Skip to content

Commit 8f13a7a

Browse files
authored
Merge pull request #752 from simvue-io/feature/ecoclient
Ecoclient Simvue Python API Extension
2 parents dd7908b + ff59423 commit 8f13a7a

23 files changed

+1330
-1178
lines changed

.github/workflows/test_client_ubuntu.yml

Lines changed: 111 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,95 @@ concurrency:
1818
cancel-in-progress: true
1919

2020
jobs:
21-
build:
22-
21+
online_unit_tests:
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 40
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Set up Python 3.13
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: "3.13"
30+
- name: Install dependencies
31+
run: |
32+
python -m pip install poetry
33+
poetry self add poetry-plugin-export
34+
poetry export -f requirements.txt --with dev -o requirements.txt --all-extras
35+
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
36+
python -m pip install -r requirements.txt
37+
python -m pip install .
38+
- name: Test with pytest
39+
env:
40+
SIMVUE_URL: ${{ secrets.SIMVUE_URL }}
41+
SIMVUE_TOKEN: ${{ secrets.SIMVUE_TOKEN }}
42+
run: python -m pytest tests/unit/ -x -m online -c /dev/null -p no:warnings -n 0 -v
43+
offline_unit_tests:
44+
runs-on: ubuntu-latest
45+
timeout-minutes: 40
46+
steps:
47+
- uses: actions/checkout@v4
48+
- name: Set up Python 3.13
49+
uses: actions/setup-python@v5
50+
with:
51+
python-version: "3.13"
52+
- name: Install dependencies
53+
run: |
54+
python -m pip install poetry
55+
poetry self add poetry-plugin-export
56+
poetry export -f requirements.txt --with dev -o requirements.txt --all-extras
57+
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
58+
python -m pip install -r requirements.txt
59+
python -m pip install .
60+
- name: Test with pytest
61+
env:
62+
SIMVUE_URL: ${{ secrets.SIMVUE_URL }}
63+
SIMVUE_TOKEN: ${{ secrets.SIMVUE_TOKEN }}
64+
run: python -m pytest tests/unit/ -x -m offline -c /dev/null -p no:warnings -n 0 -v
65+
online_functional_tests:
66+
runs-on: ubuntu-latest
67+
timeout-minutes: 40
68+
steps:
69+
- uses: actions/checkout@v4
70+
- name: Set up Python 3.13
71+
uses: actions/setup-python@v5
72+
with:
73+
python-version: "3.13"
74+
- name: Install dependencies
75+
run: |
76+
python -m pip install poetry
77+
poetry self add poetry-plugin-export
78+
poetry export -f requirements.txt --with dev -o requirements.txt --all-extras
79+
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
80+
python -m pip install -r requirements.txt
81+
python -m pip install .
82+
- name: Test with pytest
83+
env:
84+
SIMVUE_URL: ${{ secrets.SIMVUE_URL }}
85+
SIMVUE_TOKEN: ${{ secrets.SIMVUE_TOKEN }}
86+
run: python -m pytest tests/functional/ -x -m online -c /dev/null -p no:warnings -n 0 -v
87+
offline_functional_tests:
88+
runs-on: ubuntu-latest
89+
timeout-minutes: 40
90+
steps:
91+
- uses: actions/checkout@v4
92+
- name: Set up Python 3.13
93+
uses: actions/setup-python@v5
94+
with:
95+
python-version: "3.13"
96+
- name: Install dependencies
97+
run: |
98+
python -m pip install poetry
99+
poetry self add poetry-plugin-export
100+
poetry export -f requirements.txt --with dev -o requirements.txt --all-extras
101+
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
102+
python -m pip install -r requirements.txt
103+
python -m pip install .
104+
- name: Test with pytest
105+
env:
106+
SIMVUE_URL: ${{ secrets.SIMVUE_URL }}
107+
SIMVUE_TOKEN: ${{ secrets.SIMVUE_TOKEN }}
108+
run: python -m pytest tests/functional/ -x -m offline -c /dev/null -p no:warnings -n 0 -v
109+
other_unit_tests:
23110
runs-on: ubuntu-latest
24111
timeout-minutes: 40
25112
steps:
@@ -40,9 +127,26 @@ jobs:
40127
env:
41128
SIMVUE_URL: ${{ secrets.SIMVUE_URL }}
42129
SIMVUE_TOKEN: ${{ secrets.SIMVUE_TOKEN }}
43-
run: python -m pytest tests/ -x --cov --cov-report=xml -m 'not scenario' -c /dev/null -p no:warnings -n 0 -v
44-
- name: Upload coverage reports to Codecov
130+
run: python -m pytest tests/unit/ -x -m 'not offline' -m 'not online' -m 'not scenario' -c /dev/null -p no:warnings -n 0 -v
131+
other_functional_tests:
132+
runs-on: ubuntu-latest
133+
timeout-minutes: 40
134+
steps:
135+
- uses: actions/checkout@v4
136+
- name: Set up Python 3.13
137+
uses: actions/setup-python@v5
138+
with:
139+
python-version: "3.13"
140+
- name: Install dependencies
45141
run: |
46-
curl -Os https://uploader.codecov.io/latest/linux/codecov
47-
chmod +x codecov
48-
./codecov -t ${CODECOV_TOKEN}
142+
python -m pip install poetry
143+
poetry self add poetry-plugin-export
144+
poetry export -f requirements.txt --with dev -o requirements.txt --all-extras
145+
python -m pip install torch --index-url https://download.pytorch.org/whl/cpu
146+
python -m pip install -r requirements.txt
147+
python -m pip install .
148+
- name: Test with pytest
149+
env:
150+
SIMVUE_URL: ${{ secrets.SIMVUE_URL }}
151+
SIMVUE_TOKEN: ${{ secrets.SIMVUE_TOKEN }}
152+
run: python -m pytest tests/functional/ -x -m 'not offline' -m 'not online' -m 'not scenario' -c /dev/null -p no:warnings -n 0 -v

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Change log
2-
32
## Unreleased
3+
* Removed CodeCarbon dependence in favour of a slimmer solution using the CO2 Signal API.
44
* Added sorting to server queries, users can now specify to sort by columns during data retrieval from the database.
55
## [v2.0.1](https://github.com/simvue-io/client/releases/tag/v2.0.1) - 2025-03-24
66
* Improvements to docstrings on methods, classes and functions.

