-
Notifications
You must be signed in to change notification settings - Fork 8
Modernize project layout #115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2e1161c
Remove configure scripts
jorgepiloto 60021b7
Collect deps under requirements/ dir
jorgepiloto 184b177
Add tox.ini for automation
jorgepiloto c67d3f0
Update CI/CD to new tox workflow
jorgepiloto 5784873
Update .pre-commit-confgi.yml
jorgepiloto 60511e7
Update to latest ansys-sphinx-theme==0.4.2
jorgepiloto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Documentation Build | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
|
@@ -8,70 +8,62 @@ on: | |
branches: | ||
- main | ||
|
||
env: | ||
MAIN_PYTHON_VERSION: '3.10' | ||
|
||
jobs: | ||
pre-commit: | ||
name: Pre-commit checks | ||
runs-on: ubuntu-latest | ||
|
||
style: | ||
name: Code style | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Python | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10' | ||
- name: Install pre-commit requirements | ||
python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
- name: Install dependencies | ||
run: | | ||
pip install pre-commit~=2.16.0 | ||
python -m pip install --upgrade pip tox | ||
- name: Test with tox | ||
run: tox -e style | ||
|
||
- name: Run pre-commit | ||
run: | | ||
pre-commit run --all-files || ( git status --short ; git diff ; exit 1 ) | ||
|
||
docs_build: | ||
docs: | ||
name: Documentation | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2.2.2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
|
||
- name: Install diagrams dependencies | ||
- name: Install system dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install nodejs npm graphviz | ||
sudo apt-get install -y texlive-latex-extra latexmk nodejs npm graphviz | ||
npm install -g @mermaid-js/mermaid-cli | ||
|
||
- name: Build HTML Documentation | ||
- name: Install Python dependencies | ||
run: | | ||
pip install -r requirements_docs.txt --disable-pip-version-check | ||
make -C doc html SPHINXOPTS="-W" | ||
touch doc/build/html/.nojekyll | ||
echo "dev.docs.pyansys.com" > doc/build/html/CNAME | ||
|
||
- name: Deploy to gh-pages on main | ||
if: github.ref == 'refs/heads/main' | ||
uses: JamesIves/[email protected] | ||
with: | ||
token: ${{ secrets.github_token }} | ||
branch: gh-pages | ||
folder: doc/build/html | ||
clean: true | ||
single-commit: true | ||
|
||
python -m pip install --upgrade pip tox | ||
|
||
- name: Build HTML documentation | ||
run: tox -e doc | ||
|
||
- name: Build PDF Documentation | ||
run: | | ||
sudo apt update | ||
sudo apt-get install -y texlive-latex-extra latexmk | ||
python -m pip install -r requirements/requirements_doc.txt | ||
make -C doc latexpdf | ||
|
||
- name: Upload HTML Documentation | ||
- name: Upload HTML documentation | ||
uses: actions/[email protected] | ||
with: | ||
name: HTML-Documentation | ||
path: doc/build/html | ||
path: .tox/doc_out_html/ | ||
retention-days: 7 | ||
|
||
- name: Upload PDF Documentation | ||
|
@@ -81,17 +73,27 @@ jobs: | |
path: doc/build/latex/*.pdf | ||
retention-days: 7 | ||
|
||
Release: | ||
- name: Deploy to gh-pages | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags') | ||
uses: JamesIves/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages | ||
FOLDER: .tox/doc_out_html/ | ||
CLEAN: true | ||
SINGLE_COMMIT: true | ||
|
||
release: | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags') | ||
needs: docs_build | ||
needs: [style, docs] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
|
||
- uses: actions/download-artifact@v2 | ||
|
||
|
This file contains hidden or 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 |
---|---|---|
@@ -1,47 +1,50 @@ | ||
name: Nightly Documentation Build | ||
|
||
|
||
on: | ||
schedule: # UTC at 0400 | ||
- cron: '0 4 * * */2' # To run every 3 days | ||
workflow_dispatch: | ||
|
||
env: | ||
MAIN_PYTHON_VERSION: '3.10' | ||
|
||
jobs: | ||
nightly_docs_build: | ||
nightly-docs: | ||
name: Nightly documentation | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v2.2.2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
|
||
- name: Install mermaid-cli | ||
- name: Install system dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install nodejs npm graphviz | ||
sudo apt-get install -y texlive-latex-extra latexmk nodejs npm graphviz | ||
npm install -g @mermaid-js/mermaid-cli | ||
|
||
- name: Build HTML Documentation | ||
- name: Install Python dependencies | ||
run: | | ||
pip install -r requirements_docs.txt --disable-pip-version-check | ||
make -C doc html SPHINXOPTS="-W" | ||
touch doc/build/html/.nojekyll | ||
echo "dev.docs.pyansys.com" > doc/build/html/CNAME | ||
python -m pip install --upgrade pip tox | ||
|
||
- name: Build HTML documentation | ||
run: tox -e doc | ||
|
||
- name: Build PDF Documentation | ||
run: | | ||
sudo apt update | ||
sudo apt-get install -y texlive-latex-extra latexmk | ||
python -m pip install -r requirements/requirements_doc.txt | ||
make -C doc latexpdf | ||
|
||
- name: Upload HTML Documentation | ||
- name: Upload HTML documentation | ||
uses: actions/[email protected] | ||
with: | ||
name: HTML-Documentation | ||
path: doc/build/html | ||
path: .tox/doc_out_html/ | ||
retention-days: 7 | ||
|
||
- name: Upload PDF Documentation | ||
|
@@ -52,10 +55,11 @@ jobs: | |
retention-days: 7 | ||
|
||
- name: Deploy to gh-pages | ||
uses: JamesIves/[email protected] | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags') | ||
uses: JamesIves/[email protected] | ||
with: | ||
token: ${{ secrets.github_token }} | ||
branch: gh-pages | ||
folder: doc/build/html | ||
clean: true | ||
single-commit: true | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages | ||
FOLDER: .tox/doc_out_html/ | ||
CLEAN: true | ||
SINGLE_COMMIT: true |
This file contains hidden or 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 |
---|---|---|
@@ -1,21 +1,165 @@ | ||
# Compiled source # | ||
################### | ||
*.pyc | ||
# Created by https://www.toptal.com/developers/gitignore/api/python | ||
# Edit at https://www.toptal.com/developers/gitignore?templates=python | ||
|
||
# packages | ||
dist/* | ||
### Python ### | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# Pip generated folders # | ||
######################### | ||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
share/python-wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# Build docs and packages | ||
build/* | ||
doc/build/ | ||
.vscode/ | ||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.nox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
*.py,cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
db.sqlite3 | ||
db.sqlite3-journal | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
doc/_build/ | ||
|
||
# PyBuilder | ||
.pybuilder/ | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# IPython | ||
profile_default/ | ||
ipython_config.py | ||
|
||
# pyenv | ||
# For a library or package, you might want to ignore these files since the code is | ||
# intended to run in multiple environments; otherwise, check them in: | ||
# .python-version | ||
|
||
# pipenv | ||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | ||
# However, in case of collaboration, if having platform-specific dependencies or dependencies | ||
# having no cross-platform support, pipenv may install dependencies that don't work, or not | ||
# install all needed dependencies. | ||
#Pipfile.lock | ||
|
||
# poetry | ||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. | ||
# This is especially recommended for binary packages to ensure reproducibility, and is more | ||
# commonly ignored for libraries. | ||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control | ||
#poetry.lock | ||
|
||
# virtual environment | ||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow | ||
__pypackages__/ | ||
|
||
# Celery stuff | ||
celerybeat-schedule | ||
celerybeat.pid | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
.dmypy.json | ||
dmypy.json | ||
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# pytype static type analyzer | ||
.pytype/ | ||
|
||
# Cython debug symbols | ||
cython_debug/ | ||
|
||
# PyCharm | ||
# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can | ||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore | ||
# and can be added to the global gitignore or merged into this file. For a more nuclear | ||
# option (not recommended) you can uncomment the following to ignore the entire idea folder. | ||
.idea/ | ||
|
||
# Visual Studio | ||
.vs/ | ||
.vscode/ | ||
|
||
# End of https://www.toptal.com/developers/gitignore/api/python | ||
|
||
# sphinx autogen | ||
# Sphinx autogen | ||
doc/source/how-to/api/* |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.