Skip to content

Commit 7730a78

Browse files
chore: using group dependencies (#2316)
Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent a4d521d commit 7730a78

File tree

6 files changed

+48
-52
lines changed

6 files changed

+48
-52
lines changed

.github/workflows/backwards_compatibility.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
.\.venv\Scripts\Activate.ps1
6868
python -m pip install --upgrade pip
6969
pip install --upgrade build wheel
70-
pip install .[tests]
70+
pip install . --group tests
7171
7272
- name: Login to GitHub Container Registry
7373
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
@@ -189,7 +189,7 @@ jobs:
189189
run: |
190190
python -m pip install --upgrade pip
191191
pip install --upgrade build wheel
192-
pip install -e .[tests]
192+
pip install -e . --group tests
193193
194194
- name: Download Geometry service container (if needed)
195195
env:

.github/workflows/ci_cd.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ jobs:
228228
run: |
229229
python -m pip install --upgrade pip
230230
pip install --upgrade build wheel
231-
pip install -e .[tests]
231+
pip install -e . --group tests
232232
233233
- name: Login to GitHub Container Registry
234234
if: env.SKIP_UNSTABLE == 'false'
@@ -349,6 +349,7 @@ jobs:
349349
needs-quarto: true
350350
dependencies: 'pandoc'
351351
sphinxopts: '-j 1 -W --color'
352+
group-dependencies-name: "doc"
352353

353354
- name: Stop the Geometry service
354355
if: always()
@@ -446,6 +447,7 @@ jobs:
446447
python-version: ${{ env.MAIN_PYTHON_VERSION }}
447448
checkout: false
448449
randomize: true
450+
group-dependencies-name: "tests"
449451

450452
- name: Upload coverage to Codecov
451453
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
@@ -515,8 +517,7 @@ jobs:
515517
- name: Install minimum requirements
516518
run: |
517519
python -m pip install --upgrade pip
518-
pip install -e .[all,tests-minimal]
519-
pip install pytest
520+
pip install -e .[all] --group tests-minimal
520521
521522
- name: Start Geometry service and verify start
522523
env:
@@ -568,7 +569,7 @@ jobs:
568569
- name: Install minimum requirements
569570
run: |
570571
python -m pip install --upgrade pip
571-
pip install -e .[tests-minimal]
572+
pip install -e . --group tests-minimal
572573
# Uninstall pytest-pyvista (not needed for these tests)
573574
pip uninstall -y pytest-pyvista
574575
# Installing docker (needed for the tests)
@@ -741,7 +742,7 @@ jobs:
741742
python -m venv .venv
742743
.\.venv\Scripts\Activate.ps1
743744
python -m pip install --upgrade pip
744-
pip install -e .[tests]
745+
pip install -e . --group tests
745746
746747
- name: Restore images cache
747748
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
@@ -842,7 +843,7 @@ jobs:
842843
- name: Validate connection using PyAnsys Geometry
843844
run: |
844845
python -m pip install --upgrade pip
845-
pip install -e .[tests]
846+
pip install -e . --group tests
846847
847848
- name: Start Geometry service and verify start
848849
env:
@@ -868,6 +869,7 @@ jobs:
868869
pytest-extra-args: "--use-existing-service=yes"
869870
checkout: false
870871
randomize: true
872+
group-dependencies-name: "tests"
871873

872874
- name: "Compressing Linux Dockerfile"
873875
uses: vimtor/action-zip@1379ea20d4c5705669ba81fd626dd01b1c738f26 # v1.2

.github/workflows/nightly_docker_test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ jobs:
115115
- name: Install packages for testing
116116
run: |
117117
pip install --upgrade build
118-
pip install -e .[tests]
118+
pip install -e . --group tests
119119
120120
- name: Login to GitHub Container Registry
121121
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
@@ -214,6 +214,7 @@ jobs:
214214
ALLOW_PLOTTING: true
215215
with:
216216
python-version: ${{ env.MAIN_PYTHON_VERSION }}
217+
group-dependencies-name: "tests"
217218

218219
- name: Stop the Geometry service
219220
if: always()
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Using group dependencies

doc/source/contributing.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ these commands:
1919
git clone https://github.com/ansys/pyansys-geometry
2020
cd pyansys-geometry
2121
python -m pip install --upgrade pip
22-
pip install -e .
22+
pip install -e . --group dev
2323
2424
2525
Post issues
@@ -106,7 +106,7 @@ Build the documentation
106106
To build the documentation locally, you must run this command to install the
107107
documentation dependencies::
108108

109-
pip install -e .[doc]
109+
pip install -e . --group doc
110110

111111
Then, navigate to the ``docs`` directory and run this command::
112112

@@ -149,7 +149,7 @@ You can also test the correct build process of a new example by performing the f
149149

150150
1. Run the following command to install the documentation dependencies::
151151

152-
pip install -e .[doc]
152+
pip install -e . --group doc
153153

154154
2. Navigate to the ``doc`` directory and run the following command::
155155

@@ -177,7 +177,7 @@ Prerequisites
177177

178178
Prior to running the tests, you must run this command to install the test dependencies::
179179

180-
pip install -e .[tests]
180+
pip install -e . --group tests
181181

182182
Make sure to define the port and host of the service using the following environment variables::
183183

pyproject.toml

Lines changed: 31 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ dependencies = [
4141
"semver>=3,<4",
4242
"six>=1.16.0,<2",
4343
]
44-
4544
optional-dependencies.all = [
4645
"ansys-platform-instancemanagement>=1.0.3,<2",
4746
"ansys-tools-visualization-interface>=0.2.6",
@@ -50,50 +49,53 @@ optional-dependencies.all = [
5049
"pyvista[jupyter]>=0.38.1,<1",
5150
"vtk>=9,<10",
5251
]
53-
optional-dependencies.doc = [
52+
optional-dependencies.graphics = [
53+
"ansys-tools-visualization-interface>=0.2.6",
54+
"pygltflib>=1.16,<2",
55+
"pyvista[jupyter]>=0.38.1,<1",
56+
"vtk>=9,<10",
57+
]
58+
59+
urls.Changelog = "https://github.com/ansys/pyansys-geometry/blob/main/doc/source/changelog.rst"
60+
urls.Discussions = "https://github.com/ansys/pyansys-geometry/discussions"
61+
urls.Documentation = "https://geometry.docs.pyansys.com"
62+
urls.Issues = "https://github.com/ansys/pyansys-geometry/issues"
63+
urls.Releases = "https://github.com/ansys/pyansys-geometry/releases"
64+
urls.Source = "https://github.com/ansys/pyansys-geometry"
65+
66+
[dependency-groups]
67+
68+
# NOTE: The `dependency-groups` section is used to define groups of dependencies
69+
# only available when a developer clones the repository and installs the package
70+
# for local development.
71+
dev = [
72+
"pre-commit==4.3.0",
73+
{ include-group = "doc" },
74+
{ include-group = "tests" },
75+
]
76+
doc = [
5477
"ansys-sphinx-theme[autoapi]==1.6.3",
55-
"ansys-tools-path==0.7.3",
56-
"ansys-tools-visualization-interface==0.12.1",
57-
"beartype==0.21.0",
58-
"docker==7.1.0",
59-
"geomdl==5.4.0",
60-
"grpcio==1.75.0",
61-
"grpcio-health-checking==1.75.0",
6278
"ipyvtklink==0.2.3",
6379
"jupyter-sphinx==0.5.3",
6480
"jupytext==1.17.3",
65-
"matplotlib==3.10.6",
6681
"myst-parser==4.0.1",
6782
"nbconvert==7.16.6",
6883
"nbsphinx==0.9.6",
6984
"notebook==7.4.7",
70-
"numpy==2.2.6",
7185
"numpydoc==1.9.0",
72-
"panel==1.8.2",
7386
"pdf2image==1.17.0",
74-
"pint==0.24.4",
75-
"protobuf==6.32.1",
76-
"pygltflib==1.16.5",
77-
"pyvista[jupyter]==0.46.3",
7887
"quarto-cli==1.8.25",
79-
"requests==2.32.5",
80-
"scipy==1.15.3",
81-
"semver==3.0.4",
82-
"six==1.17.0",
8388
"sphinx==8.2.3",
8489
"sphinx-autodoc-typehints==3.1.0",
8590
"sphinx-copybutton==0.5.2",
8691
"sphinx-jinja==2.0.2",
87-
"trame-vtk==2.10.0",
88-
"vtk==9.5.2",
92+
{ include-group = "general-all" },
8993
]
90-
optional-dependencies.graphics = [
91-
"ansys-tools-visualization-interface>=0.2.6",
92-
"pygltflib>=1.16,<2",
93-
"pyvista[jupyter]>=0.38.1,<1",
94-
"vtk>=9,<10",
94+
tests = [
95+
{ include-group = "general-all" },
96+
{ include-group = "tests-minimal" },
9597
]
96-
optional-dependencies.tests = [
98+
general-all = [
9799
"ansys-platform-instancemanagement==1.1.2",
98100
"ansys-tools-path==0.7.3",
99101
"ansys-tools-visualization-interface==0.12.1",
@@ -107,29 +109,19 @@ optional-dependencies.tests = [
107109
"pint==0.24.4",
108110
"protobuf==6.32.1",
109111
"pygltflib==1.16.5",
110-
"pytest==8.4.2",
111-
"pytest-cov==7.0.0",
112-
"pytest-pyvista==0.2.0",
113112
"pyvista[jupyter]==0.46.3",
114-
"pyyaml==6.0.3",
115113
"requests==2.32.5",
116114
"scipy==1.15.3",
117115
"semver==3.0.4",
118116
"six==1.17.0",
119117
"vtk==9.5.2",
120118
]
121-
optional-dependencies.tests-minimal = [
119+
tests-minimal = [
122120
"pytest==8.4.2",
123121
"pytest-cov==7.0.0",
124122
"pytest-pyvista==0.2.0",
125123
"pyyaml==6.0.3",
126124
]
127-
urls.Changelog = "https://github.com/ansys/pyansys-geometry/blob/main/doc/source/changelog.rst"
128-
urls.Discussions = "https://github.com/ansys/pyansys-geometry/discussions"
129-
urls.Documentation = "https://geometry.docs.pyansys.com"
130-
urls.Issues = "https://github.com/ansys/pyansys-geometry/issues"
131-
urls.Releases = "https://github.com/ansys/pyansys-geometry/releases"
132-
urls.Source = "https://github.com/ansys/pyansys-geometry"
133125

134126
[tool.flit.module]
135127
name = "ansys.geometry.core"

0 commit comments

Comments
 (0)