Skip to content

Commit 85b2733

Browse files
authored
Merge branch 'main' into feat/add-design-points-and-modify-named-selection
2 parents 1eed8dc + ec8cf85 commit 85b2733

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1944
-580
lines changed

.ci/clean_registry.py

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/ci_cd.yml

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ env:
1313
PACKAGE_NAME: 'ansys-geometry-core'
1414
PACKAGE_NAMESPACE: 'ansys.geometry.core'
1515
DOCUMENTATION_CNAME: 'geometry.docs.pyansys.com'
16-
ANSRV_GEO_IMAGE: ghcr.io/pyansys/geometry:windows-latest
16+
ANSRV_GEO_IMAGE_WINDOWS_TAG: ghcr.io/pyansys/geometry:windows-latest
17+
ANSRV_GEO_IMAGE_LINUX_TAG: ghcr.io/pyansys/geometry:linux-latest
1718
ANSRV_GEO_PORT: 700
1819
ANSRV_GEO_LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
1920
GEO_CONT_NAME: ans_geo
@@ -86,8 +87,8 @@ jobs:
8687
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
8788
# =================================================================================================
8889

89-
testing:
90-
name: Testing and coverage
90+
testing-windows:
91+
name: Testing and coverage (Windows)
9192
needs: [smoke-tests]
9293
runs-on: [self-hosted, pygeometry]
9394

@@ -122,13 +123,13 @@ jobs:
122123
password: ${{ secrets.GITHUB_TOKEN }}
123124

124125
- name: Download Geometry service container (if needed)
125-
run: docker pull $env:ANSRV_GEO_IMAGE
126+
run: docker pull $env:ANSRV_GEO_IMAGE_WINDOWS_TAG
126127

127128
- name: Start Geometry service and verify start
128129
run: |
129130
.\.venv\Scripts\Activate.ps1
130131
$env:ANSRV_GEO_PORT_MAP = $env:ANSRV_GEO_PORT + ":50051"
131-
docker run --detach --name $env:GEO_CONT_NAME -e LICENSE_SERVER=$env:ANSRV_GEO_LICENSE_SERVER -p $env:ANSRV_GEO_PORT_MAP $env:ANSRV_GEO_IMAGE
132+
docker run --detach --name $env:GEO_CONT_NAME -e LICENSE_SERVER=$env:ANSRV_GEO_LICENSE_SERVER -p $env:ANSRV_GEO_PORT_MAP $env:ANSRV_GEO_IMAGE_WINDOWS_TAG
132133
python -c "from ansys.geometry.core.connection.validate import validate; validate()"
133134
134135
- uses: actions/cache@v3
@@ -138,8 +139,6 @@ jobs:
138139
restore-keys: pyvista-image-cache-v-${{ env.RESET_IMAGE_CACHE }}
139140

140141
- name: Testing
141-
# TODO : Once the container is available on Linux we should be able to run it as
142-
# a service, allowing to remove this stage
143142
run: |
144143
.\.venv\Scripts\Activate.ps1
145144
pytest -v
@@ -210,13 +209,13 @@ jobs:
210209
password: ${{ secrets.GITHUB_TOKEN }}
211210

212211
- name: Download Geometry service container (if needed)
213-
run: docker pull $env:ANSRV_GEO_IMAGE
212+
run: docker pull $env:ANSRV_GEO_IMAGE_WINDOWS_TAG
214213

215214
- name: Start Geometry service and verify start
216215
run: |
217216
.\.venv\Scripts\Activate.ps1
218217
$env:ANSRV_GEO_PORT_MAP = $env:ANSRV_GEO_PORT + ":50051"
219-
docker run --detach --name $env:GEO_CONT_NAME -e LICENSE_SERVER=$env:ANSRV_GEO_LICENSE_SERVER -p $env:ANSRV_GEO_PORT_MAP $env:ANSRV_GEO_IMAGE
218+
docker run --detach --name $env:GEO_CONT_NAME -e LICENSE_SERVER=$env:ANSRV_GEO_LICENSE_SERVER -p $env:ANSRV_GEO_PORT_MAP $env:ANSRV_GEO_IMAGE_WINDOWS_TAG
220219
python -c "from ansys.geometry.core.connection.validate import validate; validate()"
221220
222221
- name: Build the documentation (HTML)
@@ -256,9 +255,42 @@ jobs:
256255
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUNNING ON SELF-HOSTED RUNNER ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
257256
# =================================================================================================
258257

