-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add Compatibility for category
and categories
in Properties Files
#45
Comments
The code already allows for existing properties files that use
The code just doesn't allow for new properties files to use category , instead forcing the use of categories .
Would you like to change this? Basically, a properties file like LazyGUI's, should it or should it not be allowed to be submitted as a new library properties file? The way the code is now, I'm loose when reading in files for updating the database, but strict when accepting new ones in submissions. For completeness, categories are required for libraries
|
I'm using Pydantic for data validation - I had manually tested for all these cases before it started getting unwieldy. |
I think writing |
It's an easy mistake, but it's a mistake that only has to be corrected once, and then it's not an issue. I see it as a consistency and simplicity thing. Why accept |
I think the fact that both recent submissions used |
Continuing the conversation with @mingness started in #42
Thanks for catching that! The properties file for LazyGUI (which is the library I picked as an example for testing my changes to the issue templates) is using
category
instead ofcategories
which caused the workflow to error out.The original script appears to have gracefully handled this by mapping
category
tocategories
when creating the contribs file.To maintain compatibility with both formats (
category
andcategories
), we should update the script to support this mapping.Regarding the case where
category
orcategories
are both missing or unpopulated, it looks like the original script setcategories
asnull
if it couldn't find it though I don't know if that was intentional (see here for example). I'd lean towards throwing an error and asking the contributor to pick at least one category.The text was updated successfully, but these errors were encountered: