-
-
Notifications
You must be signed in to change notification settings - Fork 216
Install schemas from a gaphor subcommand #3039
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
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.
PR Type: Enhancement
PR Summary: This pull request introduces a new feature that allows users to install the GSettings schema for Gaphor via a new subcommand gaphor install-schemas
. This addresses the issue where users who install Gaphor from PyPI cannot install the GSettings schema, as the previous instructions were only applicable to users who checked out the code from GitHub.
Decision: Comment
📝 Type: 'Enhancement' - not supported yet.
- Sourcery currently only approves 'Typo fix' PRs.
✅ Issue addressed: this change correctly addresses the issue or implements the desired feature.
No details provided.
📝 Complexity: the changes are too large or complex for Sourcery to approve.
- Unsupported files: the diff contains files that Sourcery does not currently support during reviews.
General suggestions:
- Consider implementing a more robust check for the 'install-schemas' argument in sys.argv to avoid potential unexpected behavior if additional arguments contain this substring.
- Verify that the change in the warning message's quotation marks from single quotes to backticks is consistent with the application's documentation and other messages.
- It may be beneficial to include a Python snippet in the docstring that demonstrates how to use the install_schemas_command programmatically, in addition to the provided shell commands.
- Ensure that the default schema directory is suitable for all supported operating systems and installation methods, and that it aligns with user expectations for both system-wide and user-local installations.
Thanks for using Sourcery. We offer it for free for open source projects and would be very grateful if you could help us grow. If you like it, would you consider sharing Sourcery on your favourite social media? ✨
"Settings schema not found and settings won't be saved, run `poe install-schemas`" | ||
) | ||
# Workaround: do not show this message if we're installing schemas | ||
if "install-schemas" not in sys.argv: |
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.
suggestion (llm): The check for 'install-schemas' in sys.argv could lead to unexpected behavior if additional arguments contain this substring. Consider a more robust way to detect the installation context.
) | ||
# Workaround: do not show this message if we're installing schemas | ||
if "install-schemas" not in sys.argv: | ||
logger.warning( |
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.
nitpick (llm): The warning message has been updated to use a backtick instead of single quotes around the command. Ensure this change is consistent with documentation and other messages in the application.
@@ -0,0 +1,46 @@ | |||
""" |
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.
suggestion (llm): The docstring provides shell commands for manual installation. It would be helpful to include a Python snippet as well, showing how to use the install_schemas_command programmatically.
Now it's only possible to install via Gaphor.
1d5ff76
to
008285f
Compare
Wow, Sourcery got chatty! |
175a89c
to
8b42bca
Compare
8b42bca
to
1003cbf
Compare
1003cbf
to
a28461e
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.
This looks great @amolenaar!
PR Type
What kind of change does this PR introduce?
What is the current behavior?
If you install Gaphor from PyPI, it's not possible to install the GSettings schema.
Gaphor tells you to run
poe install-schemas
, but that only works if you checked out the code from GitHub.Issue Number: N/A
What is the new behavior?
Install the GSettings schema with
gaphor install-schemas
.Does this PR introduce a breaking change?
Other information