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

records: add NUISANCE badges for records with resource files of type: ProSelecta #801

Closed
GraemeWatt opened this issue Jun 28, 2024 · 3 comments · Fixed by #808
Closed

records: add NUISANCE badges for records with resource files of type: ProSelecta #801

GraemeWatt opened this issue Jun 28, 2024 · 3 comments · Fixed by #808
Assignees

Comments

@GraemeWatt
Copy link
Member

Following the workflow already used for "HistFactory" analyses, a resource file identified by type: ProSelecta (case-insensitive) in the submission.yaml file should be identified by a badge saying "NUISANCE" that links to the relevant resource file landing page. If using hepdata_lib, pass file_type = 'ProSelecta' to the add_additional_resource function. Searches like analyses:NUISANCE or resources.type:ProSelecta should return all relevant records.

It doesn't look like any changes are needed to the hepdata-validator package, only to the main web application. I'll try to work on the implementation in the coming weeks.

Cc: @patrickstowell @luketpickering

@GraemeWatt
Copy link
Member Author

@patrickstowell @luketpickering : I had a look at the HEPData code for the HistFactory badges and this was easy to implement by changing a few lines. I tested by uploading an example to the development instance running on my laptop after adding type: ProSelecta to the submission.yaml file then finalising with INSPIRE ID 182176 (probably a mismatch, but just for testing). Some screenshots below. The "NUISANCE" badges only show up when the record is added to the OpenSearch index, which only happens when a record is finalised and not for Sandbox records. If this looks good to you, I can open a PR next week to close this issue. The only question I have is whether you agree with type: ProSelecta and a "NUISANCE" analysis badge or is it confusing that the two are different? Alternatives would be to use either "ProSelecta" or "NUISANCE" consistently for both the type and the text of the analysis badge.

Screenshot showing search results for "analysis:NUISANCE":

Screenshot 2024-06-28 at 18 54 50



Screenshot showing finalised record page:
Screenshot 2024-06-28 at 18 55 22



Screenshot showing resource file landing page:
Screenshot 2024-06-28 at 18 55 55

@luketpickering
Copy link

@GraemeWatt Amazing, this looks great!

@GraemeWatt GraemeWatt moved this from To do to In Progress in @HEPData Jul 3, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in @HEPData Jul 8, 2024
@GraemeWatt
Copy link
Member Author

@patrickstowell @luketpickering : this feature was deployed in production on 9th July, so please use type: ProSelecta to identify the C++ snippets in your future submissions. Or pass file_type = 'ProSelecta' to the add_additional_resource function if using hepdata_lib. I've added a new NUISANCE section to the HEPData submission documentation and opened a PR to update the hepdata_lib documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants