Skip to content

Commit f1081b3

Browse files
authored
Merge pull request #437 from EnergySystemsModellingLab/develop
PR for v1.2.0rc1 release
2 parents 6b42ec1 + 0355d08 commit f1081b3

1,170 files changed

Lines changed: 42779 additions & 39853 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.1.0
2+
current_version = 1.2.0rc1
33
commit = True
44
tag = True
55

.codespell_ignore.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
datas
2+
raison
3+
fom

.editorconfig

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
1-
# EditorConfig is awesome: http://EditorConfig.org
2-
3-
# top-most EditorConfig file
41
root = true
52

6-
[*.py]
7-
indent_style = space
8-
indent_size = 4
9-
tab_width = 4
3+
[*]
104
charset = utf-8
11-
max_line_length=88
125
insert_final_newline = true
6+
trim_trailing_whitespace = true
7+
indent_style = space
8+
indent_size = 4
9+
max_line_length = 88
10+
11+
[*.md]
12+
indent_size = 2
13+
14+
[*.yaml]
15+
indent_size = 2
16+
17+
[*.yml]
18+
indent_size = 2
19+
20+
[Makefile]
21+
indent_style = tab

.flake8

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,26 @@ assignees: ''
88
---
99

1010
## Describe the bug
11-
A clear and concise description of what the bug is, including error messages.
1211

12+
A clear and concise description of what the bug is, including error messages.
1313

1414
## To Reproduce
15-
Steps to reproduce the behavior. Attache any input file that might be required.
1615

16+
Steps to reproduce the behavior. Attach any input file that might be required.
1717

1818
## Expected behavior
19+
1920
A clear and concise description of what you expected to happen.
2021

2122
## Screenshots
23+
2224
If applicable, add screenshots to help explain your problem.
2325

2426
## Context
2527

2628
Please, complete the following to better understand the system you are using to run MUSE.
2729

28-
- Operative system (eg. Windows 10):
30+
- Operating system (eg. Windows 10):
2931
- MUSE version (eg. 1.0.1):
3032
- Installation method (eg. pipx, pip, development mode):
3133
- Python version (you can get this running `python --version`):

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@ assignees: ''
77

88
---
99

10-
## Is your feature request related to a problem? Please describe.
10+
## Is your feature request related to a problem? Please describe
11+
1112
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
1213

1314
## Describe the solution you'd like
15+
1416
A clear and concise description of what you want to happen.
1517

1618
## Describe alternatives you've considered
19+
1720
A clear and concise description of any alternative solutions or features you've considered.
1821

1922
## Additional context
23+
2024
Add any other context or screenshots about the feature request here.

.github/ISSUE_TEMPLATE/usage-support.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,15 @@ assignees: ''
1111

1212
(Please, describe in detail what you want to achieve and what parts of the documentation you have checked to do so)
1313

14-
1514
## What you have tried
1615

1716
(If you have already taken some steps, please, describe here what you have tried. Provide any input files you are trying to use).
1817

19-
2018
## Context
2119

2220
Please, complete the following to better understand the system you are using to run MUSE.
2321

24-
- Operative system (eg. Windows 10):
22+
- Operating system (eg. Windows 10):
2523
- MUSE version (eg. 1.0.1):
2624
- Installation method (eg. pipx, pip, development mode):
2725
- Python version (you can get this running `python --version`):

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Fixes # (issue)
99
## Type of change
1010

