The reason behind this is to make checking and formatting consistent between
contributors and CI. It is also easier to incorporate new hooks, since many
tools already provides pre-commit hooks
In addition this commit also adds `black` and `autoflake` along with a few
other useful hooks from the `pre-commit-hooks` repository.
We've not been using this as it is and its now warning us
about strtobool deprecation changes. Removing it for now.
Signed-off-by: Kevin Morris <kevr@0cost.org>
Originally left at util/adduser.py, this script allows administrators
to simply add a user to the configured aurweb database.
See --help for options.
Signed-off-by: Kevin Morris <kevr@0cost.org>
After two months, this finally got merged by somebody else.
Still largely considering moving away from FastAPI in the
long run, but this is better than relying on kevr's fork
for starlette 0.17.1 compat.
Other packages have also been upgraded and locked to versions.
Signed-off-by: Kevin Morris <kevr@0cost.org>
Previous versions when encountered with an updated `importlib_metadata`
produce a deprecation warning. This update resolves that deprecation.
Signed-off-by: Kevin Morris <kevr@0cost.org>
This can be used to update config values for the entirety
of a config. When config values are set through this tool,
$AUR_CONFIG is overridden with a copy of the config file
with all sections and options found in $AUR_CONFIG
+ $AUR_CONFIG_DEFAULTS.
Signed-off-by: Kevin Morris <kevr@0cost.org>
Starlette 0.16.0 has a pretty bad bug in terms of logging which
has been fixed in the 0.17.0 release. That being said, FastAPI has
not yet merged a request at https://github.com/tiangolo/fastapi/pull/4145
which resolves this dependency resolution so we can use the updated
starlette package.
kevr has forked the pull request in question and we are using it
for now in our poetry dependencies to get ahead of the game.
When FastAPI upstream is updated to support 0.17.0, we'll need
to switch this back to using upstream's source.
Signed-off-by: Kevin Morris <kevr@0cost.org>
This is not used anymore in our FastAPI code, however, for
back-compatibility with pre-FastAPI scripts, we need it.
Signed-off-by: Kevin Morris <kevr@0cost.org>
There were some test failures caused by problematic
dependency versioning, most likely to to the seriously
braindead pyproject.toml config for deps that previously
existed.
This commit defines python version >=3.9<3.10 for our working
Python version and provides updated deps (to latest).
I believe the bug was originally caused by the fact that
we had no python dependency defined, allowing poetry to
resolve dependencies incorrectly for what we intended.
Signed-off-by: Kevin Morris <kevr@0cost.org>