-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix pre-commit mypy and standardizing environment setup #120
Conversation
…ure consistent environment setup,, make commands working locally
…ere yet) and add potential outline for CONTRIBUTING.md
Thanks for setting all of this up! |
Does anyone else get this error when running ruff: warning: The isort option I can fix this by adding this to pyproject.toml: [tool.ruff.lint.isort] Just wasn't sure if I'm the only one seeing this error. |
After running pre-commit, I get a lot of files changed because of the end-of-file-fixer. Should we add those file changes to this PR? |
… dependencies types-PyYAML; include .env vars in Makefile
We can definitely remove the |
@kels271828 Added in the
as you suggested. I was also getting that warning. Also fixed some of the docs syntax, added |
Maybe it's just an issue with viewing on GitHub; I was just viewing it in the browser not actually building the documentation with sphinx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @blsmxiu47 ! Run through with no issue :)
…king with pytest, mypy, and ruff
Description
@zhengp0 mentioned issues with local environment setup (I think conflicting
conda
envs iirc) and difficulty pointing to the correctmypy
executable while developing. I also noticed thatmypy
would need to be run manually (which is not bad practice, but still) prior to commit in order to catch typing issues early, rather than it automatically.So,
.pre-commit-config.yaml
to ensure it always runs for all python files insrc/
andtests/
(files updated within the commit in question, that is) to enable automatic pre-commit type checking.Makefile
that provides some environment setup-related targets that may be useful in order to ensure the local dev environment is set up correctly. As a part of this PR I removed my previous conda environment and tested setting up in this manner (i.e.make setup ENV_TYPE=conda
, thenconda activate onemod
) and can confirm that mymypy
,pytest
, etc. executables all point to the expected locations within the new ("onemod"
) conda environment so please do let me know if this approach still does not work for you using this branch.Changes made
.pre-commit-config.yaml
Makefile
with (optional but maybe useful) environment setup targetsMakefile
additions, though have not yet approached the task of rewriting all dev docs for the redesignCONTRIBUTING.md
skeleton for discussion. Would want to discuss contribution guidelines together though before filling in. May not be highest priority atm.