258+
testing-linux:
259+
name: Testing and coverage (Linux)
260+
needs: [smoke-tests]
261+
runs-on: ubuntu-latest
262+
263+
steps:
264+
- name: Login in Github Container registry
265+
uses: docker/login-action@v2
266+
with:
267+
registry: ghcr.io
268+
username: ${{ github.actor }}
269+
password: ${{ secrets.GITHUB_TOKEN }}
270+
271+
- name: Pull and launch geometry service
272+
run: |
273+
docker pull ${{ env.ANSRV_GEO_IMAGE_LINUX_TAG }}
274+
docker run --detach --name ${{ env.GEO_CONT_NAME }} -e LICENSE_SERVER=${{ env.ANSRV_GEO_LICENSE_SERVER }} -p ${{ env.ANSRV_GEO_PORT }}:50051 ${{ env.ANSRV_GEO_IMAGE_LINUX_TAG }}
275+
276+
# TODO - FOLLOW UP FOR #395 - ACTIVATE TESTING
277+
#
278+
# - name: Run pytest
279+
# uses: pyansys/actions/tests-pytest@v3
280+
# with:
281+
# python-version: ${{ env.MAIN_PYTHON_VERSION }}
282+
# requires-xvfb: true
283+
284+
- name: Stop the Geometry service
285+
if: always()
286+
run: |
287+
docker stop ${{ env.GEO_CONT_NAME }}
288+
docker logs ${{ env.GEO_CONT_NAME }}
289+
docker rm ${{ env.GEO_CONT_NAME }}
290+
259291
package:
260292
name: Package library
261-
needs: [testing, docs]
293+
needs: [testing-windows, docs]
262294
runs-on: ubuntu-latest
263295
steps:
264296
- name: Build library source and wheel artifacts

.github/workflows/nightly_docker_test.yml

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@ on:
66

77
env:
88
MAIN_PYTHON_VERSION: '3.9' # use python3.9, self-hosted has an issue with 3.10
9+
ANSRV_GEO_IMAGE_WINDOWS_TAG: ghcr.io/pyansys/geometry:windows-latest-unstable
10+
ANSRV_GEO_IMAGE_LINUX_TAG: ghcr.io/pyansys/geometry:linux-latest-unstable
11+
ANSRV_GEO_PORT: 710
12+
ANSRV_GEO_LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
13+
GEO_CONT_NAME: ans_geo_nightly
914

1015
concurrency:
1116
group: ${{ github.workflow }}-${{ github.ref }}
1217
cancel-in-progress: true
1318

1419
jobs:
1520

16-
all-tests:
17-
name: Run all tests against server
21+
windows-tests:
22+
name: Nightly unstable testing - Windows
1823
runs-on: [self-hosted, pygeometry]
19-
env:
20-
ANSRV_GEO_IMAGE: ghcr.io/pyansys/geometry:windows-latest-unstable
21-
ANSRV_GEO_PORT: 710
22-
ANSRV_GEO_LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
23-
GEO_CONT_NAME: ans_geo_nightly
2424

2525
steps:
2626
- uses: actions/checkout@v3
@@ -54,13 +54,13 @@ jobs:
5454
password: ${{ secrets.GITHUB_TOKEN }}
5555

5656
- name: Download Geometry service container (if needed)
57-
run: docker pull $env:ANSRV_GEO_IMAGE
57+
run: docker pull $env:ANSRV_GEO_IMAGE_WINDOWS_TAG
5858

