Skip to content

Commit 987ae91

Browse files
committed
Repair CI dependencies and support Python 3.8 PDF reports
1 parent 8d54c62 commit 987ae91

4 files changed

Lines changed: 16 additions & 6 deletions

File tree

‎.github/workflows/main.yml‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ on:
1616
- 'pygad/**'
1717
- 'tests/**'
1818
- 'examples/**'
19+
- 'pyproject.toml'
20+
- '.github/workflows/main.yml'
1921
# Allows manual triggering of the workflow from the GitHub Actions tab.
2022
workflow_dispatch:
2123

@@ -86,10 +88,14 @@ jobs:
8688
- name: Install PyGAD from Wheel
8789
run: |
8890
WHEEL=$(ls dist/*.whl)
89-
pip install "${WHEEL}[visualize]"
91+
pip install "${WHEEL}[visualize,report]"
9092
9193
- name: Install PyTest
92-
run: pip install pytest
94+
run: |
95+
pip install pytest responses
96+
if [ "${{ matrix.python-version }}" != "3.8" ]; then
97+
pip install 'vilvik>=0.5.4'
98+
fi
9399
94100
# Run the entire test suite using PyTest.
95101
# PyTest automatically discovers all test files in the 'tests/' directory.
@@ -100,4 +106,4 @@ jobs:
100106
pytest --ignore=tests/test_kerasga.py --ignore=tests/test_torchga.py
101107
else
102108
pytest
103-
fi
109+
fi

‎.github/workflows/scorecard.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
persist-credentials: false
4242

4343
- name: "Run analysis"
44-
uses: ossf/scorecard-action@v2.3.1 # v2.3.1
44+
uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
4545
with:
4646
results_file: results.sarif
4747
results_format: sarif

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ examples/data/*.npy
4343
# =============================================================================
4444
release_video/
4545
.pytest_cache/
46+
*.egg-info/
47+
build/
48+
dist/
4649
.claude/
4750

4851
# Superpowers brainstorming companion

‎pyproject.toml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ dependencies = [
5858
[project.optional-dependencies]
5959
deep_learning = ["keras", "tensorflow", "torch"]
6060
visualize = ["matplotlib"]
61-
report = ["matplotlib", "reportlab"]
61+
# ReportLab 4.4.3 uses hashlib's Python 3.9-only usedforsecurity keyword.
62+
report = ["matplotlib", "reportlab<4.4.3; python_version < '3.9'", "reportlab; python_version >= '3.9'"]
6263

6364
# PyTest Configuration. Later, PyTest will support the [tool.pytest] table.
6465
[tool.pytest.ini_options]
@@ -69,4 +70,4 @@ version = { attr = "pygad._version.__version__" }
6970

7071
# Ship the logo image used by the PDF report alongside the package code.
7172
[tool.setuptools.package-data]
72-
"pygad.utils" = ["pygad_logo.png"]
73+
"pygad.utils" = ["pygad_logo.png"]

0 commit comments

Comments
 (0)