Skip to content
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

Package name validator #486

Merged
merged 3 commits into from
Nov 21, 2024
Merged

Package name validator #486

merged 3 commits into from
Nov 21, 2024

Conversation

Xpirix
Copy link
Collaborator

@Xpirix Xpirix commented Nov 14, 2024

Fix for #475

EDIT: Transfered to qgis/QGIS-Plugins-Website#33

Changes summary

  • Update the validator for new plugin upload: raise an error if the plugin's directory (package_name) contains special characters:
    • Allowed characters: Lowercase letters (a to z), digits (0 to 9), and underscores (_).
    • First character: Must be a lowercase letter or an underscore.
    • Disallowed characters: Any special characters (e.g., -, @, #, $, etc.), uppercase letters, and whitespace.
  • Update the unit tests

Uploading a new plugin with an invalid directory name will generate the following error:

image

Suggestion

  • Ensure that the documentation (PyQGIS Cookbook) includes information about PEP8 & Python/QGIS guidelines compliance

Copy link
Contributor

@Guts Guts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

qgis-app/plugins/validator.py Outdated Show resolved Hide resolved
@Xpirix Xpirix merged commit 320e56f into qgis:master Nov 21, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants