-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from anevis/chore/format-and-dep-update
Format and dependency update
- Loading branch information
Showing
12 changed files
with
242 additions
and
151 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
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,6 +1,6 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/jetpack-io/devbox/0.10.3/.schema/devbox.schema.json", | ||
"packages": ["[email protected].2"], | ||
"packages": ["[email protected]"], | ||
"env": { | ||
"VENV_DIR": "$HOME/MyFiles/programming/OpenSource/yaml-to-markdown/.devbox/virtenv/python/.venv", | ||
"TWINE_USERNAME": "__token__" | ||
|
@@ -10,30 +10,15 @@ | |
". $VENV_DIR/bin/activate" | ||
], | ||
"scripts": { | ||
"install": [ | ||
"pip install -r requirements.txt" | ||
], | ||
"test": [ | ||
"pytest src/" | ||
], | ||
"test-cov": [ | ||
"pytest --cov=src/ --cov-report=xml" | ||
], | ||
"lint": [ | ||
"flake8 src/" | ||
], | ||
"format-check": [ | ||
"black --check src/" | ||
], | ||
"format": [ | ||
"black src/" | ||
], | ||
"build": [ | ||
"rm -rf dist/* && python setup.py sdist bdist_wheel" | ||
], | ||
"publish": [ | ||
"twine upload dist/*" | ||
] | ||
"audit": "safety check --short-report -r requirements.txt", | ||
"build": "rm -rf dist/* && python setup.py sdist bdist_wheel", | ||
"format": "ruff check --fix src/ && ruff format src/", | ||
"install": "pip install -r requirements.txt", | ||
"lint": "ruff check src/", | ||
"publish": "twine upload dist/*", | ||
"test": "pytest src/", | ||
"test-cov": "pytest --cov=src/ --cov-report=xml", | ||
"type-check": "mypy --config-file=src/pyproject.toml src/" | ||
} | ||
} | ||
} |
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,60 +1,60 @@ | ||
{ | ||
"lockfile_version": "1", | ||
"packages": { | ||
"[email protected].2": { | ||
"last_modified": "2024-03-22T11:26:23Z", | ||
"[email protected]": { | ||
"last_modified": "2024-07-07T07:43:47Z", | ||
"plugin_version": "0.0.3", | ||
"resolved": "github:NixOS/nixpkgs/a3ed7406349a9335cb4c2a71369b697cecd9d351#python312", | ||
"resolved": "github:NixOS/nixpkgs/b60793b86201040d9dee019a05089a9150d08b5b#python3", | ||
"source": "devbox-search", | ||
"version": "3.12.2", | ||
"version": "3.12.4", | ||
"systems": { | ||
"aarch64-darwin": { | ||
"outputs": [ | ||
{ | ||
"name": "out", | ||
"path": "/nix/store/jc5jlynlx561ibqxd6sy12hcqc8p39c9-python3-3.12.2", | ||
"path": "/nix/store/3swy1vadi125g0c1vxqp8ykdr749803j-python3-3.12.4", | ||
"default": true | ||
} | ||
], | ||
"store_path": "/nix/store/jc5jlynlx561ibqxd6sy12hcqc8p39c9-python3-3.12.2" | ||
"store_path": "/nix/store/3swy1vadi125g0c1vxqp8ykdr749803j-python3-3.12.4" | ||
}, | ||
"aarch64-linux": { | ||
"outputs": [ | ||
{ | ||
"name": "out", | ||
"path": "/nix/store/n5yvl08kxz5llrdiwwxfxyy6wiq2g6lc-python3-3.12.2", | ||
"path": "/nix/store/sz2facg15yq3ziqkidb1dkkglwzkkg8a-python3-3.12.4", | ||
"default": true | ||
}, | ||
{ | ||
"name": "debug", | ||
"path": "/nix/store/bihg62nz0vqqski18cpyppwgqz62blrq-python3-3.12.2-debug" | ||
"path": "/nix/store/19vjjqg7jbfblqapf63nm9ich1xdq9dx-python3-3.12.4-debug" | ||
} | ||
], | ||
"store_path": "/nix/store/n5yvl08kxz5llrdiwwxfxyy6wiq2g6lc-python3-3.12.2" | ||
"store_path": "/nix/store/sz2facg15yq3ziqkidb1dkkglwzkkg8a-python3-3.12.4" | ||
}, | ||
"x86_64-darwin": { | ||
"outputs": [ | ||
{ | ||
"name": "out", | ||
"path": "/nix/store/41yqb3sxsx22drhza74icn4x1gfh3h8m-python3-3.12.2", | ||
"path": "/nix/store/3y5wy1i9nq5293knm23mxsj5l6w41h2l-python3-3.12.4", | ||
"default": true | ||
} | ||
], | ||
"store_path": "/nix/store/41yqb3sxsx22drhza74icn4x1gfh3h8m-python3-3.12.2" | ||
"store_path": "/nix/store/3y5wy1i9nq5293knm23mxsj5l6w41h2l-python3-3.12.4" | ||
}, | ||
"x86_64-linux": { | ||
"outputs": [ | ||
{ | ||
"name": "out", | ||
"path": "/nix/store/7yh2ax34jd7fgf17mjfd3c6niw1h2hsj-python3-3.12.2", | ||
"path": "/nix/store/z7xxy35k7620hs6fn6la5fg2lgklv72l-python3-3.12.4", | ||
"default": true | ||
}, | ||
{ | ||
"name": "debug", | ||
"path": "/nix/store/mq8jh0sl1lcpk592whzw96n52grhq8wl-python3-3.12.2-debug" | ||
"path": "/nix/store/3x6jqv5yw212v8rlwql88cn94dginq32-python3-3.12.4-debug" | ||
} | ||
], | ||
"store_path": "/nix/store/7yh2ax34jd7fgf17mjfd3c6niw1h2hsj-python3-3.12.2" | ||
"store_path": "/nix/store/z7xxy35k7620hs6fn6la5fg2lgklv72l-python3-3.12.4" | ||
} | ||
} | ||
} | ||
|
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,32 +1,24 @@ | ||
click==8.1.7 | ||
jsonschema[format]==4.21.1 | ||
jsonschema[format]==4.23.0 | ||
pyyaml==6.0.1 | ||
|
||
# Dev dependencies | ||
coverage==7.4.4 | ||
coverage==7.6.0 | ||
mock==5.1.0 | ||
pytest==8.1.1 | ||
pytest==8.3.2 | ||
pytest-cov==5.0.0 | ||
|
||
bandit==1.7.8 | ||
black==24.4.0 | ||
flake8==7.0.0 | ||
flake8-bandit==4.1.1 | ||
flake8-black==0.3.6 | ||
flake8-bugbear==24.4.21 | ||
flake8-functions==0.0.8 | ||
isort==5.13.2 | ||
mypy==1.9.0 | ||
pep8-naming==0.13.3 | ||
safety | ||
mypy==1.11.1 | ||
ruff==0.5.5 | ||
safety==3.2.4 | ||
|
||
# Packaging | ||
setuptools==69.5.1 | ||
twine==5.0.0 | ||
setuptools==72.1.0 | ||
twine==5.1.1 | ||
wheel==0.43.0 | ||
|
||
# Typing | ||
types-mock==5.1.0.20240311 | ||
types-mock==5.1.0.20240425 | ||
types-orjson==3.6.2 | ||
types-PyYAML==6.0.12.20240311 | ||
types-jsonschema==4.21.0.20240331 | ||
types-PyYAML==6.0.12.20240724 | ||
types-jsonschema==4.23.0.20240712 |
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,13 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# This script is used to verify python code by linting, type checking and checking dependencies. | ||
set -euo pipefail | ||
|
||
echo "Linting python code ..." | ||
devbox run lint | ||
|
||
echo "Type checking python code ..." | ||
devbox run type-check | ||
|
||
echo "Checking dependencies of python code ..." | ||
devbox run audit |
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,76 @@ | ||
[project] | ||
name = "yaml-to-markdown" | ||
requires-python = ">=3.12" | ||
|
||
[tool.coverage.run] | ||
branch = true | ||
source = ["."] | ||
omit = [ | ||
# omit anything in a .local directory anywhere | ||
"*/.local/*", | ||
# Omit any test files | ||
"*/*_test.py", | ||
"setup.py", | ||
] | ||
|
||
# [tool.coverage.xml] | ||
# output = "./coverage.xml" | ||
|
||
[tool.mypy] | ||
python_version="3.12" | ||
platform="linux" | ||
|
||
show_column_numbers=true | ||
show_error_context=false | ||
error_summary=true | ||
|
||
# treat Optional per PEP 484 | ||
strict_optional=true | ||
strict_equality=true | ||
|
||
# https://mypy.readthedocs.io/en/stable/config_file.html#configuring-warnings | ||
warn_redundant_casts=true | ||
warn_unused_ignores=true | ||
warn_unreachable=true | ||
warn_no_return=true | ||
warn_return_any=true | ||
|
||
# Be real strict on using types | ||
check_untyped_defs=true | ||
disallow_incomplete_defs=true | ||
disallow_untyped_calls=true | ||
disallow_untyped_decorators=false | ||
disallow_untyped_defs=true | ||
|
||
[[tool.mypy.overrides]] | ||
# Support for types is not yet available | ||
ignore_missing_imports = true | ||
|
||
[tool.pytest.ini_options] | ||
markers = [ | ||
"integration: marks tests as integration (these are not run by default)." | ||
] | ||
|
||
[tool.ruff] | ||
line-length = 90 | ||
preview = true | ||
|
||
[tool.ruff.lint] | ||
select = [ | ||
"F", "E", "W", "C90", "I", "N", "D2", "UP", "YTT", "ANN", "ASYNC", "S", | ||
"B", "A", "C4", "DTZ", "T10", "FA", "ISC", "ICN", | ||
"LOG", "G", "INP", "PIE", "PT", "Q", "RSE", "RET", "SLF", "SLOT", "SIM", | ||
"TID", "TCH", "ARG", "PTH", "TD", "FIX", "ERA", "PL", "TRY", "FLY", | ||
"PERF", "FURB", "RUF" | ||
] | ||
|
||
ignore = ["E203", "E501", "S101", "S311", "D203", "D211", "D213", "ISC001", "ANN401", "TRY003", "TCH003"] | ||
|
||
[tool.ruff.lint.mccabe] | ||
max-complexity = 10 | ||
|
||
[tool.ruff.lint.pylint] | ||
max-args = 6 | ||
|
||
[tool.ruff.lint.per-file-ignores] | ||
"*_test.py" = ["S105", "FBT", "PLR2004", "PLR6301", "PLC2801"] |
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.