Skip to content

Commit f275366

Browse files
Merge pull request #336 from feelpp/219-refactor-report
219 refactor report
2 parents 2b0a14b + c543774 commit f275366

File tree

225 files changed

+12517
-3480
lines changed

Some content is hidden

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

225 files changed

+12517
-3480
lines changed

.github/workflows/benchmark.yml

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ jobs:
6161
https://api.github.com/orgs/feelpp/actions/runners
6262
)
6363
all_runners=$(echo $all_runners | jq -r '.runners')
64-
6564
available_systems="[]"
6665
6766
while read -r system; do
@@ -101,15 +100,21 @@ jobs:
101100
steps:
102101
- uses: actions/checkout@v6
103102

103+
- uses: astral-sh/setup-uv@v5
104+
104105
- name: Create machine config
105106
run: |
106107
json_machine_config='${{ toJson(matrix.system_config) }}'
107108
echo "$json_machine_config" > machine_config.json
108109
109-
- name: Setup machine and env
110+
- name: Print system Usage
110111
run: bash ./src/feelpp/benchmarking/reframe/config/machineConfigs/${{matrix.machine}}/setup.sh
111112
env:
112113
PROJECT_ID: ${{matrix.project_id || ''}}
114+
115+
- name: Sync Deps
116+
run: uv sync
117+
113118
- name: Execute benchmarks (CLI)
114119
if: ${{ matrix.submit == 'cli' }}
115120
run: |
@@ -155,18 +160,17 @@ jobs:
155160
steps:
156161
- uses: actions/checkout@v6
157162

163+
- uses: astral-sh/setup-uv@v5
164+
158165
- name: Download results
159166
uses: actions/download-artifact@v6
160167
with:
161168
pattern: benchmark-results-*
162169
path: ./tmp/results/
163170
merge-multiple: false
164171

165-
- name: Create Virtual Environment
166-
run: |
167-
python3 -m venv .venv
168-
source .venv/bin/activate
169-
pip3 install .
172+
- name: Sync Deps
173+
run: uv sync
170174

171175
- name: Upload to girder
172176
run: |
@@ -189,8 +193,8 @@ jobs:
189193
- name: Create Pull Request
190194
uses: peter-evans/create-pull-request@v8
191195
with:
192-
title: "Add benchmark for ${{ steps.gather_arguments.outputs.executable_name }} - ${{ steps.gather_arguments.outputs.use_case }}"
193-
commit-message: "Add benchmark for ${{ steps.gather_arguments.outputs.executable_name }} - ${{ steps.gather_arguments.outputs.use_case }}"
196+
title: "Add benchmark for ${{ steps.gather_arguments.outputs.use_case }}"
197+
commit-message: "Add benchmark for ${{ steps.gather_arguments.outputs.use_case }}"
194198
body: |
195199
Generating reports from staging directory.
196200
Auto-generated by [create-pull-request][1]
@@ -207,31 +211,36 @@ jobs:
207211
name: Deploy the website to a specific folder
208212
if: ${{ github.event.inputs.upload_id != '' || github.event.client_payload.upload_id != '' }}
209213
steps:
210-
- uses: actions/checkout@v6
214+
- uses: actions/checkout@v5
215+
216+
- uses: astral-sh/setup-uv@v5
217+
211218
- name: Download results
212219
uses: actions/download-artifact@v6
213220
with:
214221
pattern: benchmark-results-*
215222
path: ./tmp/results/
216223
merge-multiple: false
217-
- name: Create Virtual Environment
218-
run: |
219-
python3 -m venv .venv
220-
source .venv/bin/activate
221-
pip3 install -r requirements.txt
224+
225+
- name: Sync Deps
226+
run: uv sync
227+
222228
- name: Merge website configs
223229
run: |
224230
source .venv/bin/activate
225231
merge-json-configs -fp "./tmp/**/website_config.json" -o ./tmp/website_config.json -u
232+
226233
- name: Render docs
227234
run: |
228235
source .venv/bin/activate
229236
feelpp-benchmarking-render --config-file=./tmp/website_config.json
237+
230238
- name: Compile docs
231239
run: |
232240
source .venv/bin/activate
233241
npm ci
234242
npm run antora
243+
235244
- name: Upload
236245
run: |
237246
source .venv/bin/activate

