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

Fix: Add categories validator to model #106

Merged
merged 4 commits into from
Feb 25, 2024

Conversation

lwasser
Copy link
Member

@lwasser lwasser commented Feb 25, 2024

closes #105

Opening as a draft as it still needs tests but this adds a validation step to categories to ensure they are added to the final yaml file in a clean format with only dashes in between words for easier web parsing.

@lwasser lwasser marked this pull request as ready for review February 25, 2024 02:33
"""

valid_categories = {
"data-processing": "data-processing-munging",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Small tip: If you alphabetize these categories, they will be easier to scan. Also in the docstring.

Copy link
Member Author

Choose a reason for hiding this comment

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

oh - good suggestion. i can fix that before we merge. it's a small fix and you're right more readable!

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed!

@lwasser lwasser merged commit 6440acf into pyOpenSci:main Feb 25, 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.

Fix: categories need a clean / validation step
2 participants