5959
- name: Start Geometry service and verify start
6060
run: |
6161
.\.venv\Scripts\Activate.ps1
6262
$env:ANSRV_GEO_PORT_MAP = $env:ANSRV_GEO_PORT + ":50051"
63-
docker run --detach --name $env:GEO_CONT_NAME -e LICENSE_SERVER=$env:ANSRV_GEO_LICENSE_SERVER -p $env:ANSRV_GEO_PORT_MAP $env:ANSRV_GEO_IMAGE
63+
docker run --detach --name $env:GEO_CONT_NAME -e LICENSE_SERVER=$env:ANSRV_GEO_LICENSE_SERVER -p $env:ANSRV_GEO_PORT_MAP $env:ANSRV_GEO_IMAGE_WINDOWS_TAG
6464
python -c "from ansys.geometry.core.connection.validate import validate; validate()"
6565
6666
- name: Run PyGeometry tests
@@ -78,3 +78,28 @@ jobs:
7878
- name: Clean all Docker dangling images
7979
if: always()
8080
run: docker image prune -f
81+
82+
linux-tests:
83+
name: Nightly unstable testing - Linux
84+
runs-on: ubuntu-latest
85+
86+
steps:
87+
- name: Login in Github Container registry
88+
uses: docker/login-action@v2
89+
with:
90+
registry: ghcr.io
91+
username: ${{ github.actor }}
92+
password: ${{ secrets.GITHUB_TOKEN }}
93+
94+
- name: Pull, launch, and validate geometry service
95+
run: |
96+
docker pull ${{ env.ANSRV_GEO_IMAGE_LINUX_TAG }}
97+
docker run --detach --name ${{ env.GEO_CONT_NAME }} -e LICENSE_SERVER=${{ env.ANSRV_GEO_LICENSE_SERVER }} -p ${{ env.ANSRV_GEO_PORT }}:50051 ${{ env.ANSRV_GEO_IMAGE_LINUX_TAG }}
98+
99+
# TODO - FOLLOW UP FOR #395 - ACTIVATE TESTING
100+
#
101+
# - name: Run pytest
102+
# uses: pyansys/actions/tests-pytest@v3
103+
# with:
104+
# python-version: ${{ env.MAIN_PYTHON_VERSION }}
105+
# requires-xvfb: true

.github/workflows/package_cleanup.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,10 @@ jobs:
2020
PACKAGE_DELETION_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2121

2222
steps:
23-
- name: "Checkout repository"
24-
uses: actions/checkout@v3
2523

26-
- name: Set up Python
27-
uses: actions/setup-python@v4
28-
with:
29-
python-version: '3.10'
30-
31-
- name: "Install requirements"
32-
run: |
33-
pip install ghapi
34-
35-
- name: "Perform cleanup"
36-
run: |
37-
python .ci/clean_registry.py
24+
- name: "Perform versions cleanup - except certain tags"
25+
uses: pyansys/actions/hk-package-clean-except@main
26+
with:
27+
package-name: 'geometry'
28+
token: ${{ secrets.GITHUB_TOKEN }}
29+
tags-kept: 'windows-latest, windows-latest-unstable, linux-latest, linux-latest-unstable'

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
repos:
22

33
- repo: https://github.com/psf/black
4-
rev: 22.12.0 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!!
4+
rev: 23.1.0 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!!
55
hooks:
66
- id: black
77

88
- repo: https://github.com/adamchainz/blacken-docs
99
rev: 1.13.0
1010
hooks:
1111
- id: blacken-docs
12-
additional_dependencies: [black==22.12.0]
12+
additional_dependencies: [black==23.1.0]
1313

1414
- repo: https://github.com/pycqa/isort
1515
rev: 5.12.0

