From 2379948f15ff12df05879d66da86cbcf4e6f488c Mon Sep 17 00:00:00 2001 From: Songmin Date: Tue, 12 May 2026 14:23:52 +0800 Subject: [PATCH 1/2] fix: zenodo url --- workflow/rules/fetch_data.smk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/rules/fetch_data.smk b/workflow/rules/fetch_data.smk index 3bba0ece..0e7b44b5 100644 --- a/workflow/rules/fetch_data.smk +++ b/workflow/rules/fetch_data.smk @@ -41,7 +41,7 @@ if config["enable"].get("retrieve_raster", True): """retrieve GEBCO 2025 bathymetry data from Zenodo bundle""" input: gebco=storage.http( - "https://zenodo.org/record/17697456/files/GEBCO_tiff.zip" + "https://zenodo.org/records/17697456/files/GEBCO_tiff.zip" ), output: gebco="resources/data/landuse_availability/GEBCO_tiff/gebco_2025_CN.tif", @@ -98,7 +98,7 @@ elif config["enable"].get("retrieve_cutout", False): rule retrieve_cutout: input: zenodo_cutout=storage.http( - "https://zenodo.org/record/16792792/files/China-2020c.nc" + "https://zenodo.org/records/16792792/files/China-2020c.nc" ), output: cutout="resources/cutouts/China-2020c.nc", From f22660c63bf1dad786097d37b8d583c01e07299a Mon Sep 17 00:00:00 2001 From: Songmin Date: Mon, 29 Jun 2026 14:26:46 +0800 Subject: [PATCH 2/2] minor local config --- .gitignore | 2 + workflow/envs/environment-local-macos.yaml | 74 ++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 workflow/envs/environment-local-macos.yaml diff --git a/.gitignore b/.gitignore index 75c7e0fc..fc396275 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,5 @@ __pycache__ !**.gitkeep .vscode/launch.json /workflow/logs/* +.claude +CLAUDE.md \ No newline at end of file diff --git a/workflow/envs/environment-local-macos.yaml b/workflow/envs/environment-local-macos.yaml new file mode 100644 index 00000000..22d4d0fa --- /dev/null +++ b/workflow/envs/environment-local-macos.yaml @@ -0,0 +1,74 @@ +# SPDX-License-Identifier: MIT +# PyPSA-China-PIK environment for local macOS execution. +# Tested 2026-05-12 on macOS arm64 (under x86_64 anaconda via Rosetta). +# Differs from environment.yaml by hard-pinning 4 versions for the solve path. + +name: pypsa-china +channels: + - conda-forge + - bioconda +dependencies: + # --- HARD PINS (necessary for solve to work) --- + - python=3.12.* # 3.13 breaks numpy<2 indirect chain + - pypsa=0.35.1 # PIK code targets this exact API + - linopy=0.5.5 # 0.6+ adds force_dim_names check incompat w/ pypsa 0.35.1 + - xarray=2024.10.0 # 2025+ breaks Dataset constructor used by linopy 0.5.5 + - numpy<2 # required by xarray 2024.10 + + # --- core (unpinned: conda picks compatible) --- + - pip + - atlite>=0.4.0 + - dask + - coincbc + - snakemake-storage-plugin-http + - xlrd + - libgdal-hdf5 + - libgdal-netcdf + - rioxarray<0.21 # 0.21+ requires numpy>=2; cap to numpy 1.26 compatible + - openpyxl + - pycountry + - seaborn + - snakemake-minimal>=9.0 + - memory_profiler + - yaml + - pytables + - lxml + - powerplantmatching>=0.4.8 + - pandas<3 + - geopandas<2 + - netcdf4 + - networkx + - scipy + - shapely + - progressbar2 + - pyomo + - matplotlib + - proj + - fiona + - geopy + - tqdm + - pytz + - country_converter + - tabula-py + - chardet + - ultraplot + - ipython + - pytest + - cartopy + - descartes + - rasterio + + - pip: + - vresutils>=0.3.1 + - tsam>=1.1.0 + - gurobipy==12.0.3 + - jwt + - remind-pypsa-coupling>=0.1.2 + - mkdocs>=1.4.0 + - mkdocs-material>=9.0.0 + - mkdocs-gen-files + - mkdocstrings[python] + - mkdocs-awesome-nav + - mike>=1.1.0 + - python-markdown-math + - pre-commit>=4.0.0