Skip to content

Commit 323fa17

Browse files
committed
Allow explicit relative path in requirements file.
1 parent 92a168c commit 323fa17

5 files changed

Lines changed: 17 additions & 13 deletions

File tree

.github/workflows/CompletePipeline.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ jobs:
237237
with:
238238
jobs: ${{ needs.UnitTestingParams.outputs.python_jobs }}
239239
# TODO: shouldn't this be configured by a parameter? Same as directories
240-
requirements: "-r tests/unit/requirements.txt"
241240
pacboy: "gcc:p"
242241
unittest_report_xml: ${{ needs.ConfigParams.outputs.unittest_report_xml }}
243242
coverage_report_xml: ${{ needs.ConfigParams.outputs.coverage_report_xml }}

.github/workflows/UnitTesting.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ on:
4747
requirements:
4848
description: 'Python dependencies to be installed through pip.'
4949
required: false
50-
default: '-r tests/requirements.txt'
50+
default: '-r ./requirements.txt'
5151
type: string
5252
mingw_requirements:
5353
description: 'Override Python dependencies to be installed through pip on MSYS2 (MINGW64) only.'
@@ -82,7 +82,7 @@ on:
8282
root_directory:
8383
description: 'Working directory for running tests.'
8484
required: false
85-
default: ''
85+
default: '.'
8686
type: string
8787
tests_directory:
8888
description: 'Path to the directory containing tests (relative from root_directory).'
@@ -234,7 +234,12 @@ jobs:
234234
235235
requirements = "${{ inputs.requirements }}"
236236
if requirements.startswith("-r"):
237-
requirementsFile = Path(requirements[2:].lstrip())
237+
requirements = requirements[2:].lstrip()
238+
if requirements.startswith("./"):
239+
requirementsFile = Path("${{ inputs.root_directory || '.' }}") / Path("${{ inputs.tests_directory || '.' }}") / Path("${{ inputs.unittest_directory || '.' }}") / Path(requirements[2:])
240+
else:
241+
requirementsFile = Path(requirements)
242+
238243
try:
239244
dependencies = loadRequirementsFile(requirementsFile)
240245
except FileNotFoundError as ex:

doc/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ docutils_stubs ~= 0.0.22
1111
sphinx_rtd_theme ~= 3.0
1212

1313
# Sphinx Extenstions
14-
sphinxcontrib-mermaid ~= 1.0
14+
sphinxcontrib-mermaid ~= 1.2
1515
autoapi >= 2.0.1
1616
sphinx_design ~= 0.6
1717
sphinx-copybutton >= 0.5
18-
sphinx_autodoc_typehints ~= 3.5
18+
sphinx_autodoc_typehints ~= 3.6
1919
sphinx_reports ~= 0.9

tests/requirements.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
-r ../requirements.txt
22

3-
# Coverage collection
4-
Coverage ~= 7.11
5-
6-
# Test Runner
7-
pytest ~= 9.0
8-
pytest-cov ~= 7.0
9-
103
# Static Type Checking
114
mypy[reports] ~= 1.18
125
typing_extensions ~= 4.15

tests/unit/requirements.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
-r ../requirements.txt
2+
3+
# Coverage collection
4+
Coverage ~= 7.13
5+
6+
# Test Runner
7+
pytest ~= 9.0
8+
pytest-cov ~= 7.0

0 commit comments

Comments
 (0)