fix: opinionated setup and clean fn fix#240
Merged
pauldambra merged 15 commits intomasterfrom Jun 5, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
PR Summary
Added opinionated development setup instructions to the README.md, introducing uv as the recommended installation method with specific version pinning (Python 3.9.19).
- Added prescriptive setup block in README.md with explicit version requirements while maintaining existing flexible setup options
- Introduced
uvas preferred package manager for more reliable dependency management - Aligned setup instructions with minimum Python version requirement (3.9+) from setup.py
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
Member
Author
pauldambra
commented
Jun 5, 2025
Member
Author
There was a problem hiding this comment.
might want to go commit by commit
i tidied this up as well as fixing some assertions
pauldambra
commented
Jun 5, 2025
Comment on lines
+128
to
+137
| def test_clean_pydantic_like_class(self) -> None: | ||
| class Dummy: | ||
| def model_dump(self, required_param): | ||
| pass | ||
| def model_dump(self, required_param: str) -> dict: | ||
| return {} | ||
|
|
||
| # Skips a class with a defined non-Pydantic `model_dump` method. | ||
| self.assertEqual(utils.clean({"test": Dummy()}), {}) | ||
| # previously python 2 code would cause an error while cleaning, | ||
| # and this entire object would be None, and we would log an error | ||
| # let's allow ourselves to clean `Dummy` as None, | ||
| # without blatting the `test` key | ||
| assert utils.clean({"test": Dummy()}) == {"test": None} |
Member
Author
There was a problem hiding this comment.
this test was hiding that the behaviour was determined by throwing an exception in an exception handler
and then swallowing that exception
pauldambra
commented
Jun 5, 2025
Comment on lines
+127
to
130
| except Exception as exception: | ||
| item = ":".join(map(str, exception.args)) | ||
| log.warning("Error decoding: %s", item) | ||
| return None |
Member
Author
There was a problem hiding this comment.
not super convinced this logging behaviour is correct, but considering it was always throwing before now, it can't be too bad
oliverb123
approved these changes
Jun 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

copyable setup block in readme so i don't have to figure it out again in future
we also had some python 3 unsafe code that we're luckily only calling in a safe way right now that mypy was incidentally warning us about. should do a patch release with this change