Use GAMMAPY_DATA in Gammapy codebase #1822
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR replaces
$GAMMAPY_EXTRA
by$GAMMAPY_DATA
hardcoded in the codebase of Gammapy, which prevents reproducibility of tutorials and catalog access for users not having env vars like$GAMMAPY_EXTRA
or$GAMMA_CAT
.We can see
$GAMMAPY_DATA
has a data-repo stuck to Gammapy that is defined in http://gammapy.org/download/data/gammapy-data-index.json The codebase of Gammapy needs$GAMMAPY_DATA
, only a few exceptional cases (mostly related with gammacat) may still be fixed.gammapy download datasets
downloads the whole$GAMMAPY_DATA
repo.gammapy download notebooks
downloads does not download the repo.gammapy download tutorials
downloads a big fraction of this repo, almost all the datasets of$GAMMAPY_DATA
are used in the tutorials.I have left
$GAMMAPY_EXTRA
in thetest_*.py
scripts, this env var is used by developers to access datasets that will not be provided to users.I'm afraid developers should have
$GAMMAPY_EXTRA
and$GAMMAPY_DATA
pointing to the same path ?export GAMMAPY_DATA=$GAMMAPY_EXTRA/datasets
Local regression test pass, and three notebooks remain broken for those not having
$GAMMAPY_FERMI_LAT_DATA
or$GAMMA_CAT
declared:$GAMMAPY_FERMI_LAT_DATA
$GAMMA_CAT
$GAMMA_CAT