Skip to content

Commit 5bb3adb

Browse files
committed
Add tox.ini for automation
1 parent 346a999 commit 5bb3adb

File tree

2 files changed

+194
-13
lines changed

2 files changed

+194
-13
lines changed

.gitignore

Lines changed: 157 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,165 @@
1-
# Compiled source #
2-
###################
3-
*.pyc
1+
# Created by https://www.toptal.com/developers/gitignore/api/python
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=python
43

5-
# packages
6-
dist/*
4+
### Python ###
5+
# Byte-compiled / optimized / DLL files
6+
__pycache__/
7+
*.py[cod]
8+
*$py.class
79

8-
# Pip generated folders #
9-
#########################
10+
# C extensions
11+
*.so
12+
13+
# Distribution / packaging
14+
.Python
15+
build/
16+
develop-eggs/
17+
dist/
18+
downloads/
19+
eggs/
20+
.eggs/
21+
lib/
22+
lib64/
23+
parts/
24+
sdist/
25+
var/
26+
wheels/
27+
share/python-wheels/
1028
*.egg-info/
29+
.installed.cfg
30+
*.egg
31+
MANIFEST
1132

12-
# Build docs and packages
13-
build/*
14-
doc/build/
15-
.vscode/
33+
# PyInstaller
34+
# Usually these files are written by a python script from a template
35+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
36+
*.manifest
37+
*.spec
38+
39+
# Installer logs
40+
pip-log.txt
41+
pip-delete-this-directory.txt
42+
43+
# Unit test / coverage reports
44+
htmlcov/
45+
.tox/
46+
.nox/
47+
.coverage
48+
.coverage.*
49+
.cache
50+
nosetests.xml
51+
coverage.xml
52+
*.cover
53+
*.py,cover
54+
.hypothesis/
55+
.pytest_cache/
56+
cover/
57+
58+
# Translations
59+
*.mo
60+
*.pot
61+
62+
# Django stuff:
63+
*.log
64+
local_settings.py
65+
db.sqlite3
66+
db.sqlite3-journal
67+
68+
# Flask stuff:
69+
instance/
70+
.webassets-cache
71+
72+
# Scrapy stuff:
73+
.scrapy
74+
75+
# Sphinx documentation
76+
doc/_build/
77+
78+
# PyBuilder
79+
.pybuilder/
80+
target/
81+
82+
# Jupyter Notebook
83+
.ipynb_checkpoints
84+
85+
# IPython
86+
profile_default/
87+
ipython_config.py
88+
89+
# pyenv
90+
# For a library or package, you might want to ignore these files since the code is
91+
# intended to run in multiple environments; otherwise, check them in:
92+
# .python-version
93+
94+
# pipenv
95+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
96+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
97+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
98+
# install all needed dependencies.
99+
#Pipfile.lock
100+
101+
# poetry
102+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
103+
# This is especially recommended for binary packages to ensure reproducibility, and is more
104+
# commonly ignored for libraries.
105+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
106+
#poetry.lock
16107

17-
# virtual environment
108+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
109+
__pypackages__/
110+
111+
# Celery stuff
112+
celerybeat-schedule
113+
celerybeat.pid
114+
115+
# SageMath parsed files
116+
*.sage.py
117+
118+
# Environments
119+
.env
120+
.venv
121+
env/
18122
venv/
123+
ENV/
124+
env.bak/
125+
venv.bak/
126+
127+
# Spyder project settings
128+
.spyderproject
129+
.spyproject
130+
131+
# Rope project settings
132+
.ropeproject
133+
134+
# mkdocs documentation
135+
/site
136+
137+
# mypy
138+
.mypy_cache/
139+
.dmypy.json
140+
dmypy.json
141+
142+
# Pyre type checker
143+
.pyre/
144+
145+
# pytype static type analyzer
146+
.pytype/
147+
148+
# Cython debug symbols
149+
cython_debug/
150+
151+
# PyCharm
152+
# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can
153+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
154+
# and can be added to the global gitignore or merged into this file. For a more nuclear
155+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
156+
.idea/
157+
158+
# Visual Studio
159+
.vs/
160+
.vscode/
161+
162+
# End of https://www.toptal.com/developers/gitignore/api/python
19163

20-
# sphinx autogen
164+
# Sphinx autogen
21165
doc/source/how-to/api/*

tox.ini

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[tox]
2+
description = Default environments to be executed when calling tox
3+
envlist =
4+
style
5+
doc
6+
isolated_build = true
7+
isolated_build_env = build
8+
skipsdist = true
9+
10+
[testenv]
11+
description = Generic environment configuration
12+
basepython =
13+
{style,doc,build}: python3
14+
passenv = *
15+
setenv =
16+
PYTHONUNBUFFERED = yes
17+
skip_install = false
18+
19+
[testenv:style]
20+
description = Checks if code style applies
21+
skip_install = true
22+
deps =
23+
pre-commit
24+
commands =
25+
pre-commit install
26+
pre-commit run --all-files --show-diff-on-failure
27+
28+
[testenv:doc]
29+
description = Checks if project documentation properly builds
30+
skip_install = false
31+
deps =
32+
-r{toxinidir}/requirements/requirements_doc.txt
33+
allowlist_externals=*
34+
commands =
35+
sphinx-build -d "{toxworkdir}/doc_doctree" doc/source "{toxworkdir}/doc_out" --color -vW -bhtml
36+
touch "{toxworkdir}/doc_out/.nojekyll"
37+
bash -c 'echo "dev.docs.pyansys.com" > "{toxworkdir}/doc_out/CNAME"'

0 commit comments

Comments
 (0)