Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
python-package-name: 'ansys-acp-core'
dev-mode: ${{ github.ref != 'refs/heads/main' }}
extra-targets: "plotting"
extra-targets: "graphics"

testing-direct-launch:
name: Testing with direct launch mode
Expand Down Expand Up @@ -219,7 +219,7 @@ jobs:
working-directory: tests/unittests
run: |
docker pull $IMAGE_NAME
poetry run pytest -v --license-server=1055@$LICENSE_SERVER --no-server-log-files --docker-image=$IMAGE_NAME --cov=ansys.acp.core --cov-report=term --cov-report=xml --cov-report=html -m "not plotting"
poetry run pytest -v --license-server=1055@$LICENSE_SERVER --no-server-log-files --docker-image=$IMAGE_NAME --cov=ansys.acp.core --cov-report=term --cov-report=xml --cov-report=html -m "not graphics"
env:
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
IMAGE_NAME: ghcr.io/ansys/acp:${{ matrix.server-version }}
Expand Down Expand Up @@ -270,7 +270,7 @@ jobs:
run: |
pip install -U pip
pip install 'poetry!=1.7.0'
poetry install --with test --extras plotting
poetry install --with test --extras graphics

- name: Build API package from custom branch
if: "${{ env.API_BRANCH != '' }}"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
python -m venv test_env
. test_env/bin/activate

pip install $(echo dist/*.whl)[plotting]
pip install $(echo dist/*.whl)[graphics]

poetry config virtualenvs.create false --local
poetry install --no-root --only test --extras plotting
poetry install --no-root --only test --extras graphics

- name: Login in Github Container registry
uses: docker/login-action@v3
Expand Down
277 changes: 139 additions & 138 deletions poetry.lock

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ docker = ">=7.0"
[tool.poetry.extras]
# For the examples, we keep an extra to simplify installing these dependencies for the
# end user.
plotting = ["pyvista"]
plotting = ["pyvista"] # To be deprecated by "graphics"
graphics = ["pyvista"]
examples = [
"ansys-mapdl-core",
"ansys-dpf-composites",
Expand Down Expand Up @@ -168,7 +169,7 @@ ignore_missing_imports = true
# This section is required even if empty, so that pytest recognizes this
# file as a pytest configuration file, and sets the containing directory
# as its 'rootdir'.
markers = "plotting"
markers = "graphics"

[tool.coverage.run]
branch = true
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/acp/core/_utils/pyvista_import_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def inner(*args: P.args, **kwargs: P.kwargs) -> T:
except ImportError as exc:
raise ImportError(
f"The '{func.__name__}' function requires the 'pyvista' package. "
"Please reinstall PyACP with 'pip install ansys-acp-core[plotting]'."
"Please reinstall PyACP with 'pip install ansys-acp-core[graphics]'."
) from exc
return func(*args, **kwargs)

Expand Down
6 changes: 3 additions & 3 deletions tests/unittests/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def test_nodal_data(minimal_complete_model):
numpy.testing.assert_allclose(data.node_labels.values, np.array([1, 2, 3, 4]))


@pytest.mark.plotting
@pytest.mark.graphics
def test_mesh_data_to_pyvista(minimal_complete_model):
import pyvista

Expand All @@ -200,7 +200,7 @@ def test_mesh_data_to_pyvista(minimal_complete_model):
assert pv_mesh.n_cells == 1


@pytest.mark.plotting
@pytest.mark.graphics
def test_elemental_data_to_pyvista(minimal_complete_model):
import pyvista

Expand All @@ -211,7 +211,7 @@ def test_elemental_data_to_pyvista(minimal_complete_model):
assert pv_mesh.n_cells == 1


@pytest.mark.plotting
@pytest.mark.graphics
@pytest.mark.parametrize("component", [e.value for e in ElementalDataType])
def test_elemental_data_to_pyvista_with_component(minimal_complete_model, component):
import pyvista
Expand Down
8 changes: 4 additions & 4 deletions tests/unittests/test_modeling_ply.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def test_nodal_data(simple_modeling_ply):
)


@pytest.mark.plotting
@pytest.mark.graphics
def test_elemental_data_to_pyvista(minimal_complete_model, simple_modeling_ply):
import pyvista

Expand All @@ -352,7 +352,7 @@ def test_elemental_data_to_pyvista(minimal_complete_model, simple_modeling_ply):
assert pv_mesh.n_cells == 1


@pytest.mark.plotting
@pytest.mark.graphics
@pytest.mark.parametrize("component", [e.value for e in ElementalDataType])
def test_elemental_data_to_pyvista_with_component(
minimal_complete_model, simple_modeling_ply, component
Expand Down Expand Up @@ -388,7 +388,7 @@ def test_elemental_data_to_pyvista_with_component(
assert pv_mesh.n_cells == 1


@pytest.mark.plotting
@pytest.mark.graphics
def test_nodal_data_to_pyvista(minimal_complete_model, simple_modeling_ply):
import pyvista

Expand All @@ -399,7 +399,7 @@ def test_nodal_data_to_pyvista(minimal_complete_model, simple_modeling_ply):
assert pv_mesh.n_cells == 1


@pytest.mark.plotting
@pytest.mark.graphics
@pytest.mark.parametrize("component", [e.value for e in NodalDataType])
def test_nodal_data_to_pyvista_with_component(
minimal_complete_model, simple_modeling_ply, component
Expand Down
4 changes: 2 additions & 2 deletions tests/unittests/test_plot_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def case_empty_mesh_invalid(model, skip_before_version):
return model.create_element_set().mesh


@pytest.mark.plotting
@pytest.mark.graphics
@parametrize_with_cases("mesh", cases=".", glob="*_valid")
def test_direction_plotter_valid_cases(model, mesh, load_model_from_tempfile):
with load_model_from_tempfile() as model:
Expand Down Expand Up @@ -81,7 +81,7 @@ def test_direction_plotter_valid_cases(model, mesh, load_model_from_tempfile):
)


@pytest.mark.plotting
@pytest.mark.graphics
@parametrize_with_cases("mesh", cases=".", glob="*_invalid")
def test_direction_plotter_invalid_cases(model, mesh, load_model_from_tempfile):
with load_model_from_tempfile() as model:
Expand Down