Open nheeren opened 6 years ago
looks good! Is there a way to distinguish between the requirements for ODYM only and those for the Jupyther notebooks?
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.
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.
I will come back to this after having a look at the tutorials this week
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
@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
?
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
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):This includes Jupyter. Without that it would be much less dependencies.