Skip to content

Commit f538119

Browse files
committed
Merge branch 'main' into release/0.1
2 parents 47e5c8a + 3e2d7cf commit f538119

30 files changed

+236
-223
lines changed

.flake8

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[flake8]
2+
exclude = build
3+
select = W191, W291, W293, W391, E115, E117, E122, E124, E125, E225, E231, E301, E303, E501, F401, F403
4+
count = True
5+
max-complexity = 10
6+
max-line-length = 100
7+
statistics = True

.github/workflows/ci-build.yml

Lines changed: 50 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,40 @@
1-
# Build documentation
2-
name: Documentation Build
1+
name: Build
32

4-
on: [push, pull_request, workflow_dispatch]
3+
on:
4+
pull_request:
5+
push:
6+
tags:
7+
- "*"
8+
branches:
9+
- main
510

611
jobs:
7-
docs_build:
8-
runs-on: ubuntu-20.04
12+
stylecheck:
13+
runs-on: ubuntu-latest
914

1015
steps:
1116
- uses: actions/checkout@v2
1217

1318
- name: Setup Python
1419
uses: actions/[email protected]
1520
with:
16-
python-version: 3.8
21+
python-version: 3.9
22+
23+
- name: Check Style
24+
run: |
25+
pip install -r requirements_style.txt --disable-pip-version-check
26+
make
27+
28+
build:
29+
runs-on: ubuntu-latest
30+
31+
steps:
32+
- uses: actions/checkout@v2
33+
34+
- name: Setup Python
35+
uses: actions/[email protected]
36+
with:
37+
python-version: 3.9
1738

1839
- name: Install pyansys_sphinx_theme
1940
run: |
@@ -23,10 +44,11 @@ jobs:
2344
- name: lint package
2445
run: |
2546
pip install twine
26-
twine check dist/pyansys*
47+
twine check dist/*
2748
2849
- name: Build Documentation
2950
run: |
51+
pip install -r requirements_docs.txt
3052
make -C doc html SPHINXOPTS="-W"
3153
touch doc/build/html/.nojekyll
3254
echo "sphinxdocs.pyansys.com" > doc/build/html/CNAME
@@ -48,11 +70,28 @@ jobs:
4870
CLEAN: true
4971
single-commit: true
5072

51-
- name: Upload to PyPi
52-
if: startsWith(github.ref, 'refs/tags/')
73+
Release:
74+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
75+
needs: [stylecheck, build]
76+
runs-on: ubuntu-latest
77+
steps:
78+
- name: Set up Python
79+
uses: actions/setup-python@v1
80+
with:
81+
python-version: 3.9
82+
83+
- name: Generate package
84+
run: python setup.py sdist
85+
86+
- name: Upload to Public PyPi
5387
run: |
5488
pip install twine
55-
twine upload --skip-existing dist/pyansys*
89+
twine upload --skip-existing dist/*
5690
env:
5791
TWINE_USERNAME: __token__
58-
TWINE_PASSWORD: ${{ secrets.TWINE_TOKEN }}
92+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
93+
94+
- name: Release
95+
uses: softprops/action-gh-release@v1
96+
with:
97+
generate_release_notes: true

.github/workflows/style.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ dist/*
1010
*.egg-info/
1111

1212

13+
# sphinx auto-generated
1314
build/*
14-
doc/build/
15+
doc/build/
16+
doc/source/_autosummary/

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
include pyansys_sphinx_theme/docs-navbar.html
33
include pyansys_sphinx_theme/theme.conf
44

5+
graft pyansys_sphinx_theme/_templates
56
graft pyansys_sphinx_theme/static

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ CODESPELL_IGNORE ?= "ignore_words.txt"
66

77
all: doctest
88

9-
doctest: codespell
9+
doctest: codespell flake8
1010

1111
codespell:
1212
@echo "Running codespell"
1313
@codespell $(CODESPELL_DIRS) -S $(CODESPELL_SKIP) -I $(CODESPELL_IGNORE)
14+
15+
flake8:
16+
@echo "Running flake8"
17+
@flake8 .

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ preview of the theme.
2121
Other Sites Using the PyAnsys theme:
2222

2323
- `PyMAPDL <https://mapdldocs.pyansys.com/>`__
24+
- `PyAEDT <https://aedtdocs.pyansys.com/>`__
2425
- `DPF-Core <https://dpfdocs.pyansys.com/>`__
2526
- `DPF-Post <https://postdocs.pyansys.com/>`__
2627
- `Legacy PyMAPDL Reader <https://readerdocs.pyansys.com/>`__

doc/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ help:
1919
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2020

2121

22-
# customized clean due to examples gallery
22+
# customized clean due to api examples
2323
clean:
2424
rm -rf build
25+
find . -type d -name "_autosummary" -exec rm -rf {} +

doc/source/_static/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
## Contains static files for the documentation build

doc/source/_templates/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
## Contains templates for the documentation build

0 commit comments

Comments
 (0)