Skip to content

Commit 542a80a

Browse files
Add boilercore dependency and xfail the flux test
1 parent 5081fe8 commit 542a80a

File tree

7 files changed

+21
-225
lines changed

7 files changed

+21
-225
lines changed

.tools/requirements/requirements.txt

+2
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ simple-pid==2.0.0
1717
# ! Unpin numba once it supports numpy>=1.25
1818
numba==0.57.1
1919
numpy==1.24.4
20+
# ! boilercore specified differently in dev and CI to allow editable package in dev
21+
# boilercore==...

.tools/requirements/requirements_ci.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# * -------------------------------------------------------------------------------- * #
22
# * Changes below should persist in significant template updates.
33

4-
boilerdata==0.0.1
4+
boilercore@git+https://github.com/blakeNaccarato/boilercore@8229c65f8e31aa22fe3316cd07a394c036d2dcc9
55

66
# * -------------------------------------------------------------------------------- * #
77
# * Changes below may be lost in significant template updates.

.tools/requirements/requirements_dev.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# * -------------------------------------------------------------------------------- * #
22
# * Changes below should persist in significant template updates.
33

4-
-e ../boilerdata
4+
-e ../boilercore
55

66
# * -------------------------------------------------------------------------------- * #
77
# * Changes below may be lost in significant template updates.

.vscode/tasks.json

