Skip to content

Commit 7e0b7b6

Browse files
Copilotgonzalocasas
andcommitted
Update dependency management to use optional [dev] dependencies
- Move dev dependencies from requirements-dev.txt to setup.py optional dependencies - Update CI workflows to install with [dev] instead of requirements-dev.txt - Update CONTRIBUTING.md to reflect new installation method - Maintain requirements-dev.txt for backward compatibility in setup.py Co-authored-by: gonzalocasas <933277+gonzalocasas@users.noreply.github.com>
1 parent 99ec693 commit 7e0b7b6

File tree

4 files changed

+25
-3
lines changed

4 files changed

+25
-3
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ jobs:
2323
python: ${{ matrix.python }}
2424
invoke_lint: true
2525
invoke_test: false
26+
- name: Install development dependencies
27+
run: |
28+
python -m pip install -e .[dev]
2629
- name: Run unit tests
2730
run: |
2831
pytest tests/unit
@@ -59,6 +62,9 @@ jobs:
5962
python: '3.11'
6063
invoke_lint: false
6164
invoke_test: false
65+
- name: Install development dependencies
66+
run: |
67+
python -m pip install -e .[dev]
6268
- name: Run integration tests
6369
run: |
6470
pytest tests/integration

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ jobs:
1919
python: ${{ matrix.python }}
2020
invoke_lint: true
2121
invoke_test: false
22+
- name: Install development dependencies
23+
run: |
24+
python -m pip install -e .[dev]
2225
- name: Run unit tests
2326
run: |
2427
pytest tests/unit
@@ -36,6 +39,9 @@ jobs:
3639
python: '3.11'
3740
invoke_lint: false
3841
invoke_test: false
42+
- name: Install development dependencies
43+
run: |
44+
python -m pip install -e .[dev]
3945
- name: Run integration tests
4046
run: |
4147
pytest tests/integration
@@ -100,7 +106,7 @@ jobs:
100106
run: |
101107
python -m pip install --upgrade pip
102108
python -m pip install wheel
103-
python -m pip install --no-cache-dir -r requirements-dev.txt
109+
python -m pip install --no-cache-dir -e .[dev]
104110
105111
- uses: NuGet/setup-nuget@v1.0.5
106112
- name: Install dependencies

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ In short, this is how that works.
1212
3. Install development dependencies:
1313

1414
```bash
15-
pip install -r requirements-dev.txt
15+
pip install -e .[dev]
1616
```
1717

1818
4. Make sure all tests pass:

setup.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,17 @@ def read(*names, **kwargs):
2121

2222
long_description = read("README.md")
2323
requirements = read("requirements.txt").split("\n")
24-
optional_requirements = {}
24+
25+
# Read dev requirements for optional dependencies
26+
dev_requirements = [
27+
line.strip()
28+
for line in read("requirements-dev.txt").split("\n")
29+
if line.strip() and not line.strip().startswith("#") and line.strip() != "-e ."
30+
]
31+
32+
optional_requirements = {
33+
"dev": dev_requirements,
34+
}
2535

2636
setup(
2737
name="compas_eve",

0 commit comments

Comments
 (0)