-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: Tooling and automation for support matrix (#290)
* Extract the broad swath of data from the NGC containers. * Create RST tables from the data, by year. * Add tests. * Rebase after docs-ext-toc was merged. * Add logging for troublshooting unexpected results. * Add get_from_pip function from Ben
- Loading branch information
1 parent
4642602
commit 20ea0b1
Showing
33 changed files
with
2,638 additions
and
603 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,51 @@ | ||
name: docs-ci | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- 'docs/**.py' | ||
pull_request: | ||
branches: [ main ] | ||
types: [opened, synchronize, reopened, closed] | ||
paths: | ||
- 'docs/**.py' | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: [3.8] | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Ubuntu packages | ||
run: | | ||
sudo apt-get update -y | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools==59.4.0 wheel | ||
python -m pip install -r docs/requirements-doc.txt | ||
- name: Lint with flake8 | ||
run: | | ||
flake8 docs | ||
- name: Lint with black | ||
run: | | ||
black --check docs | ||
- name: Lint with isort | ||
run: | | ||
isort -c docs | ||
- name: Lint with codespell | ||
run: | | ||
codespell | ||
- name: Run unittests | ||
# python -m pytest -rxs docs | ||
run: | | ||
coverage run -m pytest -v docs && coverage report -m |
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,54 @@ | ||
name: docs-smx-data | ||
|
||
on: | ||
schedule: | ||
# * is a special character in YAML so you have to quote this string | ||
- cron: "0 0 * * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
python-version: [3.8] | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Ubuntu packages | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt-get clean autoclean | ||
sudo apt-get autoremove --yes | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools==59.4.0 wheel | ||
python -m pip install -r docs/requirements-doc.txt | ||
- name: Maximize disk space | ||
run: | | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -rf /usr/local/lib/android | ||
sudo rm -rf /opt/ghc | ||
sudo rm -rf /usr/local/share/boost | ||
- name: Get container data | ||
run: | | ||
python docs/extractor.py | ||
- name: Initialize Git configuration | ||
run: | | ||
git config user.name docs-smx-bot | ||
git config user.email do-not-send-@github.com | ||
- name: Commit updates to data.json | ||
run: | | ||
x=$(git status --porcelain) | ||
if grep -q "data.json" <<< "${x}"; then | ||
git add . | ||
git commit -m 'Updates from new containers' | ||
git push | ||
fi |
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,3 +1,9 @@ | ||
docs/build/ | ||
docs/source/examples | ||
docs/source/README.md | ||
docs/source/generated/ | ||
|
||
.coverage | ||
|
||
__pycache__/ | ||
*.py[cod] |
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,62 @@ | ||
[MESSAGES CONTROL] | ||
disable=fixme, | ||
# docstrings aren't required (yet). | ||
missing-function-docstring, | ||
missing-module-docstring, | ||
missing-class-docstring, | ||
|
||
# formatting checks that we're handling with black/isort | ||
wrong-import-order, | ||
wrong-import-position, | ||
ungrouped-imports, | ||
line-too-long, | ||
superfluous-parens, | ||
trailing-whitespace, | ||
|
||
# we'll probably never enable these checks | ||
invalid-name, | ||
import-error, | ||
duplicate-code, | ||
|
||
# disable code-complexity checks for now | ||
# TODO: should we configure the thresholds for these rather than just disable? | ||
; too-many-function-args, | ||
; too-many-instance-attributes, | ||
; too-many-locals, | ||
; too-many-branches, | ||
; too-many-nested-blocks, | ||
; too-many-statements, | ||
; too-many-arguments, | ||
; too-many-return-statements, | ||
; too-many-lines, | ||
; too-few-public-methods, | ||
|
||
# many of these checks would be great to include at some point, but would | ||
# require some changes to our codebase | ||
; useless-return, | ||
; protected-access, | ||
; arguments-differ, | ||
; unused-argument, | ||
; unused-variable, | ||
; abstract-method, | ||
; no-name-in-module, | ||
; attribute-defined-outside-init, | ||
; redefined-outer-name, | ||
; import-outside-toplevel, | ||
; no-else-continue, | ||
; no-else-return, | ||
; no-else-raise, | ||
; no-member, | ||
; super-with-arguments, | ||
; unsupported-assignment-operation, | ||
; inconsistent-return-statements, | ||
; duplicate-string-formatting-argument, | ||
; len-as-condition, | ||
; cyclic-import, | ||
|
||
# producing false positives | ||
; unexpected-keyword-arg, | ||
; not-an-iterable, | ||
; unsubscriptable-object | ||
[SIMILARITIES] | ||
min-similarty-lines=20 |
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
Oops, something went wrong.