-
Notifications
You must be signed in to change notification settings - Fork 73
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
adding pyproject / isort #163
Conversation
@yetinam, do you want to integrate https://github.com/codespell-project/codespell into pre-commit? |
I think I'd skip codespell for now. For the CI failures, they seem to be related to the version parsing. I'll look into it in more detail in the next days. |
Hi! There seems to be an issue with the version inference from setuptools_scm. When installing the branch in a clean environment, the version number is 0.0.0. However, running |
With the new setup, editable installations are by default assigned version number 0.0.0. To still be able to load weights, the version 0.0.0 allows loading weights irrespective of their version requirements.
I fixed the CI failures but there is still an issue with the version inference. Try running |
Required for setuptools_scm to work correctly
It now infers |
I think the issue is that the tags were not pulled because of how the checkout action works by default. A few commits on main have tags. I added a mitigation for that but let's see what the CI says. You can try running the build command locally on your branch. It gives 0.2.2-dev... which is consistent with the last tag on main. |
looks good! |
Are all of the workarounds in c282923 necessary? |
Not so much actually... Check https://github.com/seisbench/seisbench/actions/runs/3894641535/jobs/6648911568 . The inferred version is still 0.1.dev, which is wrong because main has a 0.2.2 tag somewhere. |
I think the parts in the test are good practice because that makes the test independent of the actual seisbench version. The part for checking version requirements is debatable. But I think it's in general rather practical if for dev-version the model weight requirements are not enforced. |
The |
Yes, but it infers |
It looks like The need for "independent" maintenance branches (imo) is only needed for major versions. From semantic versioning:
|
Yep, fails as expected. There's apparently still some issue with pulling the tags because if you check in your branch history, there is a |
@yetinam ping for workflow |
Perfect, that did the job. Could you apply the same change to the build action too? Then I'll look over the PR tomorrow and can probably merge it. Regarding the branching model, I'd decouple the discussion from this PR. Maybe you can open a separate issue about it and then we can have a discussion there? |
The build process should work as is. |
Just saw the error you fixed in the CI. Well, seems I was tired at that last commit. Thanks! |
Merged the PR now. Thanks a lot for this contribution! |
requirements.txt
bumpversion
pyproject.toml
setuptools_scm
for version taggingpre-commit-config.yaml
isort
CI
lint
action