diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 52e80fe..6a080a4 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -12,7 +12,7 @@ on: env: DOCUMENTATION_CNAME: 'engineeringworkflow.docs.pyansys.com' - MAIN_PYTHON_VERSION: '3.11' + MAIN_PYTHON_VERSION: '3.13' PACKAGE_NAME: 'ansys-engineeringworkflow-api' PACKAGE_NAMESPACE: 'ansys.engineeringworkflow.api' @@ -34,7 +34,6 @@ jobs: uses: ansys/actions/doc-style@v8 with: token: ${{ secrets.GITHUB_TOKEN }} - vale-version: "3.1.0" smoke-tests: name: "Build and Smoke tests" @@ -44,7 +43,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ['3.9', '3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12', '3.13'] should-release: - ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }} exclude: @@ -67,7 +66,7 @@ jobs: - name: Run pytest uses: ansys/actions/tests-pytest@v8 with: - python-version: ${{ env.MAIN_PYTHON_VERSION }} + python-version: ${{ matrix.python-version }} pytest-extra-args: -v --durations=10 --maxfail=10 --cov=${{ env.PACKAGE_NAMESPACE }} --cov-report=xml:coverage.xml --cov-report=html --cov-report term - name: "Upload coverage to Codecov" @@ -87,10 +86,9 @@ jobs: needs: [doc-style] steps: - name: "Run Ansys documentation building action" - uses: ansys/actions/doc-build@v8 + uses: ansys/actions/doc-build@21c9de9bee9692173780696d4a39964f20b9cfa3 # v10.1.5 with: python-version: ${{ env.MAIN_PYTHON_VERSION }} - dependencies: "texlive-fonts-extra " package: name: Package library diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 864a3ec..53359d3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,48 +2,41 @@ exclude: "tests/integration/files" repos: - repo: https://github.com/ansys/pre-commit-hooks - rev: v0.2.8 + rev: v0.5.2 hooks: - id: add-license-headers args: - --start_year=2022 - repo: https://github.com/psf/black - rev: 23.9.1 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!! + rev: 25.11.0 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!! hooks: - id: black - repo: https://github.com/adamchainz/blacken-docs - rev: 1.16.0 + rev: 1.20.0 hooks: - id: blacken-docs - additional_dependencies: [black==23.9.1] + additional_dependencies: [black==25.11.0] - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 7.0.0 hooks: - id: isort - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 + rev: 7.3.0 hooks: - id: flake8 -- repo: https://github.com/PyCQA/docformatter - rev: v1.7.5 - hooks: - - id: docformatter - additional_dependencies: [tomli] - args: [-i] - - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.4.1 hooks: - id: codespell args: ["--ignore-words", "doc/styles/config/vocabularies/ANSYS/accept.txt"] # this validates our github workflow files - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.27.0 + rev: 0.35.0 hooks: - id: check-github-workflows diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..f7137ca --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,65 @@ +# Contributor covenant code of conduct + +## Pledge + +In the interest of fostering an open and welcoming environment, +all contributors and maintainers pledge to making participation +in the Ansys project and community a harassment-free experience +for everyone, regardless of age, body size, disability, ethnicity, +sex characteristics, gender identity and expression, level of +experience, education, socioeconomic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Standards + +Examples of behavior that contribute to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual + attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project email +address, posting using an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Attribution + +This code of conduct is adapted from the [Contributor Covenant][homepage], +version 1.4, available at + + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f56c5a8..73ab5f6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,16 +1,12 @@ -# Contributing +# Contribute -Please, refer to the [PyAnsys Developer's Guide] for contributing to this project. +Overall guidance on contributing to a PyAnsys library appears in the +[Contributing] topic in the *PyAnsys developer's guide*. Ensure that you +are thoroughly familiar with this guide before attempting to contribute to +Ansys Engineering Workflow API. -All code contributions are welcome. While Ansys Engineering Workflow API is -maintained by Ansys and all submissions are thoroughly reviewed by project maintainers -before merging, the goal is to foster a community that can support user questions and develop -new features to make this tool useful to all. As such, project maintainers encourage questions -and submissions. +The following contribution information is specific to Ansys Engineering Workflow API. -Further information about contributing to Ansys Engineering Workflow API -can be found in [Contributing]. - -[PyAnsys Developer's Guide]: https://dev.docs.pyansys.com/how-to/contributing.html -[Contributing]: https://engineeringworkflow.docs.pyansys.com/version/dev/contributing/index.html +[Contributing]: https://dev.docs.pyansys.com/how-to/contributing.html + diff --git a/LICENSE b/LICENSE index 8dc06b4..fa63daa 100644 --- a/LICENSE +++ b/LICENSE @@ -1,13 +1,13 @@ MIT License -Copyright (c) 2022 - 2024 ANSYS, Inc. All rights reserved. +Copyright (c) 2022 - 2025 ANSYS, Inc. and/or its affiliates. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..5a88c01 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,16 @@ +# Security Policy + +## Reporting a vulnerability + +> [!CAUTION] +> Do not use GitHub issues to report any security vulnerabilities. + +If you detect a vulnerability, contact the [PyAnsys Core team](mailto:pyansys.core@ansys.com), +mentioning the repository and the details of your finding. The team will address it as soon as possible. + +Provide the PyAnsys Core team with this information: + +- Any specific configuration settings needed to reproduce the problem +- Step-by-step guidance to reproduce the problem +- The exact location of the problematic source code, including tag, branch, commit, or a direct URL +- The potential consequences of the vulnerability, along with a description of how an attacker could take advantage of the issue diff --git a/doc/source/conf.py b/doc/source/conf.py index fc63deb..b1ef499 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -2,13 +2,11 @@ from datetime import datetime import os -from pathlib import Path from ansys_sphinx_theme import ( ansys_favicon, ansys_logo_white, ansys_logo_white_cropped, - get_autoapi_templates_dir_relative_path, get_version_match, latex, pyansys_logo_black, @@ -52,6 +50,9 @@ "json_url": f"https://{cname}/versions.json", "version_match": switcher_version, }, + "ansys_sphinx_theme_autoapi": { + "project": project, + }, } html_context = { @@ -60,6 +61,7 @@ "github_repo": "ansys-engineeringworkflow-api", "github_version": "main", "doc_path": "doc/source", + "pyansys_tags": ["Connect"], } # Sphinx extensions @@ -70,6 +72,7 @@ "sphinx.ext.intersphinx", "sphinx_copybutton", "sphinx_design", + "ansys_sphinx_theme.extension.autoapi", ] # Intersphinx mapping @@ -107,6 +110,13 @@ # type, unless multiple values are being returned" } +numpydoc_validation_exclude = { + "add_note", + "count", + "validate", + "__cause__", + "__context__", +} # static path html_static_path = ["_static"] @@ -121,21 +131,7 @@ master_doc = "index" # Configuration for Sphinx autoapi -autoapi_type = "python" -autoapi_dirs = ["../../src/ansys"] -autoapi_root = "api" -autoapi_options = [ - "members", - "undoc-members", - "show-inheritance", - "show-module-summary", - "special-members", -] -autoapi_template_dir = get_autoapi_templates_dir_relative_path(Path(__file__)) -suppress_warnings = ["autoapi.python_import_resolution"] -autoapi_python_use_implicit_namespaces = True -autoapi_render_in_single_page = ["class", "enum", "exception"] -autoapi_own_page_level = "class" +suppress_warnings = ["autoapi.python_import_resolution", "design.fa-build"] # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -186,4 +182,3 @@ # change the preamble of latex with customized title page # variables are the title of pdf, watermark latex_elements = {"preamble": latex.generate_preamble(html_title)} -sd_fontawesome_latex = True diff --git a/doc/source/contributing/index.rst b/doc/source/contributing/index.rst index 131f3d6..4665b7d 100644 --- a/doc/source/contributing/index.rst +++ b/doc/source/contributing/index.rst @@ -14,7 +14,7 @@ Install in developer mode ------------------------- Installing the ``ansys-engineeringworkflow-api`` package in developer mode allows -you to modify the source and enhance it. This package supports Python 3.9 through 3.12 +you to modify the source and enhance it. This package supports Python 3.10 through 3.13 on Windows, MacOS, and Linux. For a local development version, you can create a clean virtual environment with this command: @@ -79,14 +79,14 @@ Makefile for your operating system: :: - make -C doc/ html && your_browser_name doc/build/html/index.html + make -C doc/ html && your_browser_name doc/_build/html/index.html .. tab-item:: macOS :sync: macos :: - make -C doc/ html && your_browser_name doc/build/html/index.html + make -C doc/ html && your_browser_name doc/_build/html/index.html .. tab-item:: Windows :sync: windows @@ -94,7 +94,7 @@ Makefile for your operating system: :: .\doc\make.bat html - .\doc\build\html\index.html + .\doc\_build\html\index.html Post issues ----------- diff --git a/doc/source/getting_started/index.rst b/doc/source/getting_started/index.rst index cd5cfcd..dfb48fe 100644 --- a/doc/source/getting_started/index.rst +++ b/doc/source/getting_started/index.rst @@ -3,7 +3,7 @@ Getting started =============== -The Ansys Engineering Workflow API supports Python 3.9 through 3.12 on Windows, +The Ansys Engineering Workflow API supports Python 3.10 through 3.13 on Windows, MacOS, and Linux. Two installation modes of the ``ansys-engineeringworkflow-api`` package diff --git a/doc/styles/config/vocabularies/ANSYS/accept.txt b/doc/styles/config/vocabularies/ANSYS/accept.txt index 3d18350..6dbc231 100644 --- a/doc/styles/config/vocabularies/ANSYS/accept.txt +++ b/doc/styles/config/vocabularies/ANSYS/accept.txt @@ -9,3 +9,4 @@ Makefile optiSLang pytest Python +THIRDPARTY \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f46acb3..7d03e24 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "ansys-engineeringworkflow-api" version = "0.1.dev0" description = "API specification for an engineering workflow engine" readme = "README.rst" -requires-python = ">=3.9,<4" +requires-python = ">=3.10,<4" license = {file = "LICENSE"} authors = [{name = "ANSYS, Inc.", email = "pyansys.core@ansys.com"}] maintainers = [{name = "ANSYS, Inc.", email = "pyansys.core@ansys.com"}] @@ -16,37 +16,33 @@ classifiers = [ "Development Status :: 4 - Beta", "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", + "Programming Language :: Python :: 3.13", ] dependencies = [ "anyio>=3.6", - "numpy>=1.20.3", + "numpy>=2.1.0", "pyansys-tools-variableinterop>=0.1.0", ] [project.optional-dependencies] doc = [ - "ansys-sphinx-theme==0.14.0", + "ansys-sphinx-theme[autoapi]==1.6.3", "anyio==4.3.0", - "numpy==1.26.4", - "numpydoc==1.6.0", + "numpydoc==1.8.0", "pyansys-tools-variableinterop==0.1.1", - "Sphinx==7.2.6", + "Sphinx==8.2.3", "sphinx-copybutton==0.5.2", - "sphinx-design==0.5.0", - "sphinx-gallery==0.15.0", - "sphinx-notfound-page==1.0.0", - "sphinx-autoapi==3.1.0a2", - "pytest-sphinx==0.6.0", + "sphinx-gallery==0.19.0", + "sphinx-notfound-page==1.1.0", + "pytest-sphinx==0.6.3", ] tests = [ "anyio==4.3.0", - "numpy==1.26.4", "pytest==8.1.1", "pytest-cov==4.1.0", "pyansys-tools-variableinterop==0.1.1", diff --git a/src/ansys/engineeringworkflow/api/__init__.py b/src/ansys/engineeringworkflow/api/__init__.py index 3b1ae2d..f49196d 100644 --- a/src/ansys/engineeringworkflow/api/__init__.py +++ b/src/ansys/engineeringworkflow/api/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/engineeringworkflow/api/datatypes.py b/src/ansys/engineeringworkflow/api/datatypes.py index 8c659b4..97bc848 100644 --- a/src/ansys/engineeringworkflow/api/datatypes.py +++ b/src/ansys/engineeringworkflow/api/datatypes.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/engineeringworkflow/api/exceptions.py b/src/ansys/engineeringworkflow/api/exceptions.py index cd6b916..8f51d75 100644 --- a/src/ansys/engineeringworkflow/api/exceptions.py +++ b/src/ansys/engineeringworkflow/api/exceptions.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/engineeringworkflow/api/iasyncworkflow.py b/src/ansys/engineeringworkflow/api/iasyncworkflow.py index 45e89fb..fcf9584 100644 --- a/src/ansys/engineeringworkflow/api/iasyncworkflow.py +++ b/src/ansys/engineeringworkflow/api/iasyncworkflow.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/engineeringworkflow/api/iworkflow.py b/src/ansys/engineeringworkflow/api/iworkflow.py index f5b8897..7b59d8a 100644 --- a/src/ansys/engineeringworkflow/api/iworkflow.py +++ b/src/ansys/engineeringworkflow/api/iworkflow.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_coercion.py b/tests/test_coercion.py index 5bd6295..b119489 100644 --- a/tests/test_coercion.py +++ b/tests/test_coercion.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tox.ini b/tox.ini index 0290bd9..4b047ed 100644 --- a/tox.ini +++ b/tox.ini @@ -9,10 +9,10 @@ isolated_build_env = _build [testenv] description = Checks for project unit tests and coverage (if desired) basepython = - py39: python3.9 py310: python3.10 py311: python3.11 py312: python3.12 + py313: python3.13 py: python3 {style,reformat,doc}: python3 setenv =