diff --git a/hepdata/cli.py b/hepdata/cli.py index b3ddbc86..df6aa806 100644 --- a/hepdata/cli.py +++ b/hepdata/cli.py @@ -35,7 +35,7 @@ from hepdata.modules.submission.models import HEPSubmission from hepdata.modules.submission.api import get_latest_hepsubmission from .factory import create_app -from hepdata.config import CFG_PUB_TYPE +from hepdata.config import CFG_PUB_TYPE, ANALYSES_ENDPOINTS from hepdata.ext.opensearch.api import reindex_all, get_records_matching_field from hepdata.modules.records.importer import api as importer_api from hepdata.modules.records.utils import data_files @@ -55,7 +55,7 @@ cli = create_cli(create_app=create_app) default_recids = 'ins1283842,ins1245023,ins1311487' - +endpoints_as_string = '"' + '" or "'.join(ANALYSES_ENDPOINTS.keys()) + '"' @cli.group() def importer(): @@ -223,9 +223,9 @@ def do_unload(records_to_unload): @utils.command() @with_appcontext -@click.option('--endpoint', '-e', type=str, help='Specific endpoint to update (e.g. "rivet" or "MadAnalysis" or "SModelS" or "CheckMATE" or "HackAnalysis" or "Combine"). Omit for all.') +@click.option('--endpoint', '-e', type=str, help=f'Specific endpoint to update (e.g. {endpoints_as_string}). Omit for all.') def find_and_add_record_analyses(endpoint): - """Finds analyses such as Rivet, MadAnalysis 5, SModelS, CheckMATE, HackAnalysis and Combine and adds them to records.""" + """Finds analyses from tools such as Rivet, MadAnalysis 5, etc. and adds them to records.""" update_analyses(endpoint) diff --git a/hepdata/config.py b/hepdata/config.py index 9eb48217..e5d67f91 100644 --- a/hepdata/config.py +++ b/hepdata/config.py @@ -359,6 +359,9 @@ def _(x): 'url': 'https://creativecommons.org/licenses/by/4.0' }, }, + 'GAMBIT': { + 'endpoint_url': 'https://gambitbsm.org/analyses.json', + }, #'ufo': {}, #'xfitter': {}, #'applgrid': {}, diff --git a/hepdata/ext/opensearch/document_enhancers.py b/hepdata/ext/opensearch/document_enhancers.py index 50540d9f..fbba8ae9 100644 --- a/hepdata/ext/opensearch/document_enhancers.py +++ b/hepdata/ext/opensearch/document_enhancers.py @@ -94,7 +94,7 @@ def add_shortened_authors(doc): def add_analyses(doc): """ - Add analyses links such as Rivet, MadAnalysis 5, SModelS, CheckMATE, HackAnalysis, Combine, HistFactory and NUISANCE to the index. + Add analyses links to tools such as Rivet, MadAnalysis 5, etc. to the index. :param doc: :return: diff --git a/hepdata/modules/records/assets/js/hepdata_common.js b/hepdata/modules/records/assets/js/hepdata_common.js index 04027b4b..833ecd32 100644 --- a/hepdata/modules/records/assets/js/hepdata_common.js +++ b/hepdata/modules/records/assets/js/hepdata_common.js @@ -49,6 +49,7 @@ HEPDATA.file_type_to_details = { "checkmate": {"icon": "area-chart", "description": "CheckMATE Analysis"}, "hackanalysis": {"icon": "area-chart", "description": "HackAnalysis Analysis"}, "combine": {"icon": "area-chart", "description": "Combine Analysis"}, + "gambit": {"icon": "area-chart", "description": "GAMBIT analysis"}, "xfitter": {"icon": "area-chart", "description": "xFitter Analysis"}, "applgrid": {"icon": "area-chart", "description": "APPLgrid Analysis"}, "ufo": {"icon": "rocket", "description": "Universal Feynrules Output (UFO)"}, diff --git a/hepdata/modules/records/templates/hepdata_records/components/resources-widget.html b/hepdata/modules/records/templates/hepdata_records/components/resources-widget.html index 79b35cb0..3f83b828 100644 --- a/hepdata/modules/records/templates/hepdata_records/components/resources-widget.html +++ b/hepdata/modules/records/templates/hepdata_records/components/resources-widget.html @@ -39,12 +39,6 @@

Add Resource for Submission