Skip to content

Commit 1c8844a

Browse files
authored
#368: Regroup acceptance tests with unit tests (#402)
* #368: move stepper tests and acceptance tests to the unittest tests to include in tox * #368: update gitignore * #368: update CI workflow * #368: update CI workflow * #368: update gitignore * #368: rename acceptance to synthetic-acceptance * #386: refactor * #368: rename workflow * #368: fix call error * #368: fix bug in a test * #368: fix bad config path for a test * #368: rename workflow * #368: upgrade tox and colorama dependency versions * #368: create a single requirements.txt file * #368: upgrade colorama version also for lbaf package setup * #368: refactor and simlify tox.ini * #368: rename workflow * #368: remove method duplicate * #368: pylint fixes * #368: pylint fixes * #368: disable some unexpected pylint warnings * #368: remove unnecessary line * #368: tentative to display unit tests results better * #368: keep only one requirements file and try fix Test report action * #368: try another Test report plugin * #368: fix issue with test output * #368: rename tests report * #368: try again another plugin * #368: upgrade version of test report plugin * #368: setoption to report output on CI * #368: fix remaining quotes and warnings * #368: fix pylint notice messages
1 parent 7bee174 commit 1c8844a

File tree

172 files changed

+284
-369
lines changed

Some content is hidden

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

172 files changed

+284
-369
lines changed

.github/workflows/acceptance-tests.yml

-106
This file was deleted.

.github/workflows/build-and-publish-to-pypi.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ jobs:
2323
user: __token__
2424
password: ${{ secrets.PYPI_API_TOKEN }}
2525
verbose: true
26-
print_hash: true
26+
print-hash: true

.github/workflows/code-quality.yml

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Code Quality (Unit tests, Coverage, PyLint)
1+
name: Code Quality (Tests, Linting, Coverage)
22
on: push
33
concurrency:
44
group: CI-${{ github.head_ref }}
@@ -33,14 +33,14 @@ jobs:
3333
- name: Install dependencies
3434
run: |
3535
python -m pip install --upgrade pip
36-
pip install -r requirements-${{ matrix.python-version }}.txt
36+
pip install -r requirements.txt
3737
pip install tox-gh-actions
3838
3939
- name: Register Github Actions Problem matchers (pylint)
4040
run: |
4141
echo "::add-matcher::.github/workflows/matchers/pylint.json"
4242
43-
- name: Running Unit-tests, Coverage, Pylint using TOX
43+
- name: Running Tests, Pylint and Coverage using TOX
4444
id: run_tox
4545
run: |
4646
tox
@@ -49,6 +49,15 @@ jobs:
4949
if [ -e "./artifacts/coverage.txt" ]; then COVERAGE_REPORT_EXISTS="true"; else COVERAGE_REPORT_EXISTS="false"; fi
5050
echo "coverage_report_exists=$COVERAGE_REPORT_EXISTS" >> $GITHUB_OUTPUT
5151
52+
- name: Report Test results
53+
uses: phoenix-actions/test-reporting@v12
54+
if: success() || failure()
55+
with:
56+
name: Tests report (${{ matrix.os }}, ${{ matrix.python-version }})
57+
path: artifacts/unittest/reports/TEST-*.xml
58+
reporter: java-junit
59+
output-to: step-summary
60+
5261
- name: Upload pylint artifact
5362
if: |
5463
steps.run_tox.outputs.pylint_report_exists == 'true'

.github/workflows/deploy_docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Install Python dependencies
2525
run: |
2626
python -m pip install --upgrade pip
27-
pip install -r requirements-${{ env.python-version }}.txt
27+
pip install -r requirements.txt
2828
pip3 install docutils jinja2 pygments
2929
- name: Clone documentation generator
3030
working-directory: ${{ env.project-directory }}

.gitignore

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1+
__pycache__
12
*.egg-info
23
*.pyc
34
.coverage
45
.env
6+
.pytest_cache
57
.tox
68
/.idea
79
/artifacts
810
/build
911
/dist
10-
/docs/output
1112
/m.css
12-
/output
13-
/tests/.pytest_cache
14-
/tests/output
1513
/venv
1614
/venv39
17-
src/Applications/Include
18-
src/Applications/Lib
19-
src/Applications/Scripts
20-
src/Applications/tcl
21-
src/lbaf/imported
15+
output
16+
/src/Applications/Include
17+
/src/Applications/Lib
18+
/src/Applications/Scripts
19+
/src/Applications/tcl
20+
/src/lbaf/imported

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[![Unit Tests](https://github.com/DARMA-tasking/LB-analysis-framework/actions/workflows/code-quality.yml/badge.svg)](https://github.com/DARMA-tasking/LB-analysis-framework/actions/workflows/code-quality.yml)
2-
[![Acceptance Tests](https://github.com/DARMA-tasking/LB-analysis-framework/actions/workflows/acceptance-tests.yml/badge.svg)](https://github.com/DARMA-tasking/LB-analysis-framework/actions/workflows/acceptance-tests.yml)
32
[![Pylint](https://raw.githubusercontent.com/DARMA-tasking/LB-analysis-framework/deploy-badges/pylint.svg)](https://raw.githubusercontent.com/DARMA-tasking/LB-analysis-framework/deploy-badges/pylint.svg)
43
[![Coverage](https://raw.githubusercontent.com/DARMA-tasking/LB-analysis-framework/deploy-badges/coverage.svg)](https://raw.githubusercontent.com/DARMA-tasking/LB-analysis-framework/deploy-badges/coverage.svg)
54

@@ -8,6 +7,7 @@
87
* `src`: Load-Balancing Simulator code
98
* `doc`: research and papers and related documents
109
* `data`: various data inputs or outputs
10+
* `tests`: unit tests and acceptance tests
1111

1212
### Please check Wiki for more details:
1313
[Load Balancing Analysis Framework Wikipedia](https://github.com/DARMA-tasking/LB-analysis-framework/wiki)
@@ -22,7 +22,7 @@ Please mind your platform as well as proper 32 or 64 bit version.
2222

2323
Make sure you have all required Python packages installed with:
2424
```shell
25-
pip install -r requirements-3.8.txt
25+
pip install -r requirements.txt
2626
```
2727

2828
Requirements are divided into `LBAF dependencies` and `LBAF testing`.

docs/pages/before_starting.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Make sure you have all required Pyhon packages installed with:
1010
.. code-block:: bash
1111
1212
# Make sure you are in project directory
13-
pip install -r requirements-3.8.txt
13+
pip install -r requirements.txt
1414
1515
Requirements are divided into `LBAF dependencies`, `LBAF testing` and `LBAF building package`:
1616

docs/pages/testing.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Requirements for testing
1010

1111
A file which contains all required packages for testing purposes can be found under:
1212

13-
* `<project-path>/requirements-3.<x>.txt`, where `<x>` stands for python version.
13+
* `<project-path>/requirements.txt`, where `<x>` stands for python version.
1414

1515
Unit testing
1616
------------

requirements-3.9.txt

-18
This file was deleted.

requirements-3.8.txt requirements.txt

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
# LBAF dependencies
2-
vtk==9.0.1
2+
vtk==9.0.1;python_version == '3.8'
3+
vtk==9.1.0;python_version == '3.9'
34
numpy==1.22.3
45
PyYAML==6.0
56
Brotli==1.0.9
67
schema==0.7.5
78
scikit-learn==1.0.2
8-
colorama==0.4.4
9-
matplotlib==3.5.3
9+
colorama==0.4.6
10+
matplotlib==3.5.3;python_version == '3.8'
11+
matplotlib==3.6.2;python_version == '3.9'
1012

1113
# LBAF testing
12-
tox==3.24.5
14+
tox==4.6.0
1315
coverage==6.3.2
1416
pylint==2.12.2
1517
pytest==7.1.1

scripts/multi_reg.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def save_data(in_files: list, y_read: dict, y_predict: dict, ranks: dict):
177177
out_file = os.path.join(dir_path, file_name)
178178
with open(out_file, "wt", encoding="utf-8") as o_file:
179179
for bool_type, values in y_read.items():
180-
for num, _val in enumerate(values):
180+
for num, _value in enumerate(values):
181181
o_file.write(
182182
f"{ranks[bool_type][num]} {y_read[bool_type][num]} {y_predict[bool_type][num]}\n")
183183

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ install_requires =
3131
Brotli == 1.0.9
3232
schema == 0.7.5
3333
scikit-learn == 1.0.2
34-
colorama == 0.4.4
34+
colorama == 0.4.6
3535
matplotlib==3.5.3;python_version=='3.8'
3636
matplotlib==3.6.2;python_version=='3.9'
3737

0 commit comments

Comments
 (0)