-
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
0 parents
commit 52dd681
Showing
77 changed files
with
8,277 additions
and
0 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,14 @@ | ||
# SPDX-FileCopyrightText: 2023 Gert van Dijk | ||
# | ||
# SPDX-License-Identifier: CC0-1.0 | ||
|
||
/.coverage | ||
/.direnv | ||
/.git | ||
/.mypy_cache | ||
/.pytest_cache | ||
/.pytest-cov | ||
/.reuse | ||
/.ruff_cache | ||
/.vscode | ||
/dist |
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,5 @@ | ||
# SPDX-FileCopyrightText: 2023 Gert van Dijk <[email protected]> | ||
# | ||
# SPDX-License-Identifier: CC0-1.0 | ||
|
||
layout python python3.10 |
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,17 @@ | ||
# SPDX-FileCopyrightText: 2023 Gert van Dijk <[email protected]> | ||
# | ||
# SPDX-License-Identifier: CC0-1.0 | ||
|
||
# Flake8 does not support reading from pyproject.toml files. | ||
# https://github.com/PyCQA/flake8/issues/234 | ||
|
||
[flake8] | ||
# Match black's default | ||
max-line-length = 88 | ||
extend-exclude = | ||
*.egg-info/, | ||
./.mypy_cache, | ||
./.pytest_cache, | ||
./build, | ||
./dist, | ||
./.direnv |
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,12 @@ | ||
# SPDX-FileCopyrightText: 2023 Gert van Dijk <[email protected]> | ||
# | ||
# SPDX-License-Identifier: CC0-1.0 | ||
|
||
*.egg-info/ | ||
__pycache__/ | ||
/.pytest_cache | ||
/build | ||
/dist | ||
/.direnv | ||
/.coverage | ||
/.pytest-cov |
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,5 @@ | ||
# SPDX-FileCopyrightText: 2023 Gert van Dijk <[email protected]> | ||
# | ||
# SPDX-License-Identifier: CC0-1.0 | ||
|
||
/*.log |
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,12 @@ | ||
{ | ||
"recommendations": [ | ||
"cameron.vscode-pytest", | ||
"charliermarsh.ruff", | ||
"exiasr.hadolint", | ||
"ms-python.isort", | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"ryanluker.vscode-coverage-gutters", | ||
"timonwong.shellcheck", | ||
] | ||
} |
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,3 @@ | ||
SPDX-FileCopyrightText: 2023 Gert van Dijk <[email protected]> | ||
|
||
SPDX-License-Identifier: CC0-1.0 |
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 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
// Overriding default Python debug test launcher command to disable coverage | ||
// (via env var below), because coverage reporting interferes with the | ||
// debugger. | ||
// https://code.visualstudio.com/docs/python/testing#_pytest-configuration-settings | ||
"name": "Python: Debug Tests", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${file}", | ||
"env": { | ||
"PYTEST_ADDOPTS": "--no-cov", | ||
}, | ||
"purpose": [ | ||
"debug-test", | ||
], | ||
"console": "integratedTerminal", | ||
"justMyCode": false, | ||
} | ||
] | ||
} |
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,3 @@ | ||
SPDX-FileCopyrightText: 2023 Gert van Dijk <[email protected]> | ||
|
||
SPDX-License-Identifier: CC0-1.0 |
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,56 @@ | ||
{ | ||
"files.associations": { | ||
".dockerignore": "ignore", // auto-interprets wrongly as Python somehow | ||
}, | ||
"files.exclude": { | ||
".coverage": true, | ||
".direnv/": true, | ||
".pytest_cache/": true, | ||
".pytest-cov/": true, | ||
".ruff_cache/": true, | ||
"**/__pycache__/": true, | ||
"**/.mypy_cache/": true, | ||
"**/*.egg-info/": true, | ||
"dist/": true, | ||
}, | ||
"files.insertFinalNewline": true, | ||
"python.linting.mypyEnabled": true, | ||
"python.linting.enabled": true, | ||
"python.analysis.diagnosticMode": "workspace", | ||
"python.analysis.indexing": true, | ||
"python.analysis.typeCheckingMode": "strict", | ||
"python.formatting.provider": "black", | ||
"editor.rulers": [ | ||
88, // black's default | ||
], | ||
// https://github.com/microsoft/vscode-isort#import-sorting-on-save | ||
"[python]": { | ||
"editor.codeActionsOnSave": { | ||
"source.organizeImports": true, | ||
} | ||
}, | ||
// for the 'ms-python.isort' extension. | ||
// keep in sync with /run-all-linters script. | ||
"isort.args": [ | ||
"--profile", | ||
"black", | ||
], | ||
// Enable to run black+isort on every (manual) save, perhaps in user-level settings. | ||
// "editor.formatOnSave": true, | ||
"python.testing.pytestEnabled": true, | ||
// For Pytest IntelliSense | ||
// https://marketplace.visualstudio.com/items?itemName=Cameron.vscode-pytest | ||
"pytest.command": "\"${command:python.interpreterPath}\" -m pytest", | ||
"coverage-gutters.coverageFileNames": [ | ||
"coverage.xml", | ||
], | ||
"coverage-gutters.coverageBaseDir": ".pytest-cov", | ||
"coverage-gutters.coverageReportFileName": "html/index.html", | ||
"shellcheck.executablePath": "shellcheck", | ||
"shellcheck.useWorkspaceRootAsCwd": true, | ||
// for the 'timonwong.shellcheck' extension. | ||
// keep in sync with /run-all-linters script. | ||
"shellcheck.customArgs": [ | ||
"--norc", | ||
], | ||
} |
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,3 @@ | ||
SPDX-FileCopyrightText: 2023 Gert van Dijk <[email protected]> | ||
|
||
SPDX-License-Identifier: CC0-1.0 |
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,123 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "run-all-linters-whole-project", | ||
"type": "shell", | ||
"command": "PYTHON_INTERPRETER=\"${command:python.interpreterPath}\" ./run-all-linters", | ||
"icon": { | ||
"id": "checklist", | ||
"color": "terminal.ansiGreen" | ||
}, | ||
"presentation": { | ||
"echo": true, | ||
"reveal": "silent", | ||
"focus": false, | ||
"panel": "shared", | ||
"showReuseMessage": false, | ||
"clear": true, | ||
"revealProblems": "onProblem", | ||
}, | ||
"problemMatcher": [ | ||
{ | ||
"owner": "run-all-linters-whole-project", | ||
"source": "mypy (via run-all-linters)", | ||
"fileLocation": [ | ||
"relative", | ||
"${workspaceFolder}", | ||
], | ||
"pattern": { | ||
// src/purepythonmilter/myfile.py:32:37: error: Name "__qualname__" is not defined [name-defined] | ||
// includes match for ''.py' in filename to avoid matching on shellcheck's | ||
// output in gcc-format. | ||
"regexp": "^(.+\\.py.?):(\\d+):(\\d+): (\\w*): (.+)( \\[(.*)\\])?$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"code": 7, | ||
"severity": 4, | ||
"message": 5, | ||
}, | ||
}, | ||
{ | ||
"owner": "run-all-linters-whole-project", | ||
"source": "flake8 (via run-all-linters)", | ||
"fileLocation": [ | ||
"relative", | ||
"${workspaceFolder}", | ||
], | ||
"pattern": { | ||
// ./src/purepythonmilter/myfile.py:5:1: F401 'typing.AsyncContextManager' imported but unused | ||
"regexp": "^(.+):(\\d+):(\\d+): ((\\w)\\d+) (.+)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"code": 4, | ||
"severity": 5, | ||
"message": 6, | ||
}, | ||
}, | ||
{ | ||
"owner": "run-all-linters-whole-project", | ||
"source": "isort (via run-all-linters)", | ||
"fileLocation": [ | ||
"absolute", | ||
], | ||
"pattern": { | ||
// ERROR: /abs/path/to/purepythonmilter/src/myfile.py Imports are incorrectly sorted and/or formatted. | ||
"regexp": "^([A-Z]+): (.+\\.py) (.+)$", | ||
"severity": 1, | ||
"file": 2, | ||
"message": 3, | ||
}, | ||
}, | ||
// The REUSE tool does not provide a machine-parsable output, because both the | ||
// summary and the listing of files with issues are presented in the same way. | ||
{ | ||
"owner": "run-all-linters-whole-project", | ||
"source": "reuse-lint (via run-all-linters)", | ||
"pattern": { | ||
// Unfortunately, your project is not compliant with version 3.0 of the REUSE Specification :-( | ||
"regexp": "^(Unfortunately, your project is not compliant .*)", | ||
"message": 1, | ||
}, | ||
}, | ||
{ | ||
"owner": "run-all-linters-whole-project", | ||
"source": "hadolint (via run-all-linters)", | ||
"fileLocation": [ | ||
"relative", | ||
"${workspaceFolder}", | ||
], | ||
"pattern": { | ||
// Dockerfile:11 DL3006 warning: Always tag the version of an image explicitly | ||
"regexp": "^(.+):(\\d+) ([A-Z0-9]+) ([a-z]+): (.+)$", | ||
"file": 1, | ||
"line": 2, | ||
"code": 3, | ||
"severity": 4, | ||
"message": 5, | ||
}, | ||
}, | ||
{ | ||
"owner": "run-all-linters-whole-project", | ||
"source": "shellcheck (via run-all-linters)", | ||
"fileLocation": [ | ||
"relative", | ||
"${workspaceFolder}", | ||
], | ||
"pattern": { | ||
// filename:25:26: error: Double quote array expansions to avoid re-splitting elements. [SC2068] | ||
"regexp": "^(.+):(\\d+):(\\d+): ([a-z]+): (.+) \\[(.*)\\]$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"code": 6, | ||
"severity": 4, | ||
"message": 5, | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
} |
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,3 @@ | ||
SPDX-FileCopyrightText: 2023 Gert van Dijk <[email protected]> | ||
|
||
SPDX-License-Identifier: Apache-2.0 |
Oops, something went wrong.