-
Notifications
You must be signed in to change notification settings - Fork 24
Add pre-commit dependency #58
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
Conversation
Pull Request Test Coverage Report for Build 13910690908Details
💛 - Coveralls |
This fixes the issue with the pre-commit CI trying to run isort but not knowing how.
|
@tennlee The PR is ready. Unfortunately the CI/CD fails due to |
|
I think yes, just bring isort into the mix. I did do an earlier commit bringing things into compliance at a point in time, so hopefully it won't be a large effort. |
I have added isort already in the pre-commit config :-). |
|
Sorry, I wasn't clear. I mean, yes, please fix the underlying issues by running isort and adding that to this PR so that we can merge the PR and also set the passing hurdle on CI/CD. |
|
OK, isort broke some imports so I'll try to fix that. |
|
I also suspect that, if my memory is right, some modules from PyEarthTools need to be loaded before others so that the registration mechanism kicks in... that means isort will probably have broken these too. |
|
Fixing this will also help get the codebase ready for ruff integration, which had similar issues. |
|
So, it looks like there are quite a lot of circular imports, some due to subpackages importing their parent packages importing subpackages... The sorting from isort made this more visible. For example, just looking at I believe the right way to address these is to go through each of these children modules and ensure they don't import a parent module (e.g. using I won't be able to do this now/today, so please @tennlee don't hesitate to have a look/push commits to this PR if you want to start fixing this without waiting for me. |
|
Just an update here, I have started to go through every import issue and fixing them one by one. I have made a new branch (to be merged here eventually) to explore if this is a viable solution. See https://github.com/jennan/PyEarthTools/tree/fix_imports. |
|
I closing this PR in favor of #64. Isort related cyclic import fixes will come as separate PRs. |
Fixes #53
devoptional dependency group, that could be used to put other non-test related dependencies.pip install .[all]will not install the current branch but the default branchdevelop).