manageprojects updates

This commit is contained in:
Jens Diemer 2023-02-23 18:35:42 +01:00
parent 3b1760713a
commit b25f15470a
17 changed files with 1499 additions and 834 deletions

View file

@ -1,4 +1,4 @@
# see http://editorconfig.org # see https://editorconfig.org
root = true root = true
[*] [*]
@ -10,11 +10,11 @@ trim_trailing_whitespace = true
insert_final_newline = true insert_final_newline = true
[*.py] [*.py]
max_line_length = 100 max_line_length = 119
[{Makefile,**.mk}] [{Makefile,**.mk}]
indent_style = tab indent_style = tab
insert_final_newline = false insert_final_newline = false
[*.yml] [*.yml]
indent_style = tab indent_size = 2

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] [flake8]
exclude = .pytest_cache, .tox, dist, htmlcov, local_test exclude = .*, dist, htmlcov, local_test
ignore = F405 ignore = F405
max-line-length = 119 max-line-length = 119

View file

@ -1,6 +1,8 @@
name: YunoHost apps package linter name: YunoHost apps package linter
on: on:
# Allow to manually trigger the workflow
workflow_dispatch:
push: push:
branches: branches:
- main - main
@ -12,12 +14,27 @@ jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: 'Set up Python'
uses: actions/setup-python@v4
# https://github.com/marketplace/actions/setup-python
with:
cache: 'pip' # caching pip dependencies
cache-dependency-path: '**/requirements.dev.txt'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install toml
- name: 'Clone YunoHost apps package linter' - name: 'Clone YunoHost apps package linter'
run: | run: |
git clone --depth=1 https://github.com/YunoHost/package_linter ~/package_linter git clone --depth=1 https://github.com/YunoHost/package_linter ~/package_linter
- name: 'Install requirements'
run: pip3 install toml
- name: 'Run linter' - name: 'Run linter'
run: | run: |
~/package_linter/package_linter.py . ~/package_linter/package_linter.py .

View file

@ -14,23 +14,22 @@ jobs:
strategy: strategy:
max-parallel: 2 max-parallel: 2
matrix: matrix:
python-version: ["3.10", "3.9"] python-version: ["3.11", "3.10", "3.9"]
steps: steps:
- uses: actions/checkout@v2 - name: Checkout
with:
fetch-depth: 0
- name: 'fetch master'
run: | run: |
git fetch origin master echo $GITHUB_REF $GITHUB_SHA
git clone --depth 1 https://github.com/$GITHUB_REPOSITORY.git .
git fetch origin $GITHUB_SHA:temporary-ci-branch
git checkout $GITHUB_SHA || (git fetch && git checkout $GITHUB_SHA)
- name: 'Set up Python ${{ matrix.python-version }}' - name: 'Set up Python ${{ matrix.python-version }}'
uses: actions/setup-python@v2 uses: actions/setup-python@v4
# https://github.com/marketplace/actions/setup-python
with: with:
python-version: '${{ matrix.python-version }}' python-version: '${{ matrix.python-version }}'
cache: 'pip' # caching pip dependencies
- uses: actions/cache@v2 cache-dependency-path: '**/requirements.dev.txt'
with:
path: ~/.cache/
key: dot-cache-files
- name: 'Install package' - name: 'Install package'
run: | run: |
@ -50,7 +49,8 @@ jobs:
make safety make safety
- name: 'Upload coverage report' - name: 'Upload coverage report'
uses: codecov/codecov-action@v2 uses: codecov/codecov-action@v3
# https://github.com/marketplace/actions/codecov
with: with:
fail_ci_if_error: false fail_ci_if_error: false
verbose: true verbose: true

View file

@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007 Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed. of this license document, but changing it is not allowed.
@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail. Also add information on how to contact you by electronic and paper mail.
@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school, You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary. if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>. <https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>. <https://www.gnu.org/philosophy/why-not-lgpl.html>.

View file

@ -16,24 +16,30 @@ check-poetry:
exit 1 ; \ exit 1 ; \
fi fi
install-base-req: ## Install needed base packages via apt
sudo apt install python3-pip python3-venv
install-poetry: ## install or update poetry install-poetry: ## install or update poetry
curl -sSL https://install.python-poetry.org | python3 - curl -sSL https://install.python-poetry.org | python3 -
install: check-poetry ## install project via poetry install: check-poetry ## install project via poetry
python3 -m venv .venv
poetry install poetry install
update: check-poetry ## update the sources and installation and generate "conf/requirements.txt" update: check-poetry ## update the sources and installation and generate "conf/requirements.txt"
python3 -m venv .venv
poetry self update poetry self update
poetry update -v poetry update -v
poetry install poetry install
poetry export -f requirements.txt --output conf/requirements.txt poetry export -f requirements.txt --output conf/requirements.txt
lint: ## Run code formatters and linter lint: ## Run code formatters and linter
poetry run darker --check
poetry run isort --check-only . poetry run isort --check-only .
poetry run flake8 . poetry run flake8 .
fix-code-style: ## Fix code formatting fix-code-style: ## Fix code formatting
poetry run black --verbose --safe --line-length=${MAX_LINE_LENGTH} --skip-string-normalization . poetry run darker
poetry run isort . poetry run isort .
tox-listenvs: check-poetry ## List all tox test environments tox-listenvs: check-poetry ## List all tox test environments

View file

@ -1,33 +1,30 @@
asgiref==3.5.2 ; python_version >= "3.9" and python_full_version < "4.0.0" \ asgiref==3.6.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:1d2880b792ae8757289136f1db2b7b99100ce959b2aa57fd69dab783d05afac4 \ --hash=sha256:71e68008da809b957b7ee4b43dbccff33d1b23519fb8344e33f049897077afac \
--hash=sha256:4a29362a6acebe09bf1d6640db38c1dc3d9217c68e6f9f6204d72667fc19a424 --hash=sha256:9567dfe7bd8d3c8c892227827c41cce860b368104c3431da67a0c5a65a949506
async-timeout==4.0.2 ; python_version >= "3.9" and python_full_version < "4.0.0" \ async-timeout==4.0.2 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15 \ --hash=sha256:2163e1640ddb52b7a8c80d0a67a08587e5d245cc9c553a74a847056bc2976b15 \
--hash=sha256:8ca1e4fcf50d07413d66d1a5e416e42cfdf5851c981d679a09851a6853383b3c --hash=sha256:8ca1e4fcf50d07413d66d1a5e416e42cfdf5851c981d679a09851a6853383b3c
bleach==5.0.1 ; python_version >= "3.9" and python_full_version < "4.0.0" \ bleach==6.0.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:085f7f33c15bd408dd9b17a4ad77c577db66d76203e5984b1bd59baeee948b2a \ --hash=sha256:1a1a85c1595e07d8db14c5f09f09e6433502c51c595970edc090551f0db99414 \
--hash=sha256:0d03255c47eb9bd2f26aa9bb7f2107732e7e8fe195ca2f64709fcf3b0a4a085c --hash=sha256:33c16e3353dbd13028ab4799a0f89a83f113405c766e9c122df8a06f5b85b3f4
bx-django-utils==36 ; python_version >= "3.9" and python_full_version < "4.0.0" \ bx-django-utils==44 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:98f900da91e3cdb22d2f386863fe05e58cfc18ff2d7c0ee656e7d551a135f529 \ --hash=sha256:0e878c87783e472626c2c47ef0f5e05aff1be57293a21e2a49f128709165fb71 \
--hash=sha256:badb8d7fb04ce449cac7896ee435e69d2786eebc3e8c756e99e9379be816cd5f --hash=sha256:50875ecb23640ad542489021d0c85f40e3b2181e7054ac01a186bd23b0053384
bx-py-utils==69 ; python_version >= "3.9" and python_full_version < "4.0.0" \ bx-py-utils==76 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:728fd575c4d5048e114b502a97d19679f9abcda90889a6896534c48348320460 \ --hash=sha256:c9fcedc76daa9782b0a0c535d0d803061f61117f95957862ef58253f3c35fc0e \
--hash=sha256:b25419e020c9c5ea16938a45cf5120086a5ac29648be78a8eb98ae202515fee1 --hash=sha256:f15c64731cd9df0ca9a7bd3993fc0bf4faeb25fc30157348eb9735bf0989a210
colorama==0.4.5 ; python_version >= "3.9" and python_full_version < "4.0.0" and sys_platform == "win32" \ colorama==0.4.6 ; python_version >= "3.9" and python_full_version < "4.0.0" and sys_platform == "win32" \
--hash=sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da \ --hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \
--hash=sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4 --hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6
colorlog==6.7.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \ colorlog==6.7.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:0d33ca236784a1ba3ff9c532d4964126d8a2c44f1f0cb1d2b0728196f512f662 \ --hash=sha256:0d33ca236784a1ba3ff9c532d4964126d8a2c44f1f0cb1d2b0728196f512f662 \
--hash=sha256:bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5 --hash=sha256:bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5
deprecated==1.2.13 ; python_version >= "3.9" and python_full_version < "4.0.0" \ django-axes==5.40.1 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:43ac5335da90c31c24ba028af536a91d41d53f9e6901ddb021bcc572ce44e38d \ --hash=sha256:347e3dbce46051e63cacc7c9ad43cb4382e910f243b6086cf181639d082fa6d0 \
--hash=sha256:64756e3e14c8c5eea9795d93c524551432a0be75629f8f29e67ab8caf076c76d --hash=sha256:b5bc4a6f528ca10fc8b94d02ac3c3726ef879ec0868600f2cb3c32b6dea28717
django-axes==5.39.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \ django-example==0.2.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:8f039f8e98f050f13f654efca599d8a04d0b57d330c590cf89ec2bf731c9a7fb \ --hash=sha256:2bcaeed97868e8be5c4d7d6a745b054f6983c931d5cefb763e6ff25807f15793 \
--hash=sha256:97702552f7939c81db5bba2ef855ae43f20df92fa261cb79fd4c8633ba3b3955 --hash=sha256:469beaa9e4f3e5d0ee98f043ee533f0f01fafef128391ac9f4ca9d9f35290da0
django-example==0.1.0rc0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:9bf31725f539d6c3489fd29a743f496fce1080164f5a62b87a6af2be04ca81c0 \
--hash=sha256:de4460c2175506dcb528ac4f98df8c436c2d102f8d08c77b766cf406038eef53
django-ipware==4.0.2 ; python_version >= "3.9" and python_full_version < "4.0.0" \ django-ipware==4.0.2 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:602a58325a4808bd19197fef2676a0b2da2df40d0ecf21be414b2ff48c72ad05 \ --hash=sha256:602a58325a4808bd19197fef2676a0b2da2df40d0ecf21be414b2ff48c72ad05 \
--hash=sha256:878dbb06a87e25550798e9ef3204ed70a200dd8b15e47dcef848cf08244f04c9 --hash=sha256:878dbb06a87e25550798e9ef3204ed70a200dd8b15e47dcef848cf08244f04c9
@ -37,121 +34,96 @@ django-redis==5.2.0 ; python_version >= "3.9" and python_full_version < "4.0.0"
django-tools==0.54.0 ; python_version >= "3.9" 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:5040a91282be9d1c9d379b0c65da50bcb3691bff03cee54fd4123ace238c3a43 \
--hash=sha256:a7b7bfa5b9c5a81966454d17dffb2403cee25a806c858ee0486a08798227598f --hash=sha256:a7b7bfa5b9c5a81966454d17dffb2403cee25a806c858ee0486a08798227598f
django-yunohost-integration[ynh]==0.5.0rc1 ; python_version >= "3.9" and python_full_version < "4.0.0" \ django-yunohost-integration[ynh]==0.5.2 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:0e6d8ec12d48d9897c9dc02fc60c35bb3c7cc5f9446961fc0be61bb6f5586197 \ --hash=sha256:05d96ae0689eb1b8c7bc30e0d247fddb1c18d2845c17a6e4ca533ed47731a4cb \
--hash=sha256:5d8823acb83a668a5126e1324d2c3c7b239595a77a03d8c9bdaa8446154c64e4 --hash=sha256:6689115f88dc84acaf94dc01ce940023f566bf933f57115563120912a14cbeff
django==4.1.2 ; python_version >= "3.9" and python_full_version < "4.0.0" \ django==4.1.7 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:26dc24f99c8956374a054bcbf58aab8dc0cad2e6ac82b0fe036b752c00eee793 \ --hash=sha256:44f714b81c5f190d9d2ddad01a532fe502fa01c4cb8faf1d081f4264ed15dcd8 \
--hash=sha256:b8d843714810ab88d59344507d4447be8b2cf12a49031363b6eed9f1b9b2280f --hash=sha256:f2f431e75adc40039ace496ad3b9f17227022e8b11566f4b363da44c7e44761e
gunicorn==20.1.0 ; python_version >= "3.9" 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:9dcc4547dbb1cb284accfb15ab5667a0e5d1881cc443e0677b4882a4067a807e \
--hash=sha256:e0a968b5ba15f8a328fdfd7ab1fcb5af4470c28aaf7e55df02a99bc13138e6e8 --hash=sha256:e0a968b5ba15f8a328fdfd7ab1fcb5af4470c28aaf7e55df02a99bc13138e6e8
icdiff==2.0.5 ; python_version >= "3.9" and python_full_version < "4.0.0" \ icdiff==2.0.6 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:35d24b728e48b7e0a12bdb69386d3bfc7eef4fe922d0ac1cd70d6e5c11630bae --hash=sha256:a2673b335d671e64fc73c44e1eaa0aa01fd0e68354e58ee17e863ab29912a79a
packaging==21.3 ; python_version >= "3.9" and python_full_version < "4.0.0" \ packaging==23.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb \ --hash=sha256:714ac14496c3e68c99c29b00845f7a2b85f3bb6f1078fd9f72fd20f0570002b2 \
--hash=sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522 --hash=sha256:b6ad297f8907de0fa2fe1ccbd26fdaf387f5f47c7275fedf8cce89f99446cf97
pprintpp==0.4.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \ pprintpp==0.4.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:b6b4dcdd0c0c0d75e4d7b2f21a9e933e5b2ce62b26e1a54537f9651ae5a5c01d \ --hash=sha256:b6b4dcdd0c0c0d75e4d7b2f21a9e933e5b2ce62b26e1a54537f9651ae5a5c01d \
--hash=sha256:ea826108e2c7f49dc6d66c752973c3fc9749142a798d6b254e1e301cfdbc6403 --hash=sha256:ea826108e2c7f49dc6d66c752973c3fc9749142a798d6b254e1e301cfdbc6403
psycopg2==2.9.3 ; python_version >= "3.9" and python_full_version < "4.0.0" \ psycopg2==2.9.5 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:06f32425949bd5fe8f625c49f17ebb9784e1e4fe928b7cce72edc36fb68e4c0c \ --hash=sha256:093e3894d2d3c592ab0945d9eba9d139c139664dcf83a1c440b8a7aa9bb21955 \
--hash=sha256:0762c27d018edbcb2d34d51596e4346c983bd27c330218c56c4dc25ef7e819bf \ --hash=sha256:190d51e8c1b25a47484e52a79638a8182451d6f6dff99f26ad9bd81e5359a0fa \
--hash=sha256:083707a696e5e1c330af2508d8fab36f9700b26621ccbcb538abe22e15485362 \ --hash=sha256:1a5c7d7d577e0eabfcf15eb87d1e19314c8c4f0e722a301f98e0e3a65e238b4e \
--hash=sha256:34b33e0162cfcaad151f249c2649fd1030010c16f4bbc40a604c1cb77173dcf7 \ --hash=sha256:1e5a38aa85bd660c53947bd28aeaafb6a97d70423606f1ccb044a03a1203fe4a \
--hash=sha256:4295093a6ae3434d33ec6baab4ca5512a5082cc43c0505293087b8a46d108461 \ --hash=sha256:322fd5fca0b1113677089d4ebd5222c964b1760e361f151cbb2706c4912112c5 \
--hash=sha256:8cf3878353cc04b053822896bc4922b194792df9df2f1ad8da01fb3043602126 \ --hash=sha256:4cb9936316d88bfab614666eb9e32995e794ed0f8f6b3b718666c22819c1d7ee \
--hash=sha256:8e841d1bf3434da985cc5ef13e6f75c8981ced601fd70cc6bf33351b91562981 \ --hash=sha256:920bf418000dd17669d2904472efeab2b20546efd0548139618f8fa305d1d7ad \
--hash=sha256:9572e08b50aed176ef6d66f15a21d823bb6f6d23152d35e8451d7d2d18fdac56 \ --hash=sha256:922cc5f0b98a5f2b1ff481f5551b95cd04580fd6f0c72d9b22e6c0145a4840e0 \
--hash=sha256:a81e3866f99382dfe8c15a151f1ca5fde5815fde879348fe5a9884a7c092a305 \ --hash=sha256:a5246d2e683a972e2187a8714b5c2cf8156c064629f9a9b1a873c1730d9e245a \
--hash=sha256:cb10d44e6694d763fa1078a26f7f6137d69f555a78ec85dc2ef716c37447e4b2 \ --hash=sha256:b9ac1b0d8ecc49e05e4e182694f418d27f3aedcfca854ebd6c05bb1cffa10d6d \
--hash=sha256:d3ca6421b942f60c008f81a3541e8faf6865a28d5a9b48544b0ee4f40cac7fca --hash=sha256:d3ef67e630b0de0779c42912fe2cbae3805ebaba30cda27fea2a3de650a9414f \
pyparsing==3.0.9 ; python_version >= "3.9" and python_full_version < "4.0.0" \ --hash=sha256:f5b6320dbc3cf6cfb9f25308286f9f7ab464e65cfb105b64cc9c52831748ced2 \
--hash=sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb \ --hash=sha256:fc04dd5189b90d825509caa510f20d1d504761e78b8dfb95a0ede180f71d50e5
--hash=sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc python-stdnum==1.18 ; python_version >= "3.9" and python_full_version < "4.0.0" \
python-stdnum==1.17 ; python_version >= "3.9" and python_full_version < "4.0.0" \ --hash=sha256:bcc763d9c49ae23da5d2b7a686d5fd1deec9d9051341160a10d1ac723a26bec0 \
--hash=sha256:374e2b5e13912ccdbf50b0b23fca2c3e0531174805c32d74e145f37756328340 \ --hash=sha256:d7f2a3c7ef4635c957b9cbdd9b1993d1f6ee3a2959f03e172c45440d99f296eb
--hash=sha256:a46e6cf9652807314d369b654b255c86a59f93d18be2834f3d567ed1a346c547 pyyaml==6.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
redis==4.3.4 ; python_version >= "3.9" and python_full_version < "4.0.0" \ --hash=sha256:01b45c0191e6d66c470b6cf1b9531a771a83c1c4208272ead47a3ae4f2f603bf \
--hash=sha256:a52d5694c9eb4292770084fa8c863f79367ca19884b329ab574d5cb2036b3e54 \ --hash=sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293 \
--hash=sha256:ddf27071df4adf3821c4f2ca59d67525c3a82e5f268bed97b813cb4fabf87880 --hash=sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b \
setuptools==65.4.1 ; python_version >= "3.9" and python_full_version < "4.0.0" \ --hash=sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57 \
--hash=sha256:1b6bdc6161661409c5f21508763dc63ab20a9ac2f8ba20029aaaa7fdb9118012 \ --hash=sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b \
--hash=sha256:3050e338e5871e70c72983072fe34f6032ae1cdeeeb67338199c2f74e083a80e --hash=sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4 \
--hash=sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07 \
--hash=sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba \
--hash=sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9 \
--hash=sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287 \
--hash=sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513 \
--hash=sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0 \
--hash=sha256:432557aa2c09802be39460360ddffd48156e30721f5e8d917f01d31694216782 \
--hash=sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0 \
--hash=sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92 \
--hash=sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f \
--hash=sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2 \
--hash=sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc \
--hash=sha256:81957921f441d50af23654aa6c5e5eaf9b06aba7f0a19c18a538dc7ef291c5a1 \
--hash=sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c \
--hash=sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86 \
--hash=sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4 \
--hash=sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c \
--hash=sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34 \
--hash=sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b \
--hash=sha256:afa17f5bc4d1b10afd4466fd3a44dc0e245382deca5b3c353d8b757f9e3ecb8d \
--hash=sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c \
--hash=sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb \
--hash=sha256:bfaef573a63ba8923503d27530362590ff4f576c626d86a9fed95822a8255fd7 \
--hash=sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737 \
--hash=sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3 \
--hash=sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d \
--hash=sha256:d4b0ba9512519522b118090257be113b9468d804b19d63c71dbcf4a48fa32358 \
--hash=sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53 \
--hash=sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78 \
--hash=sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803 \
--hash=sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a \
--hash=sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f \
--hash=sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174 \
--hash=sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5
redis==4.5.1 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:1eec3741cda408d3a5f84b78d089c8b8d895f21b3b050988351e925faf202864 \
--hash=sha256:5deb072d26e67d2be1712603bfb7947ec3431fb0eec9c578994052e33035af6d
setuptools==67.4.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:e5fd0a713141a4a105412233c63dc4e17ba0090c8e8334594ac790ec97792330 \
--hash=sha256:f106dee1b506dee5102cc3f3e9e68137bbad6d47b616be7991714b0c62204251
six==1.16.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \ six==1.16.0 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \
--hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254
sqlparse==0.4.3 ; python_version >= "3.9" 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:0323c0ec29cd52bceabc1b4d9d579e311f3e4961b98d174201d5622a23b85e34 \
--hash=sha256:69ca804846bb114d2ec380e4360a8a340db83f0ccf3afceeb1404df028f57268 --hash=sha256:69ca804846bb114d2ec380e4360a8a340db83f0ccf3afceeb1404df028f57268
tzdata==2022.4 ; python_version >= "3.9" and python_full_version < "4.0.0" and sys_platform == "win32" \ tzdata==2022.7 ; python_version >= "3.9" and python_full_version < "4.0.0" and sys_platform == "win32" \
--hash=sha256:74da81ecf2b3887c94e53fc1d466d4362aaf8b26fc87cda18f22004544694583 \ --hash=sha256:2b88858b0e3120792a3c0635c23daf36a7d7eeeca657c323da299d2094402a0d \
--hash=sha256:ada9133fbd561e6ec3d1674d3fba50251636e918aa97bd59d63735bef5a513bb --hash=sha256:fe5f866eddd8b96e9fcba978f8e503c909b19ea7efda11e52e39494bad3a7bfa
webencodings==0.5.1 ; python_version >= "3.9" and python_full_version < "4.0.0" \ webencodings==0.5.1 ; python_version >= "3.9" and python_full_version < "4.0.0" \
--hash=sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78 \ --hash=sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78 \
--hash=sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923 --hash=sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923
wrapt==1.14.1 ; python_version >= "3.9" 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

View file

@ -15,7 +15,7 @@ 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 django_yunohost_integration.secret_key import get_or_create_secret as __get_or_create_secret
# https://github.com/jedie/django-example/ # https://github.com/jedie/django-example
from django_example.settings.prod import * # noqa:F401,F403 isort:skip from django_example.settings.prod import * # noqa:F401,F403 isort:skip

View file

@ -1,4 +1,8 @@
[![pytest](https://github.com/YunoHost-Apps/django_example_ynh/actions/workflows/pytest.yml/badge.svg)](https://github.com/YunoHost-Apps/django_example_ynh/actions/workflows/pytest.yml) [![YunoHost apps package linter](https://github.com/YunoHost-Apps/django_example_ynh/actions/workflows/package_linter.yml/badge.svg)](https://github.com/YunoHost-Apps/django_example_ynh/actions/workflows/package_linter.yml) [![tests](https://github.com/YunoHost-Apps/django_example_ynh/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/YunoHost-Apps/django_example_ynh/actions/workflows/tests.yml)
[![codecov](https://codecov.io/github/jedie/django_example_ynh/branch/main/graph/badge.svg)](https://codecov.io/github/jedie/django_example_ynh)
[![django_example_ynh @ PyPi](https://img.shields.io/pypi/v/django_example_ynh?label=django_example_ynh%20%40%20PyPi)](https://pypi.org/project/django_example_ynh/)
[![Python Versions](https://img.shields.io/pypi/pyversions/django_example_ynh)](https://github.com/YunoHost-Apps/django_example_ynh/blob/main/pyproject.toml)
[![License GPL-3.0](https://img.shields.io/pypi/l/django_example_ynh)](https://github.com/YunoHost-Apps/django_example_ynh/blob/main/LICENSE)
Demo [YunoHost Application](https://install-app.yunohost.org/?app=django_example_ynh) to demonstrate the integration of a [Python](https://www.python.org/)/[Django](https://www.djangoproject.com/) project under YunoHost using [django_yunohost_integration](https://github.com/YunoHost-Apps/django_yunohost_integration). Demo [YunoHost Application](https://install-app.yunohost.org/?app=django_example_ynh) to demonstrate the integration of a [Python](https://www.python.org/)/[Django](https://www.djangoproject.com/) project under YunoHost using [django_yunohost_integration](https://github.com/YunoHost-Apps/django_yunohost_integration).

View file

@ -3,18 +3,18 @@
"id": "django_example_ynh", "id": "django_example_ynh",
"packaging_format": 1, "packaging_format": 1,
"description": { "description": {
"en": "App to demonstrate the integration of a Django project under YunoHost via https://github.com/YunoHost-Apps/django_yunohost_integration" "en": "Demo YunoHost Application to demonstrate the integration of a Django project under YunoHost."
}, },
"version": "0.5.0rc1~ynh1", "version": "0.2.0~ynh1",
"url": "https://github.com/YunoHost-Apps/django_example_ynh", "url": "https://github.com/YunoHost-Apps/django_example_ynh",
"upstream": { "upstream": {
"license": "GPL-3.0", "license": "GPL-3.0",
"website": "https://github.com/YunoHost-Apps/django_example_ynh", "website": "https://github.com/YunoHost-Apps/django_example_ynh",
"admindoc": "https://github.com/YunoHost-Apps/django_example_ynh", "admindoc": "https://github.com/YunoHost-Apps/django_example_ynh",
"userdoc": "https://github.com/YunoHost-Apps/django_example_ynh", "userdoc": "https://github.com/jedie/django-example",
"code": "https://github.com/YunoHost-Apps/django_example_ynh" "code": "https://github.com/YunoHost-Apps/django_example_ynh"
}, },
"license": "GPL-3.0", "license": "GPL-3.0-or-later",
"maintainer": { "maintainer": {
"name": "Jens Diemer", "name": "Jens Diemer",
"email": "django_example_ynh@jensdiemer.de" "email": "django_example_ynh@jensdiemer.de"
@ -36,8 +36,8 @@
{ {
"name": "path", "name": "path",
"type": "path", "type": "path",
"example": "/django_example_ynh", "example": "/django_example",
"default": "/django_example_ynh" "default": "/django_example"
}, },
{ {
"name": "admin", "name": "admin",

1830
poetry.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,37 +1,43 @@
[tool.poetry] [tool.poetry]
name = "django_example_ynh" name = "django_example_ynh"
version = "0.5.0rc1+ynh1" version = "0.2.0+ynh1"
description = "Demo YunoHost Application to demonstrate the integration of a Django project under YunoHost." description = "Demo YunoHost Application to demonstrate the integration of a Django project under YunoHost."
authors = ["JensDiemer <git@jensdiemer.de>"] authors = ["Jens Diemer <django_example_ynh@jensdiemer.de>"]
license = "GPL"
homepage = "https://github.com/YunoHost-Apps/django_example_ynh" homepage = "https://github.com/YunoHost-Apps/django_example_ynh"
license = "GPL-3.0-or-later"
readme = 'README.md'
[tool.poetry.urls] [tool.poetry.urls]
"Bug Tracker" = "https://github.com/YunoHost-Apps/django_example_ynh/issues" "Bug Tracker" = "https://github.com/YunoHost-Apps/django_example_ynh/issues"
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = ">=3.9,<4.0.0" # Stay with 3.9 until YunoHost used >=Debian 11 (Bullseye) python = ">=3.9,<4.0.0" # Stay with 3.9 until YunoHost used >=Debian 11 (Bullseye)
#
django-example = ">=0.1.0rc0" # https://github.com/jedie/django-example django_example = ">=0.1.0rc0" # https://github.com/jedie/django-example
#
# extras "ynh" will install: gunicorn, psycopg2, django-redis and django-axes # extras "ynh" will install: gunicorn, psycopg2, django-redis and django-axes
# see: https://github.com/YunoHost-Apps/django_yunohost_integration/blob/main/pyproject.toml # see: https://github.com/YunoHost-Apps/django_yunohost_integration/blob/main/pyproject.toml
django_yunohost_integration = {version = ">=0.5.0rc1", extras = ["ynh"]} # https://github.com/YunoHost-Apps/django_yunohost_integration django_yunohost_integration = {version = ">=0.5.1", extras = ["ynh"]} # https://github.com/YunoHost-Apps/django_yunohost_integration
[tool.poetry.dev-dependencies] [tool.poetry.dev-dependencies]
bx_py_utils = "*" # https://github.com/boxine/bx_py_utils bx_py_utils = "*" # https://github.com/boxine/bx_py_utils
bx_django_utils = "*" # https://github.com/boxine/bx_django_utils bx_django_utils = "*" # https://github.com/boxine/bx_django_utils
tox = "*" tox = ">=4.4.4" # https://github.com/tox-dev/tox
coverage= "*" # https://github.com/nedbat/coveragepy
darker = "*" # https://github.com/akaihola/darker
isort = "*" # https://github.com/pycqa/isort
flynt = "*" # https://github.com/ikamensh/flynt
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 = "*"
pytest-cov = "*" pytest-cov = "*"
pytest-django = "*" pytest-django = "*"
pytest-darker = "*" # https://github.com/akaihola/pytest-darker
coveralls = "*"
isort = "*"
flake8 = "*"
EditorConfig = "*" # https://github.com/editorconfig/editorconfig-core-py
safety = "*" # https://github.com/pyupio/safety
requests = "*" # https://github.com/psf/requests requests = "*" # https://github.com/psf/requests
packaging = "*" # https://github.com/pypa/packagi packaging = "*" # https://github.com/pypa/packagi
beautifulsoup4 = "*" # https://pypi.org/project/beautifulsoup4/ beautifulsoup4 = "*" # https://pypi.org/project/beautifulsoup4/
@ -45,13 +51,15 @@ build-backend = "poetry.core.masonry.api"
[tool.darker] [tool.darker]
src = ['.'] src = ['.']
revision = "origin/master..." revision = "origin/master..."
line_length = 100 line_length = 119
verbose = true verbose = true
color = true
skip_string_normalization = true skip_string_normalization = true
diff = false diff = false
check = false check = false
stdout = false stdout = false
isort = true isort = true
flynt = true
lint = [ lint = [
"flake8", "flake8",
] ]
@ -62,9 +70,9 @@ log_level = "INFO"
# https://pycqa.github.io/isort/docs/configuration/config_files/#pyprojecttoml-preferred-format # https://pycqa.github.io/isort/docs/configuration/config_files/#pyprojecttoml-preferred-format
atomic=true atomic=true
profile='black' profile='black'
skip_glob=["*/htmlcov/*","*/migrations/*","*/local_test/*"] skip_glob=[".*", "*/htmlcov/*","*/migrations/*","*/local_test/*"]
known_first_party=['django_yunohost_integration'] known_first_party=['django_example']
line_length=100 line_length=119
lines_after_imports=2 lines_after_imports=2
@ -88,7 +96,6 @@ addopts = """
--cov-report xml --cov-report xml
--no-cov-on-fail --no-cov-on-fail
--showlocals --showlocals
--darker
--doctest-modules --doctest-modules
--failed-first --failed-first
--new-first --new-first
@ -96,15 +103,19 @@ addopts = """
[tool.coverage.run] [tool.coverage.run]
omit = [".*"] source = ['.']
omit = ['.*', '*/tests/*']
[tool.coverage.report]
skip_empty = true
fail_under = 45
[tool.tox] [tool.tox] # https://tox.wiki/en/latest/config.html#pyproject-toml
# https://tox.readthedocs.io/en/latest/example/basic.html#pyproject-toml-tox-legacy-ini
legacy_tox_ini = """ legacy_tox_ini = """
[tox] [tox]
isolated_build = True isolated_build = True
envlist = py{39,310} envlist = py{311,310,39}
skip_missing_interpreters = True skip_missing_interpreters = True
[testenv] [testenv]
@ -113,3 +124,35 @@ whitelist_externals = make
commands = commands =
make pytest make pytest
""" """
[manageprojects] # https://github.com/jedie/manageprojects
initial_revision = "da47a1e"
initial_date = 2022-11-06T17:25:53+01:00
cookiecutter_template = "https://github.com/jedie/cookiecutter_templates/"
cookiecutter_directory = "yunohost_django_package"
applied_migrations = [
"4dbd146", # 2022-11-06T17:59:58+01:00
"baf1ebc", # 2022-11-30T21:19:10+01:00
"44aa620", # 2022-12-21T19:59:39+01:00
"b204761", # 2022-12-21T20:25:20+01:00
"5096b65", # 2022-12-30T14:43:05+01:00
"d970456", # 2023-02-20T16:19:35+01:00
]
[manageprojects.cookiecutter_context.cookiecutter]
project_name = "Django Example"
full_name = "Jens Diemer"
github_username = "jedie"
author_email = "django_example_ynh@jensdiemer.de"
upstream_pkg_name = "django_example"
upstream_url = "https://github.com/jedie/django-example"
ynh_app_pkg_name = "django_example_ynh"
ynh_app_url = "https://github.com/YunoHost-Apps/django_example_ynh"
bug_tracker_url = "https://github.com/jedie/django-example/issues"
upstream_version = "0.1.0rc0"
ynh_version = "1"
package_description = "Demo YunoHost Application to demonstrate the integration of a Django project under YunoHost."
license = "GPL-3.0-or-later"
_template = "https://github.com/jedie/cookiecutter_templates/"
_output_dir = "~/repos_ynh/django_example_ynh"

View file

@ -11,7 +11,6 @@ import sys
from pathlib import Path from pathlib import Path
import django import django
from django_yunohost_integration.local_test import create_local_test from django_yunohost_integration.local_test import create_local_test

View file

@ -1,11 +1,10 @@
from axes.models import AccessLog 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
from django.conf import settings from django.conf import LazySettings, settings
from django.contrib.auth.models import User from django.contrib.auth.models import User
from django.test import override_settings from django.test import override_settings
from django.test.testcases import TestCase from django.test.testcases import TestCase
from django.urls.base import reverse from django.urls.base import reverse
from django_yunohost_integration.test_utils import generate_basic_auth from django_yunohost_integration.test_utils import generate_basic_auth
@ -18,6 +17,9 @@ class DjangoYnhTestCase(HtmlAssertionMixin, TestCase):
self.client = self.client_class() self.client = self.client_class()
def test_settings(self): def test_settings(self):
assert isinstance(settings, LazySettings)
assert settings.configured is True
assert settings.PATH_URL == 'app_path' assert settings.PATH_URL == 'app_path'
assert str(settings.FINALPATH).endswith('/local_test/opt_yunohost') assert str(settings.FINALPATH).endswith('/local_test/opt_yunohost')

View file

@ -1,12 +1,10 @@
import os import os
from bx_django_utils.test_utils.html_assertion import ( from bx_django_utils.test_utils.html_assertion import HtmlAssertionMixin, assert_html_response_snapshot
HtmlAssertionMixin,
assert_html_response_snapshot,
)
from django.conf import settings from django.conf import settings
from django.test.testcases import TestCase from django.test.testcases import TestCase
from django.urls.base import reverse from django.urls.base import reverse
from django_example import __version__ from django_example import __version__
@ -28,7 +26,7 @@ class ExampleProjectTestCase(HtmlAssertionMixin, TestCase):
response, response,
parts=( parts=(
f'<h2>YunoHost Django Example Project v{__version__}</h2>', f'<h2>YunoHost Django Example Project v{__version__}</h2>',
'<p>Go to <a href="/app_path/admin/">Django Admin</a>.</p>', '<li><a href="/app_path/admin/">Django Admin</a></li>',
'<p>Log in to see more information</p>', '<p>Log in to see more information</p>',
'<tr><td>User:</td><td>AnonymousUser</td></tr>', '<tr><td>User:</td><td>AnonymousUser</td></tr>',
'<tr><td>META:</td><td></td></tr>', '<tr><td>META:</td><td></td></tr>',
@ -56,7 +54,7 @@ class ExampleProjectTestCase(HtmlAssertionMixin, TestCase):
response, response,
parts=( parts=(
f'<h2>YunoHost Django Example Project v{__version__}</h2>', f'<h2>YunoHost Django Example Project v{__version__}</h2>',
'<p>Go to <a href="/app_path/admin/">Django Admin</a>.</p>', '<li><a href="/app_path/admin/">Django Admin</a></li>',
'<tr><td>User:</td><td>test</td></tr>', '<tr><td>User:</td><td>test</td></tr>',
f'<tr><td>Process ID:</td><td>{os.getpid()}</td></tr>', f'<tr><td>Process ID:</td><td>{os.getpid()}</td></tr>',
), ),

View file

@ -20,15 +20,20 @@
<!-- Content --> <!-- Content -->
<div class="colM" id="content"> <div class="colM" id="content">
<h2> <h2>
YunoHost Django Example Project v0.1.0rc0 YunoHost Django Example Project v0.2.0
</h2> </h2>
<p> <ul>
Go to <li>
<a href="/app_path/admin/"> <a href="/app_path/admin/">
Django Admin Django Admin
</a> </a>
. </li>
</p> <li>
<a href="/app_path/login-required/">
Test Login Required View
</a>
</li>
</ul>
<p> <p>
Log in to see more information Log in to see more information
</p> </p>
@ -64,6 +69,14 @@
AnonymousUser AnonymousUser
</td> </td>
</tr> </tr>
<tr>
<td>
Remote Address:
</td>
<td>
127.0.0.1
</td>
</tr>
<tr> <tr>
<td> <td>
Process User: Process User:
@ -134,8 +147,8 @@
<!-- END Content --> <!-- END Content -->
<hr/> <hr/>
<p> <p>
<a href="https://github.com/jedie/django-example"> <a href="https://github.com/jedie/django_example">
github.com/jedie/django-example github.com/jedie/django_example
</a> </a>
</p> </p>
</div> </div>

View file

@ -8,10 +8,10 @@ import tomli
from bx_django_utils.filename import clean_filename from bx_django_utils.filename import clean_filename
from bx_py_utils.path import assert_is_dir, assert_is_file from bx_py_utils.path import assert_is_dir, assert_is_file
from django_tools.unittest_utils.project_setup import check_editor_config from django_tools.unittest_utils.project_setup import check_editor_config
import django_yunohost_integration
from django_yunohost_integration.test_utils import assert_project_version from django_yunohost_integration.test_utils import assert_project_version
from django_example import __version__
PACKAGE_ROOT = Path(__file__).parent.parent PACKAGE_ROOT = Path(__file__).parent.parent
@ -25,17 +25,19 @@ def assert_file_contains_string(file_path, string):
def test_version(): def test_version():
upstream_version = django_yunohost_integration.__version__ if 'GITHUB_ACTION' not in os.environ:
# Github has a rate-limiting... So don't fetch the API if we run as GitHub action
assert_project_version( assert_project_version(
current_version=upstream_version, current_version=__version__,
github_project_url='https://github.com/YunoHost-Apps/django_yunohost_integration', github_project_url='https://github.com/jedie/django-example',
) )
pyproject_toml_path = Path(PACKAGE_ROOT, 'pyproject.toml') pyproject_toml_path = Path(PACKAGE_ROOT, 'pyproject.toml')
pyproject_toml = tomli.loads(pyproject_toml_path.read_text(encoding='UTF-8')) pyproject_toml = tomli.loads(pyproject_toml_path.read_text(encoding='UTF-8'))
pyproject_version = pyproject_toml['tool']['poetry']['version'] 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" # pyproject.toml needs a PEP 440 conform version and used "+ynh"
# the YunoHost syntax is: "~ynh", just "convert this: # the YunoHost syntax is: "~ynh", just "convert this:
@ -108,3 +110,28 @@ def test_screenshot_filenames():
def test_check_editor_config(): def test_check_editor_config():
check_editor_config(package_root=PACKAGE_ROOT) 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}')