mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 12:30:15 +02:00
Merge branch 'master' of gitlab.com:allianceauth/allianceauth into v4.x
This commit is contained in:
commit
98fd1dcc4c
49
docs/development/aa_core/code-style
Normal file
49
docs/development/aa_core/code-style
Normal file
@ -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.
|
@ -7,4 +7,5 @@ This section contains important information on how to develop Alliance Auth itse
|
||||
:maxdepth: 1
|
||||
|
||||
documentation
|
||||
code-style
|
||||
```
|
||||
|
@ -38,7 +38,7 @@ dependencies = [
|
||||
'django-bootstrap5>=23.3',
|
||||
"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",
|
||||
|
13
thirdparty/Supervisor/auth-mumble.conf
vendored
13
thirdparty/Supervisor/auth-mumble.conf
vendored
@ -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
|
28
thirdparty/Supervisor/auth.conf
vendored
28
thirdparty/Supervisor/auth.conf
vendored
@ -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
|
Loading…
x
Reference in New Issue
Block a user