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
Use proper type hint for griffe 0.22 compatibility #1313
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1313 +/- ##
=======================================
Coverage 90.90% 90.90%
=======================================
Files 72 72
Lines 4364 4364
=======================================
Hits 3967 3967
Misses 397 397
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
Could you cherry-pick 69b58ea into this PR so we can test that it does indeed work with the new version? Might be nice to add type hints throughout this submodule too, but not urgent
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.
I've just done the cherry-pick, will merge if it passes
Thanks, I got a merge conflict when I tried to cherry-pick it. |
Shall I add these changes to #1261 instead ? |
Nah, I think we just want to stop pinning griffe altogether, if we do that in the dependabot PR it will get confused. Not sure why the docker image test is failing on this though, will see if it works on a restart |
It seems as if the commas have been escaped twice. %2C is the escape for a comma in the url and %25 is the escape character for the % sign. No idea why this happened though. |
Just reran the same tests on the head of master, looks like the docker build is pulling in newer versions of a few packages (see this same failure: https://github.com/Materials-Consortia/optimade-python-tools/runs/8101616258?check_suite_focus=true) (we should consider pinning deps in the Docker image). I'll trigger dependabot so we can figure out which dep is causing this. |
Looks like the issue is caused by the latest pydantic (see #1314). I've just added a commit here that uses the pinned dependency versions in the Docker file. As this is built and pushed to the GitHub container registry, we were effectively doing this anyway, so the change only affects those who are building the Docker image from scratch themselves. |
d7a434c
to
be6616f
Compare
This worked, I'm going to separate it into another PR. |
be6616f
to
70e177a
Compare
Griffe 0.22.0 does not seem to handle type declarations with multiple types in the doc string. So I moved the type declaration to the definition of the function This should allow PR #1261 to be merged with the master branch.
Bumps [griffe](https://github.com/mkdocstrings/griffe) from 0.21 to 0.22.0. - [Release notes](https://github.com/mkdocstrings/griffe/releases) - [Changelog](https://github.com/mkdocstrings/griffe/blob/master/CHANGELOG.md) - [Commits](mkdocstrings/griffe@0.21.0...0.22.0) --- updated-dependencies: - dependency-name: griffe dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
70e177a
to
5196bcb
Compare
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 for this @JPBergsma, and for revealing the other bug too!
A thanks to you too @ml-evs, for figuring out that the pydantic update caused the error message we were seeing. |
Griffe 0.22.0 does not seem to handle type declarations with multiple types in the doc string. So I moved the type declaration to the definition of the function recursive_postprocessing in optimade.filtertransformers.mongo.py
This should allow PR #1261 to be merged with the master branch.