Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bd893cb

Browse filesBrowse files
committed
MNT black to ruff
1 parent a88a460 commit bd893cb
Copy full SHA for bd893cb
Expand file treeCollapse file tree

20 files changed

+408
-409
lines changed

‎.github/workflows/ci.yml

Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
+21-1Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,28 @@ jobs:
1111
call-test:
1212
uses: ./.github/workflows/test.yml
1313
secrets: inherit
14+
15+
build-sdist:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: prefix-dev/setup-pixi@v0.8.8
20+
with:
21+
environments: dev
22+
cache: true
23+
- name: Re-install local
24+
run: |
25+
pixi reinstall -e dev --frozen fastcan
26+
- name: Build SDist
27+
run: |
28+
pixi run build-sdist
29+
- name: Store artifacts
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: cibw-sdist
33+
path: dist/*.tar.gz
1434

15-
build:
35+
build-wheels:
1636
strategy:
1737
fail-fast: false
1838
matrix:

‎.github/workflows/lint.yml

Copy file name to clipboardExpand all lines: .github/workflows/lint.yml
-48Lines changed: 0 additions & 48 deletions
This file was deleted.

‎.github/workflows/static.yml

Copy file name to clipboard
+32Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Static
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
static:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: prefix-dev/setup-pixi@v0.8.8
13+
with:
14+
environments: static
15+
cache: true
16+
17+
- name: Re-install local
18+
run: |
19+
pixi reinstall -e static --frozen fastcan
20+
21+
- name: Linter
22+
run: |
23+
pixi run lint
24+
- name: Lint Cython
25+
run: |
26+
pixi run cython-lint
27+
- name: Formatter
28+
run: |
29+
pixi run fmt
30+
- name: Type check
31+
run: |
32+
pixi run type

‎.github/workflows/test.yml

Copy file name to clipboardExpand all lines: .github/workflows/test.yml
+12-3Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ on:
99

1010
jobs:
1111
call-lint:
12-
uses: ./.github/workflows/lint.yml
13-
secrets: inherit
12+
uses: ./.github/workflows/static.yml
1413

1514
test:
1615
strategy:
@@ -23,7 +22,7 @@ jobs:
2322
- uses: actions/checkout@v4
2423
- uses: prefix-dev/setup-pixi@v0.8.8
2524
with:
26-
environments: default
25+
environments: dev
2726
cache: true
2827

2928
- name: Re-install local
@@ -44,3 +43,13 @@ jobs:
4443
- name: Test nogil
4544
run: |
4645
pixi run nogil-eta
46+
- name: Test coverage
47+
if: runner.os == 'Linux'
48+
shell: bash
49+
run: |
50+
FMT=xml pixi run test-coverage
51+
- name: Upload coverage reports to Codecov
52+
if: runner.os == 'Linux'
53+
uses: codecov/codecov-action@v5
54+
with:
55+
token: ${{ secrets.CODECOV_TOKEN }}

‎examples/plot_narx_msa.py

Copy file name to clipboardExpand all lines: examples/plot_narx_msa.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def auto_duffing_equation(y, t):
9393

9494
sol = odeint(duffing_equation, [0.6, -0.8], t)
9595
u_test = 2.5 * np.cos(2 * np.pi * t).reshape(-1, 1)
96-
y_test = sol[:, 0]+ e_test
96+
y_test = sol[:, 0] + e_test
9797

9898
# %%
9999
# One-step-head VS. multi-step-ahead NARX

‎examples/plot_speed.py

Copy file name to clipboardExpand all lines: examples/plot_speed.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,12 @@ def baseline(X, y, t):
178178
time_eta = np.zeros(n_features_max, dtype=float)
179179
for i in range(n_features_max):
180180
time_h[i] = timeit(
181-
f"s = FastCan({i+1}, verbose=0).fit(X, y)",
181+
f"s = FastCan({i + 1}, verbose=0).fit(X, y)",
182182
number=10,
183183
globals=globals(),
184184
)
185185
time_eta[i] = timeit(
186-
f"s = FastCan({i+1}, eta=True, verbose=0).fit(X, y)",
186+
f"s = FastCan({i + 1}, eta=True, verbose=0).fit(X, y)",
187187
number=10,
188188
globals=globals(),
189189
)

‎fastcan/__init__.py

Copy file name to clipboardExpand all lines: fastcan/__init__.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
__all__ = [
1515
"FastCan",
16-
"refine",
1716
"minibatch",
1817
"narx",
18+
"refine",
1919
"utils",
2020
]

‎fastcan/_fastcan.py

Copy file name to clipboardExpand all lines: fastcan/_fastcan.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from sklearn.utils._param_validation import Interval
1818
from sklearn.utils.validation import check_is_fitted, validate_data
1919

20-
from ._cancorr_fast import _forward_search # type: ignore
20+
from ._cancorr_fast import _forward_search # type: ignore[attr-defined]
2121

2222

2323
class FastCan(SelectorMixin, BaseEstimator):

‎fastcan/_minibatch.py

Copy file name to clipboardExpand all lines: fastcan/_minibatch.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from sklearn.utils._param_validation import Interval, validate_params
1414
from sklearn.utils.validation import check_X_y
1515

16-
from ._cancorr_fast import _forward_search # type: ignore
16+
from ._cancorr_fast import _forward_search # type: ignore[attr-defined]
1717
from ._fastcan import _prepare_search
1818

1919

‎fastcan/_refine.py

Copy file name to clipboardExpand all lines: fastcan/_refine.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from sklearn.utils._param_validation import Interval, StrOptions, validate_params
1414
from sklearn.utils.validation import check_is_fitted
1515

16-
from ._cancorr_fast import _forward_search # type: ignore
16+
from ._cancorr_fast import _forward_search # type: ignore[attr-defined]
1717
from ._fastcan import FastCan, _prepare_search
1818

1919

‎fastcan/narx.py

Copy file name to clipboardExpand all lines: fastcan/narx.py
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@
2525
)
2626

2727
from ._fastcan import FastCan
28-
from ._narx_fast import _predict_step, _update_cfd, _update_terms # type: ignore
28+
from ._narx_fast import ( # type: ignore[attr-defined]
29+
_predict_step,
30+
_update_cfd,
31+
_update_terms,
32+
)
2933
from ._refine import refine
3034
from .utils import mask_missing_values
3135

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.