-
Notifications
You must be signed in to change notification settings - Fork 122
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
docs: Tooling and automation for support matrix #290
Merged
Merged
Changes from all commits
Commits
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
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.
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.
Mostly just curious: what does the leading semicolon on these lines do?
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.
@karlhigley , ha. I didn't even question it. I highlighted the lines in vscode and pressed Ctrl+/ to comment them and vscode added the semicolons. I believe the semi acts as a comment character because I added some of those explicitly to some of the functions.
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.
Oh interesting! I thought it might be a comment but then I realized
#
was a comment, and it turns out to be impossible to search for information on this, because all you get is info on the pylint checks about semicolons.