Skip to content

Commit 8a2dffd

Browse files
authored
REFACTOR: Make the repo a non python package (#150)
* REFACTOR: Make repo non python package * DOCS: Define constants in examples * WIP: Fix CI * FIX: Dependencies * FIX: Jinja usage * FIX: Remove dependency * FIX: Html build failure due to Sphinx version * FIX: Missing value for edit page button
1 parent 2358795 commit 8a2dffd

File tree

81 files changed

+565
-1206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+565
-1206
lines changed

.github/workflows/ci_cd.yml

+24-62
Original file line numberDiff line numberDiff line change
@@ -16,41 +16,15 @@ env:
1616
PACKAGE_NAME: 'pyaedt-examples'
1717
ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }}
1818
ON_CI: True
19+
PYAEDT_NON_GRAPHICAL: '1'
20+
PYAEDT_DOC_GENERATION: '1'
1921

2022
concurrency:
2123
group: ${{ github.workflow }}-${{ github.ref }}
2224
cancel-in-progress: true
2325

2426
jobs:
2527

26-
#TODO: Update to use code-style
27-
# code-style:
28-
# name: Code style
29-
# runs-on: ubuntu-latest
30-
# steps:
31-
# - uses: ansys/actions/code-style@v4
32-
# with:
33-
# python-version: ${{ env.MAIN_PYTHON_VERSION }}
34-
# use-python-cache: false
35-
36-
smoke-tests:
37-
name: Build and Smoke tests
38-
runs-on: ${{ matrix.os }}
39-
strategy:
40-
fail-fast: false
41-
matrix:
42-
os: [ubuntu-latest, windows-latest]
43-
python-version: ['3.9', '3.10', '3.11']
44-
should-release:
45-
- ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }}
46-
steps:
47-
- name: Build wheelhouse and perform smoke test
48-
uses: ansys/actions/build-wheelhouse@v5
49-
with:
50-
library-name: ${{ env.PACKAGE_NAME }}
51-
operating-system: ${{ matrix.os }}
52-
python-version: ${{ matrix.python-version }}
53-
5428
doc-style:
5529
name: Documentation style
5630
runs-on: ubuntu-latest
@@ -59,22 +33,6 @@ jobs:
5933
with:
6034
token: ${{ secrets.GITHUB_TOKEN }}
6135

62-
tests:
63-
name: Test and coverage
64-
runs-on: ubuntu-latest
65-
steps:
66-
- uses: ansys/actions/tests-pytest@v5
67-
with:
68-
token: ${{ secrets.GITHUB_TOKEN }}
69-
70-
- name: Upload Coverage Results
71-
if: always()
72-
uses: actions/upload-artifact@v4
73-
with:
74-
name: coverage-html
75-
path: .cov/html
76-
retention-days: 7
77-
7836
# =================================================================================================
7937
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
8038
# =================================================================================================
@@ -102,8 +60,7 @@ jobs:
10260
- name: Install project and documentation dependencies
10361
run: |
10462
.venv\Scripts\Activate.ps1
105-
pip install .
106-
pip install .[doc]
63+
pip install -r requirements/requirements_doc.txt
10764
10865
# Use environment variable to keep the doctree and avoid redundant build for PDF pages
10966
- name: Create HTML documentation
@@ -136,23 +93,28 @@ jobs:
13693
path: doc/_build/latex
13794
retention-days: 7
13895

139-
#TODO: Update to use code-style
14096
release:
141-
name: Release project
142-
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
143-
# needs: [code-style, doc-build]
144-
needs: [doc-build]
97+
if: github.event_name == 'refs/heads/main' && !contains(github.ref, 'refs/tags')
98+
needs: [doc-build, doc-style]
14599
runs-on: ubuntu-latest
146100
steps:
147-
# TODO: update if ever public
148-
# - name: Release to the public PyPI repository
149-
# uses: ansys/actions/release-pypi-public@v5
150-
# with:
151-
# library-name: ${{ env.PACKAGE_NAME }}
152-
# twine-username: "__token__"
153-
# twine-token: ${{ secrets.PYPI_TOKEN }}
154-
155-
- name: Release to GitHub
156-
uses: ansys/actions/release-github@v5
101+
- uses: actions/checkout@v4
102+
103+
- uses: actions/download-artifact@v4
104+
105+
- name: Display structure of downloaded files
106+
run: ls -R
107+
108+
- name: Zip HTML documentation
109+
uses: vimtor/action-zip@v1.2
110+
with:
111+
files: documentation-html
112+
dest: documentation-html.zip
113+
114+
- name: Release
115+
uses: softprops/action-gh-release@v2
157116
with:
158-
library-name: ${{ env.PACKAGE_NAME }}
117+
generate_release_notes: true
118+
files: |
119+
./documentation-html.zip
120+
./documentation-pdf/*.pdf

0 commit comments

Comments
 (0)