- Python 99.8%
- Mako 0.2%
|
All checks were successful
CI / build_and_test (push) Successful in 2m9s
Introduce AGENTS.md to provide project context, coding constraints, development workflows, and anti-patterns for AI coding agents. Add docs/fastapi-migration.md capturing the 4-phase architectural migration plan from Flask to FastAPI (Epic #264), including the ADR summary and dependency flowchart. Assisted-by: Gemini 3.8 Flash Signed-off-by: Sheikh Limon <sheikhlimondev@gmail.com> |
||
|---|---|---|
| .forgejo/workflows | ||
| .s2i | ||
| alembic | ||
| conf | ||
| docs | ||
| oraculum | ||
| tests | ||
| .dockerignore | ||
| .git-blame-ignore-revs | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| AGENTS.md | ||
| alembic.ini | ||
| CONTRIBUTING.md | ||
| gunicorn.cfg | ||
| LICENSE | ||
| Makefile | ||
| pyproject.toml | ||
| README.md | ||
| requirements.txt | ||
| run_cli.py | ||
| uv.lock | ||
Oraculum
Data parser for Fedora Packager Dashboard.
Handles caching and querying resources from multiple services like Bodhi, Pagure (dist-git) and many more.
Requirements
- Python 3.12+
uv- Redis (for Celery)
Installation
Clone this repo, change to its directory, install dependencies:
git clone https://forge.fedoraproject.org/apps/oraculum.git && cd oraculum
sudo dnf install redis # or: sudo apt install redis-server
uv sync
Running Locally
-
Start the Development Server: In your terminal, start the development server (applies database migrations, starts Redis, Celery workers, and Flask):
uv run oraculum dev -
Populate Initial Cache (First Run Only): On a fresh setup, open a second terminal window and run an immediate initial sync:
uv run oraculum cache-recreate
Note
cache-recreateis only required on your initial setup or after resetting your local database. For routine daily development, runninguv run oraculum devis sufficient as background Celery workers automatically refresh the cache.
Dependency Management
This project uses uv for local dependency management, while generating a standard requirements.txt specifically for the OpenShift S2I production build.
To add, remove, or upgrade a dependency:
- Update
pyproject.toml(or useuv add <package>). - Run
uv syncto resolve dependencies, updateuv.lock, and sync your local.venv. - Run
make prod-buildto export the strictly pinnedrequirements.txt.
Important: You must commit both uv.lock and requirements.txt when making dependency changes. This guarantees that local development and the OpenShift production environment both receive the exact same reproducible builds.
Code Quality & Testing
- Format code:
uv run ruff format . - Lint code:
uv run ruff check . - Fix auto-fixable lint issues:
uv run ruff check --fix . - Run tests:
uv run pytest
Pre-commit Hooks (Optional)
To automatically format and lint staged files before every git commit:
uv run pre-commit install