-
Notifications
You must be signed in to change notification settings - Fork 52
Add architecture diagram workflow and documentation #1248
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
WalkthroughIntroduces automated GitHub Actions workflow to render Mermaid diagrams, adds Puppeteer configuration for diagram rendering, enables autofix in pre-commit hooks, and documents the test environment architecture with a new Mermaid sequence diagram. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 1
🤖 Fix all issues with AI Agents
In @.github/workflows/diagram.yml:
- Around line 3-5: The push trigger currently watches 'docs/*.mmd' but the
render step only targets a single file; align them by either changing the
trigger to 'docs/architecture.mmd' (narrow push.paths) or update the render step
(the command that processes docs/architecture.mmd) to iterate over or glob all
docs/*.mmd so every triggered file is actually rendered; pick one approach and
update the workflow so push.paths and the render command use the same pattern.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
docs/images/architecture.svgis excluded by!**/*.svg
📒 Files selected for processing (6)
.github/workflows/diagram.yml.pre-commit-config.yamldocs/architecture.mmddocs/images/.keepdocs/puppeteer-config.jsonnewsfragments/1244.docs.rst
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (19)
- GitHub Check: postgresql_oldest / postgres (3.14)
- GitHub Check: postgresql_oldest / postgres (3.13)
- GitHub Check: postgresql_17 / postgres (pypy-3.11)
- GitHub Check: postgresql_17 / postgres (3.11)
- GitHub Check: docker_postgresql_18 / postgres (3.13)
- GitHub Check: postgresql_17 / postgres (3.13)
- GitHub Check: postgresql_oldest / postgres (pypy-3.11)
- GitHub Check: docker_postgresql_18 / postgres (3.10)
- GitHub Check: postgresql_oldest / postgres (3.12)
- GitHub Check: postgresql_oldest / postgres (3.11)
- GitHub Check: docker_postgresql_18 / postgres (3.14)
- GitHub Check: macos_postgres_18 / postgres (3.14)
- GitHub Check: postgresql_17 / postgres (3.12)
- GitHub Check: docker_postgresql_18 / postgres (3.12)
- GitHub Check: postgresql_17 / postgres (3.14)
- GitHub Check: docker_postgresql_18 / postgres (3.11)
- GitHub Check: postgresql_oldest / postgres (3.10)
- GitHub Check: macos_postgres_18 / postgres (3.13)
- GitHub Check: macos_postgres_18 / postgres (3.12)
🔇 Additional comments (6)
.pre-commit-config.yaml (1)
21-22: LGTM! Autofix improves consistency.The
--autofixargument enables automatic JSON formatting during pre-commit runs, which improves code consistency and reduces manual formatting effort.newsfragments/1244.docs.rst (1)
1-1: LGTM! Clear and concise newsfragment.The documentation fragment appropriately describes the addition of the architecture diagram.
docs/puppeteer-config.json (1)
1-6: LGTM! Standard CI configuration for Puppeteer.The
--no-sandboxand--disable-setuid-sandboxflags are standard for running Chrome/Puppeteer in containerised CI environments like GitHub Actions, where the sandbox cannot function properly.docs/architecture.mmd (1)
1-19: LGTM! Well-structured architecture diagram.The Mermaid sequence diagram clearly illustrates the pytest-postgresql test environment lifecycle, including the template database pattern, per-test cloning, and teardown procedures. The diagram provides excellent documentation for understanding the plugin's architecture.
.github/workflows/diagram.yml (2)
23-27: LGTM! Proper commit handling with skip-ci.The auto-commit configuration correctly uses
[skip ci]to prevent infinite workflow loops and specifies an appropriate file pattern for the rendered SVG outputs.
20-21: Thedocs/images/directory is already tracked in the repository with a.keepfile, ensuring it persists in version control. No additional setup step is needed.Likely an incorrect or invalid review comment.
| push: | ||
| paths: | ||
| - 'docs/*.mmd' # Trigger only when mermaid files change |
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.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check for .mmd files in docs/ directory
fd -e mmd . docs/Repository: dbfixtures/pytest-postgresql
Length of output: 93
🏁 Script executed:
#!/bin/bash
# Read the diagram.yml workflow file
cat -n .github/workflows/diagram.ymlRepository: dbfixtures/pytest-postgresql
Length of output: 1044
Align trigger pattern with rendering logic to prevent future inconsistency.
The workflow triggers on any .mmd file in docs/ (line 5), but the render command (line 21) only processes docs/architecture.mmd. While currently only one .mmd file exists, the trigger pattern is broader than the rendering logic. If additional .mmd files are added to docs/ in the future, they will trigger the workflow but won't be rendered.
Consider either:
- Updating line 21 to render all
.mmdfiles dynamically, or - Restricting the trigger pattern to only
docs/architecture.mmd
🤖 Prompt for AI Agents
In @.github/workflows/diagram.yml around lines 3 - 5, The push trigger currently
watches 'docs/*.mmd' but the render step only targets a single file; align them
by either changing the trigger to 'docs/architecture.mmd' (narrow push.paths) or
update the render step (the command that processes docs/architecture.mmd) to
iterate over or glob all docs/*.mmd so every triggered file is actually
rendered; pick one approach and update the workflow so push.paths and the render
command use the same pattern.
Chore that needs to be done:
pipenv run towncrier create [issue_number].[type].rstTypes are defined in the pyproject.toml, issue_number either from issue tracker or the Pull request number
Summary by CodeRabbit
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.