-
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 51dc8ea
Showing
31 changed files
with
4,957 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,7 @@ | ||
# SPDX-FileCopyrightText: 2023 Gert van Dijk <github@gertvandijk.nl> | ||
# | ||
# SPDX-License-Identifier: CC0-1.0 | ||
|
||
set -e | ||
|
||
layout python python3.11 |
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 <github@gertvandijk.nl> | ||
# | ||
# 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 <github@gertvandijk.nl> | ||
# | ||
# 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,10 @@ | ||
{ | ||
"recommendations": [ | ||
"charliermarsh.ruff", | ||
"ms-python.black-formatter", | ||
"ms-python.mypy-type-checker", | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"ryanluker.vscode-coverage-gutters", | ||
] | ||
} |
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 <github@gertvandijk.nl> | ||
|
||
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 <github@gertvandijk.nl> | ||
|
||
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,59 @@ | ||
{ | ||
// Please set 'black-formatter.importStrategy' to 'fromEnvironment' in your | ||
// workspace (or user) settings to use the same Black version as in the | ||
// virtual environment. The Black plugin uses the bundled version by | ||
// default. | ||
// Not a valid folder-level setting. | ||
"black-formatter.importStrategy": "fromEnvironment", | ||
// Similar for Ruff, please set 'ruff.importStrategy' to 'fromEnvironment' | ||
// in your workspace (or user) settings to use the same Ruff version as in | ||
// the virtual environment. The Black plugin uses the bundled version by | ||
// default. | ||
// Not a valid folder-level setting as well. | ||
"ruff.importStrategy": "fromEnvironment", | ||
|
||
// Enable 'editor.formatOnSave' to run black and other formatters on every (manual) | ||
// save. Suggested as user-level or workspace-level setting. | ||
// "editor.formatOnSave": true, | ||
|
||
// Please set 'pytest.command' in your workspace (or user) settings to load | ||
// Pytest from the environment. | ||
// Not a valid folder-level setting. | ||
"pytest.command": "python -m pytest", | ||
|
||
"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.analysis.diagnosticMode": "workspace", | ||
"python.analysis.indexing": true, | ||
"python.analysis.typeCheckingMode": "strict", | ||
"[python]": { | ||
"editor.defaultFormatter": "ms-python.black-formatter", | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": true, | ||
"source.organizeImports": true, | ||
}, | ||
"editor.rulers": [ | ||
88, // black's default | ||
], | ||
}, | ||
"python.testing.pytestEnabled": true, | ||
"coverage-gutters.coverageFileNames": [ | ||
"coverage.xml", | ||
], | ||
"coverage-gutters.coverageBaseDir": ".pytest-cov", | ||
"coverage-gutters.coverageReportFileName": "html/index.html", | ||
|
||
// Mypy extension with dmypy enabled does not always show the same mypy errors as | ||
// linter check script. | ||
"mypy-type-checker.preferDaemon": 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 <github@gertvandijk.nl> | ||
|
||
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,74 @@ | ||
{ | ||
"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/pykmp/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": "Ruff (via run-all-linters)", | ||
"fileLocation": [ | ||
"relative", | ||
"${workspaceFolder}", | ||
], | ||
"pattern": { | ||
// ./src/pykmp/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, | ||
}, | ||
}, | ||
// 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, | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
} |
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 <github@gertvandijk.nl> | ||
|
||
SPDX-License-Identifier: Apache-2.0 |
Oops, something went wrong.