Skip to content

Commit

Permalink
Merge branch 'main' into fix/improve-tox
Browse files Browse the repository at this point in the history
  • Loading branch information
germa89 authored Oct 25, 2024
2 parents f167caf + 88b8f14 commit cd5998e
Show file tree
Hide file tree
Showing 92 changed files with 3,489 additions and 3,084 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cache_cleaner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/[email protected].0
uses: actions/[email protected].1

- name: Cleanup PR caches
if: github.event_name != 'workflow_dispatch'
Expand Down
117 changes: 40 additions & 77 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ env:
DPF_PORT: 21004
MAPDL_PACKAGE: ghcr.io/ansys/mapdl
ON_CI: True
PYTEST_ARGUMENTS: '-vvv -ra --durations=10 --maxfail=3 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html'
PYTEST_ARGUMENTS: '-vvv --color=yes -ra --durations=10 --maxfail=3 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html'
BUILD_CHEATSHEET: True

# Following env vars when changed will "reset" the mentioned cache,
Expand Down Expand Up @@ -70,19 +70,11 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: ansys/actions/doc-deploy-changelog@v7
- uses: ansys/actions/doc-deploy-changelog@v8
with:
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}


branch-name:
# Only if the event is a pull request and the branch name is not from the pre-commit-ci bot
if: github.event_name == 'pull_request' && github.head_ref != 'pre-commit-ci-update-config'
name: Check the name of the branch
runs-on: ubuntu-latest
steps:
- name: Check branch name
uses: ansys/actions/branch-name-style@v7
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}


pull-request-name:
Expand All @@ -91,7 +83,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check pull-request name
uses: ansys/actions/commit-style@v7
uses: ansys/actions/check-pr-title@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -104,7 +96,7 @@ jobs:
folder: ["doc", "examples"]
steps:
- name: "Ansys documentation style checks"
uses: ansys/actions/doc-style@v7
uses: ansys/actions/doc-style@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: ${{ matrix.folder }}
Expand All @@ -130,7 +122,7 @@ jobs:
os: macos-latest
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 }}
operating-system: ${{ matrix.os }}
Expand All @@ -145,6 +137,17 @@ jobs:
python -c "from pyvista.plotting import system_supports_plotting; print('System support plotting ' + str(system_supports_plotting()))"


check-vulnerabilities:
name: "Check library vulnerabilities"
runs-on: ubuntu-latest
steps:
- uses: ansys/actions/check-vulnerabilities@v8
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
python-package-name: ${{ env.PACKAGE_NAME }}
dev-mode: ${{ github.ref != 'refs/heads/main' }}

docs-build:
name: "Build documentation"
runs-on: ubuntu-latest
Expand All @@ -160,7 +163,7 @@ jobs:
GRPC_ENABLE_FORK_SUPPORT: false # See #3434
steps:
- name: "Install Git and checkout project"
uses: actions/[email protected].0
uses: actions/[email protected].1

- name: "Login in Github container registry"
uses: docker/[email protected]
Expand Down Expand Up @@ -357,7 +360,7 @@ jobs:

steps:
- name: "Install Git and checkout project"
uses: actions/[email protected].0
uses: actions/[email protected].1

- name: Get event type and user to check permissions.
id: get_user
Expand All @@ -376,6 +379,7 @@ jobs:
- uses: tspascoal/get-user-teams-membership@v3
id: is_organization_member
if: ${{ github.actor != 'dependabot[bot]' }}
with:
username: ${{ steps.get_user.outputs.user }}
organization: ansys
Expand All @@ -385,7 +389,7 @@ jobs:
- id: set-matrix
env:
extended_testing: ${{ github.event_name == 'schedule' || ( github.event_name == 'workflow_dispatch' && inputs.run_all_tests ) || ( github.event_name == 'push' && contains(github.ref, 'refs/tags') ) }}
auth_user: ${{ steps.is_organization_member.outputs.isTeamMember == 'true' }}
auth_user: ${{ steps.is_organization_member.outputs.isTeamMember == 'true' || github.actor == 'dependabot[bot]' }}
run: .ci/build_matrix.sh

