1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pyinventory_ynh.git synced 2024-09-03 20:16:09 +02:00

Update via manageprojects

https://github.com/jedie/manageprojects and https://github.com/jedie/cookiecutter_templates/

Also:

* update requirements
* Remove Python 3.7 and 3.8 support
* Add Python 3.11 to test matrix
This commit is contained in:
Jens Diemer 2022-12-21 22:21:42 +01:00
parent 14ecf400ce
commit f5c847b9ad
16 changed files with 2123 additions and 1792 deletions

View file

@ -10,7 +10,7 @@ trim_trailing_whitespace = true
insert_final_newline = true
[*.py]
max_line_length = 120
max_line_length = 100
[{Makefile,**.mk}]
indent_style = tab

View file

@ -1,7 +1,7 @@
#
# Move to pyproject.toml after: https://gitlab.com/pycqa/flake8/-/issues/428
# Move to pyproject.toml after: https://github.com/PyCQA/flake8/issues/234
#
[flake8]
exclude = .pytest_cache, .tox, dist, htmlcov, local_test
exclude = .*, dist, htmlcov, local_test
ignore = F405
max-line-length = 119

View file

@ -1,6 +1,8 @@
name: YunoHost apps package linter
on:
# Allow to manually trigger the workflow
workflow_dispatch:
push:
branches:
- main
@ -12,7 +14,17 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install toml
- name: 'Clone YunoHost apps package linter'
run: |

View file

