Skip to content
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
eef2752
feat: Migrate to UV
AlejandroFernandezLuces Jul 18, 2025
184466e
fix: Add dependency groups
AlejandroFernandezLuces Jul 18, 2025
1958983
fix: uv tests
AlejandroFernandezLuces Jul 18, 2025
41bdf3a
fix: Add uv to ci
AlejandroFernandezLuces Jul 18, 2025
152b57d
fix: uv
AlejandroFernandezLuces Jul 18, 2025
d13d8e0
fix: uv
AlejandroFernandezLuces Jul 18, 2025
c0c4eb8
fix: uv in PyMAPDL tests
AlejandroFernandezLuces Jul 18, 2025
971a46a
maint: fix doc building
AlejandroFernandezLuces Jul 21, 2025
eb23e50
fix: Reorder toml
AlejandroFernandezLuces Jul 21, 2025
a747b19
fix: toml
AlejandroFernandezLuces Jul 21, 2025
6e005fe
fix: docs makefile
AlejandroFernandezLuces Jul 21, 2025
2dc6dcb
fix: toml
AlejandroFernandezLuces Jul 21, 2025
8281d91
fix: toml
AlejandroFernandezLuces Jul 21, 2025
d734624
fix: ci
AlejandroFernandezLuces Jul 21, 2025
0135b40
fix: ci
AlejandroFernandezLuces Jul 21, 2025
58d8c59
temp: Fix ci
AlejandroFernandezLuces Jul 21, 2025
a1da13e
fix: ci
AlejandroFernandezLuces Jul 21, 2025
eacf663
fix: use system flag
AlejandroFernandezLuces Jul 21, 2025
d705e26
fix: ci
AlejandroFernandezLuces Jul 21, 2025
8f432db
fix: CI
AlejandroFernandezLuces Jul 21, 2025
1d5755b
fix: ci
AlejandroFernandezLuces Jul 21, 2025
d8ca1c9
fix: ci
AlejandroFernandezLuces Jul 21, 2025
a94d4e1
fix: toml
AlejandroFernandezLuces Jul 21, 2025
dae8554
fix: CI
AlejandroFernandezLuces Jul 22, 2025
5b4c271
fix: CI
AlejandroFernandezLuces Jul 22, 2025
4947ea0
fix: CI
AlejandroFernandezLuces Jul 22, 2025
05974c0
fix: ci
AlejandroFernandezLuces Jul 22, 2025
dc10ae2
ci
AlejandroFernandezLuces Jul 22, 2025
0d6b511
fix: Disable test
AlejandroFernandezLuces Jul 22, 2025
e001ea4
ci
AlejandroFernandezLuces Jul 22, 2025
cb504d1
maint: Update lock
AlejandroFernandezLuces Jul 22, 2025
05b3373
Apply suggestions from code review
AlejandroFernandezLuces Jul 22, 2025
fec7334
fix: Python version, grpcio version
AlejandroFernandezLuces Jul 22, 2025
b223e6b
Merge branch 'feat/migrate-uv' of https://github.com/ansys-internal/a…
AlejandroFernandezLuces Jul 22, 2025
c7e4a68
fix: pytest command
AlejandroFernandezLuces Jul 22, 2025
458ceb8
fix: CI
AlejandroFernandezLuces Jul 22, 2025
b6ac171
fix: CI doc build
AlejandroFernandezLuces Jul 22, 2025
4bb4a2d
fix: grpcio version
AlejandroFernandezLuces Jul 22, 2025
2d98aeb
Apply suggestions from code review
AlejandroFernandezLuces Jul 22, 2025
8423bba
fix: suggestion
AlejandroFernandezLuces Jul 22, 2025
f09c676
fix: grpcio version
AlejandroFernandezLuces Jul 23, 2025
2c18c09
fix: Only test deps
AlejandroFernandezLuces Jul 23, 2025
f5d1d5f
fix: remove sphinx dependency
AlejandroFernandezLuces Jul 23, 2025
211397e
test
AlejandroFernandezLuces Jul 23, 2025
c66bb32
fix: PyMAPDL tests
AlejandroFernandezLuces Jul 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,23 @@ jobs:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
cache: 'pip'

- name: Install dependencies
- name: Install uv and create venv
run: |
python -m pip install --upgrade pip
pip install -e .[tests]
pip install tests/launcher/pkg_with_entrypoint
pip install uv
uv venv
source .venv/bin/activate

- name: Install project dependencies
run: |
source .venv/bin/activate
uv pip install -e .[tests]
uv pip install tests/launcher/pkg_with_entrypoint

- name: Run tests
run: |
pytest
source .venv/bin/activate
uv run pytest

# - uses: codecov/codecov-action@v5
# name: 'Upload coverage to CodeCov'
Expand All @@ -81,6 +89,7 @@ jobs:
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
check-links: false # Delete after first release
use-uv: true