1111
Please add a line in the relevant section of
12-
[CHANGELOG.md](https://github.com/SGIModel/StarMuse/blob/development/CHANGELOG.md) to
12+
[CHANGELOG.md](https://github.com/EnergySystemsModellingLab/MUSE_OS/blob/development/CHANGELOG.md) to
1313
document the change (include PR #) - note reverse order of PR #s.
1414

1515
- [ ] New feature (non-breaking change which adds functionality)

.github/workflows/broken-link-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ jobs:
1414
uses: ruzickap/action-my-broken-link-checker@v2
1515
with:
1616
url: https://muse-os.readthedocs.io/en/latest/
17-
cmd_params: '--timeout=20 --buffer-size=8192 --max-connections=3 --color=always --skip-tls-verification --header="User-Agent:curl/7.54.0"' # muffet parameters
17+
cmd_params: '--timeout=20 --buffer-size=8192 --max-connections=3 --color=always --skip-tls-verification --header="User-Agent:curl/7.54.0"' # muffet parameters

.github/workflows/ci.yml

Lines changed: 39 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -1,183 +1,76 @@
1-
name: QA, tests and publishing
1+
name: Tests
22

33
on:
4-
pull_request:
5-
types: [opened, synchronize, reopened]
6-
push:
7-
branches: [main, develop]
8-
tags:
9-
- '*'
10-
jobs:
11-
# Checks the style using the pre-commit hooks
12-
qa:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- uses: actions/checkout@v4
16-
- uses: pre-commit/action@v3.0.0
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
push:
7+
branches: [main, develop]
8+
workflow_call:
179

18-
# Only then, normal testing proceeds
10+
jobs:
1911
unit-tests:
20-
needs: qa
2112
runs-on: ${{ matrix.os }}
2213

23-
2414
strategy:
2515
fail-fast: false
2616
matrix:
2717
os: [ubuntu-latest, macos-latest, windows-latest]
28-
python-version: ["3.8", "3.9"]
29-
30-
steps:
31-
- uses: actions/checkout@v4
32-
- name: Set up Python ${{ matrix.python-version }}
33-
uses: actions/setup-python@v4
34-
with:
35-
python-version: ${{ matrix.python-version }}
36-
37-
- name: Install dependencies
38-
run: |
39-
python -m pip install --upgrade pip==22.1.2
40-
pip install -U setuptools==62.6.0 wheel xlrd==1.2.0
41-
pip install -e .[all]
42-
43-
# The unit tests, with coverage under linux
44-
- name: Unit tests (linux)
45-
if: (runner.os == 'Linux')
46-
run: |
47-
pip install pytest-cov
48-
pytest -m "not regression and not notebook" --junitxml=junit/pytest.xml \
49-
--cov=muse \
50-
--cov-branch \
51-
--cov-report=xml
52-
53-
- name: Upload coverage to Codecov
54-
if: success() && (runner.os == 'Linux' && matrix.python-version == 3.9)
55-
uses: codecov/codecov-action@v3
56-
57-
- name: Unit tests (not linux)
58-
if: (runner.os != 'Linux')
59-
run: pytest -m "not regression and not notebook"
60-
61-
regression-tests:
62-
needs: qa
63-
runs-on: ${{ matrix.os }}
64-
65-
strategy:
66-
fail-fast: false
67-
matrix:
68-
os: [ubuntu-latest, macos-latest, windows-latest]
69-
python-version: ["3.8", "3.9"]
18+
# Test with the earliest and the latest python versions supported
19+
python-version: ["3.9", "3.12"]
7020

7121
steps:
7222
- uses: actions/checkout@v4
7323
- name: Set up Python ${{ matrix.python-version }}
74-
uses: actions/setup-python@v4
24+
uses: actions/setup-python@v5
7525
with:
7626
python-version: ${{ matrix.python-version }}
27+
cache: pip
7728

7829
- name: Install dependencies
79-
run: |
80-
python -m pip install --upgrade pip==22.1.2
81-
pip install -U setuptools==62.6.0 wheel xlrd==1.2.0
82-
pip install -e .[all]
83-
84-
# The regression tests (with non coverage)
85-
- name: Regression tests
86-
run: pytest tests/test_fullsim_regression.py
87-
88-
# If all tests pass, we try to build a wheel
89-
build-wheel:
90-
# needs: [regression-tests, unit-tests]
91-
name: Build source distribution
92-
runs-on: ubuntu-latest
93-
steps:
94-
- uses: actions/checkout@v4
30+
run: pip install -e .[all]
9531

96-
- name: Build sdist
32+
# The unit tests, with coverage under linux
33+
- name: Unit tests (linux)
34+
if: (runner.os == 'Linux')
9735
run: |
98-
python -m pip install --upgrade build
99-
python -m build
100-
101-
- uses: actions/upload-artifact@v3
36+
pip install pytest-cov
37+
pytest -m "not regression and not notebook" --junitxml=junit/pytest.xml \
38+
--cov=muse \
39+
--cov-branch \
40+
--cov-report=xml
41+
42+
- name: Upload coverage to Codecov
43+
if: success() && (runner.os == 'Linux' && matrix.python-version == 3.9)
44+
uses: codecov/codecov-action@v4
10245
with:
103-
path: dist/MUSE*
104-
105-
# And if we are pushing a tag, then we try to publish it
106-
publish-TestPyPI:
107-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
108-
needs: build-wheel
109-
name: Publish MUSE to TestPyPI
110-
runs-on: ubuntu-latest
111-
permissions:
112-
id-token: write
46+
fail_ci_if_error: true
47+
token: ${{ secrets.CODECOV_TOKEN }}
48+
verbose: true
11349

114-
steps:
115-
116-
- name: Download sdist artifact
117-
uses: actions/download-artifact@v3
118-
with:
119-
name: artifact
120-
path: dist
121-
122-
- name: Display structure of downloaded files
123-
run: ls -R dist
124-
125-
- name: Publish package distributions to TestPyPI
126-
uses: pypa/gh-action-pypi-publish@release/v1
127-
with:
128-
repository-url: https://test.pypi.org/legacy/
129-
skip-existing: true
130-
131-
publish-PyPI:
132-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
133-
needs: publish-TestPyPI
134-
name: Publish MUSE to PyPI
135-
runs-on: ubuntu-latest
136-
permissions:
137-
id-token: write
138-
139-
steps:
50+
- name: Unit tests (not linux)
51+
if: (runner.os != 'Linux')
52+
run: pytest -m "not regression and not notebook"
14053

141-
- name: Download sdist artifact
142-
uses: actions/download-artifact@v3
143-
with:
144-
name: artifact
145-
path: dist
146-
147-
- name: Display structure of downloaded files
148-
run: ls -R dist
149-
150-
- name: Publish package distributions to PyPI
151-
uses: pypa/gh-action-pypi-publish@release/v1
152-
153-
build-standalone:
154-
needs: publish-PyPI
155-
name: Build standalone executables
54+
regression-tests:
15655
runs-on: ${{ matrix.os }}
15756

15857
strategy:
15958
fail-fast: false
16059
matrix:
161-
os: [ windows-latest ]
162-
python-version: [ "3.9" ]
60+
os: [ubuntu-latest, macos-latest, windows-latest]
61+
# Test with the earliest and the latest python versions supported
62+
python-version: ["3.9", "3.12"]
16363

16464
steps:
16565
- uses: actions/checkout@v4
16666
- name: Set up Python ${{ matrix.python-version }}
167-
uses: actions/setup-python@v4
67+
uses: actions/setup-python@v5
16868
with:
16969
python-version: ${{ matrix.python-version }}
17070

17171
- name: Install dependencies
172-
run: |
173-
python -m pip install --upgrade pip
174-
python -m pip install pyinstaller
175-
python -m pip install -e .[dev,gui]
176-
177-
- name: Build directory-based standalone
178-
run: pyinstaller muse_dir.spec --distpath standalone
72+
run: pip install -e .[all]
17973

180-
- uses: actions/upload-artifact@v3
181-
with:
182-
path: standalone/MUSE*
183-
name: MUSE
74+
# The regression tests (with non coverage)
75+
- name: Regression tests
76+
run: pytest tests/test_fullsim_regression.py

0 commit comments

Comments
 (0)