This project is mirrored from https://gitlab.archlinux.org/archlinux/aurweb.git.
Pull mirroring updated .
- 04 Sep, 2021 3 commits
-
-
Kevin Morris authored
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>
-
Kevin Morris authored
This was already in the repository in ./COPYING This reverts commit 1b452d12.
-
Kevin Morris authored
This was missing from the project and really needs to be here. Closes #107 Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- 03 Sep, 2021 1 commit
-
-
Kevin Morris authored
For SQLAlchemy to automatically understand updates from the external world, it must use an `autocommit=True` in its session. This change breaks how we were using commit previously, as `autocommit=True` causes SQLAlchemy to commit when a SessionTransaction context hits __exit__. So, a refactoring was required of our tests: All usage of any `db.{create,delete}` must be called **within** a SessionTransaction context, created via new `db.begin()`. From this point forward, we're going to require: ``` with db.begin(): db.create(...) db.delete(...) db.session.delete(object) ``` With this, we now get external DB modifications automatically without reloading or restarting the FastAPI server, which we absolutely need for production. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- 01 Sep, 2021 1 commit
-
-
Kevin Morris authored
With FastAPI starting to come closer to a close, we've got to advertise this deprecation so that users have some time to adjust before making the changes. We have not specified a specific time here, but we'd like this message to reach users of the RPC API for at least a month before any modifications are made to the interface. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- 31 Aug, 2021 9 commits
-
-
Kevin Morris authored
The new `extend_query` and `urlencode` filters are way cleaner ways to achieve what we did with `dedupe_qs`. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
New jinja2 filters: * `extend_query` -> `aurweb.util.extend_query` * `urlencode` -> `aurweb.util.to_qs` Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
The first addition, extend_query, can be used to take an existing query parameter dictionary and inject an *additions as replacement key/value pairs. The second, to_qs, converts a query parameter dictionary to a query string in the form "a=b&c=d". These two functions simplify and make dedupe_qs and quote_plus more efficient in terms of constructing custom query string overrides. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
urlencode does more than just a quote_plus. Using urlencode was not sensible, so this commit addresses that. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
These are module local globals and we don't want to expose global functionality to users, so privatize them with a leading `_` prefix. These things should **really** not be accessible by users.
-
Kevin Morris authored
This was missed during the original implementation merge. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
The possibly plural version of `tr`, `tn` provides a way to translate strings into singular or plural form based on a given integer being 1 or not 1. Example use: ``` {{ 1 | tn("%d package found.", "%d packages found.") | format(1) }} ``` Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- 29 Aug, 2021 7 commits
-
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Hunter Wittenborn authored
-
Hunter Wittenborn authored
-
Hunter Wittenborn authored
Folder will be used under virtualenv for pip dependencies
-
Hunter Wittenborn authored
-
Hunter Wittenborn authored
-
Hunter Wittenborn authored
Changed 'Generic' to 'General'
-
- 28 Aug, 2021 1 commit
-
-
Hunter Wittenborn authored
Adds Python dependencies to requirements list to allow installation via pip
-
- 26 Aug, 2021 1 commit
-
-
Kevin Morris authored
Clearly made in mistake, removing to keep things organized. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- 25 Aug, 2021 2 commits
-
-
Kevin Morris authored
Some columns should only be shown when a user is authenticated. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- 18 Aug, 2021 11 commits
-
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Added: - User.voted_for(package) - Has a user voted for a particular package? - User.notified(package) - Is a user being notified about a particular package? - User.packages() - Entire collection of Package objects related to User. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Just like some of the other tables, we have some constant records that we use to denote types of things. This commit adds constants which correlate with these record constants. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
A helper function which provides a textual string conversion of a particular Status column. In a PackageRequest, Status is split up into four different types: - PENDING : "Pending", PENDING_ID: 0 - CLOSED : "Closed", CLOSED_ID: 1 - ACCEPTED : "Accepted", ACCEPTED_ID: 2 - REJECTED : "Rejected", REJECTED_ID: 3 This commit adds constants for the textual strings and the IDs. It also adds a PackageRequest.status_display() function which grabs the proper display string for a particular Status ID. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Anything where we can have more than one of something, scalar() cannot be used. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
This puts one more toward completion of the homepage overall; we'll need to still implement the authenticated user dashboard after this. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
python-orjson speeds up a lot of JSON serialization steps, so we choose to use it over the standard library json module. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
This includes the addition of the python-fakeredis package, used for stubbing python-redis when a user does not have a configured cache. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
Now, the fastapi docker-compose service uses the new redis service for a cache option. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- 17 Aug, 2021 2 commits
-
-
Kevin Morris authored
Additionally, setup memcached for php-fpm. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
Kevin Morris authored
These weren't needed at all and provided false negatives in general. Removed them to let Docker deal with them. Additionally. 'exit 0' -> 'echo' for ca's command; 'exit 0' happens to depend on the shell running Docker (it seems). echo is quite a bit more agnostic. Moreso, added mariadb deps to php-fpm and fastapi. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- 10 Aug, 2021 1 commit
-
-
Kevin Morris authored
Signed-off-by:
Kevin Morris <kevr@0cost.org>
-
- 09 Aug, 2021 1 commit
-
-
Kevin Morris authored
This is needed to be able to reach the mysql service from other hosts or through localhost. Handling both cases here means that we can support both localhost access and host access. Signed-off-by:
Kevin Morris <kevr@0cost.org>
-