AUTHORS.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Authors
2+
3+
## Project Lead
4+
5+
* [Roberto Pastor](https://github.com/RobPasMue)
6+
7+
## Contributors
8+
9+
* [Jonah Boling](https://github.com/jonahrb)
10+
* [Matteo Bini](https://github.com/b-matteo)
11+
* [Chad Queen](https://github.com/chadqueen)
12+
* [Revathy Venugopal](https://github.com/Revathyvenugopal162)
13+
* [Maxime Rey](https://github.com/MaxJPRey)
14+
* [Alexander Kaszynski](https://github.com/akaszynski)
15+
* [Jorge Martínez](https://github.com/jorgepiloto)
16+
* [Alejandro Fernández](https://github.com/AlejandroFernandezLuces)

CONTRIBUTING.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
1-
# Contributing
1+
# Contributing
22

3+
We absolutely welcome any code contributions and we hope that this
4+
guide will facilitate an understanding of the PyGeometry code
5+
repository. It is important to note that while the PyGeometry software
6+
package is maintained by ANSYS and any submissions will be reviewed
7+
thoroughly before merging, we still seek to foster a community that can
8+
support user questions and develop new features to make this software
9+
a useful tool for all users. As such, we welcome and encourage any
10+
questions or submissions to this repository.
11+
12+
For contributing to this project, please refer to the [PyAnsys Developer's Guide].
13+
Further information about contributing to PyGeometry can be found in [Contributing].
14+
15+
[PyAnsys Developer's Guide]: https://dev.docs.pyansys.com/index.html
16+
[Contributing]: https://geometry.docs.pyansys.com/dev/contributing.html

README.rst

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ The following OS-dependent tags are available:
6565

6666
* ``windows-latest``
6767
* ``windows-latest-unstable``
68+
* ``linux-latest``
69+
* ``linux-latest-unstable``
6870

6971
Next, you will be ready to run the Geometry service directly from PyGeometry:
7072

@@ -85,7 +87,7 @@ First, start the Geometry service locally. If you have Docker installed and have
8587

8688
.. code:: bash
8789
88-
docker run --name ans_geo -e LICENSE_SERVER=<LICENSE-SERVER> -p 50051:50051 ghcr.io/pyansys/geometry:windows-latest
90+
docker run --name ans_geo -e LICENSE_SERVER=<LICENSE-SERVER> -p 50051:50051 ghcr.io/pyansys/geometry:<TAG>
8991
9092
The Geometry service has a set of environment variables that are **mandatory**:
9193

@@ -108,7 +110,7 @@ Next, connect to the service with:
108110
By default ``Modeler`` connects to ``127.0.0.1`` (``'localhost'``) on
109111
port ``50051``. You can change this by modifying the ``host`` and ``port``
110112
parameters of ``Modeler``, but note that you must also modify
111-
your ``docker run`` command by changing ``<HOST-PORT>-50051``.
113+
your ``docker run`` command by changing ``<HOST-PORT>:50051``.
112114

113115
If you want to change the defaults, modify the following environment variables:
114116

@@ -119,7 +121,14 @@ If you want to change the defaults, modify the following environment variables:
119121
export ANSRV_GEO_HOST=127.0.0.1
120122
export ANSRV_GEO_PORT=50051
121123
122-
**On Windows**
124+
**On Windows Powershell**
125+
126+
.. code::
127+
128+
$env:ANSRV_GEO_HOST="127.0.0.1"
129+
$env:ANSRV_GEO_PORT=50051
130+
131+
**On Windows CMD**
123132

124133
.. code::
125134
@@ -182,6 +191,12 @@ To install PyGeometry in developer mode, perform these steps:
182191
183192
git clone https://github.com/pyansys/pygeometry
184193
194+
#. Access the ``pygeometry`` directory where the repository has been cloned:
195+
196+
.. code:: bash
197+
198+
cd pygeometry
199+
185200
#. Create a clean Python virtual environment and activate it:
186201

187202
.. code:: bash
@@ -204,18 +219,21 @@ To install PyGeometry in developer mode, perform these steps:
204219
205220
python -m pip install -U pip tox
206221
207-
208222
#. Install the project in editable mode:
209223

210224
.. code:: bash
211-
212-
python -m pip install ansys-geometry-core
213-
214-
#. Verify your development installation by running:
225+
226+
# Install the minimum requirements
227+
python -m pip install -e .
215228
216-
.. code:: bash
217-
218-
tox
229+
# Install the minimum + tests requirements
230+
python -m pip install -e .[tests]
231+
232+
# Install the minimum + doc requirements
233+
python -m pip install -e .[doc]
234+
235+
# Install all requirements
236+
python -m pip install -e .[tests,doc]
219237
220238
Install in offline mode
221239
^^^^^^^^^^^^^^^^^^^^^^^
@@ -233,7 +251,7 @@ For example, on Linux with Python 3.7, unzip the wheelhouse archive and install
233251

234252
.. code:: bash
235253
236-
unzip ansys-geometry-core-v0.2.dev0-wheelhouse-Linux-3.7.zip wheelhouse
254+
unzip ansys-geometry-core-v0.3.dev0-wheelhouse-Linux-3.7.zip wheelhouse
237255
pip install ansys-geometry-core -f wheelhouse --no-index --upgrade --ignore-installed
238256
239257
If you're on Windows with Python 3.9, unzip to a wheelhouse directory and install using the preceding command.
40.3 KB
Loading
12 KB
Loading

0 commit comments

Comments
 (0)