Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change DEFAULT_PRODUCT_VERSION to 241 #648

Merged
merged 9 commits into from
Feb 3, 2025
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
39 changes: 19 additions & 20 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ on:
tags:
- "*"
branches:
- main

- release/0.17

env:
MAIN_PYTHON_VERSION: "3.10"
DOCUMENTATION_CNAME: "additive.docs.pyansys.com"
LIBRARY_NAME: "ansys-additive-core"
# NOTE: The server needs to stay in a private registry.
ANSYS_PRODUCT_IMAGE: "ghcr.io/ansys-internal/additive:24.2.0-alpha1"
ANSYS_PRODUCT_IMAGE: "ghcr.io/ansys-internal/additive:24.1.0-3"
ANSYS_PRODUCT_CONTAINER: "ansys-additive-container"

concurrency:
Expand All @@ -28,14 +27,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Run PyAnsys code style checks"
uses: ansys/actions/code-style@v4
uses: ansys/actions/code-style@v8

doc-style:
name: "Running documentation style checks"
runs-on: ubuntu-latest
steps:
- name: "Running documentation style checks"
uses: ansys/actions/doc-style@v4
uses: ansys/actions/doc-style@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -55,7 +54,7 @@ jobs:
os: macos-latest
steps:
- name: "Build a wheelhouse of the Python library"
uses: ansys/actions/build-wheelhouse@v4
uses: ansys/actions/build-wheelhouse@v8
with:
library-name: ${{ env.LIBRARY_NAME }}
operating-system: ${{ matrix.os }}
Expand All @@ -72,19 +71,19 @@ jobs:
fail-fast: false
steps:
- name: "Run pytest"
uses: ansys/actions/tests-pytest@v4
uses: ansys/actions/tests-pytest@v8

- name: Upload Coverage Results
if: always()
uses: actions/upload-artifact@v3
if: (matrix.python-version == env.MAIN_PYTHON_VERSION) && (runner.os == 'Linux')
uses: actions/upload-artifact@v4
with:
name: coverage-html
path: .cov/html
retention-days: 7

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v5
if: (matrix.python-version == env.MAIN_PYTHON_VERSION) && (runner.os == 'Linux')
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
Expand Down Expand Up @@ -134,7 +133,7 @@ jobs:
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}

- name: "Setup headless display"
uses: pyvista/setup-headless-display-action@v2
uses: pyvista/setup-headless-display-action@v3

- name: "Checkout code"
uses: actions/checkout@v4
Expand Down Expand Up @@ -180,14 +179,14 @@ jobs:
BUILD_EXAMPLES_LONG: true

- name: Upload HTML documentation
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: documentation-html
path: doc/_build/html
retention-days: 7