build-test-remote:
Expand All @@ -411,7 +415,7 @@ jobs:

steps:
- name: "Install Git and checkout project"
uses: actions/[email protected].0
uses: actions/[email protected].1

- name: "Login in Github container registry"
uses: docker/[email protected]
Expand Down Expand Up @@ -595,10 +599,11 @@ jobs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: "Install Git and checkout project"
uses: actions/[email protected].0
uses: actions/[email protected].1

- uses: tspascoal/get-user-teams-membership@v3
id: is_organization_member
if: ${{ github.actor != 'dependabot[bot]' }}
with:
username: ${{ github.actor }}
organization: ansys
Expand All @@ -614,7 +619,7 @@ jobs:
RUN_ALL_TEST: ${{ inputs.run_all_tests }}
ON_PUSH: ${{ github.event_name == 'push' }}
HAS_TAG: ${{ contains(github.ref, 'refs/tags') }}
auth_user: ${{ steps.is_organization_member.outputs.isTeamMember == 'true' }}
auth_user: ${{ steps.is_organization_member.outputs.isTeamMember == 'true' || github.actor == 'dependabot[bot]' }}
run: .ci/build_matrix.sh

build-test-ubuntu-local:
Expand All @@ -641,7 +646,7 @@ jobs:

steps:
- name: "Install Git and checkout project"
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
Expand Down Expand Up @@ -721,7 +726,7 @@ jobs:

- name: "PR comment with reactions"
if: ${{ steps.attatch-to-pr.outputs.pushed == 'true' }}
uses: thollander/actions-comment-pull-request@v2
uses: thollander/actions-comment-pull-request@v3
with:
message: |
Hello! :wave:
Expand Down Expand Up @@ -772,7 +777,7 @@ jobs:

steps:
- name: "Install Git and checkout project"
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
Expand Down Expand Up @@ -867,7 +872,7 @@ jobs:
ON_LOCAL: TRUE

steps:
- uses: actions/[email protected].0
- uses: actions/[email protected].1

# Skipping because it is installed locally.
# - name: Setup Python
Expand Down Expand Up @@ -935,7 +940,7 @@ jobs:
runs-on: ubuntu-latest
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 All @@ -953,13 +958,13 @@ jobs:
contents: write
steps:
- name: "Release to the public PyPI repository"
uses: ansys/actions/release-pypi-public@v7
uses: ansys/actions/release-pypi-public@v8
with:
library-name: ${{ env.PACKAGE_NAME }}
use-trusted-publisher: true

- name: "Release to GitHub"
uses: ansys/actions/release-github@v7
uses: ansys/actions/release-github@v8
with:
library-name: ${{ env.PACKAGE_NAME }}
additional-artifacts: "minimum_requirements.txt"
Expand All @@ -975,42 +980,13 @@ jobs:
needs: [release]
steps:
- name: "Deploy the stable documentation"
# TODO: testing SEO improvements. This branch avoids creating a
# sitemap.xml pages in opposite to v5.
uses: ansys/actions/doc-deploy-stable@feat/seo-improvements
uses: ansys/actions/doc-deploy-stable@v8
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
render-last: '5'


doc-index-stable:
name: "Deploy stable docs index"
runs-on: ubuntu-latest
needs: upload-docs-release
steps:
- name: "Install Git and clone project"
uses: actions/[email protected]

- name: "Install the package requirements"
run: pip install -e .

- name: "Get the version to PyMeilisearch"
run: |
VERSION=$(python -c "from ansys.mapdl.core import __version__; print('.'.join(__version__.split('.')[:2]))")
VERSION_MEILI=$(python -c "from ansys.mapdl.core import __version__; print('-'.join(__version__.split('.')[:2]))")
echo "Calculated VERSION: $VERSION"
echo "Calculated VERSION_MEILI: $VERSION_MEILI"
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "VERSION_MEILI=$VERSION_MEILI" >> $GITHUB_ENV
- name: "Deploy the latest documentation index"
uses: ansys/actions/doc-deploy-index@v7
with:
cname: ${{ env.DOCUMENTATION_CNAME }}/version/${{ env.VERSION }}
index-name: pymapdl-v${{ env.VERSION_MEILI }}
host-url: ${{ vars.MEILISEARCH_HOST_URL }}
api-key: ${{ env.MEILISEARCH_API_KEY }}
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}


