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

Validate plugin version numbers #112

Open
ewels opened this issue Jan 22, 2025 · 1 comment
Open

Validate plugin version numbers #112

ewels opened this issue Jan 22, 2025 · 1 comment

Comments

@ewels
Copy link
Member

ewels commented Jan 22, 2025

See #110 (comment) - we should add validation of this to the JSON schema for CI.

Would this work @bentsherman ? https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string

^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$

Though maybe that's too permissive: https://regex101.com/r/RlYsCm/1

Would a simpler one ok?

^(\d+\.)?(\d+\.)?(\*|\d+)(-\w+)?$

(must be a 3-part numeric, with optional hyphen+alphanumerics at the end)

https://regex101.com/r/1fcwZM/1

@ewels ewels changed the title Validate python version numbers Validate plugin version numbers Jan 22, 2025
@tom-seqera
Copy link

For reference, the plugin framework used by Nextflow (pf4j) uses SemVer for plugin versions. Specifically, the jsemver library.

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

No branches or pull requests

2 participants