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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

Xpirix
Copy link
Collaborator

@Xpirix Xpirix commented Nov 14, 2024

Fix for #475

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

@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
Co-authored-by: Julien <dev@ingeoveritas.com>
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