Path to Python/FastAPI
At some point, a porting of PHP aurweb to Python was proposed on the `aur-dev` mailing list. In May 2020 it was accepted as a milestone (reference: https://lists.archlinux.org/pipermail/aur-dev/2020-May/004848.html). The HTTP framework of choice in the conversation settled on [FastAPI](https://fastapi.tiangolo.com) along with the popular database management library, [SQLAlchemy](https://www.sqlalchemy.org) and [Alembic](https://alembic.sqlalchemy.org/en/latest) to manage its migrations.
This effort has been started and its beginnings now exist in the `pu` branch.
This issue should be updated with information that reflects the current state of the port whenever a commit is added which affects Python/FastAPI. Edits will be managed by project maintainers after merges or cherry-picks.
## State of Development
In this section, we will cover infrastructural changes, while tasks will have their own sections beneath this.
* `pytest` has been added to the project
* Docker runs a build and test + coverage report of aurweb
* Code coverage is now required to pass GitLab CI tests
* `FastAPI` has been added to the project
* `SQLAlchemy` has been added to the project
* With the addition of SQLAlchemy ORM
* `Alembic` has been added to the project
* Initial SSO migrations are now run on `aurweb.initdb`
* `hypercorn` has replaced `uvicorn` for a production ASGI server
* `hypercorn` supports HTTP/2, while `uvicorn` does not
## Route Porting Tasks
Any "completed" tasks which are not yet merged into `pu` should specify the branch that it lies in. All completed tasks with no specified branch is assumed to be merged into `pu`. Example of a completed, unmerged task: `[x] blah.php - kevr/aurweb branch: not_merged_branch`. On the other hand, an example of a completed, merged into `pu` task would simply be `[x] blah.php`.
- [x] 404.php
- [x] 503.php
- [x] account.php
- [x] addvote.php
- [x] comaintainers.php
- [x] commentedit.php
- [x] home.php
- [x] index.php
- [x] login.php
- [x] logout.php
- [x] packages.php
- [x] passreset.php
- [x] pkgbase.php
- [x] pkgdel.php
- [x] pkgdisown.php
- [x] pkgflagcomment.php
- [x] pkgflag.php
- [x] pkgmerge.php
- [x] pkgreq.php
- [x] register.php
- [ ] rpc.php - **in progress, but big task** - `[multi]info` done, `suggest-pkgbase` done
- [x] rss.php
- [x] modified-rss.php
- [x] tos.php
- [x] tu.php
- [x] voters.php
**NOTE:** Issues should be created for all of these route tasks. To start off with, we'll prioritize creating issues for the more dependent tasks on the road to have one for each of them (or grouped, if sensible).
issue