-
Couldn't load subscription status.
- Fork 6
Infrahub repostory init #467
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
Deploying infrahub-sdk-python with
|
| Latest commit: |
866ab0a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b74b4c98.infrahub-sdk-python.pages.dev |
| Branch Preview URL: | https://atg-20250711-cs60.infrahub-sdk-python.pages.dev |
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## develop #467 +/- ##
===========================================
- Coverage 75.58% 75.56% -0.03%
===========================================
Files 100 100
Lines 8769 8790 +21
Branches 1712 1716 +4
===========================================
+ Hits 6628 6642 +14
- Misses 1663 1669 +6
- Partials 478 479 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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.
Pull Request Overview
Adds a new repository init command to infrahubctl, including supporting dependencies, tests, documentation, and a changelog entry.
- Introduce
copieras an optional dependency and update poetry extras. - Implement
infrahubctl repository initusingcopier.run_copy. - Add unit tests and documentation for the new
initcommand, plus a changelog entry.
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/ctl/test_repository_app.py | Add tests for repository init and local-template initialization |
| pyproject.toml | Add copier dependency and update ctl/all extras |
| infrahub_sdk/ctl/repository.py | Implement the async init subcommand with copier.run_copy |
| docs/docs/infrahubctl/infrahubctl-repository.mdx | Document the new init command |
| changelog/466.added.md | Changelog entry for adding the init command |
Comments suppressed due to low confidence (1)
tests/unit/ctl/test_repository_app.py:353
- Missing assertion for exit code in test_repo_init; consider adding
assert result.exit_code == 0to verify the command succeeded.
runner.invoke(app, ["repository", "init", str(dst), "--data", str(yaml_path), "--vcs-ref", commit])
Add init command Add testing changelog Add docs Add copier to all extras update lock file update lock file update lock file update lock file
75d41a3 to
c07b5d4
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.
Just ran the command, everything works perfectly. Nice job! 👍
Few details:
- Some could argue that if you have generator/transform you'll have by consequence queries. Don't know if we want to override the query flag based on generator/transform one.
- In my opinion, this should be the default way for a developer to kick the tires. Then it should be included in the infrahub getting started doc https://docs.infrahub.app/getting-started/next-steps.
|
@BaptisteGi Templates fixed queries will now be included by default if generators or transforms are used. |
No description provided.