Breakthrough-Energy / docs

Documentation
https://breakthrough-energy.github.io/docs/
Creative Commons Attribution 4.0 International
13 stars 14 forks source link

docs: guidelines for package installation and local workflows #8

Closed jenhagg closed 4 years ago

jenhagg commented 4 years ago

Purpose

Add descriptions for how to install packages and some of the tooling - black, tox, pytest. Since we are not completely consistent across repositories, there are some conditional instructions so that the guide will apply across the board. We can probably simplify it in the near future, after a bit more standardization.

What it does

Add sections to the contribution guide.

Time to review

10 mins (hope my writing is not too confusing)

jenhagg commented 4 years ago

@jon-hagg, should we have a section on virtual environment and its benefits before Pipenv?

Maybe, I'm trying to not get too much into standard python stuff, mostly focus on what is specific to our project. But I could add a small section just explaining that it will be easier to use virtual environments, what do you think?

rouille commented 4 years ago

@jon-hagg, should we have a section on virtual environment and its benefits before Pipenv?

Maybe, I'm trying to not get too much into standard python stuff, mostly focus on what is specific to our project. But I could add a small section just explaining that it will be easier to use virtual environments, what do you think?

I am not sure. I think we should be explicit on the installation method that you developed. We have some dependencies between PoweSimData and PostREISE (PreREISE) and those are well taking care of with pipenv. I would really focus on installing pipenv, pipenv sync and pipenv shell and that if other packages are needed for their project they can pip install in the venv activated through pipenv shell. Running pip install -r requirements.txt in PostREISE is not going to install PowerSimData and its dependencies.

jenhagg commented 4 years ago

Running pip install -r requirements.txt in PostREISE is not going to install PowerSimData and its dependencies.

That should actually work, since the setup.py in powersimdata has its requirements listed. Nevertheless, I see what you mean, will push some revisions.

rouille commented 4 years ago

Running pip install -r requirements.txt in PostREISE is not going to install PowerSimData and its dependencies.

That should actually work, since the setup.py in powersimdata has its requirements listed. Nevertheless, I see what you mean, will push some revisions.

You are right, I forgot about that powersimdata is in the requirements of PreREISE/PostREISE. Thanks for the reminder.