Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 9 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
name: Python 🐍 CI tests
name: Python 🐍 CI install check

on:
pull_request:
types: [closed]
branches: [main]
paths-ignore:
- "**.md"
- "**.bib"
- "**.ya?ml"
- "LICENSE"
- ".gitignore"
workflow_dispatch:

jobs:
test:
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true
env:
SHIFT_SOLVER: highs
SHIFT_SOLVER_OPTIONS: highs-default
SHIFT_COMPUTE_IIS: "false"
install-check:
# No test suite exists yet (see tests/ removal history) - this job only
# confirms the pixi environment resolves and installs cleanly on both
# platforms. Replace with a real test job once tests/ exists again.
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -29,13 +25,10 @@ jobs:
- uses: actions/checkout@v4

- name: Install Pixi
run: python -m pip install --upgrade pip pixi
uses: prefix-dev/setup-pixi@v0.9.0

- name: Install dependencies via Pixi (test env)
run: pixi install --environment test
- name: Install dependencies via Pixi (default env)
run: pixi install

- name: Validate environment
run: pixi info --environment test

- name: Run tests
run: pixi run -e test unit-tests
run: pixi info
12 changes: 0 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,4 @@ repos:
rev: v1.0.0
hooks:
- id: snakefmt

# Run some default pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
args: ["--maxkb=2000"]
- id: check-merge-conflict
- id: check-yaml
exclude: "pixi.lock"
- id: end-of-file-fixer
- id: trailing-whitespace

20 changes: 2 additions & 18 deletions environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,36 @@ dependencies:
- pypsa>=0.32.1
- atlite>=0.3
- linopy>=0.4.4
- powerplantmatching>=0.5.15

# Dependencies of the workflow itself
- dask
- xlrd
- openpyxl
- seaborn
- snakemake-minimal>=9
- snakemake-storage-plugin-http>=0.3
- snakemake-executor-plugin-slurm
- snakemake-executor-plugin-cluster-generic
- memory_profiler
- yaml
- pytables
- lxml
- numpy
- pandas>=2.1
- geopandas>=1
- xarray>=2024.03.0
- rioxarray
- netcdf4
- libgdal-netcdf
- networkx
- scipy
- glpk
- shapely>=2.0
- matplotlib
- proj
- fiona
- country_converter
- geopy
- tqdm
- pytz
- jpype1
- pyxlsb
- graphviz
- geojson
- pyscipopt
- graphviz
- wbdata
- searoute

# GIS dependencies:
- cartopy
- descartes
- rasterio

# Development dependencies
- jupyter
Expand All @@ -68,6 +53,5 @@ dependencies:
- pip:
- gurobipy
- highspy
- tsam>=2.3.1
- entsoe-py
- wbgapi
- pypsatopo
68 changes: 68 additions & 0 deletions pixi.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ snakemake-minimal = "==9.6.2"
snakemake-storage-plugin-http = ">=0.3"
tqdm = "*"
xarray = ">=2026.0.0"
openpyxl = ">=3.1.5,<4"

[pypi-dependencies]
# pip-installable packages (always included)
gurobipy = "*"
wbdata = ">=1.1.0"
wbgapi = ">=1.0.14, <2"
highspy = "*"

[feature.test.dependencies]
pytest = "*"
Expand Down
Loading
Loading