-
Notifications
You must be signed in to change notification settings - Fork 9
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
New Coding Style guide #95
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
2955dac
Move coding_style/ -> coding-style/
jorgepiloto 3ebd904
Remove beyond_pep8.rst and flake8.rst
jorgepiloto 07e2491
Rename pep8_best_practices.rst -> pep8.rst
jorgepiloto 87f75da
New formatting-tools.rst section
jorgepiloto cf6481b
Fix links and references
jorgepiloto 76e8ab4
Apply code suggestions
jorgepiloto ea24d24
Improve pep8.rst tabs
jorgepiloto c7b267c
Apply suggestions from code review
jorgepiloto b24f20f
Add more tabs
jorgepiloto e32bfbd
Add additional options to flake8
jorgepiloto 194e674
Improve formatting tools
jorgepiloto 1c89050
Add required standard section
jorgepiloto 47f222b
Add required standard
jorgepiloto 977a5e0
Improve pep8.rst
jorgepiloto 38389d7
Add code suggestions
jorgepiloto 0f23cad
Apply blacken-docs
jorgepiloto 15acec5
Fix code snippets
jorgepiloto 28bf52f
Apply suggestions from code review
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
.. code-block:: ini | ||
|
||
[tox] | ||
description = Default tox environments list | ||
envlist = | ||
style,{py37,py38,py39,py310}{,-coverage},doc | ||
skip_missing_interpreters = true | ||
isolated_build = true | ||
isolated_build_env = build | ||
|
||
[testenv] | ||
description = Checks for project unit tests and coverage (if desired) | ||
basepython = | ||
py37: python3.7 | ||
py38: python3.8 | ||
py39: python3.9 | ||
py310: python3.10 | ||
py: python3 | ||
{style,reformat,doc,build}: python3 | ||
setenv = | ||
PYTHONUNBUFFERED = yes | ||
coverage: PYTEST_EXTRA_ARGS = --cov=ansys.product --cov-report=term --cov-report=xml --cov-report=html | ||
deps = | ||
-r{toxinidir}/requirements/requirements_tests.txt | ||
commands = | ||
pytest {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {posargs:-vv} | ||
|
||
[testenv:style] | ||
description = Checks project code style | ||
skip_install = true | ||
deps = | ||
pre-commit | ||
commands = | ||
pre-commit install | ||
pre-commit run --all-files --show-diff-on-failure | ||
|
||
[testenv:doc] | ||
description = Check if documentation generates properly | ||
deps = | ||
-r{toxinidir}/requirements/requirements_doc.txt | ||
commands = | ||
sphinx-build -d "{toxworkdir}/doc_doctree" doc/source "{toxworkdir}/doc_out" --color -vW -bhtml | ||
|
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
.. code-block:: ini | ||
|
||
[tox] | ||
description = Default tox environments list | ||
envlist = | ||
style,{py37,py38,py39,py310}{,-coverage},doc | ||
skip_missing_interpreters = true | ||
isolated_build = true | ||
|
||
[testenv] | ||
description = Checks for project unit tests and coverage (if desired) | ||
basepython = | ||
py37: python3.7 | ||
py38: python3.8 | ||
py39: python3.9 | ||
py310: python3.10 | ||
py: python3 | ||
{style,reformat,doc,build}: python3 | ||
skip_install = true | ||
whitelist_externals = | ||
poetry | ||
setenv = | ||
PYTHONUNBUFFERED = yes | ||
coverage: PYTEST_EXTRA_ARGS = --cov=ansys.product --cov-report=term --cov-report=xml --cov-report=html | ||
deps = | ||
-r{toxinidir}/requirements/requirements_tests.txt | ||
commands = | ||
poetry install | ||
poetry run pytest {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {posargs:-vv} | ||
|
||
[testenv:style] | ||
description = Checks project code style | ||
skip_install = true | ||
deps = | ||
pre-commit | ||
commands = | ||
pre-commit install | ||
pre-commit run --all-files --show-diff-on-failure | ||
|
||
[testenv:doc] | ||
description = Check if documentation generates properly | ||
deps = | ||
-r{toxinidir}/requirements/requirements_doc.txt | ||
commands = | ||
poetry run sphinx-build -d "{toxworkdir}/doc_doctree" doc/source "{toxworkdir}/doc_out" --color -vW -bhtml | ||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This parameter needed to have a description. Please review and correct as necessary.