PyPSA / pypsa-usa

PyPSA-USA: An Open-Source Energy System Optimization Model for the United States
https://pypsa-usa.readthedocs.io
MIT License
35 stars 15 forks source link

Package PyPSA-USA #282

Open trevorb1 opened 2 months ago

trevorb1 commented 2 months ago

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 commented 2 months ago

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