Skip to content

Install snakemake plugins from bioconda#1674

Merged
lkstrp merged 7 commits intomasterfrom
code/change-snakemake-plugins-source
May 7, 2025
Merged

Install snakemake plugins from bioconda#1674
lkstrp merged 7 commits intomasterfrom
code/change-snakemake-plugins-source

Conversation

@euronion
Copy link
Copy Markdown
Contributor

@euronion euronion commented May 6, 2025

Instead of installing with pip.

I encountered errors when running with the mixed bioconda (snakemake-minimal) and pypi (snakemake-*) install.
Since the snakemake-* things seem to be on bioconda nowadays, I suggest we switch over.
bioconda is also the recommended channel for snakemake, so that should be fine?

Changes proposed in this Pull Request

Checklist

  • I tested my contribution locally and it works as intended.
  • Code and workflow changes are sufficiently documented.
  • Changed dependencies are added to envs/environment.yaml.
  • Changes in configuration options are added in config/config.default.yaml.
  • Changes in configuration options are documented in doc/configtables/*.csv.
  • Sources of newly added data are documented in doc/data_sources.rst.
  • A release note doc/release_notes.rst is added.

@lkstrp
Copy link
Copy Markdown
Member

lkstrp commented May 7, 2025

Reverts #1669

@lkstrp lkstrp merged commit 7ac80b3 into master May 7, 2025
12 checks passed
@lkstrp lkstrp deleted the code/change-snakemake-plugins-source branch May 7, 2025 10:51
daniel-rdt pushed a commit to open-energy-transition/open-tyndp that referenced this pull request May 7, 2025
* Update environment.yaml

* Update test.yaml

* Updatedate test.yaml

* Upupdatedate test.yaml

* dateUp test.yaml

* fix: remove cache for inhouse

* Update test.yaml

---------

Co-authored-by: Lukas Trippe <[email protected]>
daniel-rdt pushed a commit to open-energy-transition/open-tyndp that referenced this pull request May 7, 2025
* Update environment.yaml

* Update test.yaml

* Updatedate test.yaml

* Upupdatedate test.yaml

* dateUp test.yaml

* fix: remove cache for inhouse

* Update test.yaml

---------

Co-authored-by: Lukas Trippe <[email protected]>
daniel-rdt pushed a commit to open-energy-transition/open-tyndp that referenced this pull request May 8, 2025
* Update environment.yaml

* Update test.yaml

* Updatedate test.yaml

* Upupdatedate test.yaml

* dateUp test.yaml

* fix: remove cache for inhouse

* Update test.yaml

---------

Co-authored-by: Lukas Trippe <[email protected]>
daniel-rdt added a commit to open-energy-transition/open-tyndp that referenced this pull request May 9, 2025
… for filtering the tyndp year (#37)

* refactor: bring tyndp reference grid processing in line with using planning_horizon for filtering the tyndp year

* doc: add changes in configuration options to configtables csv

* Install snakemake plugins from bioconda (PyPSA#1674)
tgilon added a commit to open-energy-transition/open-tyndp that referenced this pull request May 16, 2025
* Update README.md to be project specific

* build(deps): bump lkstrp/pypsa-validator in the github-actions group (#1)

Bumps the github-actions group with 1 update: [lkstrp/pypsa-validator](https://github.com/lkstrp/pypsa-validator).


Updates `lkstrp/pypsa-validator` from 0.2.3 to 0.2.4
- [Release notes](https://github.com/lkstrp/pypsa-validator/releases)
- [Commits](PyPSA/pypsa-validator@v0.2.3...v0.2.4)

---
updated-dependencies:
- dependency-name: lkstrp/pypsa-validator
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add initial configuration to set a basis for development

* Increase the number of nodes to have more nodes than bidding zones

* Add private configuration file for remote configurations

* Reset solver configuration as default

* Disable oil and hydrogen transport demand

* Check that the distribution network is activated

* Select relevant heat systems depending on the load

* Add an option to choose between OPSD or TYNDP electric load and update switches

* Change environment naming convention to be coherent

* Update README.md to use TYNDP syntax

* Retrieve data from TYNDP bundle (#15)

* add retrieve rule and script to retrieve TYNDP data bundle from Zenodo

* Improve doc string

* Add data retrieve as default for tyndp

* Shorten folder name

---------

Co-authored-by: daniel-rdt <[email protected]>

* Fix minor typo in the configuration file

* Fix data bundle URL

* Introduce the clean_tyndp_data rule to prepare electric demand data (#14)

* add initial structure and script for tyndp data cleaning

* add loading and prep of electricity demand

* Fix naming convention and formatting

* Use snapshot year as electricity demand and climatic year are correlated

* Add a fallback option if snapshot year is not available in TYNDP data

* Write output file in resources and match naming convention

* Add parameters for the scenarios

* Add more documentation

* Shorten naming convention

* Address data inconsistencies in electricity profiles

---------

Co-authored-by: daniel-rdt <[email protected]>

* Build electricity demand file in build_electricity_demand for tyndp data

* build: revert env name change

* fix: enable conditional addition of existing heat capacities

* ci: align tested and main configuration

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* refactor: use snakemake parameters in main

* doc: improve documentation of new rules

* ci: align test naming convention

* ci: improve Makefile

* feat: skip build_electricity_demand_base as already nodal

* fix: fix build_existing_heating_distribution for missing countries

* bugfix: remove heating technologies for biomass and industry when TYNDP load is used

* bugfix: remove explicit industry electricity demand and low temperature heat for industry when TYNDP load is used

* bugfix: fix directory input for retrieve_tyndp_bundle rule

* bugfix: fix missing LU lv buses (#33)

This PR addresses missing low-voltage nodes for LU where electricity demand attaches. In the original TYNDP regional clustering introduced in #18, the clustered regions only encompass one region for Luxembourg which is mapped to the Bus LUB1 while the other LU nodes (LUF1, LUG1, LUV1) are co-located at LUB1.

Accordingly, the clustered population layouts are also only created for the LUB1 region. The clustered population layout in turn is used in prepare_sectornetwork to define nodes for newly added components (nodes = pop_layout.index).
The TYNDP demand inputs however, have specified values for both LUB1 and LUF1 and LUG1 nodes for Luxembourg.

To address this, this PR proposes a dedicated fix that uses the AC buses directly from n.buses instead of pop_layout.index to define the nodes for the low voltage buses.

* bugfix: fix energy balance plotting routines with missing heat systems

* feature: make interpolation of tyndp electricity demand optional with default no interpolation

* bugfix: deduction of distribution losses from electricity demand in prepare_sector_network only when distribution losses enabled

* Update test.yaml

* another fix for inhouse CI

* bugfix: remove outdated input reference to tyndp bundle in build_electricity_demand

* refactor: simplify definition of nodes for low voltage buses

* fix: remove distribution losses as explicitly modelled

* refactor: group gaps filling strategies options

* fix: remove ancient clause for tyndp demand as output of rule

* refactor: rename file and improve path handling

* Install snakemake plugins from bioconda (PyPSA#1674)

* Update environment.yaml

* Update test.yaml

* Updatedate test.yaml

* Upupdatedate test.yaml

* dateUp test.yaml

* fix: remove cache for inhouse

* Update test.yaml

---------

Co-authored-by: Lukas Trippe <[email protected]>

* feat: introduce wildcards for electrical load (#38)

* refactor: simplify configuration file and use planning_horizons

(cherry picked from commit f059bde)

* refactor: make clean_tyndp_demand to read all planning years at once

(cherry picked from commit 2530cde)

* fix: set correct test name and policy

(cherry picked from commit 2685d16)

* feat: introduce wildcards for electricity demand

(cherry picked from commit 40aafaa)

* feat: create a twin rule for elec demand with wildcard

* feat: add tyndp load as input of prepare_sector_network

* refactor: define slice of planning horizon only if necessary

* fix: unpack dict for parameters

* fix: set load source as external param

* fix: fix missing return in optional input function

* fix: overwrite cyear when falling back on another cyear

* ci: extend test for two planning years

* feat: overwrite load in prepare_sector_network

* feat: increase coherence for load_source

* fix: sanitize columns in add_brownfield

* feat: set co2_budget to default values

* fix: temporary increase co2_budget to allow CI to pass while load configurations are incomplete

* refactor: create optional dependency to opsd load

* doc: harmonize logging

* feat: enable multithreading for clean_tyndp_demand

* bugfix: use partial function for multiprocessing in clean_tyndp_demand

* Apply suggestions from code review

Co-authored-by: Daniel Rüdt <[email protected]>

* Apply suggestions from code review

Co-authored-by: Daniel Rüdt <[email protected]>

* refactor: read the load file inside attach_load

* refactor: use logger consistently

* refactor: add rule inheritance

* refactor: simplify inputs formulation

* fix: simplify inputs formulation

* doc: update doc/configtables/load.csv

Co-authored-by: Jonas Hörsch <[email protected]>

* doc: throw an error when clustering with tyndp load data

* refactor: improve multiprocessing readability

---------

Co-authored-by: daniel-rdt <[email protected]>
Co-authored-by: Daniel Rüdt <[email protected]>
Co-authored-by: Jonas Hörsch <[email protected]>

* doc: fix typo

* fix: fix UK/GB naming convention

* feat: add 2040 in the default tyndp config

* Apply suggestions from code review

Co-authored-by: Jonas Hörsch <[email protected]>

* Apply suggestions from code review

* refactor: reduce code dependency to load_source in prepare_sector_network

* fix: add a default configuration for use_industry_load

* ci: update ci config to be compatible with tyndp config

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix: use -call in makefile for tyndp

* refactor: avoid default value for scenario

* ci: use default cutout in test config

* ci: increase co2 budget while features are incomplete

* doc: add a release note

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: daniel-rdt <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Daniel Rüdt <[email protected]>
Co-authored-by: Lukas Trippe <[email protected]>
Co-authored-by: Johannes HAMPP <[email protected]>
Co-authored-by: Jonas Hörsch <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants