Commit graph

122 commits

Author SHA1 Message Date
Kevin Morris
2f8e2288ad
poetry: bump version to 6.0.5
... I need to stop missing this. We need to centralize version
setting into a single file and source it.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-02-04 16:18:44 -08:00
Kevin Morris
c39a648bf2
pyproject.toml: set version to current (v6.0.4)
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-02-03 19:24:57 -08:00
Kevin Morris
16bdbee520
poetry: lock email-validator to 1.1.3, update the rest
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-02-03 17:12:30 -08:00
Kevin Morris
d94e2dc9d7
feat(poetry): add srcinfo
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-16 18:16:42 -08:00
Kevin Morris
e6679e4c4e
change(poetry): update fastapi to 0.71.0 release
Signed-off-by: Kevin Morris <kevr@0cost.org>
2022-01-08 13:54:54 -08:00
Kevin Morris
6f6f067597
feat: add aurweb-adduser console script
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>
2022-01-08 13:40:38 -08:00
Kevin Morris
bf371c447f
change(poetry): move fastapi to tiangolo/fastapi@2b10ca1
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>
2022-01-07 02:20:38 -08:00
Kevin Morris
cab86035e9
feat(poetry): add pyalpm dependency & update some others
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-31 18:26:38 -08:00
Kevin Morris
0c07c14860
change(poetry): update Markdown to 3.3.6
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>
2021-12-19 15:54:31 -08:00
Kevin Morris
95a215ec58
change(poetry): dep on python >= 3.9 < 3.11
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-13 14:16:02 -08:00
Kevin Morris
155aa47a1a
feat(poetry): add posix_ipc
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-28 19:55:11 -08:00
Kevin Morris
759f18ea75
feat: add aurweb-config console script
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>
2021-11-27 16:44:56 -08:00
Kevin Morris
40b21203ed
feat(poetry): add filelock
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-17 01:34:58 -08:00
Kevin Morris
cea9104efb
feat(poetry): add pytest-xdist
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-17 01:34:58 -08:00
Kevin Morris
b0b05df193
fix(fastapi): pin markdown to 3.3.4
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-16 21:11:35 -08:00
Kevin Morris
3517862ecd
change(poetry): use kevr@upgrade-starlette-0.17.0 as fastapi source
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>
2021-11-08 18:46:21 -08:00
Kevin Morris
cc45290ec2
feat(poetry): add prometheus-fastapi-instrumentator
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-01 11:41:38 -07:00
Kevin Morris
a82879210c
fix(poetry): add mysql-connector dep
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>
2021-10-31 19:56:56 -07:00
Kevin Morris
d4210c53cf
fix: update poetry dependencies
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>
2021-10-22 17:39:59 -07:00
Kevin Morris
927f5e8567
feat(docker): add gunicorn support & production default
Supply FASTAPI_BACKEND=gunicorn and FASTAPI_WORKERS=<threads_num> to
docker-compose up to use the gunicorn backend.

This is defaulted in production to gunicorn, but FASTAPI_WORKERS
should definitely be configured by any production deployment.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-10-16 22:53:46 -07:00
Kevin Morris
b59601a8b7
feat(poetry): add paginate==0.5.6
With upstream at https://github.com/Pylons/paginate, this module
helps us deal with pagination without reinventing the wheel.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-09-19 12:44:16 -07:00
Kevin Morris
2f9994807b
use Poetry to deal with deps and package install
As the new-age Python package manager, Poetry brings a lot
of good additions to the table. It allows us to more easily
deal with virtualenvs for the project and resolve dependencies.

As of this commit, `requirements.txt` is replaced by Poetry,
configured at `pyproject.toml`.

In Docker and GitLab, we currently use Poetry in a root fashion.
We should work toward purely using virtualenvs in Docker, but,
for now we'd like to move forward with other things. The project
can still be installed to a virtualenv and used on a user's system
through Poetry; it is just not yet doing so in Docker.

Modifications:

* docker/scripts/install-deps.sh
    * Remove python dependencies.
* conf/config.defaults
    * Script paths have been updated to use '/usr/bin'.
* docker/git-entrypoint.sh
    * Use '/usr/bin/aurweb-git-auth' instead of
      '/usr/local/bin/aurweb-git-auth'.

Additions:

* docker/scripts/install-python-deps.sh
    * A script used purely to install Python dependencies with Poetry.
      This has to be used within the aurweb project directory and
      requires system-wide dependencies are installed beforehand.
    * Also upgrades system-wide pip.

Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-09-04 15:46:40 -07:00