- name: Upload PDF documentation
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: documentation-pdf
path: doc/_build/latex/*.pdf
Expand Down Expand Up @@ -224,7 +223,7 @@ jobs:

- name: "Upload container logs as artifacts"
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: docker-logs.txt
path: docker-logs.txt
Expand All @@ -235,7 +234,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Build library source and wheel artifacts"
uses: ansys/actions/build-library@v4
uses: ansys/actions/build-library@v8
with:
library-name: ${{ env.LIBRARY_NAME }}
python-version: ${{ env.MAIN_PYTHON_VERSION }}
Expand All @@ -247,14 +246,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Release to the PyPI repository"
uses: ansys/actions/release-pypi-public@v4
uses: ansys/actions/release-pypi-public@v8
with:
library-name: ${{ env.LIBRARY_NAME }}
twine-username: "__token__"
twine-token: ${{ secrets.PYPI_TOKEN }}

- name: "Release to GitHub"
uses: ansys/actions/release-github@v4
uses: ansys/actions/release-github@v8
with:
library-name: ${{ env.LIBRARY_NAME }}

Expand All @@ -265,7 +264,7 @@ jobs:
if: github.event_name == 'push'
steps:
- name: "Deploy the latest documentation"
uses: ansys/actions/doc-deploy-dev@v4
uses: ansys/actions/doc-deploy-dev@v8
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -277,7 +276,7 @@ jobs:
needs: [release]
steps:
- name: "Deploy the stable documentation"
uses: ansys/actions/doc-deploy-stable@v4
uses: ansys/actions/doc-deploy-stable@v8
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ repos:
rev: v2.2.5
hooks:
- id: codespell
args: ["--ignore-words", "doc/styles/Vocab/ANSYS/accept.txt"]
args:
["--ignore-words", "doc/styles/config/vocabularies/ANSYS/accept.txt"]
exclude_types: ["jupyter"]

# To be activated after quick dev cycles
Expand Down
3 changes: 3 additions & 0 deletions doc/source/getting_started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
Getting started
###############

.. vale off

PyAdditive is a Python client library for the Ansys Additive server. The Ansys
Additive server is distributed with the Additive option of the Structures package
in the Ansys unified installation.
Expand Down Expand Up @@ -310,6 +312,7 @@ the building requirements and then executing the build module:
python -m build
python -m twine check dist/*

.. vale on
.. LINKS AND REFERENCES
.. _black: https://github.com/psf/black
.. _flake8: https://flake8.pycqa.org/en/latest/
Expand Down
160 changes: 79 additions & 81 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,99 +1,97 @@
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
requires = ["flit_core >=3.2,<4"]

[project]
# Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections
name = "ansys-additive-core"
version = "0.17.2"
authors = [{name = "ANSYS, Inc.", email = "[email protected]"}]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Manufacturing",
"Topic :: Scientific/Engineering",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
description = "A Python client for the Ansys Additive service"
license = {file = "LICENSE"}
maintainers = [{name = "ANSYS, Inc.", email = "[email protected]"}]
name = "ansys-additive-core"
readme = "README.rst"
requires-python = ">=3.9,<4"
license = { file = "LICENSE" }
authors = [{ name = "ANSYS, Inc.", email = "[email protected]" }]
maintainers = [{ name = "ANSYS, Inc.", email = "[email protected]" }]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Manufacturing",
"Topic :: Scientific/Engineering",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
version = "0.17.3"

dependencies = [
"ansys-api-additive==1.4.1",
"ansys-platform-instancemanagement>=1.1.1",
"dill>=0.3.7",
"google-api-python-client>=1.7.11",
"googleapis-common-protos>=1.52.0",
"grpcio>=1.35.0",
"grpcio-health-checking>=1.45.0",
"importlib-metadata>=4.0",
"numpy>=1.20.3",
"pandas>=1.3.2",
"panel>=1.2.1",
"platformdirs>=3.8.0",
"plotly>=5.16.1",
"protobuf>=3.20.2,<5",
"six>=1.16.0",
"tqdm>=4.45.0",
"ansys-api-additive==1.4.1",
"ansys-platform-instancemanagement>=1.1.1",
"dill>=0.3.7",
"google-api-python-client>=1.7.11",
"googleapis-common-protos>=1.52.0",
"grpcio>=1.35.0",
"grpcio-health-checking>=1.45.0",
"importlib-metadata>=4.0",
"numpy>=1.20.3",
"pandas>=1.3.2",
"panel>=1.2.1",
"platformdirs>=3.8.0",
"plotly>=5.16.1",
"protobuf>=3.20.2,<5",
"six>=1.16.0",
"tqdm>=4.45.0",
]

[project.optional-dependencies]
tests = [
"ansys-platform-instancemanagement==1.1.2",
"dill==0.3.7",
"google-api-python-client==2.109.0",
"googleapis-common-protos==1.61.0",
"grpcio==1.59.3",
"grpcio-health-checking==1.48.2",
"numpy==1.26.2",
"pandas==2.1.3",
"panel==1.3.4",
"platformdirs==4.0.0",
"plotly==5.18.0",
"protobuf==3.20.3",
"six==1.16.0",
"tqdm==4.66.1",
# Test specific dependencies
"pytest==7.4.3",
"pytest-cov==4.0.0",
"ansys-platform-instancemanagement==1.1.2",
"dill==0.3.7",
"google-api-python-client==2.109.0",
"googleapis-common-protos==1.61.0",
"grpcio==1.59.3",
"grpcio-health-checking==1.48.2",
"numpy==1.26.2",
"pandas==2.1.3",
"panel==1.3.4",
"platformdirs==4.0.0",
"plotly==5.18.0",
"protobuf==3.20.3",
"six==1.16.0",
"tqdm==4.66.1", # Test specific dependencies
"pytest==7.4.3",
"pytest-cov==4.0.0",
]

doc = [
"ansys-sphinx-theme==0.12.5",
"enum-tools==0.11.0",
"jupyter_sphinx==0.4.0",
"matplotlib==3.8.2",
"numpydoc==1.6.0",
"panel==1.3.4",
"phantomjs==1.4.1",
"pypandoc==1.12",
"pyvista==0.42.3",
"selenium==4.15.2",
"sphinx==7.2.6",
"sphinx-autoapi==3.0.0",
#"sphinx-autoapi @ git+https://github.com/ansys/sphinx-autoapi@feat/single-page-stable",
"sphinx-autodoc-typehints==1.25.2",
"sphinx-copybutton==0.5.2",
"sphinx-design==0.5.0",
"sphinx-gallery==0.15.0",
"sphinx-jinja==2.0.2",
"sphinx-notfound-page==1.0.0",
"sphinx-toolbox==3.5.0",
"sphinxemoji==0.2.0",
"ansys-sphinx-theme==0.12.5",
"enum-tools==0.11.0",
"jupyter_sphinx==0.4.0",
"matplotlib==3.8.2",
"numpydoc==1.6.0",
"panel==1.3.4",
"phantomjs==1.4.1",
"pypandoc==1.12",
"pyvista==0.44.2",
"selenium==4.15.2",
"sphinx==7.2.6",
"sphinx-autoapi==3.0.0", #"sphinx-autoapi @ git+https://github.com/ansys/sphinx-autoapi@feat/single-page-stable",
"sphinx-autodoc-typehints==1.25.2",
"sphinx-copybutton==0.5.2",
"sphinx-design==0.5.0",
"sphinx-gallery==0.15.0",
"sphinx-jinja==2.0.2",
"sphinx-notfound-page==1.0.0",
"sphinx-toolbox==3.5.0",
"sphinxemoji==0.2.0",
]

[project.urls]
Source = "https://github.com/ansys/pyadditive"
Issues = "https://github.com/ansys/pyadditive/issues"
Documentation = "https://additive.docs.pyansys.com"
Discussions = "https://github.com/ansys/pyadditive/discussions"
Documentation = "https://additive.docs.pyansys.com"
Issues = "https://github.com/ansys/pyadditive/issues"
Releases = "https://github.com/ansys/pyadditive/releases"
Source = "https://github.com/ansys/pyadditive"

[tool.flit.module]
name = "ansys.additive.core"
Expand All @@ -102,28 +100,28 @@ name = "ansys.additive.core"
line-length = 100

[tool.isort]
profile = "black"
default_section = "THIRDPARTY"
force_sort_within_sections = true
line_length = 100
default_section = "THIRDPARTY"
profile = "black"
src_paths = ["doc", "src", "tests"]

[tool.coverage.run]
source = ["ansys.additive.core"]
omit = ["*/parametric_study/display/*"] # TODO: Remove this once unit tests are added for these files
source = ["ansys.additive.core"]

[tool.coverage.report]
show_missing = true

[tool.pytest.ini_options]
minversion = "7.1"
addopts = "-ra --cov=ansys.additive.core --cov-report html:.cov/html --cov-report xml:.cov/xml --cov-report term -vv --cov-fail-under 95"
testpaths = ["tests"]
filterwarnings = ["ignore:::.*protoc_gen_swagger*"]
minversion = "7.1"
testpaths = ["tests"]

[tool.interrogate]
ignore-semiprivate = true
ignore-magic = true
ignore-private = true
ignore-semiprivate = true
ignore-setters = true
ignore-magic = true
verbose = 1
2 changes: 1 addition & 1 deletion src/ansys/additive/core/server_connection/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"""IP address for localhost."""
PYPIM_PRODUCT_NAME = "additive"
"""Product name for the Additive server in a PyPIM environment."""
DEFAULT_PRODUCT_VERSION = "242"
DEFAULT_PRODUCT_VERSION = "241"
"""Default Ansys product version to use for the Additive server."""
ADDITIVE_SERVER_EXE_NAME = "additiveserver"
"""Name of the Additive server executable."""
Expand Down