From e5a09027e5b92e539ed4f992c60cee678074bc32 Mon Sep 17 00:00:00 2001 From: Ariel Rin Date: Sat, 7 Oct 2023 21:53:03 +1000 Subject: [PATCH 1/4] Remove outdated supervisor configs - refer to docs --- thirdparty/Supervisor/auth-mumble.conf | 13 ------------ thirdparty/Supervisor/auth.conf | 28 -------------------------- 2 files changed, 41 deletions(-) delete mode 100644 thirdparty/Supervisor/auth-mumble.conf delete mode 100644 thirdparty/Supervisor/auth.conf diff --git a/thirdparty/Supervisor/auth-mumble.conf b/thirdparty/Supervisor/auth-mumble.conf deleted file mode 100644 index 8389e377..00000000 --- a/thirdparty/Supervisor/auth-mumble.conf +++ /dev/null @@ -1,13 +0,0 @@ -[program:auth-mumble] -command=python authenticator.py -directory=/home/allianceserver/allianceauth/thirdparty/Mumble -user=allianceserver -numprocs=1 -stdout_logfile=/home/allianceserver/allianceauth/log/authenticator.log -stderr_logfile=/home/allianceserver/allianceauth/log/authenticator.log -autostart=true -autorestart=true -startsecs=10 -stopwaitsecs = 600 -killasgroup=true -priority=500 diff --git a/thirdparty/Supervisor/auth.conf b/thirdparty/Supervisor/auth.conf deleted file mode 100644 index 8124d559..00000000 --- a/thirdparty/Supervisor/auth.conf +++ /dev/null @@ -1,28 +0,0 @@ -[program:celerybeat] -command=celery -A alliance_auth beat -directory=/home/allianceserver/allianceauth -user=allianceserver -stdout_logfile=/home/allianceserver/allianceauth/log/beat.log -stderr_logfile=/home/allianceserver/allianceauth/log/beat.log -autostart=true -autorestart=true -startsecs=10 -priority=998 - -[program:celeryd] -command=celery -A alliance_auth worker -directory=/home/allianceserver/allianceauth -user=allianceserver -numprocs=1 -stdout_logfile=/home/allianceserver/allianceauth/log/worker.log -stderr_logfile=/home/allianceserver/allianceauth/log/worker.log -autostart=true -autorestart=true -startsecs=10 -stopwaitsecs = 600 -killasgroup=true -priority=998 - -[group:auth] -programs=celerybeat,celeryd -priority=999 From 77a08cd218d539c695cc2a04077976ca6daf1a84 Mon Sep 17 00:00:00 2001 From: Ariel Rin Date: Sat, 7 Oct 2023 22:32:19 +1000 Subject: [PATCH 2/4] Add code-style docs --- docs/development/aa_core/code-style | 49 +++++++++++++++++++++++++++++ docs/development/aa_core/index.md | 1 + 2 files changed, 50 insertions(+) create mode 100644 docs/development/aa_core/code-style diff --git a/docs/development/aa_core/code-style b/docs/development/aa_core/code-style new file mode 100644 index 00000000..4f9d5b60 --- /dev/null +++ b/docs/development/aa_core/code-style @@ -0,0 +1,49 @@ +# Code Style + +## Pre-Commit + +Alliance Auth is a team effort with developers of various skill levels and background. To avoid significant drift or formatting changes between developers we use [pre-commit](https://pre-commit.com/) to apply a very minimal set of formatting checks to code contributed to the project. + +Pre-commit is also very popular with our Community Apps and may be significantly more opinionated or looser depending on the project. + +To get started, `pip install pre-commit`, then `pre-commit install` to add the git hooks. + +Before any code is "git push"-ed, pre-commit will check it for uniformity and correct it if possible + +```bash +check python ast.....................................(no files to check)Skipped +check yaml...........................................(no files to check)Skipped +check json...........................................(no files to check)Skipped +check toml...........................................(no files to check)Skipped +check xml............................................(no files to check)Skipped +check for merge conflicts............................(no files to check)Skipped +check for added large files..........................(no files to check)Skipped +detect private key...................................(no files to check)Skipped +check for case conflicts.............................(no files to check)Skipped +debug statements (python)............................(no files to check)Skipped +fix python encoding pragma...........................(no files to check)Skipped +fix utf-8 byte order marker..........................(no files to check)Skipped +mixed line ending....................................(no files to check)Skipped +trim trailing whitespace.............................(no files to check)Skipped +check that executables have shebangs.................(no files to check)Skipped +fix end of files.....................................(no files to check)Skipped +Check .editorconfig rules............................(no files to check)Skipped +django-upgrade.......................................(no files to check)Skipped +pyupgrade............................................(no files to check)Skipped +``` + +## Editorconfig + +[Editorconfig](https://editorconfig.org/) is supported my most IDE's to streamline the most common editor disparities. While checked by our pre-commit file, using this in your IDE (Either automatically or via a plugin) will minimize the corrections that may need to be made. + +## Doc Strings + +We prefer either [PEP-287](https://peps.python.org/pep-0287/)/[reStructuredText](https://docutils.sourceforge.io/rst.html) or [Google](https://google.github.io/styleguide/pyguide.html#381-docstrings) Docstrings. + +These can be used to automatically generate our Sphinx documentation in either format. + +## Best Practice + +It is advisable to avoid wide formatting changes on code that is not being modified by an MR. Further to this, automated code formatting should be kept to a minimal when modifying sections of existing files. + +If you are contributing whole modules or rewriting large sections of code you may use any legible code formatting valid under Python. diff --git a/docs/development/aa_core/index.md b/docs/development/aa_core/index.md index b9ccbc0e..836a5a15 100644 --- a/docs/development/aa_core/index.md +++ b/docs/development/aa_core/index.md @@ -7,4 +7,5 @@ This section contains important information on how to develop Alliance Auth itse :maxdepth: 1 documentation + code-style ``` From 563e2210ef85dd07b34fc0d67f9418de145ce3f8 Mon Sep 17 00:00:00 2001 From: Ariel Rin Date: Thu, 19 Oct 2023 13:11:35 +1000 Subject: [PATCH 3/4] Bump Django-ESI to >=5.0.0 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index db5b176f..18318565 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ dependencies = [ "celery>=5.2.0,<6", "django-bootstrap-form", "django-celery-beat>=2.3.0", - "django-esi>=4.0.1", + "django-esi>=5.0.0", "django-redis>=5.2.0", "django-registration>=3.3,<3.4", "django-sortedm2m", From 424246df2629a28509e97f8e87dbf7cc43ab4963 Mon Sep 17 00:00:00 2001 From: Ariel Rin Date: Thu, 19 Oct 2023 14:00:29 +1000 Subject: [PATCH 4/4] Version Bump 3.7.1 --- allianceauth/__init__.py | 2 +- docker/.env.example | 2 +- docker/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/allianceauth/__init__.py b/allianceauth/__init__.py index b403718e..d4748f2c 100644 --- a/allianceauth/__init__.py +++ b/allianceauth/__init__.py @@ -5,7 +5,7 @@ manage online service access. # This will make sure the app is always imported when # Django starts so that shared_task will use this app. -__version__ = '3.7.0' +__version__ = '3.7.1' __title__ = 'Alliance Auth' __url__ = 'https://gitlab.com/allianceauth/allianceauth' NAME = f'{__title__} v{__version__}' diff --git a/docker/.env.example b/docker/.env.example index 531f0431..9a761a2b 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -1,7 +1,7 @@ PROTOCOL=https:// AUTH_SUBDOMAIN=%AUTH_SUBDOMAIN% DOMAIN=%DOMAIN% -AA_DOCKER_TAG=registry.gitlab.com/allianceauth/allianceauth/auth:v3.7.0 +AA_DOCKER_TAG=registry.gitlab.com/allianceauth/allianceauth/auth:v3.7.1 # Nginx Proxy Manager PROXY_HTTP_PORT=80 diff --git a/docker/Dockerfile b/docker/Dockerfile index fe24577d..1b8e213b 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,5 +1,5 @@ FROM python:3.9-slim -ARG AUTH_VERSION=v3.7.0 +ARG AUTH_VERSION=v3.7.1 ARG AUTH_PACKAGE=allianceauth==${AUTH_VERSION} ENV VIRTUAL_ENV=/opt/venv ENV AUTH_USER=allianceauth