-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ff1f556
Showing
30 changed files
with
1,081 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[flake8] | ||
exclude = venv, __init__.py, doc/_build, .venv | ||
select = W191, W291, W293, W391, E115, E117, E122, E124, E125, E225, E231, E301, E303, E501, F401, F403 | ||
count = True | ||
max-complexity = 10 | ||
max-line-length = 100 | ||
statistics = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* text=auto !eol | ||
*.sh eol=lf | ||
*.bat eol=crlf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
labels: | ||
- "maintenance" | ||
- "dependencies" | ||
|
||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
labels: | ||
- "maintenance" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
documentation: | ||
- doc/source/**/* | ||
maintenance: | ||
- .github/**/* | ||
- .flake8 | ||
- pyproject.toml | ||
dependencies: | ||
- requirements/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
- name: bug | ||
description: Something isn't working | ||
color: d42a34 | ||
|
||
- name: dependencies | ||
description: Related with project dependencies | ||
color: ffc0cb | ||
|
||
- name: documentation | ||
description: Improvements or additions to documentation | ||
color: 0677ba | ||
|
||
- name: enhancement | ||
description: New features or code improvements | ||
color: FFD827 | ||
|
||
- name: good first issue | ||
description: Easy to solve for newcomers | ||
color: 62ca50 | ||
|
||
- name: maintenance | ||
description: Package and maintenance related | ||
color: f78c37 | ||
|
||
- name: release | ||
description: Anything related to an incoming release | ||
color: ffffff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
name: CI | ||
on: | ||
pull_request: | ||
push: | ||
tags: | ||
- "*" | ||
branches: | ||
- main | ||
|
||
env: | ||
MAIN_PYTHON_VERSION: '3.10' | ||
DOCUMENTATION_CNAME: 'simai.docs.pyansys.com' | ||
LIBRARY_NAME: 'ansys-simai-core' | ||
LIBRARY_NAMESPACE: 'ansys.simai.core' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
code-style: | ||
name: "Code style" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: ansys/actions/code-style@v4 | ||
with: | ||
python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
|
||
doc-style: | ||
name: "Documentation style" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: ansys/actions/doc-style@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
smoke-tests: | ||
name: "Build and Smoke tests" | ||
runs-on: ${{ matrix.os }} | ||
needs: [code-style] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
python-version: ['3.10'] | ||
steps: | ||
- uses: ansys/actions/build-wheelhouse@v4 | ||
with: | ||
library-name: ${{ env.LIBRARY_NAME }} | ||
library-namespace: ${{ env.LIBRARY_NAMESPACE }} | ||
operating-system: ${{ matrix.os }} | ||
python-version: ${{ matrix.python-version }} | ||
|
||
tests: | ||
name: "Tests" | ||
runs-on: ${{ matrix.os }} | ||
needs: [smoke-tests] | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
python-version: ['3.10'] | ||
fail-fast: false | ||
steps: | ||
- uses: ansys/actions/tests-pytest@v4 | ||
with: | ||
pytest-extra-args: "--cov=ansys --cov-report=term --cov-report=html:.cov/html" | ||
|
||
doc-build: | ||
name: "Build documentation" | ||
runs-on: ubuntu-latest | ||
needs: [doc-style] | ||
steps: | ||
- uses: ansys/actions/doc-build@v4 | ||
with: | ||
python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
check-links: false | ||
|
||
build-library: | ||
name: "Build library basic example" | ||
runs-on: ubuntu-latest | ||
needs: [doc-build, tests] | ||
steps: | ||
- uses: ansys/actions/build-library@v4 | ||
with: | ||
library-name: ${{ env.LIBRARY_NAME }} | ||
python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
|
||
doc-deploy-dev: | ||
name: "Deploy development documentation" | ||
runs-on: ubuntu-latest | ||
needs: [build-library] | ||
if: github.event_name == 'push' && !contains(github.ref, 'refs/tags') | ||
steps: | ||
- uses: ansys/actions/doc-deploy-dev@v4 | ||
with: | ||
cname: ${{ env.DOCUMENTATION_CNAME }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
doc-deploy-stable: | ||
name: "Deploy stable documentation" | ||
runs-on: ubuntu-latest | ||
needs: [build-library] | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags') | ||
steps: | ||
- uses: ansys/actions/doc-deploy-stable@v4 | ||
with: | ||
cname: ${{ env.DOCUMENTATION_CNAME }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: Labeler | ||
on: | ||
pull_request: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- '../labels.yml' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
label-syncer: | ||
name: Syncer | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: micnncim/action-label-syncer@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
labeler: | ||
name: Set labels | ||
needs: [label-syncer] | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
# Label based on modified files | ||
- name: Label based on changed files | ||
uses: actions/labeler@v4 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
sync-labels: '' | ||
|
||
# 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: | ||
- name: Suggest to add labels | ||
uses: peter-evans/create-or-update-comment@v2 | ||
# Execute only when no labels have been applied to the pull request | ||
if: toJSON(github.event.pull_request.labels.*.name) == '{}' | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
body: | | ||
Please add one of the following labels to add this contribution to the Release Notes :point_down: | ||
- [bug](https://github.com/ansys/simai/pulls?q=label%3Abug+) | ||
- [documentation](https://github.com/ansys/simai/pulls?q=label%3Adocumentation+) | ||
- [enhancement](https://github.com/ansys/simai/pulls?q=label%3Aenhancement+) | ||
- [good first issue](https://github.com/ansys/simai/pulls?q=label%3Agood+first+issue) | ||
- [maintenance](https://github.com/ansys/simai/pulls?q=label%3Amaintenance+) | ||
- [release](https://github.com/ansys/simai/pulls?q=label%3Arelease+) |
Oops, something went wrong.