Skip to content

Commit

Permalink
sync extensions with PyEnSight; address tech review issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mariostieriansys committed Oct 18, 2024
1 parent ed8592e commit 5925517
Show file tree
Hide file tree
Showing 20 changed files with 316 additions and 329 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
26 changes: 6 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ jobs:
name: "Code style"
runs-on: ubuntu-latest
steps:
- uses: ansys/actions/code-style@v7
- uses: ansys/actions/code-style@v8
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}

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

Expand All @@ -51,7 +51,7 @@ jobs:
- ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }}
steps:
- name: Build wheelhouse and perform smoke test
uses: ansys/actions/build-wheelhouse@v7
uses: ansys/actions/build-wheelhouse@v8
with:
library-name: ${{ env.PACKAGE_NAME }}
library-namespace: ${{ env.PACKAGE_NAMESPACE }}
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
run: docker pull ${{ env.ENSIGHT_IMAGE }}

- name: Run pytest
uses: ansys/actions/tests-pytest@v7
uses: ansys/actions/tests-pytest@v8
env:
ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }}
with:
Expand All @@ -94,7 +94,7 @@ jobs:
needs: [tests]
runs-on: ubuntu-latest
steps:
- uses: ansys/actions/build-library@v7
- uses: ansys/actions/build-library@v8
with:
library-name: ${{ env.PACKAGE_NAME }}
python-version: ${{ env.MAIN_PYTHON_VERSION }}
Expand All @@ -105,21 +105,7 @@ jobs:
needs: build-library
runs-on: ubuntu-latest
steps:
# Upload first to the private PyPi, at least up until we release
- name: Release to the private PyPI repository
uses: ansys/actions/release-pypi-private@v7
with:
library-name: ${{ env.PACKAGE_NAME }}
twine-token: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}

- name: Release to the public PyPI repository
uses: ansys/actions/release-pypi-public@v7
with:
library-name: ${{ env.PACKAGE_NAME }}
twine-username: "__token__"
twine-token: ${{ secrets.PYPI_TOKEN }}

- name: Release to GitHub
uses: ansys/actions/release-github@v7
uses: ansys/actions/release-github@v8
with:
library-name: ${{ env.PACKAGE_NAME }}
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: docker pull ${{ env.ENSIGHT_IMAGE }}

- name: Run pytest
uses: ansys/actions/tests-pytest@v7
uses: ansys/actions/tests-pytest@v8
env:
ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }}
with:
Expand All @@ -42,7 +42,7 @@ jobs:
steps:

- name: Build library source and wheel artifacts
uses: ansys/actions/build-library@v7
uses: ansys/actions/build-library@v8
with:
library-name: ${{ env.PACKAGE_NAME }}
python-version: ${{ env.MAIN_PYTHON_VERSION }}
Expand Down
108 changes: 57 additions & 51 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,51 +1,57 @@
repos:
- repo: https://github.com/psf/black
rev: 23.3.0 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!!
hooks:
- id: black

- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8

- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
additional_dependencies: ["tomli"]

- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit
# args not working with pyproject.toml
args: [
-lll,
-n, "3",
-r,
-x, "venv/*, tests/*"
]

# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.3.0
# hooks:
# - id: mypy
# # Exclude only works here, not in config files
# exclude: "tests/|doc/|src/ansys/pyensight/core/exts/|exts/"


- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: debug-statements
- id: check-yaml
- id: trailing-whitespace
- id: check-added-large-files
- id: check-case-conflict
repos:
- repo: https://github.com/psf/black
rev: 24.10.0 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!!
hooks:
- id: black

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
additional_dependencies: ["tomli"]

- repo: https://github.com/PyCQA/bandit
rev: 1.7.10
hooks:
- id: bandit
# args not working with pyproject.toml
args: [
-lll,
-n, "3",
-r,
-x, "venv/*, tests/*"
]

# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.3.0
# hooks:
# - id: mypy
# # Exclude only works here, not in config files
# exclude: "tests/|doc/|src/ansys/pyensight/core/exts/|exts/"


- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: debug-statements
- id: check-yaml
- id: trailing-whitespace
- id: check-added-large-files
- id: check-case-conflict

- repo: https://github.com/ansys/pre-commit-hooks
rev: v0.4.3
hooks:
- id: add-license-headers
files: '(exts|tests)/.*\.(py)'
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 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:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
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.
3 changes: 3 additions & 0 deletions doc/styles/config/vocabularies/ANSYS/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ autogenerated
casemapped
circumsphere
cmdlang
colorby_rgb
compi
compj
Compute_Per_case
Expand Down Expand Up @@ -70,6 +71,7 @@ num_points
NumPy
numpy
Oddy
Omniverse
Q_criteria
partlist
peakness
Expand All @@ -79,6 +81,7 @@ Pitot
pitot
plist
Protobuf
pyensight
PyPI
Python
Radiograph_grid
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
# 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.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# 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.

from .extension import *
Loading

0 comments on commit 5925517

Please sign in to comment.