Skip to content

Commit

Permalink
Merge pull request #241 from ansys/maint/udpate-from-main
Browse files Browse the repository at this point in the history
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Andy Grigg <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Doug Addy <[email protected]>
  • Loading branch information
4 people authored Apr 22, 2024
2 parents 20619de + 66b5ef3 commit 6cfc005
Show file tree
Hide file tree
Showing 18 changed files with 317 additions and 116 deletions.
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ updates:
interval: "daily"
labels:
- "maintenance"
- "dependencies"
10 changes: 10 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
documentation:
- changed-files:
- any-glob-to-any-file: ['doc/source/**/*', 'examples/**/*']
- head-branch: ['^doc/', '^docs/']

maintenance:
- changed-files:
- any-glob-to-any-file: ['.github/**/*', '.flake8', 'pyproject.toml']
- head-branch: ['^maint/', '^ci/', '^no-ci/']

enhancement:
- head-branch: ['^feat/']

bug:
- head-branch: ['^fix/', '^patch/']

dependencies:
- changed-files:
- any-glob-to-any-file: ['poetry.lock']
3 changes: 3 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ changelog:
- title: "Features"
labels:
- enhancement
- title: "Bug fixes"
labels:
- bug
- title: "Documentation"
labels:
- documentation
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/check_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
logger = logging.getLogger()

MAX_ATTEMPTS = 30
WAIT_TIME = 5
WAIT_TIME = 15


def block_until_server_is_ok(func):
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ jobs:
name: "Code style"
runs-on: ubuntu-latest
steps:
- uses: ansys/actions/code-style@v5
- uses: ansys/actions/code-style@v6
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}

doc-style:
name: "Documentation style"
runs-on: ubuntu-latest
steps:
- uses: ansys/actions/doc-style@v5
- uses: ansys/actions/doc-style@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
vale-version: "2.29.6"
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
os: [ubuntu-latest, windows-latest]
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- uses: ansys/actions/build-wheelhouse@v5
- uses: ansys/actions/build-wheelhouse@v6
with:
library-name: ${{ env.LIBRARY_NAME }}
operating-system: ${{ matrix.os }}
Expand Down Expand Up @@ -118,8 +118,10 @@ jobs:
retention-days: 7

- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
if: ${{ matrix.python-version == env.MAIN_PYTHON_VERSION && matrix.os == 'ubuntu-latest' && !startsWith( github.event.pull_request.head.ref, 'dependabot/') }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: .cov/xml
flags: unittests
Expand All @@ -130,7 +132,7 @@ jobs:
runs-on: ubuntu-latest
needs: [ doc-build, tests ]
steps:
- uses: ansys/actions/build-library@v5
- uses: ansys/actions/build-library@v6
with:
library-name: ${{ env.LIBRARY_NAME }}
python-version: ${{ env.MAIN_PYTHON_VERSION }}
Expand All @@ -151,7 +153,7 @@ jobs:
needs: [server-checks]
if: github.event_name == 'push' && !contains(github.ref, 'refs/tags')
steps:
- uses: ansys/actions/doc-deploy-dev@v5
- uses: ansys/actions/doc-deploy-dev@v6
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -163,14 +165,14 @@ jobs:
needs: [build-library, server-checks]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
steps:
- uses: ansys/actions/release-pypi-public@v5
- uses: ansys/actions/release-pypi-public@v6
name: "Release to public PyPI"
with:
library-name: ${{ env.LIBRARY_NAME }}
twine-username: "__token__"
twine-token: ${{ secrets.PYPI_TOKEN }}

- uses: ansys/actions/release-github@v5
- uses: ansys/actions/release-github@v6
name: "Release to GitHub"
with:
library-name: ${{ env.LIBRARY_NAME }}
Expand All @@ -181,7 +183,7 @@ jobs:
needs: release
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
steps:
- uses: ansys/actions/doc-deploy-stable@v5
- uses: ansys/actions/doc-deploy-stable@v6
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
34 changes: 1 addition & 33 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,41 +30,11 @@ jobs:
runs-on: ubuntu-latest
steps:

# Label based on modified files
- name: Label based on changed files
- name: Label based on changed files and branch name
uses: actions/labeler@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

# Label based on branch name
- uses: actions-ecosystem/action-add-labels@v1
if: |
startsWith(github.event.pull_request.head.ref, 'doc') ||
startsWith(github.event.pull_request.head.ref, 'docs')
with:
labels: documentation

- uses: actions-ecosystem/action-add-labels@v1
if: |
startsWith(github.event.pull_request.head.ref, 'maint') ||
startsWith(github.event.pull_request.head.ref, 'no-ci') ||
startsWith(github.event.pull_request.head.ref, 'ci')
with:
labels: maintenance

- uses: actions-ecosystem/action-add-labels@v1
if: startsWith(github.event.pull_request.head.ref, 'feat')
with:
labels: |
enhancement
- uses: actions-ecosystem/action-add-labels@v1
if: |
startsWith(github.event.pull_request.head.ref, 'fix') ||
startsWith(github.event.pull_request.head.ref, 'patch')
with:
labels: bug

commenter:
runs-on: ubuntu-latest
steps:
Expand All @@ -79,6 +49,4 @@ jobs:
- [bug](https://github.com/ansys/grantami-recordlists/pulls?q=label%3Abug+)
- [documentation](https://github.com/ansys/grantami-recordlists/pulls?q=label%3Adocumentation+)
- [enhancement](https://github.com/ansys/grantami-recordlists/pulls?q=label%3Aenhancement+)
- [good first issue](https://github.com/ansys/grantami-recordlists/pulls?q=label%3Agood+first+issue)
- [maintenance](https://github.com/ansys/grantami-recordlists/pulls?q=label%3Amaintenance+)
- [release](https://github.com/ansys/grantami-recordlists/pulls?q=label%3Arelease+)
16 changes: 13 additions & 3 deletions .github/workflows/server_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ on:
AZURE_VM_NAME:
required: true

CODECOV_TOKEN:
required: true

TEST_SERVER_URL:
required: true

Expand Down Expand Up @@ -131,8 +134,10 @@ jobs:
retention-days: 7

- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
if: ${{ matrix.os == 'ubuntu-latest' }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: .cov/xml
flags: integration
Expand Down Expand Up @@ -192,11 +197,16 @@ jobs:
path: doc/_build/latex/*.pdf
retention-days: 7

check_workflow_runs:
name: Check if there are active workflow runs
needs: doc-build
uses: ansys/pygranta/.github/workflows/check-concurrent-workflows.yml@main

stop-vm:
name: "Stop Azure VM"
runs-on: ubuntu-latest
needs: doc-build
if: ${{ always() && !(inputs.skip-vm-management)}}
needs: check_workflow_runs
if: always() && !cancelled() && !(inputs.skip-vm-management) && needs.check_workflow_runs.outputs.active-runs != 'true'
steps:
- uses: azure/CLI@v2
with:
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ci:
repos:

- repo: https://github.com/psf/black
rev: 24.3.0
rev: 24.4.0
hooks:
- id: black

Expand All @@ -22,10 +22,10 @@ repos:
rev: v2.2.6
hooks:
- id: codespell
args: ["--ignore-words", "doc/styles/Vocab/ANSYS/accept.txt", "--skip", "poetry.lock"]
args: ["--ignore-words", "doc/styles/config/vocabularies/ANSYS/accept.txt", "--skip", "poetry.lock"]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-yaml
- id: debug-statements
Expand All @@ -50,7 +50,7 @@ repos:
additional_dependencies: ["mypy==1.0.1"]

- repo: https://github.com/ansys/pre-commit-hooks
rev: v0.2.8
rev: v0.2.9
hooks:
- id: add-license-headers
args:
Expand Down
2 changes: 2 additions & 0 deletions doc/.vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ Vocab = ANSYS

# Apply the following styles
BasedOnStyles = Vale, Google

Vale.Terms = NO
4 changes: 2 additions & 2 deletions doc/styles/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*
!Vocab
!Vocab/**
!config
!config/**
!.gitignore
File renamed without changes.
File renamed without changes.
34 changes: 17 additions & 17 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
# Check https://python-poetry.org/docs/pyproject/ for all available sections
name = "ansys-grantami-recordlists"
version = "1.2.0a0"
version = "1.2.0b0"
description = "A python wrapper for the Granta MI RecordLists API"
license = "MIT"
authors = ["ANSYS, Inc. <[email protected]>"]
Expand All @@ -14,7 +14,7 @@ readme = "README.rst"
repository = "https://github.com/ansys/grantami-recordlists"
documentation = "https://recordlists.grantami.docs.pyansys.com"
classifiers = [
"Development Status :: 3 - Alpha",
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand All @@ -30,7 +30,7 @@ packages = [
[tool.poetry.dependencies]
python = ">=3.9,<4.0"
ansys-openapi-common = "^2.0.0"
ansys-grantami-serverapi-openapi = "3.0.0a3"
ansys-grantami-serverapi-openapi = "3.0.0b0"
requests = "^2.26"

# Optional documentation dependencies
Expand Down
Loading

0 comments on commit 6cfc005

Please sign in to comment.