Skip to content
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
eaf0b5d
maint: Tech review
AlejandroFernandezLuces Aug 5, 2024
35a55b3
fix: Several changes
AlejandroFernandezLuces Aug 6, 2024
671eebb
feat: Use ruff in pre-commit
AlejandroFernandezLuces Aug 6, 2024
98436a3
feat: Add contributing guide
AlejandroFernandezLuces Aug 6, 2024
965b643
fix: Add argparse and update readme
AlejandroFernandezLuces Aug 6, 2024
3cb10f3
fix: Rename
AlejandroFernandezLuces Aug 6, 2024
cc13384
maint: Add labeler
AlejandroFernandezLuces Aug 6, 2024
c3a506d
maint: Add smoke tests
AlejandroFernandezLuces Aug 6, 2024
67a1971
Merge main branch
AlejandroFernandezLuces Aug 6, 2024
60e57cf
doc: Add docs
AlejandroFernandezLuces Aug 6, 2024
3e17373
maint: Add doc build action
AlejandroFernandezLuces Aug 6, 2024
7609514
fix: Vale structure
AlejandroFernandezLuces Aug 6, 2024
5f05a36
fix: Add vale ini
AlejandroFernandezLuces Aug 6, 2024
51e10a0
fix: Admit flowkit
AlejandroFernandezLuces Aug 6, 2024
98189d2
fix: Temp ignore repo link
AlejandroFernandezLuces Aug 6, 2024
85d5bbc
maint: Add documentation deploy
AlejandroFernandezLuces Aug 6, 2024
1966223
fix: Add package name
AlejandroFernandezLuces Aug 6, 2024
0fa6789
fix: Add package action
AlejandroFernandezLuces Aug 6, 2024
32f1be7
fix: Version getter
AlejandroFernandezLuces Aug 6, 2024
cd9fb40
maint: Add license and license header action
AlejandroFernandezLuces Aug 6, 2024
cfc5972
maint: Add license headers
AlejandroFernandezLuces Aug 6, 2024
c905487
fix: restore dockerfile defaults
AlejandroFernandezLuces Aug 6, 2024
9d4a91c
Merge main branch
AlejandroFernandezLuces Aug 7, 2024
e6d856b
fix: Several small fixes
AlejandroFernandezLuces Aug 7, 2024
5418acf
fix: Adapt tests to new changes
AlejandroFernandezLuces Aug 7, 2024
e7c6b89
fix: Imports
AlejandroFernandezLuces Aug 7, 2024
548e741
fix: Adapt CICD tests
AlejandroFernandezLuces Aug 7, 2024
ee57819
fix: String import
AlejandroFernandezLuces Aug 7, 2024
9f64e93
fix: Add asyncio plugin
AlejandroFernandezLuces Aug 7, 2024
b21491b
fix: pytest folder struct
AlejandroFernandezLuces Aug 7, 2024
352896a
Apply suggestions from code review
AlejandroFernandezLuces Aug 12, 2024
7a8b2e1
fix: Comments
AlejandroFernandezLuces Aug 12, 2024
870740e
Merge branch 'maint/tech-review' of https://github.com/ansys/allie-fl…
AlejandroFernandezLuces Aug 12, 2024
c3056e7
fix: Contributing docs
AlejandroFernandezLuces Aug 12, 2024
f0a9173
fix: Remove packaging from CICD
AlejandroFernandezLuces Aug 12, 2024
950e75c
Update doc/source/index.rst
AlejandroFernandezLuces Aug 12, 2024
4dabd1a
fix: Update ansys actions
AlejandroFernandezLuces Aug 12, 2024
dd00219
Merge branch 'maint/tech-review' of https://github.com/ansys/allie-fl…
AlejandroFernandezLuces Aug 12, 2024
185d1a2
fix: Dockerfile and readme
AlejandroFernandezLuces Aug 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
documentation:
- changed-files:
- any-glob-to-any-file: ['doc/source/**/*', 'README.md']

maintenance:
- changed-files:
- any-glob-to-any-file: ['.github/**/*', 'pyproject.toml', '.pre-commit-config.yaml']

testing:
- changed-files:
- any-glob-to-any-file: ['tests/*']
44 changes: 44 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
- 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

- name: testing
description: Anything related to testing
color: 5802B8

- name: graphics
description: Anything related to graphics
color: 5903A8

- name: triage
description: Need some assessment
color: f78a50

- name: top priority
description: Must be fixed promptly
color: ab8a50

92 changes: 72 additions & 20 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:

env:
MAIN_PYTHON_VERSION: '3.12'
DOCUMENTATION_CNAME: expert-adventure-nvnoo1y.pages.github.io
PACKAGE_NAME: allie-flowkit-python

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -24,38 +26,75 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Run PyAnsys code style checks"
uses: ansys/actions/code-style@v6
uses: ansys/actions/code-style@v7

smoke-tests:
name: Build and Smoke tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.10', '3.11', '3.12']
should-release:
- ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }}
exclude:
- should-release: false
os: macos-latest
steps:
- name: Build wheelhouse and perform smoke test
uses: ansys/actions/build-wheelhouse@v7
with:
library-name: ${{ env.PACKAGE_NAME }}
operating-system: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}

docs-style:
name: Documentation Style Check
runs-on: ubuntu-latest
steps:
- name: PyAnsys documentation style checks
uses: ansys/actions/doc-style@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}

docs-build:
name: Documentation Build
runs-on: ubuntu-latest
needs: [docs-style]
steps:

- name: "Run Ansys documentation building action"
uses: ansys/actions/doc-build@v7
with:
add-pdf-html-docs-as-assets: true

upload_dev_docs:
name: Upload dev documentation
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: [docs-build]
steps:
- name: Deploy the latest documentation
uses: ansys/actions/doc-deploy-dev@v7
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}

tests:
name: "Tests"
runs-on: ${{ matrix.os }}
needs: [code-style]
needs: [smoke-tests]
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.9', '3.12']
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Testing
uses: ansys/actions/tests-pytest@v6
uses: ansys/actions/tests-pytest@v7
timeout-minutes: 12
with:
checkout: false
skip-install: true
pytest-extra-args: "--cov=ansys.allie.flowkit.python --cov-report=term --cov-report=html:.cov/html --cov-report=xml:.cov/coverage.xml"

- name: Upload coverage results (HTML)
uses: actions/upload-artifact@v4
Expand All @@ -68,7 +107,7 @@ jobs:
release:
name: "Release project"
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
needs: [code-style]
needs: [docs-build, tests]
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -79,6 +118,19 @@ jobs:
with:
generate_release_notes: true

upload_docs_release:
name: Upload release documentation
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
runs-on: ubuntu-latest
needs: [release]
steps:
- name: Deploy the stable documentation
uses: ansys/actions/doc-deploy-stable@v7
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}


release-docker:
name : Generate Docker release
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,8 @@ dist/
config.yaml

# Do not ignore config.yaml in the configs/ directory
!configs/config.yaml
!configs/config.yaml

# Docs
doc/_build/
doc/source/api/
47 changes: 23 additions & 24 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
repos:
- repo: https://github.com/psf/black
rev: 23.12.1
- repo: https://github.com/adamchainz/blacken-docs
rev: 1.18.0
hooks:
- id: black

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

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

- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
args: ["--ignore=D205,D100,D213,D203"]
exclude: examples
additional_dependencies: [toml]
- id: blacken-docs
additional_dependencies: [black==23.12.1]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-merge-conflict
- id: debug-statements
- id: check-yaml
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.3
rev: 0.29.1
hooks:
- id: check-github-workflows


- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.7
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/ansys/pre-commit-hooks
rev: v0.4.3
hooks:
- id: check-github-workflows
- id: add-license-headers
files: '(src|examples|tests|docker)/.*\.(py)|\.(proto)'
args:
- --start_year=2024
12 changes: 12 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This is the list of allie-flowkit-python's significant contributors.
#
# This file does not necessarily list everyone who has contributed code.
#
# For contributions made under a Corporate CLA, the organization is
# added to this file.
#
# If you have contributed to the repository and wish to be added to this file
# please submit a request.
#
#
ANSYS, Inc.
65 changes: 65 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -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
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Contribute

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
allie-flowkit-python. For contributing to this project, please refer to the
[Contributing] section of this project's documentation.

[PyAnsys Developer's Guide]: https://dev.docs.pyansys.com/index.html
[Contributing]: expert-adventure-nvnoo1y.pages.github.io/dev/contributing.html
5 changes: 5 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Contributors

## Project Lead or Owner

* [Laura Sanchez-Gallego Kadri](https://github.com/laurasgkadri98)
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.
Loading