@ -1,3 +1,4 @@
{# https://jinja.palletsprojects.com/en/latest/templates/#escaping #}
name: pytest
on:
@ -14,7 +15,7 @@ jobs:
strategy:
max-parallel: 2
matrix:
python-version: ["3.10", "3.9", "3.8", "3.7"]
python-version: ["3.11", "3.10", "3.9"]
steps:
- uses: actions/checkout@v2
with:
@ -34,7 +35,7 @@ jobs:
- name: 'Install package'
run: |
make install-poetry
pip3 install poetry
make install
- name: 'List installed packages'
@ -54,3 +55,4 @@ jobs:
with:
fail_ci_if_error: false
verbose: true

1
.gitignore vendored
View file

@ -3,6 +3,7 @@
!.editorconfig
!.flake8
!.gitignore
!/doc/screenshots/.gitkeep
__pycache__
secret.txt
/local_test/

View file

@ -1,5 +1,5 @@
SHELL := /bin/bash
MAX_LINE_LENGTH := 119
MAX_LINE_LENGTH := 100
all: help
@ -20,21 +20,23 @@ install-poetry: ## install or update poetry
curl -sSL https://install.python-poetry.org | python3 -
install: check-poetry ## install project via poetry
python3 -m venv .venv
poetry install
update: check-poetry ## update the sources and installation and generate "conf/requirements.txt"
python3 -m venv .venv
poetry self update
poetry update -v
poetry install
poetry export -f requirements.txt --output conf/requirements.txt
lint: ## Run code formatters and linter
poetry run flynt --fail-on-change --line-length=${MAX_LINE_LENGTH} .
poetry run darker --check
poetry run isort --check-only .
poetry run flake8 .
fix-code-style: ## Fix code formatting
poetry run flynt --line-length=${MAX_LINE_LENGTH} .
poetry run black --verbose --safe --line-length=${MAX_LINE_LENGTH} --skip-string-normalization .
poetry run darker
poetry run isort .
tox-listenvs: check-poetry ## List all tox test environments

View file

@ -1,198 +1,194 @@
asgiref==3.5.2 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:1d2880b792ae8757289136f1db2b7b99100ce959b2aa57fd69dab783d05afac4 \
--hash=sha256:4a29362a6acebe09bf1d6640db38c1dc3d9217c68e6f9f6204d72667fc19a424
async-timeout==4.0.2 ; python_version >= "3.7" and python_full_version < "4.0.0" \
asgiref==3.6.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:71e68008da809b957b7ee4b43dbccff33d1b23519fb8344e33f049897077afac \
--hash=sha256:9567dfe7bd8d3c8c892227827c41cce860b368104c3431da67a0c5a65a949506
async-timeout==4.0.2 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15 \
--hash=sha256:8ca1e4fcf50d07413d66d1a5e416e42cfdf5851c981d679a09851a6853383b3c
bleach==5.0.1 ; python_version >= "3.7" and python_full_version < "4.0.0" \
bleach==5.0.1 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:085f7f33c15bd408dd9b17a4ad77c577db66d76203e5984b1bd59baeee948b2a \
--hash=sha256:0d03255c47eb9bd2f26aa9bb7f2107732e7e8fe195ca2f64709fcf3b0a4a085c
bx-django-utils==35 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:341b27ad0b72a903acf2f28def0fe371def811c1b2305da9806124869a698fc8 \
--hash=sha256:5151806d349a9dafc8dba9636239422022bab211b5b02afa52fce1f58ec2e6ab
bx-py-utils==69 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:728fd575c4d5048e114b502a97d19679f9abcda90889a6896534c48348320460 \
--hash=sha256:b25419e020c9c5ea16938a45cf5120086a5ac29648be78a8eb98ae202515fee1
certifi==2022.9.24 ; python_version >= "3.7" and python_version < "4" \
--hash=sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14 \
--hash=sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382
charset-normalizer==2.1.1 ; python_version >= "3.7" and python_version < "4" \
bx-django-utils==37 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:2d94b168bf70ac011fb5cb37b2c6645b9845dd7ee91d2ef4a0653b2d9cabce6d \
--hash=sha256:ce3f954c5684194a1725d1678790a4ca1e6b34f0ac6cec2e191ffba6350526fe
bx-py-utils==71 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:02150263d58fa280caf5e0afbe99c10470f9b25f0cd69e4a2cc525c875e5ad70 \
--hash=sha256:ceff6b29b41b6a797b87b3006f94d5394b067a551b004567d4ada7e1a6544806
certifi==2022.12.7 ; python_version >= "3.9" and python_version < "4" \
--hash=sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3 \
--hash=sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18
charset-normalizer==2.1.1 ; python_version >= "3.9" and python_version < "4" \
--hash=sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845 \
--hash=sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f
colorama==0.4.5 ; python_version >= "3.7" and python_full_version < "4.0.0" and sys_platform == "win32" \
--hash=sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da \
--hash=sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4
colorlog==6.7.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
colorama==0.4.6 ; python_version >= "3.9" and python_full_version < "4.0.0" and sys_platform == "win32" \
--hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \
--hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6
colorlog==6.7.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:0d33ca236784a1ba3ff9c532d4964126d8a2c44f1f0cb1d2b0728196f512f662 \
--hash=sha256:bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5
defusedxml==0.7.1 ; python_version >= "3.7" and python_full_version < "4.0.0" \
defusedxml==0.7.1 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:1bb3032db185915b62d7c6209c5a8792be6a32ab2fedacc84e01b52c51aa3e69 \
--hash=sha256:a352e7e428770286cc899e2542b6cdaedb2b4953ff269a210103ec58f6198a61
deprecated==1.2.13 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:43ac5335da90c31c24ba028af536a91d41d53f9e6901ddb021bcc572ce44e38d \
--hash=sha256:64756e3e14c8c5eea9795d93c524551432a0be75629f8f29e67ab8caf076c76d
diff-match-patch==20200713 ; python_version >= "3.7" and python_full_version < "4.0.0" \
diff-match-patch==20200713 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:8bf9d9c4e059d917b5c6312bac0c137971a32815ddbda9c682b949f2986b4d34 \
--hash=sha256:da6f5a01aa586df23dfc89f3827e1cafbb5420be9d87769eeb079ddfd9477a18
django-admin-sortable2==1.0.4 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:e22956889533b48a35a7f02859ae3a939753fa9a7d7d532cefc2835b41bdcebb \
--hash=sha256:f96044003176c6684c5f969792ca833a505d654fa0f7b24232a0a610e4332a53
django-axes==5.39.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:8f039f8e98f050f13f654efca599d8a04d0b57d330c590cf89ec2bf731c9a7fb \
--hash=sha256:97702552f7939c81db5bba2ef855ae43f20df92fa261cb79fd4c8633ba3b3955
django-ckeditor==6.3.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
django-admin-sortable2==2.1.4 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:7dc08ff0fbce5859502f809d108c0495f3b0d94609269eaedbb1237e03084acb \
--hash=sha256:93d7951fadfeb1a31bed382e78adbf015f30018429a3287bd4343e343fa10aa8
django-axes==5.40.1 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:347e3dbce46051e63cacc7c9ad43cb4382e910f243b6086cf181639d082fa6d0 \
--hash=sha256:b5bc4a6f528ca10fc8b94d02ac3c3726ef879ec0868600f2cb3c32b6dea28717
django-ckeditor==6.3.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:b5c03d77b9fe848bf12520512a82d07533afa8678040731b1d4d86c1dcea8344 \
--hash=sha256:d04f350f4a200c2a0f96307fc8827bd4e87af5694fb12d53189ba92025b2da37
django-dbbackup==4.0.2 ; python_version >= "3.7" and python_full_version < "4.0.0" \
django-dbbackup==4.0.2 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:1874d684abc22260972a67668a6db3331b24d7e1e8af89eaffdcd61eb27dbc2a \
--hash=sha256:3ccde831f1a8268fb031b37a8e7e2de3abb556623023af1e859cd7104c09ea2a
django-debug-toolbar==3.7.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:1e3acad24e3d351ba45c6fa2072e4164820307332a776b16c9f06d1f89503465 \
--hash=sha256:80de23066b624d3970fd296cf02d61988e5d56c31aa0dc4a428970b46e2883a8
django-import-export==2.9.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:02ce3a8e191992fa7aa1d660877ac6764fa9e32a5ba6394293f2fc761a5bdd19 \
--hash=sha256:126d32a4410c42b6e1bf060355bf45968f6fe427c3b7ed04c96873bd45d7549a
django-ipware==4.0.2 ; python_version >= "3.7" and python_full_version < "4.0.0" \
django-debug-toolbar==3.8.1 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:24ef1a7d44d25e60d7951e378454c6509bf536dce7e7d9d36e7c387db499bc27 \
--hash=sha256:879f8a4672d41621c06a4d322dcffa630fc4df056cada6e417ed01db0e5e0478
django-import-export==3.0.2 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:ae77a44c08d94b98e50dec11ea53fd5f65702b7d8c3c929c88c310a4e4444507 \
--hash=sha256:f0f08f119b1f3a39e67dab8f945609ee13e264a798be532bdd7210e1c851efe2
django-ipware==4.0.2 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:602a58325a4808bd19197fef2676a0b2da2df40d0ecf21be414b2ff48c72ad05 \
--hash=sha256:878dbb06a87e25550798e9ef3204ed70a200dd8b15e47dcef848cf08244f04c9
django-js-asset==2.0.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
django-js-asset==2.0.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:86f9f300d682537ddaf0487dc2ab356581b8f50c069bdba91d334a46e449f923 \
--hash=sha256:adc1ee1efa853fad42054b540c02205344bb406c9bddf87c9e5377a41b7db90f
django-processinfo==1.1.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
django-processinfo==1.1.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:c7d1fe2203655925294c860878509fe2a6eb1a5390a170c848023e4619b903da \
--hash=sha256:e5d883c2bd4d3a197357bb381a4c19165b5c9ff9a852f96b0dd1ccfd98e2e4a2
django-redis==5.2.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
django-redis==5.2.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:1d037dc02b11ad7aa11f655d26dac3fb1af32630f61ef4428860a2e29ff92026 \
--hash=sha256:8a99e5582c79f894168f5865c52bd921213253b7fd64d16733ae4591564465de
django-reversion-compare==0.15.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
django-reversion-compare==0.15.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:d6f37b106aec287ae17a076bb7db1184ab02ab1898f0e8693f2779fbdaf71697 \
--hash=sha256:ed0264a2852d9d867023f1874948b8234dad9c2d2fa22ea18cfd5f28f304d7a0
django-reversion==5.0.3 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:acb600f8482147312a27bd58e63766aa0383310181e485e6eaa2f42d26502c9b \
--hash=sha256:c5955e09c4f290a8a3c5048b3f77d5ba75eae325c0fb1e571b0cd98df6a0017b
django-tagulous==1.3.3 ; python_version >= "3.7" and python_full_version < "4.0.0" \
django-reversion==5.0.4 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:a591cbce8621b5d036a37617554668b5ef2eb9777682e3af20b6401ee87cfbc5 \
--hash=sha256:c12bab452d31dd3c244456cf1df383acf14ba147cf99404c5e44412596de42fc
django-tagulous==1.3.3 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:ad3bb85f4cce83a47e4c0257143229cb92a294defa02fe661823b0442b35d478 \
--hash=sha256:d445590ae1b5cb9b8c5a425f97bf5f01148a33419c19edeb721ebd9fdd6792fe
django-tools==0.54.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
django-tools==0.54.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:5040a91282be9d1c9d379b0c65da50bcb3691bff03cee54fd4123ace238c3a43 \
--hash=sha256:a7b7bfa5b9c5a81966454d17dffb2403cee25a806c858ee0486a08798227598f
django-yunohost-integration[ynh]==0.4.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:11a4add7cac2331e06348ef0c3eae597fe01f37867cde1f315ca707625527cdb \
--hash=sha256:560a280d509f8e28ea4b932d6682c91fab5d50f62b907981b9e0376556c8df7b
django==3.2.15 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:115baf5049d5cf4163e43492cdc7139c306ed6d451e7d3571fe9612903903713 \
--hash=sha256:f71934b1a822f14a86c9ac9634053689279cd04ae69cb6ade4a59471b886582b
et-xmlfile==1.1.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
django-yunohost-integration[ynh]==0.5.1 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:22a00dd9670ed8fbc6edb34939aa01f5e278334a445982216ebbabf93fe63c1e \
--hash=sha256:a0f64b9f3de11b74eeb00476a7ece82be4e748d1c581e85833a7c852ffd57117
django==4.1.4 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:0b223bfa55511f950ff741983d408d78d772351284c75e9f77d2b830b6b4d148 \
--hash=sha256:d38a4e108d2386cb9637da66a82dc8d0733caede4c83c4afdbda78af4214211b
et-xmlfile==1.1.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:8eb9e2bc2f8c97e37a2dc85a09ecdcdec9d8a396530a6d5a33b30b9a92da0c5c \
--hash=sha256:a2ba85d1d6a74ef63837eed693bcb89c3f752169b0e3e7ae5b16ca5e1b3deada
gunicorn==20.1.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
gunicorn==20.1.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:9dcc4547dbb1cb284accfb15ab5667a0e5d1881cc443e0677b4882a4067a807e \
--hash=sha256:e0a968b5ba15f8a328fdfd7ab1fcb5af4470c28aaf7e55df02a99bc13138e6e8
icdiff==2.0.5 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:35d24b728e48b7e0a12bdb69386d3bfc7eef4fe922d0ac1cd70d6e5c11630bae
idna==3.4 ; python_version >= "3.7" and python_version < "4" \
icdiff==2.0.6 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:a2673b335d671e64fc73c44e1eaa0aa01fd0e68354e58ee17e863ab29912a79a
idna==3.4 ; python_version >= "3.9" and python_version < "4" \
--hash=sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4 \
--hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2
importlib-metadata==4.2.0 ; python_version >= "3.7" and python_version < "3.8" \
--hash=sha256:057e92c15bc8d9e8109738a48db0ccb31b4d9d5cfbee5a8670879a30be66304b \
--hash=sha256:b7e52a1f8dec14a75ea73e0891f3060099ca1d8e6a462a4dff11c3e119ea1b31
markuppy==1.14 ; python_version >= "3.7" and python_full_version < "4.0.0" \
markuppy==1.14 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:1adee2c0a542af378fe84548ff6f6b0168f3cb7f426b46961038a2bcfaad0d5f
odfpy==1.4.1 ; python_version >= "3.7" and python_full_version < "4.0.0" \
odfpy==1.4.1 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:db766a6e59c5103212f3cc92ec8dd50a0f3a02790233ed0b52148b70d3c438ec
openpyxl==3.0.10 ; python_version >= "3.7" and python_full_version < "4.0.0" \
openpyxl==3.0.10 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:0ab6d25d01799f97a9464630abacbb34aafecdcaa0ef3cba6d6b3499867d0355 \
--hash=sha256:e47805627aebcf860edb4edf7987b1309c1b3632f3750538ed962bbcc3bd7449
packaging==21.3 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb \
--hash=sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522
pillow==9.2.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:0030fdbd926fb85844b8b92e2f9449ba89607231d3dd597a21ae72dc7fe26927 \
--hash=sha256:030e3460861488e249731c3e7ab59b07c7853838ff3b8e16aac9561bb345da14 \
--hash=sha256:0ed2c4ef2451de908c90436d6e8092e13a43992f1860275b4d8082667fbb2ffc \
--hash=sha256:136659638f61a251e8ed3b331fc6ccd124590eeff539de57c5f80ef3a9594e58 \
--hash=sha256:13b725463f32df1bfeacbf3dd197fb358ae8ebcd8c5548faa75126ea425ccb60 \
--hash=sha256:1536ad017a9f789430fb6b8be8bf99d2f214c76502becc196c6f2d9a75b01b76 \
--hash=sha256:15928f824870535c85dbf949c09d6ae7d3d6ac2d6efec80f3227f73eefba741c \
--hash=sha256:17d4cafe22f050b46d983b71c707162d63d796a1235cdf8b9d7a112e97b15bac \
--hash=sha256:1802f34298f5ba11d55e5bb09c31997dc0c6aed919658dfdf0198a2fe75d5490 \
--hash=sha256:1cc1d2451e8a3b4bfdb9caf745b58e6c7a77d2e469159b0d527a4554d73694d1 \
--hash=sha256:1fd6f5e3c0e4697fa7eb45b6e93996299f3feee73a3175fa451f49a74d092b9f \
--hash=sha256:254164c57bab4b459f14c64e93df11eff5ded575192c294a0c49270f22c5d93d \
--hash=sha256:2ad0d4df0f5ef2247e27fc790d5c9b5a0af8ade9ba340db4a73bb1a4a3e5fb4f \
--hash=sha256:2c58b24e3a63efd22554c676d81b0e57f80e0a7d3a5874a7e14ce90ec40d3069 \
--hash=sha256:2d33a11f601213dcd5718109c09a52c2a1c893e7461f0be2d6febc2879ec2402 \
--hash=sha256:336b9036127eab855beec9662ac3ea13a4544a523ae273cbf108b228ecac8437 \
--hash=sha256:337a74fd2f291c607d220c793a8135273c4c2ab001b03e601c36766005f36885 \
--hash=sha256:37ff6b522a26d0538b753f0b4e8e164fdada12db6c6f00f62145d732d8a3152e \
--hash=sha256:3d1f14f5f691f55e1b47f824ca4fdcb4b19b4323fe43cc7bb105988cad7496be \
--hash=sha256:4134d3f1ba5f15027ff5c04296f13328fecd46921424084516bdb1b2548e66ff \
--hash=sha256:4ad2f835e0ad81d1689f1b7e3fbac7b01bb8777d5a985c8962bedee0cc6d43da \
--hash=sha256:50dff9cc21826d2977ef2d2a205504034e3a4563ca6f5db739b0d1026658e004 \
--hash=sha256:510cef4a3f401c246cfd8227b300828715dd055463cdca6176c2e4036df8bd4f \
--hash=sha256:5aed7dde98403cd91d86a1115c78d8145c83078e864c1de1064f52e6feb61b20 \
--hash=sha256:69bd1a15d7ba3694631e00df8de65a8cb031911ca11f44929c97fe05eb9b6c1d \
--hash=sha256:6bf088c1ce160f50ea40764f825ec9b72ed9da25346216b91361eef8ad1b8f8c \
--hash=sha256:6e8c66f70fb539301e064f6478d7453e820d8a2c631da948a23384865cd95544 \
--hash=sha256:74a04183e6e64930b667d321524e3c5361094bb4af9083db5c301db64cd341f3 \
--hash=sha256:75e636fd3e0fb872693f23ccb8a5ff2cd578801251f3a4f6854c6a5d437d3c04 \
--hash=sha256:7761afe0126d046974a01e030ae7529ed0ca6a196de3ec6937c11df0df1bc91c \
--hash=sha256:7888310f6214f19ab2b6df90f3f06afa3df7ef7355fc025e78a3044737fab1f5 \
--hash=sha256:7b0554af24df2bf96618dac71ddada02420f946be943b181108cac55a7a2dcd4 \
--hash=sha256:7c7b502bc34f6e32ba022b4a209638f9e097d7a9098104ae420eb8186217ebbb \
--hash=sha256:808add66ea764ed97d44dda1ac4f2cfec4c1867d9efb16a33d158be79f32b8a4 \
--hash=sha256:831e648102c82f152e14c1a0938689dbb22480c548c8d4b8b248b3e50967b88c \
--hash=sha256:93689632949aff41199090eff5474f3990b6823404e45d66a5d44304e9cdc467 \
--hash=sha256:96b5e6874431df16aee0c1ba237574cb6dff1dcb173798faa6a9d8b399a05d0e \
--hash=sha256:9a54614049a18a2d6fe156e68e188da02a046a4a93cf24f373bffd977e943421 \
--hash=sha256:a138441e95562b3c078746a22f8fca8ff1c22c014f856278bdbdd89ca36cff1b \
--hash=sha256:a647c0d4478b995c5e54615a2e5360ccedd2f85e70ab57fbe817ca613d5e63b8 \
--hash=sha256:a9c9bc489f8ab30906d7a85afac4b4944a572a7432e00698a7239f44a44e6efb \
--hash=sha256:ad2277b185ebce47a63f4dc6302e30f05762b688f8dc3de55dbae4651872cdf3 \
--hash=sha256:adabc0bce035467fb537ef3e5e74f2847c8af217ee0be0455d4fec8adc0462fc \
--hash=sha256:b6d5e92df2b77665e07ddb2e4dbd6d644b78e4c0d2e9272a852627cdba0d75cf \
--hash=sha256:bc431b065722a5ad1dfb4df354fb9333b7a582a5ee39a90e6ffff688d72f27a1 \
--hash=sha256:bdd0de2d64688ecae88dd8935012c4a72681e5df632af903a1dca8c5e7aa871a \
--hash=sha256:c79698d4cd9318d9481d89a77e2d3fcaeff5486be641e60a4b49f3d2ecca4e28 \
--hash=sha256:cb6259196a589123d755380b65127ddc60f4c64b21fc3bb46ce3a6ea663659b0 \
--hash=sha256:d5b87da55a08acb586bad5c3aa3b86505f559b84f39035b233d5bf844b0834b1 \
--hash=sha256:dcd7b9c7139dc8258d164b55696ecd16c04607f1cc33ba7af86613881ffe4ac8 \
--hash=sha256:dfe4c1fedfde4e2fbc009d5ad420647f7730d719786388b7de0999bf32c0d9fd \
--hash=sha256:ea98f633d45f7e815db648fd7ff0f19e328302ac36427343e4432c84432e7ff4 \
--hash=sha256:ec52c351b35ca269cb1f8069d610fc45c5bd38c3e91f9ab4cbbf0aebc136d9c8 \
--hash=sha256:eef7592281f7c174d3d6cbfbb7ee5984a671fcd77e3fc78e973d492e9bf0eb3f \
--hash=sha256:f07f1f00e22b231dd3d9b9208692042e29792d6bd4f6639415d2f23158a80013 \
--hash=sha256:f3fac744f9b540148fa7715a435d2283b71f68bfb6d4aae24482a890aed18b59 \
--hash=sha256:fa768eff5f9f958270b081bb33581b4b569faabf8774726b283edb06617101dc \
--hash=sha256:fac2d65901fb0fdf20363fbd345c01958a742f2dc62a8dd4495af66e3ff502a4
pprintpp==0.4.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
packaging==22.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3 \
--hash=sha256:957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3
pillow==9.3.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:03150abd92771742d4a8cd6f2fa6246d847dcd2e332a18d0c15cc75bf6703040 \
--hash=sha256:073adb2ae23431d3b9bcbcff3fe698b62ed47211d0716b067385538a1b0f28b8 \
--hash=sha256:0b07fffc13f474264c336298d1b4ce01d9c5a011415b79d4ee5527bb69ae6f65 \
--hash=sha256:0b7257127d646ff8676ec8a15520013a698d1fdc48bc2a79ba4e53df792526f2 \
--hash=sha256:12ce4932caf2ddf3e41d17fc9c02d67126935a44b86df6a206cf0d7161548627 \
--hash=sha256:15c42fb9dea42465dfd902fb0ecf584b8848ceb28b41ee2b58f866411be33f07 \
--hash=sha256:18498994b29e1cf86d505edcb7edbe814d133d2232d256db8c7a8ceb34d18cef \
--hash=sha256:1c7c8ae3864846fc95f4611c78129301e203aaa2af813b703c55d10cc1628535 \
--hash=sha256:22b012ea2d065fd163ca096f4e37e47cd8b59cf4b0fd47bfca6abb93df70b34c \
--hash=sha256:276a5ca930c913f714e372b2591a22c4bd3b81a418c0f6635ba832daec1cbcfc \
--hash=sha256:2e0918e03aa0c72ea56edbb00d4d664294815aa11291a11504a377ea018330d3 \
--hash=sha256:3033fbe1feb1b59394615a1cafaee85e49d01b51d54de0cbf6aa8e64182518a1 \
--hash=sha256:3168434d303babf495d4ba58fc22d6604f6e2afb97adc6a423e917dab828939c \
--hash=sha256:32a44128c4bdca7f31de5be641187367fe2a450ad83b833ef78910397db491aa \
--hash=sha256:3dd6caf940756101205dffc5367babf288a30043d35f80936f9bfb37f8355b32 \
--hash=sha256:40e1ce476a7804b0fb74bcfa80b0a2206ea6a882938eaba917f7a0f004b42502 \
--hash=sha256:41e0051336807468be450d52b8edd12ac60bebaa97fe10c8b660f116e50b30e4 \
--hash=sha256:4390e9ce199fc1951fcfa65795f239a8a4944117b5935a9317fb320e7767b40f \
--hash=sha256:502526a2cbfa431d9fc2a079bdd9061a2397b842bb6bc4239bb176da00993812 \
--hash=sha256:51e0e543a33ed92db9f5ef69a0356e0b1a7a6b6a71b80df99f1d181ae5875636 \
--hash=sha256:57751894f6618fd4308ed8e0c36c333e2f5469744c34729a27532b3db106ee20 \
--hash=sha256:5d77adcd56a42d00cc1be30843d3426aa4e660cab4a61021dc84467123f7a00c \
--hash=sha256:655a83b0058ba47c7c52e4e2df5ecf484c1b0b0349805896dd350cbc416bdd91 \
--hash=sha256:68943d632f1f9e3dce98908e873b3a090f6cba1cbb1b892a9e8d97c938871fbe \
--hash=sha256:6c738585d7a9961d8c2821a1eb3dcb978d14e238be3d70f0a706f7fa9316946b \
--hash=sha256:73bd195e43f3fadecfc50c682f5055ec32ee2c933243cafbfdec69ab1aa87cad \
--hash=sha256:772a91fc0e03eaf922c63badeca75e91baa80fe2f5f87bdaed4280662aad25c9 \
--hash=sha256:77ec3e7be99629898c9a6d24a09de089fa5356ee408cdffffe62d67bb75fdd72 \
--hash=sha256:7db8b751ad307d7cf238f02101e8e36a128a6cb199326e867d1398067381bff4 \
--hash=sha256:801ec82e4188e935c7f5e22e006d01611d6b41661bba9fe45b60e7ac1a8f84de \
--hash=sha256:82409ffe29d70fd733ff3c1025a602abb3e67405d41b9403b00b01debc4c9a29 \
--hash=sha256:828989c45c245518065a110434246c44a56a8b2b2f6347d1409c787e6e4651ee \
--hash=sha256:829f97c8e258593b9daa80638aee3789b7df9da5cf1336035016d76f03b8860c \
--hash=sha256:871b72c3643e516db4ecf20efe735deb27fe30ca17800e661d769faab45a18d7 \
--hash=sha256:89dca0ce00a2b49024df6325925555d406b14aa3efc2f752dbb5940c52c56b11 \
--hash=sha256:90fb88843d3902fe7c9586d439d1e8c05258f41da473952aa8b328d8b907498c \
--hash=sha256:97aabc5c50312afa5e0a2b07c17d4ac5e865b250986f8afe2b02d772567a380c \
--hash=sha256:9aaa107275d8527e9d6e7670b64aabaaa36e5b6bd71a1015ddd21da0d4e06448 \
--hash=sha256:9f47eabcd2ded7698106b05c2c338672d16a6f2a485e74481f524e2a23c2794b \
--hash=sha256:a0a06a052c5f37b4ed81c613a455a81f9a3a69429b4fd7bb913c3fa98abefc20 \
--hash=sha256:ab388aaa3f6ce52ac1cb8e122c4bd46657c15905904b3120a6248b5b8b0bc228 \
--hash=sha256:ad58d27a5b0262c0c19b47d54c5802db9b34d38bbf886665b626aff83c74bacd \
--hash=sha256:ae5331c23ce118c53b172fa64a4c037eb83c9165aba3a7ba9ddd3ec9fa64a699 \
--hash=sha256:af0372acb5d3598f36ec0914deed2a63f6bcdb7b606da04dc19a88d31bf0c05b \
--hash=sha256:afa4107d1b306cdf8953edde0534562607fe8811b6c4d9a486298ad31de733b2 \
--hash=sha256:b03ae6f1a1878233ac620c98f3459f79fd77c7e3c2b20d460284e1fb370557d4 \
--hash=sha256:b0915e734b33a474d76c28e07292f196cdf2a590a0d25bcc06e64e545f2d146c \
--hash=sha256:b4012d06c846dc2b80651b120e2cdd787b013deb39c09f407727ba90015c684f \
--hash=sha256:b472b5ea442148d1c3e2209f20f1e0bb0eb556538690fa70b5e1f79fa0ba8dc2 \
--hash=sha256:b59430236b8e58840a0dfb4099a0e8717ffb779c952426a69ae435ca1f57210c \
--hash=sha256:b90f7616ea170e92820775ed47e136208e04c967271c9ef615b6fbd08d9af0e3 \
--hash=sha256:b9a65733d103311331875c1dca05cb4606997fd33d6acfed695b1232ba1df193 \
--hash=sha256:bac18ab8d2d1e6b4ce25e3424f709aceef668347db8637c2296bcf41acb7cf48 \
--hash=sha256:bca31dd6014cb8b0b2db1e46081b0ca7d936f856da3b39744aef499db5d84d02 \
--hash=sha256:be55f8457cd1eac957af0c3f5ece7bc3f033f89b114ef30f710882717670b2a8 \
--hash=sha256:c7025dce65566eb6e89f56c9509d4f628fddcedb131d9465cacd3d8bac337e7e \
--hash=sha256:c935a22a557a560108d780f9a0fc426dd7459940dc54faa49d83249c8d3e760f \
--hash=sha256:dbb8e7f2abee51cef77673be97760abff1674ed32847ce04b4af90f610144c7b \
--hash=sha256:e6ea6b856a74d560d9326c0f5895ef8050126acfdc7ca08ad703eb0081e82b74 \
--hash=sha256:ebf2029c1f464c59b8bdbe5143c79fa2045a581ac53679733d3a91d400ff9efb \
--hash=sha256:f1ff2ee69f10f13a9596480335f406dd1f70c3650349e2be67ca3139280cade0
pprintpp==0.4.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:b6b4dcdd0c0c0d75e4d7b2f21a9e933e5b2ce62b26e1a54537f9651ae5a5c01d \
--hash=sha256:ea826108e2c7f49dc6d66c752973c3fc9749142a798d6b254e1e301cfdbc6403
psycopg2==2.9.3 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:06f32425949bd5fe8f625c49f17ebb9784e1e4fe928b7cce72edc36fb68e4c0c \
--hash=sha256:0762c27d018edbcb2d34d51596e4346c983bd27c330218c56c4dc25ef7e819bf \
--hash=sha256:083707a696e5e1c330af2508d8fab36f9700b26621ccbcb538abe22e15485362 \
--hash=sha256:34b33e0162cfcaad151f249c2649fd1030010c16f4bbc40a604c1cb77173dcf7 \
--hash=sha256:4295093a6ae3434d33ec6baab4ca5512a5082cc43c0505293087b8a46d108461 \
--hash=sha256:8cf3878353cc04b053822896bc4922b194792df9df2f1ad8da01fb3043602126 \
--hash=sha256:8e841d1bf3434da985cc5ef13e6f75c8981ced601fd70cc6bf33351b91562981 \
--hash=sha256:9572e08b50aed176ef6d66f15a21d823bb6f6d23152d35e8451d7d2d18fdac56 \
--hash=sha256:a81e3866f99382dfe8c15a151f1ca5fde5815fde879348fe5a9884a7c092a305 \
--hash=sha256:cb10d44e6694d763fa1078a26f7f6137d69f555a78ec85dc2ef716c37447e4b2 \
--hash=sha256:d3ca6421b942f60c008f81a3541e8faf6865a28d5a9b48544b0ee4f40cac7fca
pyinventory[psycopg2-source]==0.17.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
psycopg2==2.9.5 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:093e3894d2d3c592ab0945d9eba9d139c139664dcf83a1c440b8a7aa9bb21955 \
--hash=sha256:190d51e8c1b25a47484e52a79638a8182451d6f6dff99f26ad9bd81e5359a0fa \
--hash=sha256:1a5c7d7d577e0eabfcf15eb87d1e19314c8c4f0e722a301f98e0e3a65e238b4e \
--hash=sha256:1e5a38aa85bd660c53947bd28aeaafb6a97d70423606f1ccb044a03a1203fe4a \
--hash=sha256:322fd5fca0b1113677089d4ebd5222c964b1760e361f151cbb2706c4912112c5 \
--hash=sha256:4cb9936316d88bfab614666eb9e32995e794ed0f8f6b3b718666c22819c1d7ee \
--hash=sha256:920bf418000dd17669d2904472efeab2b20546efd0548139618f8fa305d1d7ad \
--hash=sha256:922cc5f0b98a5f2b1ff481f5551b95cd04580fd6f0c72d9b22e6c0145a4840e0 \
--hash=sha256:a5246d2e683a972e2187a8714b5c2cf8156c064629f9a9b1a873c1730d9e245a \
--hash=sha256:b9ac1b0d8ecc49e05e4e182694f418d27f3aedcfca854ebd6c05bb1cffa10d6d \
--hash=sha256:d3ef67e630b0de0779c42912fe2cbae3805ebaba30cda27fea2a3de650a9414f \
--hash=sha256:f5b6320dbc3cf6cfb9f25308286f9f7ab464e65cfb105b64cc9c52831748ced2 \
--hash=sha256:fc04dd5189b90d825509caa510f20d1d504761e78b8dfb95a0ede180f71d50e5
pyinventory==0.17.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:65575c3a2ff2e536301a1f2fb4be5ee9ad8c34e75b4c1f57f69356dab12aa6ce \
--hash=sha256:e92ed7233d3a1c7b31acef985c69956f070dd47ce60763c872b44a200e1bf930
pyparsing==3.0.9 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb \
--hash=sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc
python-stdnum==1.17 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:374e2b5e13912ccdbf50b0b23fca2c3e0531174805c32d74e145f37756328340 \
--hash=sha256:a46e6cf9652807314d369b654b255c86a59f93d18be2834f3d567ed1a346c547
pytz==2022.4 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:2c0784747071402c6e99f0bafdb7da0fa22645f06554c7ae06bf6358897e9c91 \
--hash=sha256:48ce799d83b6f8aab2020e369b627446696619e79645419610b9facd909b3174
pyyaml==6.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
python-stdnum==1.18 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:bcc763d9c49ae23da5d2b7a686d5fd1deec9d9051341160a10d1ac723a26bec0 \
--hash=sha256:d7f2a3c7ef4635c957b9cbdd9b1993d1f6ee3a2959f03e172c45440d99f296eb
pytz==2022.7 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:7ccfae7b4b2c067464a6733c6261673fdb8fd1be905460396b97a073e9fa683a \
--hash=sha256:93007def75ae22f7cd991c84e02d434876818661f8df9ad5df9e950ff4e52cfd
pyyaml==6.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf \
--hash=sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293 \
--hash=sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b \
@ -233,104 +229,36 @@ pyyaml==6.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f \
--hash=sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174 \
--hash=sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5
redis==4.3.4 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:a52d5694c9eb4292770084fa8c863f79367ca19884b329ab574d5cb2036b3e54 \
--hash=sha256:ddf27071df4adf3821c4f2ca59d67525c3a82e5f268bed97b813cb4fabf87880
requests==2.28.1 ; python_version >= "3.7" and python_version < "4" \
redis==4.4.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:7b8c87d19c45d3f1271b124858d2a5c13160c4e74d4835e28273400fa34d5228 \
--hash=sha256:cae3ee5d1f57d8caf534cd8764edf3163c77e073bdd74b6f54a87ffafdc5e7d9
requests==2.28.1 ; python_version >= "3.9" and python_version < "4" \
--hash=sha256:7c5599b102feddaa661c826c56ab4fee28bfd17f5abca1ebbe3e7f19d7c97983 \
--hash=sha256:8fefa2a1a1365bf5520aac41836fbee479da67864514bdb821f31ce07ce65349
setuptools==65.4.1 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:1b6bdc6161661409c5f21508763dc63ab20a9ac2f8ba20029aaaa7fdb9118012 \
--hash=sha256:3050e338e5871e70c72983072fe34f6032ae1cdeeeb67338199c2f74e083a80e
six==1.16.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
setuptools==65.6.3 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:57f6f22bde4e042978bcd50176fdb381d7c21a9efa4041202288d3737a0c6a54 \
--hash=sha256:a7620757bf984b58deaf32fc8a4577a9bbc0850cf92c20e1ce41c38c19e5fb75
six==1.16.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \
--hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254
sqlparse==0.4.3 ; python_version >= "3.7" and python_full_version < "4.0.0" \
sqlparse==0.4.3 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:0323c0ec29cd52bceabc1b4d9d579e311f3e4961b98d174201d5622a23b85e34 \
--hash=sha256:69ca804846bb114d2ec380e4360a8a340db83f0ccf3afceeb1404df028f57268
tablib[html,ods,xls,xlsx,yaml]==3.2.1 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:870d7e688f738531a14937a055e8bba404fbc388e77d4d500b2c904075d1019c \
--hash=sha256:a57f2770b8c225febec1cb1e65012a69cf30dd28be810e0ff98d024768c7d0f1
typing-extensions==4.3.0 ; python_version >= "3.7" and python_version < "3.8" \
--hash=sha256:25642c956049920a5aa49edcdd6ab1e06d7e5d467fc00e0506c44ac86fbfca02 \
--hash=sha256:e6d2677a32f47fc7eb2795db1dd15c1f34eff616bcaf2cfb5e997f854fa1c4a6
urllib3==1.26.12 ; python_version >= "3.7" and python_version < "4" \
--hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e \
--hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997
webencodings==0.5.1 ; python_version >= "3.7" and python_full_version < "4.0.0" \
tablib[html,ods,xls,xlsx,yaml]==3.3.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:11e02a6f81d256e0666877d8397972d10302307a54c04fd7157e92faf740cb10 \
--hash=sha256:f7f2e214a1a68577f2599927a8870495adac0f7f2673b1819130f2060e1914ab
tzdata==2022.7 ; python_version >= "3.9" and python_full_version < "4.0.0" and sys_platform == "win32" \
--hash=sha256:2b88858b0e3120792a3c0635c23daf36a7d7eeeca657c323da299d2094402a0d \
--hash=sha256:fe5f866eddd8b96e9fcba978f8e503c909b19ea7efda11e52e39494bad3a7bfa
urllib3==1.26.13 ; python_version >= "3.9" and python_version < "4" \
--hash=sha256:47cc05d99aaa09c9e72ed5809b60e7ba354e64b59c9c173ac3018642d8bb41fc \
--hash=sha256:c083dd0dce68dbfbe1129d5271cb90f9447dea7d52097c6e0126120c521ddea8
webencodings==0.5.1 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78 \
--hash=sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923
wrapt==1.14.1 ; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:00b6d4ea20a906c0ca56d84f93065b398ab74b927a7a3dbd470f6fc503f95dc3 \
--hash=sha256:01c205616a89d09827986bc4e859bcabd64f5a0662a7fe95e0d359424e0e071b \
--hash=sha256:02b41b633c6261feff8ddd8d11c711df6842aba629fdd3da10249a53211a72c4 \
--hash=sha256:07f7a7d0f388028b2df1d916e94bbb40624c59b48ecc6cbc232546706fac74c2 \
--hash=sha256:11871514607b15cfeb87c547a49bca19fde402f32e2b1c24a632506c0a756656 \
--hash=sha256:1b376b3f4896e7930f1f772ac4b064ac12598d1c38d04907e696cc4d794b43d3 \
--hash=sha256:21ac0156c4b089b330b7666db40feee30a5d52634cc4560e1905d6529a3897ff \
--hash=sha256:257fd78c513e0fb5cdbe058c27a0624c9884e735bbd131935fd49e9fe719d310 \
--hash=sha256:2b39d38039a1fdad98c87279b48bc5dce2c0ca0d73483b12cb72aa9609278e8a \
--hash=sha256:2cf71233a0ed05ccdabe209c606fe0bac7379fdcf687f39b944420d2a09fdb57 \
--hash=sha256:2fe803deacd09a233e4762a1adcea5db5d31e6be577a43352936179d14d90069 \
--hash=sha256:3232822c7d98d23895ccc443bbdf57c7412c5a65996c30442ebe6ed3df335383 \
--hash=sha256:34aa51c45f28ba7f12accd624225e2b1e5a3a45206aa191f6f9aac931d9d56fe \
--hash=sha256:36f582d0c6bc99d5f39cd3ac2a9062e57f3cf606ade29a0a0d6b323462f4dd87 \
--hash=sha256:380a85cf89e0e69b7cfbe2ea9f765f004ff419f34194018a6827ac0e3edfed4d \
--hash=sha256:40e7bc81c9e2b2734ea4bc1aceb8a8f0ceaac7c5299bc5d69e37c44d9081d43b \
--hash=sha256:43ca3bbbe97af00f49efb06e352eae40434ca9d915906f77def219b88e85d907 \
--hash=sha256:4fcc4649dc762cddacd193e6b55bc02edca674067f5f98166d7713b193932b7f \
--hash=sha256:5a0f54ce2c092aaf439813735584b9537cad479575a09892b8352fea5e988dc0 \
--hash=sha256:5a9a0d155deafd9448baff28c08e150d9b24ff010e899311ddd63c45c2445e28 \
--hash=sha256:5b02d65b9ccf0ef6c34cba6cf5bf2aab1bb2f49c6090bafeecc9cd81ad4ea1c1 \
--hash=sha256:60db23fa423575eeb65ea430cee741acb7c26a1365d103f7b0f6ec412b893853 \
--hash=sha256:642c2e7a804fcf18c222e1060df25fc210b9c58db7c91416fb055897fc27e8cc \
--hash=sha256:6a9a25751acb379b466ff6be78a315e2b439d4c94c1e99cb7266d40a537995d3 \
--hash=sha256:6b1a564e6cb69922c7fe3a678b9f9a3c54e72b469875aa8018f18b4d1dd1adf3 \
--hash=sha256:6d323e1554b3d22cfc03cd3243b5bb815a51f5249fdcbb86fda4bf62bab9e164 \
--hash=sha256:6e743de5e9c3d1b7185870f480587b75b1cb604832e380d64f9504a0535912d1 \
--hash=sha256:709fe01086a55cf79d20f741f39325018f4df051ef39fe921b1ebe780a66184c \
--hash=sha256:7b7c050ae976e286906dd3f26009e117eb000fb2cf3533398c5ad9ccc86867b1 \
--hash=sha256:7d2872609603cb35ca513d7404a94d6d608fc13211563571117046c9d2bcc3d7 \
--hash=sha256:7ef58fb89674095bfc57c4069e95d7a31cfdc0939e2a579882ac7d55aadfd2a1 \
--hash=sha256:80bb5c256f1415f747011dc3604b59bc1f91c6e7150bd7db03b19170ee06b320 \
--hash=sha256:81b19725065dcb43df02b37e03278c011a09e49757287dca60c5aecdd5a0b8ed \
--hash=sha256:833b58d5d0b7e5b9832869f039203389ac7cbf01765639c7309fd50ef619e0b1 \
--hash=sha256:88bd7b6bd70a5b6803c1abf6bca012f7ed963e58c68d76ee20b9d751c74a3248 \
--hash=sha256:8ad85f7f4e20964db4daadcab70b47ab05c7c1cf2a7c1e51087bfaa83831854c \
--hash=sha256:8c0ce1e99116d5ab21355d8ebe53d9460366704ea38ae4d9f6933188f327b456 \
--hash=sha256:8d649d616e5c6a678b26d15ece345354f7c2286acd6db868e65fcc5ff7c24a77 \
--hash=sha256:903500616422a40a98a5a3c4ff4ed9d0066f3b4c951fa286018ecdf0750194ef \
--hash=sha256:9736af4641846491aedb3c3f56b9bc5568d92b0692303b5a305301a95dfd38b1 \
--hash=sha256:988635d122aaf2bdcef9e795435662bcd65b02f4f4c1ae37fbee7401c440b3a7 \
--hash=sha256:9cca3c2cdadb362116235fdbd411735de4328c61425b0aa9f872fd76d02c4e86 \
--hash=sha256:9e0fd32e0148dd5dea6af5fee42beb949098564cc23211a88d799e434255a1f4 \
--hash=sha256:9f3e6f9e05148ff90002b884fbc2a86bd303ae847e472f44ecc06c2cd2fcdb2d \
--hash=sha256:a85d2b46be66a71bedde836d9e41859879cc54a2a04fad1191eb50c2066f6e9d \
--hash=sha256:a9a52172be0b5aae932bef82a79ec0a0ce87288c7d132946d645eba03f0ad8a8 \
--hash=sha256:aa31fdcc33fef9eb2552cbcbfee7773d5a6792c137b359e82879c101e98584c5 \
--hash=sha256:b014c23646a467558be7da3d6b9fa409b2c567d2110599b7cf9a0c5992b3b471 \
--hash=sha256:b21bb4c09ffabfa0e85e3a6b623e19b80e7acd709b9f91452b8297ace2a8ab00 \
--hash=sha256:b5901a312f4d14c59918c221323068fad0540e34324925c8475263841dbdfe68 \
--hash=sha256:b9b7a708dd92306328117d8c4b62e2194d00c365f18eff11a9b53c6f923b01e3 \
--hash=sha256:d1967f46ea8f2db647c786e78d8cc7e4313dbd1b0aca360592d8027b8508e24d \
--hash=sha256:d52a25136894c63de15a35bc0bdc5adb4b0e173b9c0d07a2be9d3ca64a332735 \
--hash=sha256:d77c85fedff92cf788face9bfa3ebaa364448ebb1d765302e9af11bf449ca36d \
--hash=sha256:d79d7d5dc8a32b7093e81e97dad755127ff77bcc899e845f41bf71747af0c569 \
--hash=sha256:dbcda74c67263139358f4d188ae5faae95c30929281bc6866d00573783c422b7 \
--hash=sha256:ddaea91abf8b0d13443f6dac52e89051a5063c7d014710dcb4d4abb2ff811a59 \
--hash=sha256:dee0ce50c6a2dd9056c20db781e9c1cfd33e77d2d569f5d1d9321c641bb903d5 \
--hash=sha256:dee60e1de1898bde3b238f18340eec6148986da0455d8ba7848d50470a7a32fb \
--hash=sha256:e2f83e18fe2f4c9e7db597e988f72712c0c3676d337d8b101f6758107c42425b \
--hash=sha256:e3fb1677c720409d5f671e39bac6c9e0e422584e5f518bfd50aa4cbbea02433f \
--hash=sha256:ee2b1b1769f6707a8a445162ea16dddf74285c3964f605877a20e38545c3c462 \
--hash=sha256:ee6acae74a2b91865910eef5e7de37dc6895ad96fa23603d1d27ea69df545015 \
--hash=sha256:ef3f72c9666bba2bab70d2a8b79f2c6d2c1a42a7f7e2b0ec83bb2f9e383950af
xlrd==2.0.1 ; python_version >= "3.7" and python_full_version < "4.0.0" \
xlrd==2.0.1 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:6a33ee89877bd9abc1158129f6e94be74e2679636b8a205b43b85206c3f0bbdd \
--hash=sha256:f72f148f54442c6b056bf931dbc34f986fd0c3b0b6b5a58d013c9aef274d0c88
xlwt==1.3.0 ; python_version >= "3.7" and python_full_version < "4.0.0" \
xlwt==1.3.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:a082260524678ba48a297d922cc385f58278b8aa68741596a87de01a9c628b2e \
--hash=sha256:c59912717a9b28f1a3c2a98fd60741014b06b043936dcecbc113eaaada156c88
zipp==3.8.1 ; python_version >= "3.7" and python_version < "3.8" \
--hash=sha256:05b45f1ee8f807d0cc928485ca40a07cb491cf092ff587c0df9cb1fd154848d2 \
--hash=sha256:47c40d7fe183a6f21403a199b3e4192cca5774656965b0a4988ad2f8feb5f009

View file

@ -13,7 +13,10 @@ from pathlib import Path as __Path
from django_yunohost_integration.base_settings import * # noqa:F401,F403
from django_yunohost_integration.secret_key import get_or_create_secret as __get_or_create_secret
from inventory_project.settings.base import * # noqa:F401,F403
# https://github.com/jedie/PyInventory
from inventory_project.settings.base import * # noqa:F401,F403 isort:skip
from django_yunohost_integration.base_settings import LOGGING # noqa:F401 isort:skip
@ -25,12 +28,14 @@ assert FINALPATH.is_dir(), f'Directory not exists: {FINALPATH}'
PUBLIC_PATH = __Path('__PUBLIC_PATH__') # /var/www/$app
assert PUBLIC_PATH.is_dir(), f'Directory not exists: {PUBLIC_PATH}'
LOG_FILE = __Path('__LOG_FILE__') # /var/log/$app/pyinventory.log
LOG_FILE = __Path('__LOG_FILE__') # /var/log/$app/pyinventory_ynh.log
assert LOG_FILE.is_file(), f'File not exists: {LOG_FILE}'
PATH_URL = '__PATH_URL__' # $YNH_APP_ARG_PATH
PATH_URL = PATH_URL.strip('/')
YNH_CURRENT_HOST = '__YNH_CURRENT_HOST__' # YunoHost main domain from: /etc/yunohost/current_host
# -----------------------------------------------------------------------------
# config_panel.toml settings:
@ -49,13 +54,15 @@ YNH_SETUP_USER = 'setup_user.setup_project_user'
SECRET_KEY = __get_or_create_secret(FINALPATH / 'secret.txt') # /opt/yunohost/$app/secret.txt
INSTALLED_APPS.append('django_yunohost_integration')
INSTALLED_APPS.append('django_yunohost_integration.apps.YunohostIntegrationConfig')
MIDDLEWARE.insert(
MIDDLEWARE.index('django.contrib.auth.middleware.AuthenticationMiddleware') + 1,
# login a user via HTTP_REMOTE_USER header from SSOwat:
'django_yunohost_integration.sso_auth.auth_middleware.SSOwatRemoteUserMiddleware',
)
# AxesMiddleware should be the last middleware:
MIDDLEWARE.append('axes.middleware.AxesMiddleware')
# Keep ModelBackend around for per-user permissions and superuser
AUTHENTICATION_BACKENDS = (

View file

@ -1,7 +1,10 @@
# https://github.com/YunoHost/example_ynh/blob/master/config_panel.toml.example
version = "1.0"
[main]
name = "django_example_ynh configuration"
name.en = "Main configuration"
name.fr = "Configuration principale"
services = ["__APP__"]
[main.config]

0
doc/screenshots/.gitkeep Normal file
View file

View file

@ -6,20 +6,22 @@
"en": "Web based management to catalog things including state and location etc."
},
"version": "0.17.0~ynh1",
"url": "https://github.com/jedie/PyInventory",
"url": "https://github.com/YunoHost-Apps/pyinventory_ynh",
"upstream": {
"license": "GPL-3.0",
"website": "https://github.com/jedie/PyInventory",
"admindoc": "https://github.com/jedie/PyInventory",
"userdoc": "https://github.com/jedie/PyInventory",
"code": "https://github.com/jedie/PyInventory"
},
"license": "GPL-3.0",
"license": "GPL-3.0-or-later",
"maintainer": {
"name": "Jens Diemer",
"email": "pyinventory_ynh@jensdiemer.de"
},
"previous_maintainers": [],
"requirements": {
"yunohost": ">= 4.4"
"yunohost": ">=11"
},
"multi_instance": true,
"services": [

3245
poetry.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,36 +1,45 @@
[tool.poetry]
name = "pyinventory_ynh"
version = "0.17.0+ynh1"
description = "Test pyinventory_ynh via local_test.py"
authors = ["JensDiemer <git@jensdiemer.de>"]
license = "GPL"
description = "YunoHost app package for: https://github.com/jedie/PyInventory"
authors = ["Jens Diemer <pyinventory_ynh@jensdiemer.de>"]
homepage = "https://github.com/YunoHost-Apps/pyinventory_ynh"
license = "GPL-3.0-or-later"
readme = 'README.md'
[tool.poetry.urls]
"Bug Tracker" = "https://github.com/jedie/PyInventory/issues"
[tool.poetry.dependencies]
# Keep Python 3.7 until Yunohost contains a newer Python Version ;)
python = ">=3.7,<4.0.0"
pyinventory = {version = ">=0.17.0", extras = ["psycopg2-source"]}
python = ">=3.9,<4.0.0" # Stay with 3.9 until YunoHost used >=Debian 11 (Bullseye)
#
pyinventory = ">=0.17.0" # https://github.com/jedie/PyInventory
#
# extras "ynh" will install: gunicorn, psycopg2, django-redis and django-axes
# see: https://github.com/YunoHost-Apps/django_yunohost_integration/blob/main/pyproject.toml
django_yunohost_integration = {version = ">=0.5.0", extras = ["ynh"]} # https://github.com/YunoHost-Apps/django_yunohost_integration
# Note: "ynh" extras will install gunicorn, psycopg2, django-redis and django-axes
django_yunohost_integration = {version = "*", extras = ["ynh"]}
psycopg2 = "*" # https://github.com/psycopg/psycopg2/
[tool.poetry.dev-dependencies]
bx_py_utils = "*"
tox = "*"
bx_py_utils = "*" # https://github.com/boxine/bx_py_utils
bx_django_utils = "*" # https://github.com/boxine/bx_django_utils
tox = "*" # https://github.com/tox-dev/tox
coveralls = "*" # http://github.com/TheKevJames/coveralls-python
darker = "*" # https://github.com/akaihola/pytest-darker
isort = "*" # https://github.com/pycqa/isort
flake8 = "*" # https://github.com/pycqa/flake8
EditorConfig = "*" # https://github.com/editorconfig/editorconfig-core-py
safety = "*" # https://github.com/pyupio/safety
mypy = "*" # https://github.com/python/mypy
tomli = "*" # https://github.com/hukkin/tomli
twine = "*" # https://github.com/pypa/twine
poetry-publish = "*" # https://github.com/jedie/poetry-publish
pytest = "*"
pytest-cov = "*"
pytest-django = "*"
pytest-darker = "*" # https://github.com/akaihola/pytest-darker
flake8 = "*"
isort = "*"
coveralls = "*"
flynt = "*"
pyupgrade = "*"
EditorConfig = "*" # https://github.com/editorconfig/editorconfig-core-py
safety = "*" # https://github.com/pyupio/safety
requests = "*" # https://github.com/psf/requests
packaging = "*" # https://github.com/pypa/packaging
packaging = "*" # https://github.com/pypa/packagi
beautifulsoup4 = "*" # https://pypi.org/project/beautifulsoup4/
[build-system]
@ -41,7 +50,7 @@ build-backend = "poetry.core.masonry.api"
[tool.darker]
src = ['.']
revision = "origin/master..."
line_length = 120
line_length = 100
verbose = true
skip_string_normalization = true
diff = false
@ -54,17 +63,13 @@ lint = [
log_level = "INFO"
[tool.flynt]
line_length = 120
[tool.isort]
# https://pycqa.github.io/isort/docs/configuration/config_files/#pyprojecttoml-preferred-format
atomic=true
profile='black'
line_length=120
known_first_party=["inventory"]
skip_glob=["*/htmlcov/*","*/migrations/*","*/local_test/*"]
skip_glob=[".*", "*/htmlcov/*","*/migrations/*","*/local_test/*"]
known_first_party=['inventory', 'inventory_project']
line_length=100
lines_after_imports=2
@ -88,7 +93,6 @@ addopts = """
--cov-report xml
--no-cov-on-fail
--showlocals
--darker
--doctest-modules
--failed-first
--new-first
@ -96,7 +100,7 @@ addopts = """
[tool.coverage.run]
omit = [".*"]
omit = ['.*', '*/tests/*']
[tool.tox]
@ -104,7 +108,7 @@ omit = [".*"]
legacy_tox_ini = """
[tox]
isolated_build = True
envlist = py{37,38,39,310}
envlist = py{311,310,39}
skip_missing_interpreters = True
[testenv]
@ -113,3 +117,26 @@ whitelist_externals = make
commands =
make pytest
"""
[manageprojects] # https://github.com/jedie/manageprojects
initial_revision = "b204761"
initial_date = 2022-12-21T20:25:20+01:00
cookiecutter_template = "https://github.com/jedie/cookiecutter_templates/"
cookiecutter_directory = "yunohost_django_package"
[manageprojects.cookiecutter_context.cookiecutter]
project_name = "PyInventory"
full_name = "Jens Diemer"
github_username = "jedie"
author_email = "pyinventory_ynh@jensdiemer.de"
upstream_pkg_name = "pyinventory"
upstream_url = "https://github.com/jedie/PyInventory"
ynh_app_pkg_name = "pyinventory_ynh"
ynh_app_url = "https://github.com/YunoHost-Apps/pyinventory_ynh"
bug_tracker_url = "https://github.com/jedie/PyInventory/issues"
upstream_version = "0.17.0"
ynh_version = "1"
package_description = "Web based management to catalog things including state and location etc."
license = "GPL-3.0-or-later"
_template = "https://github.com/jedie/cookiecutter_templates/"

View file

@ -8,10 +8,14 @@ domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH
admin=$YNH_APP_ARG_ADMIN
app=$YNH_APP_INSTANCE_NAME
# Currently not used: PyInventory has no public pages, yet!
is_public=$YNH_APP_ARG_IS_PUBLIC
app=$YNH_APP_INSTANCE_NAME
# Transfer the main SSO domain to the App:
ynh_current_host=$(cat /etc/yunohost/current_host)
__YNH_CURRENT_HOST__=${ynh_current_host}
#=================================================
# ARGUMENTS FROM CONFIG PANEL

View file

@ -1,7 +1,8 @@
from pathlib import Path
from axes.models import AccessLog
from bx_django_utils.test_utils.html_assertion import HtmlAssertionMixin
from bx_django_utils.test_utils.html_assertion import (
HtmlAssertionMixin,
assert_html_response_snapshot,
)
from django.conf import LazySettings, settings
from django.contrib.auth.models import User
from django.test import override_settings
@ -27,18 +28,14 @@ class DjangoYnhTestCase(HtmlAssertionMixin, TestCase):
assert settings.configured is True
assert settings.PATH_URL == 'app_path'
assert str(settings.FINALPATH).endswith('/local_test/opt_yunohost')
assert str(settings.PUBLIC_PATH).endswith('/local_test/var_www')
assert str(settings.LOG_FILE).endswith('/local_test/var_log_pyinventory.log')
assert settings.ROOT_URLCONF == 'urls'
assert reverse('admin:index') == '/app_path/'
def assert_path(path, end_text):
assert isinstance(path, Path)
path = str(path)
assert path.endswith(end_text)
assert_path(settings.FINALPATH, '/local_test/opt_yunohost')
assert_path(settings.PUBLIC_PATH, '/local_test/var_www')
assert_path(settings.LOG_FILE, '/local_test/var_log_pyinventory.log')
def test_config_panel_settings(self):
# config_panel.toml settings, set via tests.conftest.pytest_configure():
assert settings.DEBUG_ENABLED == '0' and settings.DEBUG is False
@ -55,11 +52,17 @@ class DjangoYnhTestCase(HtmlAssertionMixin, TestCase):
# Serve user uploads via django_tools.serve_media_app:
assert settings.MEDIA_URL == '/app_path/media/'
assert reverse('serve_media_app:serve-media', kwargs={'user_token': 'token', 'path': 'foo/bar/'}) == (
'/app_path/media/token/foo/bar/'
url = reverse(
'serve_media_app:serve-media',
kwargs={'user_token': 'token', 'path': 'foo/bar/'},
)
assert url == '/app_path/media/token/foo/bar/'
def test_auth(self):
assert settings.PATH_URL == 'app_path'
assert reverse('admin:index') == '/app_path/'
# SecurityMiddleware should redirects all non-HTTPS requests to HTTPS:
assert settings.SECURE_SSL_REDIRECT is True
response = self.client.get('/app_path/', secure=False)
@ -90,10 +93,9 @@ class DjangoYnhTestCase(HtmlAssertionMixin, TestCase):
user = User.objects.first()
assert user.username == 'test'
assert user.is_active is True
assert user.is_staff is True # Set by: django_yunohost_integration
assert user.is_staff is True # Set by: conf.setup_user.setup_project_user
assert user.is_superuser is False
assert response.status_code == 200
self.assert_html_parts(
response,
parts=(
@ -101,6 +103,7 @@ class DjangoYnhTestCase(HtmlAssertionMixin, TestCase):
'<strong>test</strong>',
),
)
assert_html_response_snapshot(response, query_selector='#container', validate=False)
def test_wrong_auth_user(self):
assert User.objects.count() == 0
@ -120,7 +123,7 @@ class DjangoYnhTestCase(HtmlAssertionMixin, TestCase):
user = User.objects.first()
assert user.username == 'test'
assert user.is_active is True
assert user.is_staff is True # Set by: django_yunohost_integration
assert user.is_staff is True # Set by: conf.setup_user.setup_project_user
assert user.is_superuser is False
assert AccessLog.objects.count() == 1
@ -145,7 +148,7 @@ class DjangoYnhTestCase(HtmlAssertionMixin, TestCase):
user = User.objects.first()
assert user.username == 'test'
assert user.is_active is True
assert user.is_staff is True # Set by: django_yunohost_integration
assert user.is_staff is True # Set by: conf.setup_user.setup_project_user
assert user.is_superuser is False
assert AccessLog.objects.count() == 1
@ -172,7 +175,7 @@ class DjangoYnhTestCase(HtmlAssertionMixin, TestCase):
user = User.objects.first()
assert user.username == 'test'
assert user.is_active is True
assert user.is_staff is True # Set by: django_yunohost_integration
assert user.is_staff is True # Set by: conf.setup_user.setup_project_user
assert user.is_superuser is False
assert AccessLog.objects.count() == 1

View file

@ -4,14 +4,13 @@ import shutil
import subprocess
from pathlib import Path
import requests
import tomli
from django_tools.serve_media_app.utils import clean_filename
from django_tools.unittest_utils.assertments import assert_is_dir, assert_is_file
from bx_django_utils.filename import clean_filename
from bx_py_utils.path import assert_is_dir, assert_is_file
from django_tools.unittest_utils.project_setup import check_editor_config
from packaging.version import Version
from django_yunohost_integration.test_utils import assert_project_version
import inventory
from inventory import __version__
PACKAGE_ROOT = Path(__file__).parent.parent
@ -25,29 +24,18 @@ def assert_file_contains_string(file_path, string):
raise AssertionError(f'File {file_path} does not contain {string!r} !')
def get_github_version_tag(github_project_url):
api_url = github_project_url.replace('github.com', 'api.github.com/repos')
tags = requests.get(f'{api_url}/tags').json()
for tag in tags:
version_str = tag['name']
ver_obj = Version(version_str)
if ver_obj.base_version and not ver_obj.is_prerelease:
return ver_obj
def test_version():
upstream_version = inventory.__version__
current_ver_obj = Version(upstream_version)
github_ver = get_github_version_tag(github_project_url='https://github.com/jedie/PyInventory')
assert (
github_ver == current_ver_obj
), f'Current version from github is: {github_ver} but current package version is: {current_ver_obj}'
assert_project_version(
current_version=__version__,
github_project_url='https://github.com/jedie/PyInventory',
)
pyproject_toml_path = Path(PACKAGE_ROOT, 'pyproject.toml')
pyproject_toml = tomli.loads(pyproject_toml_path.read_text(encoding='UTF-8'))
pyproject_version = pyproject_toml['tool']['poetry']['version']
assert pyproject_version.startswith(f'{upstream_version}+ynh')
assert pyproject_version.startswith(
f'{__version__}+ynh'
), f'{pyproject_version!r} does not start with "{__version__}+ynh"'
# pyproject.toml needs a PEP 440 conform version and used "+ynh"
# the YunoHost syntax is: "~ynh", just "convert this:
@ -108,6 +96,8 @@ def test_screenshot_filenames():
renamed = []
for file_path in screenshot_path.iterdir():
file_name = file_path.name
if file_name.startswith('.'):
continue
cleaned_name = clean_filename(file_name)
if cleaned_name != file_name:
new_path = file_path.with_name(cleaned_name)
@ -118,3 +108,28 @@ def test_screenshot_filenames():
def test_check_editor_config():
check_editor_config(package_root=PACKAGE_ROOT)
def _call_make(*args):
make_bin = shutil.which('make')
assert make_bin
return subprocess.check_output(
(make_bin,) + args,
text=True,
env=dict(PATH=os.environ['PATH']),
stderr=subprocess.STDOUT,
cwd=str(PACKAGE_ROOT),
)
def test_check_code_style():
# First try:
try:
_call_make('lint')
except subprocess.CalledProcessError:
# Fix and test again:
try:
_call_make('fix-code-style')
_call_make('lint')
except subprocess.CalledProcessError as err:
raise AssertionError(f'Linting error:\n{"-"*100}\n{err.stdout}\n{"-"*100}')