.github/workflows/benchmark_deploy.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v6
1616

17-
- name: Create Virtual Environment
18-
run: |
19-
python3 -m venv .venv
20-
source .venv/bin/activate
21-
pip3 install .
17+
- uses: astral-sh/setup-uv@v5
18+
19+
- name: Sync Deps
20+
run: uv sync
2221

2322
- name: Download stage reports
2423
run: |
@@ -71,11 +70,10 @@ jobs:
7170
steps:
7271
- uses: actions/checkout@v6
7372

74-
- name: Create Virtual Environment
75-
run: |
76-
python3 -m venv .venv
77-
source .venv/bin/activate
78-
pip3 install .
73+
- uses: astral-sh/setup-uv@v5
74+
75+
- name: Sync Deps
76+
run: uv sync
7977

8078
- name: Cleanup stage folder
8179
run: |

.github/workflows/ci.yml

Lines changed: 66 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,34 @@ jobs:
1717
if: "!contains(github.event.head_commit.message, 'wheel skip')"
1818
steps:
1919

20-
- name: Checkout
21-
uses: actions/checkout@v6
2220

23-
- name: Create Virtual Environment
24-
run: |
25-
python3 -m venv .venv
26-
source .venv/bin/activate
27-
pip3 install -r requirements.txt
21+
- uses: actions/checkout@v6
2822

29-
- name: Compile
30-
run: |
31-
source .venv/bin/activate
32-
python3 -m build --wheel
23+
- uses: astral-sh/setup-uv@v5
24+
25+
- name: Sync deps
26+
run: uv sync
3327

