Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MNT] Add typecheck workflow using mypy #2092

Merged
merged 6 commits into from
Sep 27, 2024
Merged

[MNT] Add typecheck workflow using mypy #2092

merged 6 commits into from
Sep 27, 2024

Conversation

MatthewMiddlehurst
Copy link
Member

@MatthewMiddlehurst MatthewMiddlehurst commented Sep 24, 2024

Closes #1856

Adds mypy as an optional workflow which can be run on PRs. The same can be run locally using mypy aeon/ after installing, as it uses the default set up currently.

I opted to avoid using pre-commit for this, as it is apparently prone to issues and should really be run on the whole repo instead of only changed files. (see https://jaredkhan.com/blog/mypy-pre-commit#step-2-creating-our-own-pre-commit-hook and python/mypy#13916)

@MatthewMiddlehurst MatthewMiddlehurst added the run typecheck test Run typecheck tests on a PR label Sep 24, 2024
@aeon-actions-bot aeon-actions-bot bot added the maintenance Continuous integration, unit testing & package distribution label Sep 24, 2024
@aeon-actions-bot
Copy link
Contributor

Thank you for contributing to aeon

I have added the following labels to this PR based on the title: [ $\color{#EC843A}{\textsf{maintenance}}$ ].

The Checks tab will show the status of our automated tests. You can click on individual test runs in the tab or "Details" in the panel below to see more information if there is a failure.

If our pre-commit code quality check fails, any trivial fixes will automatically be pushed to your PR unless it is a draft.

Don't hesitate to ask questions on the aeon Slack channel if you have any.

PR CI actions

These checkboxes will add labels to enable/disable CI functionality for this PR. This may not take effect immediately, and a new commit may be required to run the new configuration.

  • Run pre-commit checks for all files
  • Run all pytest tests and configurations
  • Run all notebook example tests
  • Run numba-disabled codecov tests
  • Stop automatic pre-commit fixes (always disabled for drafts)
  • Push an empty commit to re-run CI checks

@MatthewMiddlehurst MatthewMiddlehurst removed the run typecheck test Run typecheck tests on a PR label Sep 25, 2024
@MatthewMiddlehurst MatthewMiddlehurst marked this pull request as ready for review September 25, 2024 19:02
Copy link
Member

@baraline baraline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't know about the tool but itdm definitly looks like the right one for the job. Test errors seems to be due to the hpy5 issue, so LGTM!

@TonyBagnall TonyBagnall merged commit bd5f7e0 into main Sep 27, 2024
15 checks passed
@TonyBagnall TonyBagnall deleted the mm/type-hints branch September 27, 2024 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Continuous integration, unit testing & package distribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MNT] Add pre-commit hook for mypy
3 participants