edgi-govdata-archiving / ECHO-Cross-Program

Jupyter Notebooks for ECHO that use data from multiple EPA programs
https://colab.research.google.com/github/edgi-govdata-archiving/ECHO-Cross-Program/blob/master/ECHO-Cross-Programs.ipynb
GNU General Public License v3.0
8 stars 5 forks source link

Import rather than clone outside modules #99

Closed shansen5 closed 2 years ago

shansen5 commented 4 years ago

mr0grog Today at 11:19 AM @shansen5 / @ericnost I was watching a video of you walking through one of the notebooks yesterday and noticed the way you’re pulling in the ECHO_modules project. I was wondering:

Why use %run ECHO_modules/DataSet.py instead of import ECHO_modules.DataSet? That might make it easier to test and fit into other non-workbook workflows if ever needed.

If you did the above, you could also structure ECHO_modules as a python package so you can install via !pip install instead of !git clone . One advantage of that is that you can install a specific branch or tag.

shansen5 commented 3 years ago

I don't think importing will work, but cloning as submodule might. I'm trying to figure out the advantage. https://git-scm.com/book/en/v2/Git-Tools-Submodules

ericnost commented 3 years ago

We can already install specific branches through clone. We have done that in COVID notebook for instance: !git clone https://github.com/edgi-govdata-archiving/ECHO_modules.git -b database-views

To my understanding, I think the main advantage of structuring ECHO_modules as a python package and using !pip install would be to make it easier to work with outside of a notebook.

Frijol commented 2 years ago

Is this something we want to pursue?

ericnost commented 2 years ago

I think we did this!!! 🎉

Frijol commented 2 years ago

oh, cool!