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

Moved mypy from pre-commit to GitHub Action #775

Merged
merged 5 commits into from
May 21, 2024

Conversation

HangenYuu
Copy link
Contributor

Description

Move mypy action out of .pre-commit to run on GitHub Action only due to slowness.

Related Issue

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

Copy link

codecov bot commented May 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.85%. Comparing base (8c157a2) to head (a6093e6).
Report is 209 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #775   +/-   ##
=======================================
  Coverage   80.85%   80.85%           
=======================================
  Files         162      162           
  Lines       47016    47016           
  Branches    11501    11501           
=======================================
  Hits        38014    38014           
  Misses       6751     6751           
  Partials     2251     2251           

@HangenYuu
Copy link
Contributor Author

The workflow is up and running. What I have done:

  1. Remove mypy from pre-commit file.
  2. Create a GitHub Action config file for mypy.
  3. Add dependencies for mypy to environment.yml.

Copy link
Contributor

@maresb maresb left a comment

Choose a reason for hiding this comment

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

Great work @HangenYuu! I think we can squash-merge this as-is.

Would you be willing to do a followup PR on this to get rid of the old and unstable setup-miniconda action in favor of the newer and much simpler setup-micromamba action?

I did this in pymc-devs/pymc#7213, but it didn't get merged and became stale due to some issues with the tests. You should be able to use that as a template. Basically what you need to do is:

  1. Add the shell initialization so that the Conda environment is properly activated:
defaults:
  run:
    shell: bash -leo pipefail {0}
  1. Delete the cache actions
  2. Replace setup-miniconda with the much simpler setup-micromamba and adapt the settings, which I think you could basically copy from Switch to setup-micromamba action pymc#7213 with minor adaptations.

Does this make sense, and is it something you'd be able to help with? Thanks a lot!

@HangenYuu
Copy link
Contributor Author

Hi @maresb, yes I would like to help!

@ricardoV94 ricardoV94 merged commit 863efc0 into pymc-devs:main May 21, 2024
56 checks passed
@ricardoV94
Copy link
Member

Thanks a ton @HangenYuu

@maresb
Copy link
Contributor

maresb commented May 21, 2024

Thanks again @HangenYuu!

Feel free to tackle the task I described above, and let me know if you have any questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't run mypy in pre-commit
3 participants