Skip to content

Commit

Permalink
[MNT] mypy fixes (#295)
Browse files Browse the repository at this point in the history
* mypy

* symlink
  • Loading branch information
MatthewMiddlehurst authored Oct 9, 2024
1 parent 687bf71 commit 75dfaba
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 5 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/periodic_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,31 @@ jobs:
with:
extra_args: --all-files

typecheck:
runs-on: ubuntu-22.04

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install tsml-eval, dependencies and mypy
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: python -m pip install .[all_extras,unstable_extras,dev] mypy

- name: Show dependencies
run: python -m pip list

- name: Run mypy typecheck
run: mypy tsml_eval/

run-notebook-examples:
runs-on: ubuntu-20.04

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr_typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
python-version: "3.10"

- name: Install aeon, dependencies and mypy
- name: Install tsml-eval, dependencies and mypy
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
Expand Down
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,13 @@ per-file-ignores = [

[tool.mypy]
mypy_path = "tsml_eval/"
exclude = ["_wip"]
ignore_missing_imports = true
exclude = [
"_wip",
# Ignore the publications symlinks and its contents
"tsml_eval/publications/2023",
]


[tool.pytest.ini_options]
testpaths = "tsml_eval"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ def _plot_path(
width = height = 0.65
bottom_h = bottom + height + 0.02

rect_s_y = [left, bottom, w_ts, height]
rect_gram = [left_h, bottom, width, height]
rect_s_x = [left_h, bottom_h, width, h_ts]
rect_s_y = (left, bottom, w_ts, height)
rect_gram = (left_h, bottom, width, height)
rect_s_x = (left_h, bottom_h, width, h_ts)

ax_gram = plt.axes(rect_gram)
ax_s_x = plt.axes(rect_s_x)
Expand Down

0 comments on commit 75dfaba

Please sign in to comment.