Edinburgh-Chemistry-Teaching / Data-driven-chemistry

Creative Commons Attribution 4.0 International
22 stars 2 forks source link

Requirements file #23

Closed jcumby closed 1 year ago

jcumby commented 1 year ago

I think we probably should include a requirements file describing specific Python packages needed, for instance nglview or SciPy. My question is - which format do we go with?!

ppxasjsm commented 1 year ago

Do you mean this for Colab or in general? Other JOSE publications seem to have a requirements.txt file which I am fine with. environment.yml easily go out of date and don't work anymore I've found in the past.

jcumby commented 1 year ago

I meant in general; in order to run the notebooks, people will probably want to know what packages are required!

Requirements.txt is the more supported option, but (I think) they require specific version numbers to work correctly, don't they? I tend to favour environment.yml (without version numbers) for this reason, but they are quite conda-specific...

ppxasjsm commented 1 year ago

I think just a requirements.txt with current version numbers we use is fine. I am sure we all use slightly different versions anyway. I assume most people would use conda, but we can also see what a reviewer might want us to change. I don't have any strong opinions here.

degiacom commented 1 year ago

I have added a requirements.txt file with package versions as per my environment. Included numpy, scipy, pandas, matplotlib, nglview. If other units have additional requirements, please add.

jcumby commented 1 year ago

I've added some other imports used through the course, and updated versions to match those on Noteable (no major differences).

There are a few packages that are install "on-the-fly" in the notebooks:

It would probably be better to add these as requirements and do away with pip usage to avoid dependency issues @punkpony @degiacom?

punkpony commented 1 year ago

trying to get nglview to work on binder. the ngliew guys have it working as a tutorial, this is their environment.yml:

channels:
- conda-forge
dependencies:
- python=3.7
- nodejs
- ipython
- ipywidgets=7.5.1
- notebook
- ipykernel
- nglview=2.7
- rdkit::rdkit
- pip:
    - pytraj
    - ipython_blocking
    - moviepy

may be the solution to #28 is in here?...

ppxasjsm commented 1 year ago

Yep...we've been down that rabbit hole with exactly this idea. But then ran out of time to fix it. I don't think it is essential for the paper submission and I'll or maybe @degiacom will try again.

ppxasjsm commented 1 year ago

The slow part of trying these things is waiting for binder to load for like 10 minutes for each iteration. There seems to be no way of speeding that up.

ppxasjsm commented 1 year ago

Got colab to work. this issue is no longer an issue. There are clear installation instructions with the necessary packages.