Skip to content

Commit 210a971

Browse files
authored
ci: Install torchjd in editable mode (#479)
* pytest-cov does not produce a code coverage report if the project is not installed in editable mode. So this fixes code coverage. * The -e flag is also added for installations where no code coverage is computed, just in case.
1 parent 3407290 commit 210a971

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/build-deploy-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
python-version: ${{ env.PYTHON_VERSION }}
2828

2929
- name: Install dependencies (default with full options & doc)
30-
run: uv pip install --python-version=${{ env.PYTHON_VERSION }} '.[full]' --group doc
30+
run: uv pip install --python-version=${{ env.PYTHON_VERSION }} -e '.[full]' --group doc
3131

3232
- name: Determine deployment folder
3333
id: deploy_folder

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
with:
2828
python-version: ${{ matrix.python-version }}
2929
- name: Install default (with full options) and test dependencies
30-
run: uv pip install --python-version=${{ matrix.python-version }} '.[full]' --group test
30+
run: uv pip install --python-version=${{ matrix.python-version }} -e '.[full]' --group test
3131
- name: Run unit and doc tests with coverage report
3232
run: uv run pytest -W error tests/unit tests/doc --cov=src --cov-report=xml
3333
- name: Upload results to Codecov
@@ -45,7 +45,7 @@ jobs:
4545
with:
4646
python-version: ${{ env.PYTHON_VERSION }}
4747
- name: Install default (without any option) and test dependencies
48-
run: uv pip install --python-version=${{ env.PYTHON_VERSION }} . --group test
48+
run: uv pip install --python-version=${{ env.PYTHON_VERSION }} -e . --group test
4949
- name: Run unit and doc tests with coverage report
5050
run: |
5151
uv run pytest -W error tests/unit tests/doc \
@@ -71,7 +71,7 @@ jobs:
7171
python-version: ${{ env.PYTHON_VERSION }}
7272

7373
- name: Install dependencies (default with full options & doc)
74-
run: uv pip install --python-version=${{ env.PYTHON_VERSION }} '.[full]' --group doc
74+
run: uv pip install --python-version=${{ env.PYTHON_VERSION }} -e '.[full]' --group doc
7575

7676
- name: Build Documentation
7777
working-directory: docs
@@ -90,7 +90,7 @@ jobs:
9090
python-version: ${{ env.PYTHON_VERSION }}
9191

9292
- name: Install dependencies (default with full options & check)
93-
run: uv pip install --python-version=${{ env.PYTHON_VERSION }} '.[full]' --group check
93+
run: uv pip install --python-version=${{ env.PYTHON_VERSION }} -e '.[full]' --group check
9494

9595
- name: Run mypy
9696
run: uv run mypy src/torchjd

0 commit comments

Comments
 (0)