34-
- name: Upload Artifact
28+
29+
- name: Build
30+
run: uv build
31+
32+
- name: Upload Wheel
3533
uses: actions/upload-artifact@v5
3634
with:
3735
name: wheel-artifacts
3836
path: dist/*.whl
3937

40-
tests:
38+
unit_tests:
4139
runs-on: self-feelpp
42-
name: Integration Tests
40+
name: Unit Tests
4341
needs: build_wheel
44-
if: "!contains(github.event.head_commit.message, 'tests skip')"
42+
if: "!contains(github.event.head_commit.message, 'unit_tests skip')"
4543
steps:
4644
- uses: actions/checkout@v6
4745

46+
- uses: astral-sh/setup-uv@v5
47+
4848
- name: Download packages
4949
uses: actions/download-artifact@v6
5050
with:
@@ -53,39 +53,74 @@ jobs:
5353

5454
- name: Install Python dependencies
5555
run: |
56-
python -m venv .venv
57-
source .venv/bin/activate
58-
python3 -m pip install --upgrade pip
59-
python3 -m pip install pytest
60-
python3 -m pip install dist/*.whl
56+
uv sync --extra test
57+
uv pip install dist/*.whl
6158
6259
- name: Unit tests
63-
run: |
64-
source .venv/bin/activate
65-
python3 -m pytest
60+
run: uv run pytest
6661
env:
6762
GIRDER_API_KEY: ${{secrets.GIRDER}}
6863

64+
integration_tests:
65+
runs-on: self-feelpp
66+
name: Integration Tests
67+
needs: build_wheel
68+
if: "!contains(github.event.head_commit.message, 'integration_tests skip')"
69+
steps:
70+
- uses: actions/checkout@v4
71+
72+
- uses: astral-sh/setup-uv@v5
73+
74+
- name: Download packages
75+
uses: actions/download-artifact@v4
76+
with:
77+
name: wheel-artifacts
78+
path: dist/
79+
80+
- name: Install Python dependencies
81+
run: |
82+
uv sync --extra test
83+
uv pip install dist/*.whl
84+
6985
- name: Compile test applications
7086
run: |
7187
mpic++ -std=c++17 -O3 examples/parallelsum/parallelSum.cpp -o examples/parallelsum/parallelSum
88+
mpic++ -std=c++17 -O3 examples/matrixvector/matrixvector.cpp -o examples/matrixvector/matrixvector
7289
73-
- name: Test benchmarks
90+
- name: Test ParallelSum Case
7491
run: |
7592
source .venv/bin/activate
7693
feelpp-benchmarking-exec -mc examples/machines/default.json -bc examples/parallelsum/parallelSum.json -pc examples/parallelsum/plots.json
7794
echo $?
7895
96+
- name: Test Fibonacci Case
97+
run: |
98+
source .venv/bin/activate
99+
feelpp-benchmarking-exec -mc examples/machines/default.json -bc examples/fibonacci/benchmark.json -pc examples/fibonacci/plots.json
100+
echo $?
101+
102+
- name: Test MatrixVector Case
103+
run: |
104+
source .venv/bin/activate
105+
feelpp-benchmarking-exec -mc examples/machines/default.json -bc examples/matrixvector/matrixvector.json -pc examples/matrixvector/plots.json
106+
echo $?
107+
108+
- name: Test Sorting Case
109+
run: |
110+
source .venv/bin/activate
111+
feelpp-benchmarking-exec -mc examples/machines/default.json -bc examples/sorting/sorting.json -pc examples/sorting/plots.json
112+
echo $?
113+
79114
- name: Dry-run reports
80115
run: |
81116
source .venv/bin/activate
82117
feelpp-benchmarking-render --config-file reports/website_config.json
83118
84119
- name: Check files
85120
run: | #TODO: check if not empty (maybe)
86-
nb_rfm_report_files=$(ls -1q reports/parallelSum/parallel_sum/default|wc -l)
87-
nb_doc_reports=$(ls -1q docs/modules/ROOT/pages/reports/|wc -l)
88-
if [ "$nb_rfm_report_files" -ne 1 ] || [ "$nb_doc_reports" -ne 1 ]; then
121+
nb_rfm_report_files=$(ls -1q reports|wc -l)
122+
nb_doc_reports=$(ls -1q docs/modules/ROOT/pages/leaves/|wc -l)
123+
if [ "$nb_rfm_report_files" -ne 5 ] || [ "$nb_doc_reports" -ne 4 ]; then
89124
echo "Reports where not rendered."
90125
exit 1
91126
fi
@@ -97,6 +132,8 @@ jobs:
97132
if: "!contains(github.event.head_commit.message, 'docs skip')"
98133
steps:
99134

135+
136+
- uses: astral-sh/setup-uv@v5
100137
- uses: actions/checkout@v6
101138

102139
- name: Install credentials
@@ -115,9 +152,7 @@ jobs:
115152

116153
- name: Install Python dependencies
117154
run: |
118-
python -m venv .venv
119-
source .venv/bin/activate
120-
pip3 install dist/*.whl
155+
uv sync --no-dev
121156
122157
- name: Download website config
123158
run: |
@@ -189,7 +224,7 @@ jobs:
189224
release:
190225
runs-on: self-feelpp
191226
name: Release
192-
needs: [tests]
227+
needs: [unit_tests,integration_tests]
193228
if: startsWith(github.ref ,'refs/tags/v')
194229
permissions:
195230
contents: write

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ cache/
77
jupyter/
88
/**/feelppdb/
99
/**/__pycache__/
10+
uv.lock
1011
dist/
1112
# Prerequisites
1213
*.d
@@ -64,6 +65,7 @@ project/report/*
6465
docs/modules/ROOT/pages/
6566
!docs/modules/ROOT/pages/index.adoc
6667
reports/
68+
reframe/*
6769

6870
#Test Outputs
6971
tests/data/outputs/

config/feelbvh/bvh.json

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

0 commit comments

Comments
 (0)