upload-dev-docs:
Expand All @@ -1020,25 +996,12 @@ jobs:
needs: [docs-build]
steps:
- name: "Deploy the latest documentation"
# TODO: testing SEO improvements. This branch reuses the "index.html" from the stable version
uses: ansys/actions/doc-deploy-dev@feat/seo-improvements
uses: ansys/actions/doc-deploy-dev@v8
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}


doc-index-dev:
name: "Deploy dev index docs"
runs-on: ubuntu-latest
needs: upload-dev-docs
steps:
- name: "Deploy the latest documentation index"
uses: ansys/actions/doc-deploy-index@v7
with:
cname: ${{ env.DOCUMENTATION_CNAME }}/version/dev
index-name: pymapdl-vdev
host-url: ${{ vars.MEILISEARCH_HOST_URL }}
api-key: ${{ env.MEILISEARCH_API_KEY }}
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}


notify:
Expand Down Expand Up @@ -1066,7 +1029,7 @@ jobs:
os: [ubuntu-latest, windows-latest]

steps:
- uses: actions/[email protected].0
- uses: actions/[email protected].1
- name: "Set up Julia"
uses: julia-actions/setup-julia@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker_clean_untagged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:

- name: "Perform versions cleanup - except certain tags"
uses: ansys/actions/hk-package-clean-untagged@v7
uses: ansys/actions/hk-package-clean-untagged@v8
with:
package-name: 'mapdl'
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
name: Syncer
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected].0
- uses: actions/[email protected].1
- uses: micnncim/action-label-syncer@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -127,6 +127,8 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: ansys/actions/doc-changelog@v7
- uses: ansys/actions/doc-changelog@v8
with:
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/linkchecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
SHELLOPTS: "errexit:pipefail"
steps:
- name: "Install Git and checkout project"
uses: actions/[email protected].0
uses: actions/[email protected].1

- name: "Login in Github container registry"
uses: docker/[email protected]
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ repos:
)
- repo: https://github.com/psf/black
rev: 24.8.0 # If version changes --> modify "blacken-docs" manually as well.
rev: 24.10.0 # If version changes --> modify "blacken-docs" manually as well.
hooks:
- id: black
args:
- --line-length=88

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.18.0
rev: 1.19.0
hooks:
- id: blacken-docs
additional_dependencies: [black==24.8.0]
additional_dependencies: [black==24.10.0]

- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
Expand All @@ -71,13 +71,13 @@ repos:
# exclude: "tests/"

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: debug-statements

# this validates our github workflow files
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.3
rev: 0.29.4
hooks:
- id: check-github-workflows
1 change: 0 additions & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ignore:
- "src/ansys/mapdl/core/_commands"
- "src/ansys/mapdl/core/jupyter.py"
- "src/ansys/mapdl/core/mapdl_console.py"
- "src/ansys/mapdl/core/mapdl_inprocess.py"
Expand Down
1 change: 0 additions & 1 deletion doc/changelog.d/3453.dependencies.md

This file was deleted.

1 change: 0 additions & 1 deletion doc/changelog.d/3454.dependencies.md

This file was deleted.

1 change: 0 additions & 1 deletion doc/changelog.d/3455.added.md

This file was deleted.

1 change: 0 additions & 1 deletion doc/changelog.d/3457.fixed.md

This file was deleted.

1 change: 0 additions & 1 deletion doc/changelog.d/3460.miscellaneous.md

This file was deleted.

1 change: 0 additions & 1 deletion doc/changelog.d/3465.documentation.md

This file was deleted.

1 change: 1 addition & 0 deletions doc/changelog.d/3466.documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs: documenting using pymapdl on clusters
Loading

0 comments on commit cd5998e

Please sign in to comment.