pypsa-usa icon indicating copy to clipboard operation
pypsa-usa copied to clipboard

Package PyPSA-USA

Open trevorb1 opened this issue 1 year ago • 2 comments

Feature Request

I need to use the INTERCONNECT_2_CODE constant in the snakefile, as some demand data will come in at a state level. It would be nice to be able to access this constant directly, instead of having to duplicate it in the snakefile. I guess this would require packaging pypsa-usa to allow for this. For example, we could just call:

from pypsa_usa.constants import INTERCONNECT_2_CODE

Suggested Solution

Ive use pyscaffold and hatch to do this before. They both allow for converting existing projects to packaged projects. Im not saying we push pypsa-usa to pypi, but allowing for local install via pip install . (or pip install -e . for developers) would be nice. Also, I am def not super experienced with packaging projects, so there may be a better tool to do this. imo hatch was a little easier to work with though, due to less setup files.

Additional Info

No response

trevorb1 avatar Apr 19 '24 18:04 trevorb1

Another advantage of packaging is it allows us to group our modules a little better. For example, we can group all plot_*.py modules into a plotting/ directory

trevorb1 avatar Apr 28 '24 21:04 trevorb1

When sorting through this, would be good to figure out how to update the automatic pre-commit PRs so both the master and develop branch update at the same time

trevorb1 avatar Oct 17 '24 18:10 trevorb1