Skip to content

Commit cc6eb2c

Browse files
authored
Merge pull request #87 from KTH-dESA/develop
The commits in this PR improved the modularity of the code and prepared the scripts for packaging them as a python package.
2 parents bb01f2b + f08f342 commit cc6eb2c

26 files changed

+2861
-232
lines changed

.github/workflows/testing.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Python
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
python-version: ["3.9", "3.10", "3.11"]
12+
# os: [ubuntu-latest, windows-latest]
13+
os: [ubuntu-latest]
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
cache: pip
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install hatch
26+
- name: Create Environment
27+
run: hatch env create
28+
- name: Test OSeMOSYS_step
29+
run: hatch run test
30+
# - name: Format OSeMOSYS_step
31+
# run: hatch fmt
32+
# uncomment for auto-pushing to PyPI
33+
# - name: Build OSeMOSYS_step
34+
# run: hatch build

.gitignore

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
# Project specific
2+
results/
3+
steps/
4+
data/datapackage*
5+
data/step*
6+
data/scenarios/
7+
data/data*/
8+
data/*.txt
9+
*.snakemake/
10+
data/config.yaml
11+
12+
# Byte-compiled / optimized / DLL files
13+
__pycache__/
14+
*.py[cod]
15+
*$py.class
16+
17+
# C extensions
18+
*.so
19+
20+
# Distribution / packaging
21+
.Python
22+
build/
23+
develop-eggs/
24+
dist/
25+
downloads/
26+
eggs/
27+
.eggs/
28+
lib/
29+
lib64/
30+
parts/
31+
sdist/
32+
var/
33+
wheels/
34+
share/python-wheels/
35+
*.egg-info/
36+
.installed.cfg
37+
*.egg
38+
MANIFEST
39+
40+
# PyInstaller
41+
# Usually these files are written by a python script from a template
42+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
43+
*.manifest
44+
*.spec
45+
46+
# Installer logs
47+
pip-log.txt
48+
pip-delete-this-directory.txt
49+
50+
# Unit test / coverage reports
51+
htmlcov/
52+
.tox/
53+
.nox/
54+
.coverage
55+
.coverage.*
56+
.cache
57+
nosetests.xml
58+
coverage.xml
59+
*.cover
60+
*.py,cover
61+
.hypothesis/
62+
.pytest_cache/
63+
cover/
64+
65+
# Translations
66+
*.mo
67+
*.pot
68+
69+
# Django stuff:
70+
*.log
71+
local_settings.py
72+
db.sqlite3
73+
db.sqlite3-journal
74+
75+
# Flask stuff:
76+
instance/
77+
.webassets-cache
78+
79+
# Scrapy stuff:
80+
.scrapy
81+
82+
# Sphinx documentation
83+
docs/_build/
84+
85+
# PyBuilder
86+
.pybuilder/
87+
target/
88+
89+
# Jupyter Notebook
90+
.ipynb_checkpoints
91+
92+
# IPython
93+
profile_default/
94+
ipython_config.py
95+
96+
# pyenv
97+
# For a library or package, you might want to ignore these files since the code is
98+
# intended to run in multiple environments; otherwise, check them in:
99+
# .python-version
100+
101+
# pipenv
102+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
103+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
104+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
105+
# install all needed dependencies.
106+
#Pipfile.lock
107+
108+
# poetry
109+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
110+
# This is especially recommended for binary packages to ensure reproducibility, and is more
111+
# commonly ignored for libraries.
112+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
113+
#poetry.lock
114+
115+
# pdm
116+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
117+
#pdm.lock
118+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
119+
# in version control.
120+
# https://pdm.fming.dev/#use-with-ide
121+
.pdm.toml
122+
123+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
124+
__pypackages__/
125+
126+
# Celery stuff
127+
celerybeat-schedule
128+
celerybeat.pid
129+
130+
# SageMath parsed files
131+
*.sage.py
132+
133+
# Environments
134+
.env
135+
.venv
136+
env/
137+
venv/
138+
ENV/
139+
env.bak/
140+
venv.bak/
141+
142+
# Spyder project settings
143+
.spyderproject
144+
.spyproject
145+
146+
# Rope project settings
147+
.ropeproject
148+
149+
# mkdocs documentation
150+
/site
151+
152+
# mypy
153+
.mypy_cache/
154+
.dmypy.json
155+
dmypy.json
156+
157+
# Pyre type checker
158+
.pyre/
159+
160+
# pytype static type analyzer
161+
.pytype/
162+
163+
# Cython debug symbols
164+
cython_debug/
165+
166+
# PyCharm
167+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
168+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
169+
# and can be added to the global gitignore or merged into this file. For a more nuclear
170+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
171+
#.idea/
172+
173+
# VS Code
174+
.vscode/

0 commit comments

Comments
 (0)