From cc23920776b5a999a1be61fa928251c577564e23 Mon Sep 17 00:00:00 2001 From: Bryn Pickering <17178478+brynpickering@users.noreply.github.com> Date: Tue, 18 Feb 2025 11:31:04 +0000 Subject: [PATCH 1/3] Update install method; reorganise dependencies --- README.md | 13 +++---------- environment.yml | 8 -------- requirements/base.txt | 8 +++++++- requirements/dev.txt | 6 ------ 4 files changed, 10 insertions(+), 25 deletions(-) delete mode 100644 environment.yml diff --git a/README.md b/README.md index 0a2bd68..ad48260 100644 --- a/README.md +++ b/README.md @@ -9,24 +9,17 @@ The main branch contains the most up-to-date version of the models and the math; ## Install -You can install calliope pathways in one of two ways: +You can install calliope pathways as a user or developer: As a user: ```shell -mamba env create -f environment.yml +mamba create -n calliope-pathways -c conda-forge/label/calliope_dev -c conda-forge --file requirements/base.txt mamba activate calliope-pathways -``` - -As a developer on WINDOWS: - -```shell -mamba create -n calliope-pathways-dev -c conda-forge/label/calliope_dev -c conda-forge --file requirements/base.txt --file requirements/dev.txt -mamba activate calliope-pathways-dev pip install --no-deps -e . ``` -As a developer on UNIX: +As a developer: ```shell mamba create -n calliope-pathways-dev -c conda-forge/label/calliope_dev -c conda-forge --file requirements/base.txt --file requirements/dev.txt diff --git a/environment.yml b/environment.yml deleted file mode 100644 index b06cad4..0000000 --- a/environment.yml +++ /dev/null @@ -1,8 +0,0 @@ -name: calliope-pathways-test -channels: - - conda-forge - - conda-forge/label/calliope_dev -dependencies: - - calliope>=0.7.0dev3 - - pip: - - "." \ No newline at end of file diff --git a/requirements/base.txt b/requirements/base.txt index cccd3e7..bae3e9e 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1 +1,7 @@ -calliope>=0.7.0dev3 \ No newline at end of file +calliope>=0.7.0dev3 +numpy == 1.26 +plotly >= 5 +pyyaml >= 6 +pycountry == 22.3.5 +pint-pandas >= 0.5 +powerplantmatching == 0.5.14 diff --git a/requirements/dev.txt b/requirements/dev.txt index 1676b19..d106be5 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -5,14 +5,8 @@ mkdocs-jupyter >= 0.24, < 0.24.7 mkdocs-macros-plugin >= 1.0, < 2 mkdocs-material >= 9.5, < 10 mkdocstrings-python >= 1.7, < 2 -numpy pandas-stubs -plotly >= 5, < 6 pre-commit < 4 pytest < 8 pytest-order < 2 pytest-xdist < 4 -pyyaml -pycountry == 22.3.5 -pint-pandas -powerplantmatching == 0.5.14 From 9983c1466114a2bf0c9ef0939f795cb7b9af1ace Mon Sep 17 00:00:00 2001 From: Bryn Pickering <17178478+brynpickering@users.noreply.github.com> Date: Tue, 18 Feb 2025 15:40:17 +0000 Subject: [PATCH 2/3] Fix calliope version --- requirements/base.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements/base.txt b/requirements/base.txt index bae3e9e..ce18bb0 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -1,5 +1,5 @@ -calliope>=0.7.0dev3 -numpy == 1.26 +calliope == 0.7.0dev3 +numpy >= 1.26 plotly >= 5 pyyaml >= 6 pycountry == 22.3.5 From e87962b7b949c8d200a74f067bdfc1bc87908534 Mon Sep 17 00:00:00 2001 From: Bryn Pickering <17178478+brynpickering@users.noreply.github.com> Date: Tue, 18 Feb 2025 15:46:11 +0000 Subject: [PATCH 3/3] Update RTD config --- .readthedocs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 368f8ab..08a5e45 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,6 +1,6 @@ version: 2 conda: - environment: environment.yml + environment: requirements/base.txt build: os: ubuntu-22.04 tools: @@ -8,6 +8,7 @@ build: jobs: post_create_environment: - mamba install coin-or-cbc --file requirements/dev.txt + - pip install --no-deps . - python -m ipykernel install --user --name calliope_docs_pathways mkdocs: