Merge pull request #5 from YunoHost-Apps/testing

Testing
This commit is contained in:
Jens Diemer 2022-04-05 08:18:06 +02:00 committed by GitHub
commit da82b95af5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 45 additions and 42 deletions

View file

@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Web based FritzBox management using Python/Django.
**Shipped version:** 0.0.2.rc1~ynh1
**Shipped version:** 0.0.2~ynh1

View file

@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
**Version incluse :** 0.0.2.rc1~ynh1
**Version incluse :** 0.0.2~ynh1

View file

@ -40,9 +40,9 @@ django-axes==5.31.0; python_version >= "3.7" and python_full_version < "4.0.0" \
django-debug-toolbar==3.2.4; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:644bbd5c428d3283aa9115722471769cac1bec189edf3a0c855fd8ff870375a9 \
--hash=sha256:6b633b6cfee24f232d73569870f19aa86c819d750e7f3e833f2344a9eb4b4409
django-fritzconnection==0.0.2rc1; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:d996ec1d65c4b2f43b90b5f346964be5e885cf36721cc0f42a7952aad824c950 \
--hash=sha256:3c08cdd2d2d92ca08c9d10d4d1cc1df91aa1f5c83488b8fba6e6847f26800976
django-fritzconnection==0.0.2; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:665614f4c628a4430d41b72f6eb9bfaf88e37d401619a70ff7ed3eb46072e755 \
--hash=sha256:13e5a8222b2261a1ff342541556741d7b037f1a183c0d69016db1f3664971023
django-ipware==4.0.2; python_version >= "3.7" and python_full_version < "3.0.0" or python_version >= "3.7" and python_full_version < "4.0.0" and python_full_version >= "3.6.0" \
--hash=sha256:602a58325a4808bd19197fef2676a0b2da2df40d0ecf21be414b2ff48c72ad05 \
--hash=sha256:878dbb06a87e25550798e9ef3204ed70a200dd8b15e47dcef848cf08244f04c9
@ -108,9 +108,9 @@ python-stdnum==1.17; python_version >= "3.7" and python_full_version < "4.0.0" \
pytz==2022.1; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:e68985985296d9a66a881eb3193b0906246245294a881e7c8afe623866ac6a5c \
--hash=sha256:1e760e2fe6a8163bc0b3d9a19c4f84342afa0a2affebfaa84b01b978a02ecaa7
redis==4.2.1; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:69d05fac17bf3f43937afbb775c536eb516bd21355a4f17d59a966f4a531ce71 \
--hash=sha256:fe45513881229dbee610620b9e0817b1f48c47ba635870320fd44a712204bbdd
redis==4.2.2; python_version >= "3.7" and python_full_version < "4.0.0" \
--hash=sha256:4e95f4ec5f49e636efcf20061a5a9110c20852f607cfca6865c07aaa8a739ee2 \
--hash=sha256:0107dc8e98a4f1d1d4aa00100e044287f77121a1e6d2085545c4b7fa94a7a27f
requests==2.27.1; python_version >= "3.7" and python_full_version < "3.0.0" or python_version >= "3.7" and python_full_version < "4.0.0" and python_full_version >= "3.6.0" \
--hash=sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d \
--hash=sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61
@ -194,6 +194,6 @@ wrapt==1.14.0; python_version >= "3.7" and python_full_version < "3.0.0" or pyth
--hash=sha256:2eca15d6b947cfff51ed76b2d60fd172c6ecd418ddab1c5126032d27f74bc350 \
--hash=sha256:bb36fbb48b22985d13a6b496ea5fb9bb2a076fea943831643836c9f6febbcfdc \
--hash=sha256:8323a43bd9c91f62bb7d4be74cc9ff10090e7ef820e27bfe8815c57e68261311
zipp==3.7.0; python_version >= "3.7" and python_full_version < "4.0.0" and python_version < "3.8" \
--hash=sha256:b47250dd24f92b7dd6a0a8fc5244da14608f3ca90a5efcd37a3b1642fac9a375 \
--hash=sha256:9f50f446828eb9d45b267433fd3e9da8d801f614129124863f9c51ebceafb87d
zipp==3.8.0; python_version >= "3.7" and python_full_version < "4.0.0" and python_version < "3.8" \
--hash=sha256:c4f6e5bbf48e74f7a38e7cc5b0480ff42b0ae5178957d564d18932525d5cf099 \
--hash=sha256:56bf8aadb83c24db6c4b577e13de374ccfb67da2078beba1d037c17980bf43ad

