-
Couldn't load subscription status.
- Fork 1
Feat/setup workflow #2
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
Reviewer's GuideThis PR establishes a robust developer workflow by overhauling build scripts, integrating CI and version bumping, updating dependencies, refreshing documentation, and normalizing config file formatting. Entity relationship diagram for version bumping configurationerDiagram
BUMPVERSION_CONFIG {
current_version string
parse string
serialize string
search string
replace string
tag boolean
tag_name string
tag_message string
commit boolean
message string
}
PYPROJECT_TOML {
version string
}
BUMPVERSION_CONFIG ||--|{ PYPROJECT_TOML : updates
BUMPVERSION_CONFIG ||--|{ GIT_TAG : creates
GIT_TAG {
tag_name string
tag_message string
}
Class diagram for Makefile targets and their relationshipsclassDiagram
class Makefile {
+install()
+lint-fix()
+test()
+pre-commit()
+bump-patch()
+bump-minor()
+bump-major()
+clean()
}
Makefile : install() uses "uv sync --all-groups"
Makefile : install() uses "uv run pre-commit install"
Makefile : lint-fix() uses "pyupgrade, autoflake, isort, black, mypy"
Makefile : test() uses "pytest"
Makefile : pre-commit() uses "pre-commit run --all-files"
Makefile : bump-patch() uses "bump-my-version bump patch"
Makefile : bump-minor() uses "bump-my-version bump minor"
Makefile : bump-major() uses "bump-my-version bump major"
Makefile : clean() removes "__pycache__, *.egg-info, .pytest_cache, .mypy_cache"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey there - I've reviewed your changes - here's some feedback:
Blocking issues:
- An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. (link)
General comments:
- There are nearly identical installation and workflow instructions duplicated in README.md and resources/configs/default/README.md—consider centralizing these snippets or referencing a single source to reduce drift.
- The repo now uses both bump-my-version Make targets and a bumpversion config file, which could lead to inconsistent version bumps—standardize on one tool for clarity and maintenance.
- Your CI job runs lint-fix and tests but doesn’t validate the new .pre-commit-config.yaml—consider adding a
make pre-commitorpre-commit run --all-filesstep in CI to ensure hooks pass.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- There are nearly identical installation and workflow instructions duplicated in README.md and resources/configs/default/README.md—consider centralizing these snippets or referencing a single source to reduce drift.
- The repo now uses both bump-my-version Make targets and a bumpversion config file, which could lead to inconsistent version bumps—standardize on one tool for clarity and maintenance.
- Your CI job runs lint-fix and tests but doesn’t validate the new .pre-commit-config.yaml—consider adding a `make pre-commit` or `pre-commit run --all-files` step in CI to ensure hooks pass.
## Individual Comments
### Comment 1
<location> `.github/workflows/ci.yml:23` </location>
<code_context>
uses: astral-sh/setup-uv@v5
</code_context>
<issue_to_address>
**security (yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha):** An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.
*Source: opengrep*
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
edd30aa to
cd303e2
Compare
Summary by Sourcery
Set up a unified development workflow with Makefile targets, CI, and versioning tools
Enhancements:
Build:
Documentation: