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

[products] Show Identifiers in product pages #5356

Merged
merged 2 commits into from
Jul 20, 2024

Conversation

captn3m0
Copy link
Member

@captn3m0 captn3m0 commented Jun 26, 2024

Currently, we don't expose identifiers beyond storing them in the front-matter. This will start exposing the identifiers on the website as a start.

Simple version to start with, based on https://github.com/package-url/packageurl-python/blob/main/src/packageurl/contrib/purl2url.py, with a few more types, and no support for "versions", since identifiers won't have that.

@captn3m0 captn3m0 added the enhancement New feature or request label Jun 26, 2024
@captn3m0 captn3m0 self-assigned this Jun 26, 2024
@captn3m0 captn3m0 force-pushed the show-product-identifiers branch from 0cf74e7 to 5828d83 Compare June 26, 2024 06:02
@captn3m0
Copy link
Member Author

Working on generating links, converting to draft.

@captn3m0 captn3m0 marked this pull request as draft June 26, 2024 07:58
@captn3m0 captn3m0 requested a review from marcwrobel June 26, 2024 10:45
@captn3m0 captn3m0 marked this pull request as ready for review June 26, 2024 10:45
marcwrobel added a commit that referenced this pull request Jul 6, 2024
Based on modifications done in #5356.
marcwrobel added a commit that referenced this pull request Jul 6, 2024
Looks like it was wrong, see #5356.
marcwrobel added a commit that referenced this pull request Jul 6, 2024
Looks like it was wrong, see #5356.
marcwrobel added a commit that referenced this pull request Jul 6, 2024
Looks like it was wrong, see #5356.
marcwrobel added a commit that referenced this pull request Jul 6, 2024
Based on modifications done in #5356.
marcwrobel added a commit that referenced this pull request Jul 6, 2024
Looks like it was wrong, see #5356.
marcwrobel added a commit that referenced this pull request Jul 6, 2024
Looks like it was wrong, see #5356.
marcwrobel added a commit that referenced this pull request Jul 6, 2024
Looks like it was wrong, see #5356.
@captn3m0
Copy link
Member Author

captn3m0 commented Jul 6, 2024

I'll drop the PURL fix commits and rebase this.

A PURL validator will be nice to have.

@marcwrobel
Copy link
Member

I'll drop the PURL fix commits and rebase this.

@captn3m0, don't mind I am doing it right now.

@marcwrobel marcwrobel force-pushed the show-product-identifiers branch 2 times, most recently from 4d0b3ba to 64d66eb Compare July 6, 2024 16:18
Copy link
Member

@marcwrobel marcwrobel left a comment

Choose a reason for hiding this comment

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

Overall LGTM.

Before merging I will:

  • add a validator to validate all identifiers
  • see if I should exclude the validation of those generated URLs from product-data-validator
  • see if I can improve the rendering (having a " Show Product Identifiers" at the bottom seems a bit strange).

@flo7000
Copy link
Contributor

flo7000 commented Jul 15, 2024

@marcwrobel you're removing the wrong PURLs (and adding the right ones) and not working on any repology/CPE identifiers, right? not that I do something that you already did, but isn't in the master at the moment 😆

my edits: #5352 #5459

Simple version to start with.
We can look at a PURL->URL generator later
@marcwrobel
Copy link
Member

@marcwrobel you're removing the wrong PURLs (and adding the right ones) and not working on any repology/CPE identifiers, right? not that I do something that you already did, but isn't in the master at the moment 😆

Yes, that's right. Credit goes to @captn3m0 though ;)

@marcwrobel marcwrobel force-pushed the show-product-identifiers branch from 953dcbe to 9ed4720 Compare July 20, 2024 14:09
- add validation for identifiers in product-data-validator.rb (makes errors easier to read)
- simplify and generify identifiers.html (render all identifiers the same way)
- make purl-to-url generate URLs for all identifier types (rename to identifier-to-url)
- make identifier-to-url more strict for unknown identifier types or variants
- revert sass-embedded version to avoid lots of build warnings
@marcwrobel marcwrobel force-pushed the show-product-identifiers branch from 9ed4720 to b81ff94 Compare July 20, 2024 14:12
@marcwrobel
Copy link
Member

marcwrobel commented Jul 20, 2024

@captn3m0 I improved the PR:

  • add validation for identifiers in product-data-validator.rb (makes errors easier to read)
  • simplify and generify identifiers.html (render all identifiers the same way)
  • make purl-to-url generate URLs for all identifier types (rename to identifier-to-url)
  • make purl-to-url more strict for unknown identifier types or variants
  • revert sass-embedded version to avoid lots of build warnings

I don't know how to improve the rendering (having a " Show Product Identifiers" at the bottom seems a bit strange), so left it like this.

@marcwrobel
Copy link
Member

Merging, will see tomorrow how many broken links this generates.

@marcwrobel marcwrobel merged commit e5dc147 into master Jul 20, 2024
5 checks passed
@marcwrobel marcwrobel deleted the show-product-identifiers branch July 20, 2024 15:05
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 this pull request may close these issues.

3 participants