Skip to content

Commit

Permalink
Merge pull request #2 from open-energy-transition/os_to_pathlib
Browse files Browse the repository at this point in the history
Os to pathlib and helpers.py method from pypsa-earth-sec
  • Loading branch information
finozzifa authored Jun 7, 2024
2 parents 72c09a2 + e2abe30 commit 480fd1e
Show file tree
Hide file tree
Showing 36 changed files with 1,508 additions and 433 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ci-linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: CI-linux
on:
push:
branches:
- main
- oet_main
pull_request:
branches:
- main
- oet_main
schedule:
- cron: "0 5 * * TUE"

Expand Down Expand Up @@ -82,6 +82,11 @@ jobs:
cp test/tmp/config.landlock_tmp.yaml config.yaml
snakemake --cores all solve_all_networks --forceall
- name: Unit tests
run: |
python -m pip install pytest
pytest test/
# - name: Test plotting and summaries
# run: |
# snakemake --cores all plot_all_p_nom
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/ci-mac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: CI-mac
on:
push:
branches:
- main
- oet_main
pull_request:
branches:
- main
- oet_main
schedule:
- cron: "0 5 * * TUE"

Expand Down Expand Up @@ -68,6 +68,11 @@ jobs:
cp test/tmp/config.tutorial_noprogress_tmp.yaml config.yaml
snakemake --cores all solve_all_networks
- name: Unit tests
run: |
python -m pip install pytest
pytest test/
# - name: Test plotting and summaries
# run: |
# snakemake --cores all plot_all_p_nom
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/ci-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: CI-windows
on:
push:
branches:
- main
- oet_main
pull_request:
branches:
- main
- oet_main
schedule:
- cron: "0 5 * * TUE"

Expand Down Expand Up @@ -68,6 +68,11 @@ jobs:
cp test/tmp/config.tutorial_noprogress_tmp.yaml config.yaml
snakemake --cores all solve_all_networks
- name: Unit tests
run: |
python -m pip install pytest
pytest test/
# - name: Test plotting and summaries
# run: |
# snakemake --cores all plot_all_p_nom
Expand Down
2 changes: 1 addition & 1 deletion Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import sys

sys.path.append("./scripts")

from os.path import normpath, exists, isdir
from os.path import normpath, exists
from shutil import copyfile, move

from snakemake.remote.HTTP import RemoteProvider as HTTPRemoteProvider
Expand Down
6 changes: 3 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
# documentation root, use pathlib.Path.absolute to make it absolute, like shown here.
#
import datetime
import os
import pathlib
import shutil
import sys

from git import Repo

sys.path.insert(0, os.path.abspath("../scripts"))
sys.path.insert(0, str(pathlib.Path("../scripts").absolute()))
for p in sys.path:
print(p)

Expand Down
Loading

0 comments on commit 480fd1e

Please sign in to comment.