-204
Original file line numberDiff line numberDiff line change
@@ -21,210 +21,6 @@
2121
"tasks": [
2222
// * -------------------------------------------------------------------------- * //
2323
// * Changes below should persist in significant template updates.
24-
{
25-
"label": "proj: hide notebook inputs",
26-
"type": "shell",
27-
"options": { "shell": { "executable": "pwsh", "args": ["-Command"] } },
28-
"command": "python -m boilercv.docs",
29-
"icon": { "id": "graph" },
30-
"problemMatcher": []
31-
},
32-
{
33-
"label": "proj: Run file PREVIEW/WRITE",
34-
"type": "shell",
35-
"options": {
36-
"shell": { "executable": "pwsh", "args": ["-Command"] },
37-
"env": {
38-
"BOILERCV_PREVIEW": "True",
39-
"BOILERCV_WRITE": "True"
40-
}
41-
},
42-
"command": "python ${file}",
43-
"icon": { "id": "repo" },
44-
"problemMatcher": []
45-
},
46-
{
47-
"label": "proj: Run file DEBUG/PREVIEW/WRITE",
48-
"type": "shell",
49-
"options": {
50-
"shell": { "executable": "pwsh", "args": ["-Command"] },
51-
"env": {
52-
"BOILERCV_DEBUG": "True",
53-
"BOILERCV_PREVIEW": "True",
54-
"BOILERCV_WRITE": "True"
55-
}
56-
},
57-
"command": "python ${file}",
58-
"icon": { "id": "repo" },
59-
"problemMatcher": []
60-
},
61-
{
62-
"label": "proj: Run file PREVIEW",
63-
"type": "shell",
64-
"options": {
65-
"shell": { "executable": "pwsh", "args": ["-Command"] },
66-
"env": { "BOILERCV_PREVIEW": "True" }
67-
},
68-
"command": "python ${file}",
69-
"icon": { "id": "repo" },
70-
"problemMatcher": []
71-
},
72-
{
73-
"label": "proj: Run file WRITE",
74-
"type": "shell",
75-
"options": {
76-
"shell": { "executable": "pwsh", "args": ["-Command"] },
77-
"env": { "BOILERCV_WRITE": "True" }
78-
},
79-
"command": "python ${file}",
80-
"icon": { "id": "repo" },
81-
"problemMatcher": []
82-
},
83-
{
84-
"label": "proj: preview",
85-
"type": "shell",
86-
"options": {
87-
"shell": { "executable": "pwsh", "args": ["-Command"] },
88-
"env": { "BOILERCV_PREVIEW": "True" }
89-
},
90-
"command": "python -m boilercv.previews.${input:preview}",
91-
"icon": { "id": "graph" },
92-
"problemMatcher": []
93-
},
94-
{
95-
"label": "dvc: repro build docs",
96-
"dependsOrder": "sequence",
97-
"dependsOn": ["dvc: pre-repro"],
98-
"type": "shell",
99-
"options": { "shell": { "executable": "pwsh", "args": ["-Command"] } },
100-
"command": "dvc repro build_docs",
101-
"icon": { "id": "graph" },
102-
"problemMatcher": []
103-
},
104-
{
105-
"label": "dvc: repro force downstream (debug)",
106-
"dependsOrder": "sequence",
107-
"dependsOn": ["dvc: pre-repro"],
108-
"type": "shell",
109-
"options": {
110-
"shell": { "executable": "pwsh", "args": ["-Command"] },
111-
"env": { "BOILERCV_DEBUG": "True" }
112-
},
113-
"command": "dvc repro --force --downstream ${input:stage}",
114-
"icon": { "id": "graph" },
115-
"problemMatcher": []
116-
},
117-
{
118-
"label": "dvc: repro (debug)",
119-
"dependsOrder": "sequence",
120-
"dependsOn": ["dvc: pre-repro"],
121-
"type": "shell",
122-
"options": {
123-
"shell": { "executable": "pwsh", "args": ["-Command"] },
124-
"env": { "BOILERCV_DEBUG": "True" }
125-
},
126-
"command": "dvc repro ${input:stage}",
127-
"icon": { "id": "graph" },
128-
"problemMatcher": []
129-
},
130-
{
131-
"label": "dvc: repro force downstream",
132-
"dependsOrder": "sequence",
133-
"dependsOn": ["dvc: pre-repro"],
134-
"type": "shell",
135-
"options": { "shell": { "executable": "pwsh", "args": ["-Command"] } },
136-
"command": "dvc repro --force --downstream ${input:stage}",
137-
"icon": { "id": "graph" },
138-
"problemMatcher": []
139-
},
140-
{
141-
"label": "dvc: repro",
142-
"dependsOrder": "sequence",
143-
"dependsOn": ["dvc: pre-repro"],
144-
"type": "shell",
145-
"options": { "shell": { "executable": "pwsh", "args": ["-Command"] } },
146-
"command": "dvc repro ${input:stage}",
147-
"icon": { "id": "graph" },
148-
"problemMatcher": []
149-
},
150-
{
151-
"label": "dvc: repro force all",
152-
"dependsOrder": "sequence",
153-
"dependsOn": [
154-
"setup: Update project",
155-
"dvc: pre-repro",
156-
"dvc: freeze",
157-
"git: Stage all files",
158-
"pre-commit",
159-
"git: Stage all files"
160-
],
161-
"type": "shell",
162-
"options": { "shell": { "executable": "pwsh", "args": ["-Command"] } },
163-
"command": "dvc repro --force",
164-
"icon": { "id": "graph" },
165-
"problemMatcher": []
166-
},
167-
{
168-
"label": "dvc: repro all",
169-
"dependsOrder": "sequence",
170-
"dependsOn": [
171-
"setup: Update project",
172-
"dvc: pre-repro",
173-
"dvc: freeze",
174-
"git: Stage all files",
175-
"pre-commit",
176-
"git: Stage all files"
177-
],
178-
"type": "shell",
179-
"options": { "shell": { "executable": "pwsh", "args": ["-Command"] } },
180-
"command": "dvc repro",
181-
"icon": { "id": "graph" },
182-
"problemMatcher": []
183-
},
184-
{
185-
"label": "dvc: dag",
186-
"dependsOrder": "sequence",
187-
"dependsOn": ["dvc: pre-repro"],
188-
"type": "shell",
189-
"options": { "shell": { "executable": "pwsh", "args": ["-Command"] } },
190-
"command": "(dvc dag --md) -Replace 'mermaid', '{mermaid}' > docs/dag.md && . '~/.local/nodeenvs/markdownlint/Scripts/Activate.ps1' && markdownlint --fix docs/dag.md",
191-
"icon": { "id": "graph" },
192-
"problemMatcher": []
193-
},
194-
{
195-
"label": "dvc: pre-repro",
196-
"type": "shell",
197-
"options": { "shell": { "executable": "pwsh", "args": ["-Command"] } },
198-
"command": "python -m boilercv.pre_repro",
199-
"icon": { "id": "graph" },
200-
"problemMatcher": []
201-
},
202-
{
203-
"label": "dvc: freeze",
204-
"type": "shell",
205-
"options": { "shell": { "executable": "pwsh", "args": ["-Command"] } },
206-
"command": "pip freeze --requirement .tools/requirements/requirements.txt --local --exclude-editable > repro.txt",
207-
"icon": { "id": "graph" },
208-
"problemMatcher": []
209-
},
210-
// * -------------------------------------------------------------------------- * //
211-
// * WSL-SPECIFIC * //
212-
{
213-
"label": "wsl: Copy PID of Python Debugger",
214-
"type": "shell",
215-
"command": "ps aux | grep python | grep --max-count 1 -- --adapter-access-token | grep --only-matching --perl-regexp 'user\\s+\\d+' | grep --only-matching --perl-regexp '\\d+' | clip.exe",
216-
"group": {
217-
"kind": "test",
218-
"isDefault": true
219-
},
220-
"presentation": {
221-
"close": false,
222-
"focus": true,
223-
"reveal": "always"
224-
},
225-
"icon": { "id": "terminal-linux" },
226-
"problemMatcher": []
227-
},
22824

22925
// * -------------------------------------------------------------------------- * //
23026
// * Changes below may be lost in significant template updates.

pyproject.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ license = { file = "LICENSE" }
1717
requires-python = ">=3.11"
1818
classifiers = ["License :: OSI Approved :: MIT License"]
1919
dependencies = [
20-
"boilerdata>=0.0.1",
20+
"boilercore>=0.0.0",
2121
"dulwich>=0.21.5",
2222
"dvc[gs]>=3.10.1",
2323
"ipykernel>=6.25.0",
@@ -50,14 +50,14 @@ Tracker = "https://github.com/blakeNaccarato/boilerdaq/issues"
5050
[tool.fawltydeps]
5151
# ignore_undeclared = ["pytest"]
5252
ignore_unused = [
53-
"boilerdata", # Fawltydeps struggles here
53+
"boilercore", # Not picked up by fawltydeps
5454
"dvc", # For experiment orchestration
5555
"numba", # Pin numba until it supports numpy>=1.25
5656
"numpy", # Pin numpy until numba supports numpy>=1.25
5757
"pandas-stubs", # Provides stubs for pandas
5858
]
5959
ignore_undeclared = [
60-
"boilerdata", # Fawltydeps struggles here
60+
"boilercore", # Not picked up by fawltydeps
6161
"graphviz", # .tools/requirements/requirements_docs.txt
6262
"originpro", # .tools/requirements/requirements_dev.txt
6363
"pytest",

src/boilerdaq/examples/controlled/flux_control.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Use heat flux as a control parameter."""
22

3-
import boilerdata # noqa: F401
3+
import boilercore # noqa: F401
44

55
import boilerdaq as bd
66
from boilerdaq.examples import CONTROL_SENSOR_NAME, OUTPUT_LIMITS

tests/test_boilerdaq.py

+13-15
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
"""Tests."""
22

3+
34
from importlib import import_module
45
from pathlib import Path
6+
from typing import Any
57

68
import pytest
79
from PyQt5.QtCore import QTimer
@@ -11,29 +13,25 @@
1113

1214
SRC = Path("src")
1315
EXAMPLES_DIR = SRC / "boilerdaq" / "examples"
14-
EXAMPLES: list[str] = []
16+
EXAMPLES: list[Any] = []
1517
for directory in [EXAMPLES_DIR] + [
1618
path
1719
for path in EXAMPLES_DIR.iterdir()
1820
if path.is_dir() and "__" not in str(path.relative_to(SRC))
1921
]:
20-
EXAMPLES.extend(
21-
[
22-
str(example.relative_to(SRC).with_suffix("")).replace("\\", ".")
23-
for example in sorted(directory.glob("[!__]*.py"))
24-
]
25-
)
22+
for example in sorted(directory.glob("[!__]*.py")):
23+
module = str(example.relative_to(SRC).with_suffix("")).replace("\\", ".")
24+
if module in {"boilerdaq.examples.controlled.set_voltage"}:
25+
marks = [pytest.mark.skip]
26+
elif module in {"boilerdaq.examples.controlled.flux_control"}:
27+
marks = [pytest.mark.xfail]
28+
else:
29+
marks = []
30+
EXAMPLES.append(pytest.param(module, marks=marks))
2631

2732

2833
@pytest.mark.xdist_group(name="hardware")
29-
@pytest.mark.parametrize(
30-
"example",
31-
(
32-
example
33-
for example in EXAMPLES
34-
if "boilerdaq.examples.controlled.set_voltage" not in example
35-
),
36-
)
34+
@pytest.mark.parametrize("example", EXAMPLES)
3735
def test_boilerdaq(example: str):
3836
"""Test examples."""
3937
module = import_module(example)

0 commit comments

Comments
 (0)