diff --git a/hepdata/config.py b/hepdata/config.py index 86b5040f..81cf5e08 100644 --- a/hepdata/config.py +++ b/hepdata/config.py @@ -363,6 +363,9 @@ def _(x): 'GAMBIT': { 'endpoint_url': 'https://gambitbsm.org/analyses.json', }, + 'SimpleAnalysis': { + 'endpoint_url': 'https://simpleanalysis.docs.cern.ch/analyses.json', + }, #'ufo': {}, #'xfitter': {}, #'applgrid': {}, diff --git a/tests/records_test.py b/tests/records_test.py index 0f910c38..707a4a6e 100644 --- a/tests/records_test.py +++ b/tests/records_test.py @@ -1217,6 +1217,15 @@ def test_update_analyses(app): assert len(analysis_resources) == 1 assert analysis_resources[0].file_location == 'https://github.com/GambitBSM/gambit_2.6/blob/release_2.6/ColliderBit/src/analyses/Analysis_ATLAS_13TeV_MONOJET_139infb.cpp' + # SimpleAnalysis + import_records(['ins1597123'], synchronous=True) # 1597123 is in SimpleAnalysis JSON but doesn't have code uploaded to HEPData + analysis_resources = DataResource.query.filter_by(file_type='SimpleAnalysis').all() + assert len(analysis_resources) == 2 # 1811596 and 1847779 have SimpleAnalysis file attached + update_analyses('SimpleAnalysis') + analysis_resources = DataResource.query.filter_by(file_type='SimpleAnalysis').all() + assert len(analysis_resources) == 5 # file attached: 1811596, 1847779; JSON file: 1811596, 1847779, 1597123 + assert analysis_resources[4].file_location == 'https://gitlab.cern.ch/atlas-sa/simple-analysis/-/tree/master/SimpleAnalysisCodes/src/ANA-EXOT-2018-06.cxx' # 1847779 + # Call update_analysis using an endpoint with no endpoint_url current_app.config["ANALYSES_ENDPOINTS"]["TestAnalysis"] = {} update_analyses('TestAnalysis')