Skip to content

Conversation

eeshs
Copy link

@eeshs eeshs commented Sep 19, 2025

Extended existing label map coverage and added URL map to match PyPI heuristics.

@eeshs eeshs requested a review from a team as a code owner September 19, 2025 01:23
… url map to reflect PyPI heuristics

Signed-off-by: Eesh Sahay <eesh.sahay@ufl.edu>
@eeshs eeshs force-pushed the feature/url-map-heuristics branch from c50992f to 284c023 Compare September 19, 2025 01:34
@jkowalleck
Copy link
Member

where do these additions come from? are there any docs for this?

'donation': ExternalReferenceType.SOCIAL,
'donate': ExternalReferenceType.SOCIAL
}
URL_MAP = {
Copy link
Member

@jkowalleck jkowalleck Sep 19, 2025

Choose a reason for hiding this comment

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

unused symbol?
what is it for?

@eeshs
Copy link
Author

eeshs commented Sep 19, 2025

where do these additions come from? are there any docs for this?

This is in reference to issue #800 "extend project URLs -> external references", I made the additions according to the specified domains in this document that was provided under the issue here: https://docs.pypi.org/project_metadata/#icons. It was my understanding that the code needed to be updated to be able to match the specified URL labels and URLs found in the doc to their proper external reference types. Please let me know if I am misunderstanding what needs to be done.

@jkowalleck jkowalleck marked this pull request as draft September 22, 2025 08:27
@jkowalleck
Copy link
Member

could you add tests for that new implementation?
test beds for the various types are here: https://github.com/CycloneDX/cyclonedx-python/tree/main/tests/_data/infiles

'repository': ExternalReferenceType.VCS,
'github': ExternalReferenceType.VCS,
'chat': ExternalReferenceType.CHAT,
'sponsor': ExternalReferenceType.SOCIAL,
Copy link
Member

Choose a reason for hiding this comment

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

"sponsor","donation", "donate" - this is an undesired category mapping to "social".
thats not what social is for. see https://cyclonedx.org/docs/1.6/json/#externalReferences_items_type

'changelog': ExternalReferenceType.RELEASE_NOTES,
'changes': ExternalReferenceType.RELEASE_NOTES,
'releasenotes': ExternalReferenceType.RELEASE_NOTES,
'news': ExternalReferenceType.RELEASE_NOTES,
Copy link
Member

Choose a reason for hiding this comment

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

"news","whatsnew" can be anything, not only release notes - i think this is undesired

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