CITATION.cff

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -42,67 +42,5 @@ keywords:
4242
- alerting
4343
- simulation
4444
license: Apache-2.0
45-
commit: 5084f9c17ae4b7f77e188f5aa8a51ebd3f790c9e
4645
version: 2.0.1
4746
date-released: '2025-03-24'
48-
references:
49-
- title: mlco2/codecarbon
50-
version: v2.8.2
51-
type: software
52-
date-released: 2024-12-08
53-
doi: 10.5281/zenodo.14518377
54-
url: https://doi.org/10.5281/zenodo.14518377
55-
repository-code: https://github.com/mlco2/codecarbon
56-
authors:
57-
- given-names: Benoit
58-
family-names: Courty
59-
- given-names: Victor
60-
family-names: Schmidt
61-
- given-names: Sasha
62-
family-names: Luccioni
63-
- given-names: Goyal
64-
family-names: Kamal
65-
- given-names: Marion
66-
family-names: Coutarel
67-
- given-names: Boris
68-
family-names: Feld
69-
- given-names: Jérémy
70-
family-names: Lecourt
71-
- given-names: Liam
72-
family-names: Connell
73-
- given-names: Amine
74-
family-names: Saboni
75-
- given-names: Mathilde
76-
family-names: Léval
77-
- given-names: Luis
78-
family-names: Blanche
79-
- given-names: Alexis
80-
family-names: Cruveiller
81-
- given-names: Franklin
82-
family-names: Zhao
83-
- given-names: Aditya
84-
family-names: Joshi
85-
- given-names: Alexis
86-
family-names: Bogroff
87-
- given-names: Hugues
88-
family-names: de Lavoreille
89-
- given-names: Niko
90-
family-names: Laskaris
91-
- given-names: Edoardo
92-
family-names: Abati
93-
- given-names: Douglas
94-
family-names: Blank
95-
- given-names: Ziyao
96-
family-names: Wang
97-
- given-names: Armin
98-
family-names: Catovic
99-
- given-names: Marc
100-
family-names: Alencon
101-
- given-names: Michał
102-
family-names: Stęchły
103-
- given-names: Christian
104-
family-names: Bauer
105-
- given-names: Lucas Otávio N.
106-
family-names: de Araújo
107-
- given-names: Minerva
108-
family-names: Books

0 commit comments

Comments
 (0)