View file

@ -5,7 +5,7 @@
"description": {
"en": "Web based FritzBox management using Python/Django."
},
"version": "0.0.2.rc1~ynh1",
"version": "0.0.2~ynh1",
"url": "https://github.com/jedie/django-fritzconnection",
"upstream": {
"license": "GPL-3.0",

24
poetry.lock generated
View file

@ -295,7 +295,7 @@ sqlparse = ">=0.2.0"
[[package]]
name = "django-fritzconnection"
version = "0.0.2rc1"
version = "0.0.2"
description = "Web based FritzBox management using Python/Django."
category = "main"
optional = false
@ -770,7 +770,7 @@ tokenize-rt = ">=3.2.0"
[[package]]
name = "redis"
version = "4.2.1"
version = "4.2.2"
description = "Python client for Redis database and key-value store"
category = "main"
optional = false
@ -934,20 +934,20 @@ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7"
[[package]]
name = "zipp"
version = "3.7.0"
version = "3.8.0"
description = "Backport of pathlib-compatible object wrapper for zip files"
category = "main"
optional = false
python-versions = ">=3.7"
[package.extras]
docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"]
testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"]
docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"]
testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"]
[metadata]
lock-version = "1.1"
python-versions = ">=3.7,<4.0.0"
content-hash = "8f3f43b394d701d10e15f02cea8b141f719e80b65bc2340332685c92512bb8be"
content-hash = "4c39c72fdad761c8491a5f92d4f347d4fa3102a6b776f32769b93ba85d093b83"
[metadata.files]
asgiref = [
@ -1107,8 +1107,8 @@ django-debug-toolbar = [
{file = "django_debug_toolbar-3.2.4-py3-none-any.whl", hash = "sha256:6b633b6cfee24f232d73569870f19aa86c819d750e7f3e833f2344a9eb4b4409"},
]
django-fritzconnection = [
{file = "django-fritzconnection-0.0.2rc1.tar.gz", hash = "sha256:d996ec1d65c4b2f43b90b5f346964be5e885cf36721cc0f42a7952aad824c950"},
{file = "django_fritzconnection-0.0.2rc1-py3-none-any.whl", hash = "sha256:3c08cdd2d2d92ca08c9d10d4d1cc1df91aa1f5c83488b8fba6e6847f26800976"},
{file = "django-fritzconnection-0.0.2.tar.gz", hash = "sha256:665614f4c628a4430d41b72f6eb9bfaf88e37d401619a70ff7ed3eb46072e755"},
{file = "django_fritzconnection-0.0.2-py3-none-any.whl", hash = "sha256:13e5a8222b2261a1ff342541556741d7b037f1a183c0d69016db1f3664971023"},
]
django-ipware = [
{file = "django-ipware-4.0.2.tar.gz", hash = "sha256:602a58325a4808bd19197fef2676a0b2da2df40d0ecf21be414b2ff48c72ad05"},
@ -1274,8 +1274,8 @@ pyupgrade = [
{file = "pyupgrade-2.31.1.tar.gz", hash = "sha256:22e0ad6dd39c4381805cb059f1e691b6315c62c0ebcec98a5f29d22cd186a72a"},
]
redis = [
{file = "redis-4.2.1-py3-none-any.whl", hash = "sha256:69d05fac17bf3f43937afbb775c536eb516bd21355a4f17d59a966f4a531ce71"},
{file = "redis-4.2.1.tar.gz", hash = "sha256:fe45513881229dbee610620b9e0817b1f48c47ba635870320fd44a712204bbdd"},
{file = "redis-4.2.2-py3-none-any.whl", hash = "sha256:4e95f4ec5f49e636efcf20061a5a9110c20852f607cfca6865c07aaa8a739ee2"},
{file = "redis-4.2.2.tar.gz", hash = "sha256:0107dc8e98a4f1d1d4aa00100e044287f77121a1e6d2085545c4b7fa94a7a27f"},
]
requests = [
{file = "requests-2.27.1-py2.py3-none-any.whl", hash = "sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d"},
@ -1414,6 +1414,6 @@ wrapt = [
{file = "wrapt-1.14.0.tar.gz", hash = "sha256:8323a43bd9c91f62bb7d4be74cc9ff10090e7ef820e27bfe8815c57e68261311"},
]
zipp = [
{file = "zipp-3.7.0-py3-none-any.whl", hash = "sha256:b47250dd24f92b7dd6a0a8fc5244da14608f3ca90a5efcd37a3b1642fac9a375"},
{file = "zipp-3.7.0.tar.gz", hash = "sha256:9f50f446828eb9d45b267433fd3e9da8d801f614129124863f9c51ebceafb87d"},
{file = "zipp-3.8.0-py3-none-any.whl", hash = "sha256:c4f6e5bbf48e74f7a38e7cc5b0480ff42b0ae5178957d564d18932525d5cf099"},
{file = "zipp-3.8.0.tar.gz", hash = "sha256:56bf8aadb83c24db6c4b577e13de374ccfb67da2078beba1d037c17980bf43ad"},
]

View file

@ -1,6 +1,6 @@
[tool.poetry]
name = "django-fritzconnection_ynh"
version = "0.0.2.rc1~ynh1"
version = "0.0.2~ynh1"
description = "Test django-fritzconnection_ynh via local_test.py"
authors = ["JensDiemer <git@jensdiemer.de>"]
license = "GPL"
@ -8,7 +8,7 @@ license = "GPL"
[tool.poetry.dependencies]
# Keep Python 3.7 until Yunohost contains a newer Python Version ;)
python = ">=3.7,<4.0.0"
django-fritzconnection = ">=0.0.2rc1"
django-fritzconnection = ">=0.0.2"
# Note: "ynh" extras will install gunicorn, psycopg2, django-redis and django-axes
django_yunohost_integration = {version = ">=v0.2.0", extras = ["ynh"]}

View file

@ -21,7 +21,11 @@ domain=$(ynh_app_setting_get --app="$app" --key=domain)
path_url=$(ynh_app_setting_get --app="$app" --key=path)
port=$(ynh_app_setting_get --app="$app" --key=port)
db_pwd=$(ynh_app_setting_get --app="$app" --key=psqlpwd)
db_name=$(ynh_sanitize_dbid --db_name="$app")
db_user=$db_name
admin_mail=$(ynh_user_get_info "$admin" mail)
redis_db=$(ynh_app_setting_get --app="$app" --key=redis_db)
@ -118,8 +122,9 @@ ynh_replace_string --match_string="__LOG_FILE__" --replace_string="$log_file" --
ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$gunicorn_conf"
ynh_store_file_checksum --file="$gunicorn_conf"
ynh_backup_if_checksum_is_different --file="$final_path/manage.py"
cp ../conf/manage.py "$final_path/manage.py"
ynh_replace_string --match_string="__FINAL_HOME_PATH__" --replace_string="$final_path" --target_file="$final_path/manage.py"
ynh_store_file_checksum --file="$final_path/manage.py"
chmod +x "$final_path/manage.py"
# save old settings file
@ -129,6 +134,8 @@ ynh_backup_if_checksum_is_different --file="$settings"
cp "../conf/settings.py" "$settings"
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$settings"
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$settings"
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$settings"
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$settings"
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$settings"
ynh_replace_string --match_string="__ADMINMAIL__" --replace_string="$admin_mail" --target_file="$settings"
@ -159,25 +166,21 @@ touch "$final_path/local_settings.py"
#=================================================
ynh_script_progression --message="migrate/collectstatic/createadmin..." --weight=10
(
set +o nounset
source "${final_path}/venv/bin/activate"
set -o nounset
cd "${final_path}"
cd "$final_path" || exit
# Just for debugging:
./manage.py diffsettings
# Just for debugging:
./manage.py diffsettings
./manage.py migrate --no-input
./manage.py collectstatic --no-input
./manage.py migrate --no-input
./manage.py collectstatic --no-input
# Create/update Django superuser (set unusable password, because auth done via SSOwat):
./manage.py create_superuser --username="$admin" --email="$admin_mail"
# Create/update Django superuser (set unusable password, because auth done via SSOwat):
./manage.py create_superuser --username="$admin" --email="$admin_mail"
# Check the configuration
# This may fail in some cases with errors, etc., but the app works and the user can fix issues later.
./manage.py check --deploy || true
# Check the configuration
# This may fail in some cases with errors, etc., but the app works and the user can fix issues later.
./manage.py check --deploy || true
)
#=================================================
# SETUP LOGROTATE