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 classifiers #46

Closed
FFY00 opened this issue Jan 24, 2023 · 2 comments · Fixed by #164
Closed

Validate classifiers #46

FFY00 opened this issue Jan 24, 2023 · 2 comments · Fixed by #164
Labels
enhancement New feature or request

Comments

@FFY00
Copy link
Member

FFY00 commented Jan 24, 2023

No description provided.

@FFY00 FFY00 added the enhancement New feature or request label Jan 24, 2023
@henryiii
Copy link
Collaborator

henryiii commented Sep 12, 2024

I'd much rather just have some docs on how to validate with trove_classifiers. I'd prefer not to have a mandatory dependency, and don't want to vendor and have to keep updating, and if the build backend, etc. want to do this, they can decide how they want to include trove_classifiers.

@henryiii
Copy link
Collaborator

henryiii commented Sep 12, 2024

Classifier validation

You can validate the classifiers using the PyPI package trove_classifiers, which is the canonical source of trove classifier info.

import trove_classifiers

invalid_classifiers = set(metadata.classifiers) - trove_classifiers.classifiers

# Also the deprecated dict if you want it
dep_names = set(metadata.classifiers) & set(trove_classifiers.deprecated_classifiers)
deprecated_classifiers = {k: trove_classifiers.deprecated_classifiers[k] for k in dep_names)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants