xgcm / xgcm-examples

Examples and tutorials for xgcm
MIT License
12 stars 12 forks source link

Environment (anaconda, pipenv, virtual env) needed for the notebooks? #11

Open rcaneill opened 3 years ago

rcaneill commented 3 years ago

I wanted to rework the NEMO example (fix the typos, and reshape some stuff now that I am more confident with xgcm) and I am wondering, what environment should I use? Previously I used the environment.yml provided in xgcm (for readthedocs), is it still the same case now? I feel lost between all the environments + the pangeo gallery. Thanks!

jbusecke commented 3 years ago

@rcaneill Thanks for the initiative! I would use the environment in the docs/environment.yml. If that proves unreliable I will look into it that we have a separate one over here!

jbusecke commented 3 years ago

Oh and to build it with conda, just use conda env create -f docs/environment.yml. Let me know if there are any issues I can help with.

rcaneill commented 3 years ago

Is this normal that xgcm is not provided in the docs/environment.yml? I thought I would just need to create the conda environment, activate it and voilà, but the notebooks can't be run due to a ModuleNotFoundError: No module named xgcm. I can of course install it by hand, but did I jut missed something?

jbusecke commented 3 years ago

In all the environments you always have to install xgcm manually using pip install -e . (from the root folder). I should probably add that to the contributor guide.

rcaneill commented 3 years ago

Great thanks!

jbusecke commented 3 years ago

Does this edit make it more transparent?

https://github.com/xgcm/xgcm/pull/317

rcaneill commented 3 years ago

Yes very good thanks. I think it may also be a nice idea to add a link to the xgcm contribute page on the xgcm-example README.

jbusecke commented 3 years ago

Ok cool. Will do that right away.

jbusecke commented 3 years ago

I added a little blurb in https://github.com/xgcm/xgcm-examples/pull/12. Thoughts?