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

Add info about Gammapy contact points and gammapy-extra #435

Merged
merged 1 commit into from Feb 7, 2016

Conversation

Projects
None yet
3 participants
@cdeil
Member

cdeil commented Feb 4, 2016

This PR adds some info for users and developers on

I don't have time to improve / finish the sample data loading stuff today ... this will have to wait for a future PR.

@cdeil cdeil added the docs label Feb 4, 2016

@cdeil cdeil added this to the 0.4 milestone Feb 4, 2016

@cdeil cdeil self-assigned this Feb 4, 2016

@cdeil cdeil referenced this pull request Feb 4, 2016

Merged

Add EventList plots #415

at https://github.com/gammapy/gammapy-extra/ .
To get the repository, ``git clone`` it to a location of your choosing using a git protocol of your choosing
(try HTTPS or see the `Github clone URL help article`_ if you're not sure which you want).

This comment has been minimized.

@bsipocz

bsipocz Feb 4, 2016

Member

this link doesn't work, change the ref name here or below

This comment has been minimized.

@cdeil

cdeil Feb 6, 2016

Member

Fixed.

export GAMMAPY_EXTRA=/path/on/your/machine/to/gammapy-extra
After you've done this, open up a new terminal (or ``source .profile``) and check if ``gammapy-extra`` is found:

This comment has been minimized.

@JonathanDHarris

JonathanDHarris Feb 5, 2016

Contributor

This is still not dumbed down enough for me : P

I've added the environment variable:

jon@Treebeard:~/Pycharm/gammapy$ echo $GAMMAPY_EXTRA
/home/jon/Pycharm/gammapy-extra/gammapy-extra

but when I run my script

 File "/home/jon/Pycharm/gammapy/gammapy/datasets/core.py", line 244, in dir
    raise GammapyExtraNotFoundError(msg)
gammapy.datasets.core.GammapyExtraNotFoundError: The gammapy-extra repo is not available. You have to set the GAMMAPY_EXTRA environment variable to point to the location for it to be found.

This comment has been minimized.

@cdeil

cdeil Feb 5, 2016

Member

Is the gammapy-extra repo really checked out at /home/jon/Pycharm/gammapy-extra/gammapy-extra?

Maybe it's at ``/home/jon/Pycharm/gammapy-extra/`?

This is the check I put in:
https://github.com/gammapy/gammapy/blob/master/gammapy/datasets/core.py#L226

Do you have that file? At what location?

This comment has been minimized.

@JonathanDHarris

JonathanDHarris Feb 6, 2016

Contributor

You're correct, but...

jon@Treebeard:~/Pycharm/gammapy$ echo $GAMMAPY_EXTRA
/home/jon/Pycharm/gammapy-extra/
gammapy.datasets.core.GammapyExtraNotFoundError: The gammapy-extra repo is not available. You have to set the GAMMAPY_EXTRA environment variable to point to the location for it to be found.

The file is there

jon@Treebeard:~/Pycharm/gammapy$ ls $GAMMAPY_EXTRA/logo/gammapy_logo.pdf
/home/jon/Pycharm/gammapy-extra/logo/gammapy_logo.pdf

For reference, this works

os.environ["GAMMAPY_EXTRA"] = "/home/jon/Pycharm/gammapy-extra"

This comment has been minimized.

@cdeil

cdeil Feb 6, 2016

Member

@JonathanDHarris - Looks like the GAMMAPY_EXTRA shell variable is not available from your Python process.
I'm not sure how to debug / fix this ... it depends on your system and how you start Python or IPython whether environment variables are available or not.

One thing I learned from this is that the error message should be improved.
It should first check if the GAMMAPY_EXTRA variable is available and if not explicitly say that this is the issue.
Only if it is available, should it check if the variable actually points to a folder where gammapy-extra is located, and if not, explicitly state that as an error.
These could be two different errors, e.g. add GammapyExtraVariableNotSet.

@JonathanDHarris - Do you agree that would be better? If yes, I could implement this change in this PR now.

This comment has been minimized.

@cdeil

cdeil Feb 6, 2016

Member

One thing you could try is to run Python this way:

GAMMAPY_EXTRA=/home/jon/Pycharm/gammapy-extra python myscript.py

Can you then see the environment variable from myscript.py?

@cdeil cdeil force-pushed the cdeil:devdoc branch from f4b5b11 to a9f0fa9 Feb 6, 2016

@cdeil cdeil changed the title from Add info about gammapy-extra and Slack to Add info about Gammapy contact points and gammapy-extra Feb 6, 2016

@cdeil cdeil force-pushed the cdeil:devdoc branch from a9f0fa9 to a2e0be6 Feb 6, 2016

@cdeil

This comment has been minimized.

Member

cdeil commented Feb 6, 2016

This build errored:
https://travis-ci.org/gammapy/gammapy/jobs/107430524#L1078

gammapy/astro/population/tests/test_spatial.py::TestMorphologyModels::test_fitter1D[model_class0-test_parameters0] <- ../../home/travis/miniconda/envs/test/lib/python3.5/site-packages/astropy/modeling/tests/test_models.py 

No idea what the issue is ... restarting the build now.

cdeil added a commit that referenced this pull request Feb 7, 2016

Merge pull request #435 from cdeil/devdoc
Add info about Gammapy contact points and gammapy-extra

@cdeil cdeil merged commit d3b050a into gammapy:master Feb 7, 2016

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment