-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
D335: Open sourcing process: use ansys-api-edb (#334)
* REFACT: remove proto files * REFACT: update build deps and use ansys-api-edb * MISC: update project name and description * REFACT: architecture renaming Changes: - use ansys.edb.core instead of ansys.edb - use ansys.api.edb instead of files from local protos * MISC: update licence year * MISC: set optional dependencies in pyproject.toml Changes: - remove all requirements files - add project.optional-dependencies : notebook, tests, doc - update README.rest, tox.ini and ci_cd.yml accordingly * MISC: update pre-commit config Changes: - use newer repo revisions - add common pyansys repo * MISC: fix codespell pre-commit Changes are to leverage common pyansys file directory structure * CI: add twine install to build job * MISC: disable licence pre-commit * MISC: exclude notebooks from codespell hook * MISC: pass pre-commit hooks Changes: - sort imports - format using black - format to match flake8 - format some docstring to match pydocstyle - trim trailing whitespace (and exclude files) * CI: fix workflows The main issue we had was to retrieve `ansys-api-edb`. It is now accessible through private pypi. Changes: - use PIP_EXTRA_INDEX_URL to leverage private pypi - remove python3.7 from CI and tox.ini - fix doc-build deps - fix tox.ini by installing with .[tests] - change project extra deps to be compatible with private pypi * CI: update new doc cname
- Loading branch information
1 parent
34bffae
commit c0e3c29
Showing
270 changed files
with
1,287 additions
and
7,557 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 |
---|---|---|
|
@@ -10,7 +10,9 @@ on: | |
workflow_dispatch: | ||
|
||
env: | ||
DOCUMENTATION_CNAME: 'edb.docs.pyansys.com' | ||
DOCUMENTATION_CNAME: 'edb.core.docs.pyansys.com' | ||
MAIN_PYTHON_VERSION: '3.10' | ||
PIP_EXTRA_INDEX_URL: 'https://${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}@pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/simple/' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
@@ -21,17 +23,27 @@ jobs: | |
name: Code style | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: ansys/actions/code-style@v4 | ||
- name: PyAnsys code style checks | ||
uses: ansys/actions/code-style@v4 | ||
with: | ||
python-version: 3.7 | ||
python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
|
||
doc-style: | ||
name: Documentation Style Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: PyAnsys documentation style checks | ||
uses: ansys/actions/doc-style@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
tests: | ||
name: Tests and coverage | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [windows-latest, ubuntu-latest] | ||
python-version: ['3.7', '3.8', '3.9', '3.10'] | ||
python-version: ['3.8', '3.9', '3.10'] | ||
fail-fast: false | ||
|
||
steps: | ||
|
@@ -40,23 +52,16 @@ jobs: | |
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade -r requirements/requirements_tox.txt | ||
python -m pip install --upgrade .[tests] | ||
python -m pip install --upgrade tox-gh-actions | ||
- name: Test with tox | ||
# Only the tox environment specified in the tox.ini gh-actions is run | ||
run: tox -e test -- --ignore=tests/e2e | ||
|
||
doc-style: | ||
name: Documentation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Check documentation style" | ||
uses: ansys/actions/doc-style@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# TODO: convert to ansys/actions/doc-build | ||
doc-build: | ||
name: Build documentation | ||
|
@@ -67,11 +72,11 @@ jobs: | |
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
python-version: 3.8 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade -r requirements/requirements_tox.txt | ||
python -m pip install --upgrade .[doc] tox | ||
- name: Generate the documentation with tox | ||
run: tox -e doc | ||
|
@@ -91,18 +96,10 @@ jobs: | |
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
python-version: 3.8 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip flit | ||
python -m pip install -r protos/requirements/requirements_build.txt | ||
python -m pip install -r requirements/requirements_build.txt | ||
- name: Build API | ||
run: | | ||
cd protos | ||
python setup.py develop | ||
python setup.py bdist_wheel | ||
cp -a dist/. ../dist/ | ||
python -m pip install --upgrade pip flit twine | ||
- name: Build Core | ||
run: | | ||
flit build | ||
|
@@ -129,7 +126,7 @@ jobs: | |
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: 3.7 | ||
python-version: 3.8 | ||
|
||
- uses: actions/checkout@v2 | ||
- uses: actions/download-artifact@v3 | ||
|
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
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
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
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
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
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
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
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
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
Oops, something went wrong.