IndEcol / ODYM

Open Dynamic Material Systems Model
MIT License
77 stars 44 forks source link

Use a requirements.txt file #4

Open nheeren opened 6 years ago

nheeren commented 6 years ago

We need a requirements.txt. The current file imports everything. I am not sure what is the purpose of this.

Would you mind if I replaced it with the following, @stefanpauliuk ? In my case ODYM seems to work with the following (i.e. pip freeze output):

appnope==0.1.0
bleach==2.1.2
cycler==0.10.0
decorator==4.2.1
entrypoints==0.2.3
html5lib==1.0.1
ipykernel==4.8.2
ipython==6.2.1
ipython-genutils==0.2.0
ipywidgets==7.1.2
jedi==0.11.1
Jinja2==2.10
jsonschema==2.6.0
jupyter==1.0.0
jupyter-client==5.2.2
jupyter-console==5.2.0
jupyter-core==4.4.0
MarkupSafe==1.0
matplotlib==2.1.2
mistune==0.8.3
nbconvert==5.3.1
nbformat==4.4.0
notebook==5.4.0
numpy==1.14.1
pandas==0.22.0
pandocfilters==1.4.2
parso==0.1.1
pexpect==4.4.0
pickleshare==0.7.4
prompt-toolkit==1.0.15
ptyprocess==0.5.2
Pygments==2.2.0
pyparsing==2.2.0
python-dateutil==2.6.1
pytz==2018.3
pyzmq==17.0.0
qtconsole==4.3.1
scipy==1.0.0
Send2Trash==1.5.0
simplegeneric==0.8.1
six==1.11.0
terminado==0.8.1
testpath==0.3.1
tornado==4.5.3
tqdm==4.19.6
traitlets==4.3.2
wcwidth==0.1.7
webencodings==0.5.1
widgetsnbextension==3.1.4
xlrd==1.1.0
xlwt==1.3.0

This includes Jupyter. Without that it would be much less dependencies.

stefanpauliuk commented 6 years ago

looks good! Is there a way to distinguish between the requirements for ODYM only and those for the Jupyther notebooks?

nheeren commented 6 years ago

Well I guess the question is if we build upon Jupyter notebooks or not. On my computer I have (at least) one environment per project. So, personally, I would be happy if Jupyter would get installed with it. As discussed today, I will read up on this, but once we use something like pip, we probably don't really need this file anymore.

stefanpauliuk commented 6 years ago

The alternative is that users are responsible for installing Jupyther, e.g., via the Anaconda distribution. Main model scripts will likely be pure Python with lots and lots of heavy code but for tutorials Jupyther seems suitable.

nheeren commented 6 years ago

I will come back to this after having a look at the tutorials this week

konstantinstadler commented 6 years ago

Hi, Just a short interception from my side (since I get these issues in my inbox).

Based on my experience with pymrio and country_converter you should aim to get a package as soon as possible. It is not necessary that you upload that to pypi straight away, you can still just clone the repo and than do an pip install FOLDER_OF_SOURCE

You can also do a pip install -e FOLDER_OF_SOURCE in which case your install will reflect the changes in the code you are doing.

This will solve your requirement issue and also the need for specifying where the source code is in the settings file. Otherwise, you are reinventing the wheel in a way the user would not expect... Once you are happy with the software, it is just one command to publish it on pypi and any user can install it with the same command without cloning from github.

You can check here for a minimal setup file to make a package: https://github.com/konstantinstadler/country_converter

As I am not really involved in this software, I will unsusbscribe from these issues - however, you can still mention me with @konstantinstadler and I will have a look

nheeren commented 6 years ago

@konstantinstadler Thanks for dropping in. This is very helpful. Stefan and I had this very discussion yesterday.

I like your suggestion and will read up on how to create packages. Are the packages managed in setup.py?

konstantinstadler commented 6 years ago

Yes. It takes a little time to get your head around the concepts, but than you are surprised how easy it is. This helped me to get started https://tom-christie.github.io/articles/pypi/ Further background info you can find here

Perhaps the easiest way to try these things would be to clone the country converter as a running example and play with it. You can alway get rid of installed packages by pip uninstall package_name