-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
137d239
commit fb9ac14
Showing
6 changed files
with
98 additions
and
16 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Lint tests run on PR | ||
# but should not run after push to main because reporting | ||
# these after push is meaningless to the building of the package | ||
name: lint | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- run: pip install tox | ||
|
||
- name: Test Lint | ||
run: tox -e lint |
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,14 @@ | ||
|
||
COSMO Software Cookbook | ||
======================= | ||
|
||
.. include:: ../../README.rst | ||
:start-after: marker-intro-start | ||
:end-before: marker-intro-end | ||
|
||
.. toctree:: | ||
:caption: Table of Contents | ||
|
||
mlp_models/index | ||
uncategorized/index | ||
sample_selection/index |
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
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 |
---|---|---|
@@ -1,13 +1,57 @@ | ||
[tox] | ||
min_version = 4.0 | ||
envlist = | ||
lint | ||
docs | ||
|
||
[testenv:docs] | ||
lint_folders = "{toxinidir}/examples" | ||
|
||
[testenv:lint] | ||
skip_install = true | ||
deps = | ||
black | ||
blackdoc | ||
flake8 | ||
flake8-bugbear | ||
isort | ||
flake8-sphinx-links | ||
sphinx-lint | ||
commands = | ||
flake8 {[tox]lint_folders} | ||
black --check --diff {[tox]lint_folders} | ||
blackdoc --check --diff {[tox]lint_folders} | ||
isort --check-only --diff {[tox]lint_folders} | ||
sphinx-lint --enable line-too-long --max-line-length 88 \ | ||
-i "{toxinidir}/docs/src" \ | ||
{[tox]lint_folders} "{toxinidir}/README.rst" | ||
|
||
[testenv:docs] | ||
deps = | ||
-r docs/requirements.txt | ||
commands = | ||
pip install -r docs/requirements.txt | ||
# tox's can not handle our custom requirement files in the deps section. | ||
pip install -r docs/requirements-rascal.txt | ||
pip install -r docs/requirements-equistore.txt | ||
|
||
sphinx-build {posargs:-E} -W -b html docs/src docs/build/html | ||
|
||
[testenv:format] | ||
# Abuse tox to do actual formatting. Users can call `tox -e format` to run | ||
# formatting on all files | ||
skip_install = true | ||
deps = | ||
black | ||
blackdoc | ||
isort | ||
commands = | ||
black {[tox]lint_folders} | ||
blackdoc {[tox]lint_folders} | ||
isort {[tox]lint_folders} | ||
|
||
[flake8] | ||
max_line_length = 88 | ||
exclude = | ||
docs/src/examples/ | ||
per-file-ignores = | ||
# D205 and D400 are incompatible with the requirements of sphinx-gallery | ||
examples/**:D205, D400 |