strawberry-django
strawberry-django copied to clipboard
[Draft] Enable psycopg v3 tests
Description
Merge the following first:
- https://github.com/strawberry-graphql/strawberry-django/pull/683
- https://github.com/strawberry-graphql/strawberry-django/pull/684
P.s. Not sure if putting like 50 test scenarios is a good idea though 😅
Also I was thinking -- are we even using postgres in tests? 🤔
Types of Changes
- [ ] Core
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement/optimization
- [ ] Documentation
Checklist
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the CONTRIBUTING document.
- [ ] I have added tests to cover my changes.
- [ ] I have tested the changes and verified that they work and don't break anything (as well as I can manage).
Summary by Sourcery
Tests:
- Add tests for psycopg v3 compatibility.
Reviewer's Guide by Sourcery
This PR enables tests for psycopg v3, expands Django and Python version support, and migrates from django-mptt to django-tree-queries.
Class diagram showing tree structure migration
classDiagram
note for TreeNode "Replaces MPTT implementation"
class TreeNode {
+parent: TreeNode
+children: List[TreeNode]
+depth: int
+path: str
}
TreeNode --> TreeNode: parent
note for ArrayField "Now supports both psycopg2 and psycopg3"
class ArrayField {
+base_field
+size: Optional[int]
+default: Any
}
File-Level Changes
| Change | Details | Files |
|---|---|---|
| Enable psycopg v3 tests |
|
.github/workflows/tests.yml |
| Expand Django and Python version support |
|
.github/workflows/tests.yml |
| Migrate from django-mptt to django-tree-queries |
|
pyproject.tomltests/relay/mptt/test_nested_children.pytests/relay/treenode/test_nested_children.pytests/relay/mptt/models.pytests/relay/treenode/models.pytests/relay/mptt/test_lazy_annotations.pytests/relay/treenode/test_lazy_annotations.pytests/relay/treenode/b.pytests/relay/treenode/a.pytests/relay/mptt/a.pytests/relay/mptt/b.py |
Tips and commands
Interacting with Sourcery
- Trigger a new review: Comment
@sourcery-ai reviewon the pull request. - Continue discussions: Reply directly to Sourcery's review comments.
- Generate a GitHub issue from a review comment: Ask Sourcery to create an issue from a review comment by replying to it.
- Generate a pull request title: Write
@sourcery-aianywhere in the pull request title to generate a title at any time. - Generate a pull request summary: Write
@sourcery-ai summaryanywhere in the pull request body to generate a PR summary at any time. You can also use this command to specify where the summary should be inserted.
Customizing Your Experience
Access your dashboard to:
- Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others.
- Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.
Getting Help
- Contact our support team for questions or feedback.
- Visit our documentation for detailed guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 89.17%. Comparing base (
48b54fd) to head (d13d70c).
Additional details and impacted files
@@ Coverage Diff @@
## main #685 +/- ##
=======================================
Coverage 89.17% 89.17%
=======================================
Files 41 41
Lines 3778 3778
=======================================
Hits 3369 3369
Misses 409 409
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@kwongtn now you can rebase this 😊
@kwongtn are you still going to work on this?