package:
name: Package library
Expand Down
53 changes: 27 additions & 26 deletions .github/workflows/run_mapdl_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,36 @@ env:

jobs:
build-tests:
name: Build and Testing
runs-on: ubuntu-22.04
container:
image: ghcr.io/ansys/pymapdl/mapdl:v22.2-ubuntu
options: "-u=0:0 --entrypoint /bin/bash"
credentials:
username: ${{ secrets.GH_USERNAME }}
password: ${{ secrets.GH_TOKEN }}
image: ghcr.io/ansys/pymapdl/mapdl:v22.2-ubuntu
options: "-u=0:0 --entrypoint /bin/bash"
credentials:
username: ${{ secrets.GH_USERNAME }}
password: ${{ secrets.GH_TOKEN }}
env:
ANSYS_LOCAL: true
ON_UBUNTU: true
ANSYS_LOCAL: true
ON_UBUNTU: true

steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
- name: Install library, with test extra
run: |
python -m pip install .[tests]
python -m pip install tests/launcher/pkg_with_entrypoint
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
- name: Install uv and create venv
run: |
python -m pip install --upgrade pip
pip install uv
- name: Install project dependencies
run: |
uv pip install --system .[tests]
uv pip install --system tests/launcher/pkg_with_entrypoint
- name: Run tests
run: |
python -m pytest -vx --cov=${{ env.PACKAGE_NAMESPACE }} --cov-report=term --cov-report=xml:.cov/coverage.xml --cov-report=html:.cov/html


- name: Unit testing
run: |
python -m pytest -vx --cov=${{ env.PACKAGE_NAMESPACE }} --cov-report=term --cov-report=xml:.cov/coverage.xml --cov-report=html:.cov/html

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
files: .cov/coverage.xml
# - uses: codecov/codecov-action@v5
# name: 'Upload coverage to CodeCov'
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# You can set these variables from the command line.
SPHINXOPTS = -j auto -W --color
SPHINXBUILD = sphinx-build
SPHINXBUILD = uv run sphinx-build
APIDIR = api
EXAMPLESDIR = examples
SOURCEDIR = source
Expand Down
3 changes: 2 additions & 1 deletion doc/styles/config/vocabularies/ANSYS/accept.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
(?i)Ansys
pytest
ANS
ANS
astroid
33 changes: 24 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "ansys-tools-common"
version = "0.1.dev0"
description = "A set of tools for PyAnsys libraries"
readme = "README.rst"
requires-python = ">=3.10,<4"
requires-python = ">=3.11,<4"
license = "MIT"
license-files = ["LICENSE"]
authors = [{ name = "ANSYS, Inc.", email = "[email protected]" }]
Expand All @@ -32,12 +32,12 @@ dependencies = [

[project.optional-dependencies]
all = [
"ansys-tools-visualization-tool>=0.9.2",
"ansys-tools-visualization-interface>=0.9.2",
"ansys-tools-filetransfer>=0.1.1",
]

graphics = [
"ansys-tools-visualization-tool>=0.9.2",
"ansys-tools-visualization-interface>=0.9.2",
]

filetransfer = [
Expand All @@ -50,13 +50,13 @@ tests = [
"pyfakefs==5.8.0",
"hypothesis==6.135.10",
"grpcio==1.73.0",
"grpcio-health-checking==1.73.0",
"grpcio-health-checking==1.68.0",
]

doc = [
"ansys-sphinx-theme==1.5.2",
"grpcio==1.73.0",
"grpcio-health-checking==1.73.0",
"grpcio-health-checking==1.68.0",
"sphinx==8.2.3",
"sphinx-autoapi==3.6.0",
"sphinx-click==4.4.0",
Expand All @@ -66,6 +66,17 @@ doc = [
"sphinx-jinja==2.0.2",
]

[dependency-groups]
dev = [
"pytest==8.4.0",
"pytest-cov==6.1.1",
"pyfakefs==5.8.0",
"hypothesis==6.135.10",
"grpcio==1.73.0",
"grpcio-health-checking==1.68.0",
"pre-commit"
]

[project.scripts]
save-ansys-path = "ansys.tools.common.path.save:cli"
ansys-launcher = "ansys.tools.local_product_launcher._cli:cli"
Expand All @@ -77,8 +88,12 @@ Discussions = "https://github.com/ansys/ansys-tools-common/discussions"
Documentation = "https://ansys.tools.docs.pyansys.com/"
Releases = "https://github.com/ansys/ansys-tools-common/releases/"

[tool.flit.module]
name = "ansys.tools.common"
[tool.uv]
package = true

[tool.hatch.build.targets.wheel]
packages = ["src/ansys"]


[tool.pytest.ini_options]
addopts = "-ra --cov=ansys.tools.common --cov-report html:.cov/html --cov-report xml:.cov/xml --cov-report term --capture=sys -vv"
Expand Down
Loading
Loading