Imported from milos-bondi/RUAG_OGN_Data (
AGENTS.md). Install upstream withnpx skills add milos-bondi/RUAG_OGN_Data. Copyright stays with the author.
Agent Instructions
You are working on a data collection and visualization project for the Open Glider Network. The goal is to maintain a simple HTML dashboard, a FastAPI API, and a data collection job that continuously stores new OGN data.
- Use
ogn-clientto collect the data. - Use
sqlalchemyfor the python ORM, no migrations are needed. - Use
fastapifor the api. - Use
pydantic-settingsto load environments, and create anenv = Settings()object. - Use
uvto manage the Python environment. - A single
uv run fastapicommand must run both the API and the cron jobs.
Architecture
repository/
├── src/ # API application code
│ ├── envs.py # Environment variable loading
│ ├── router.py # Router assembly and API wiring
│ ├── cron/ # Scheduled background jobs / data collection
│ ├── db/ # Database session, models, and queries
│ │ ├── __init__.py # Package marker
│ │ ├── session.py # Database session setup
│ │ ├── functions/ # Database helper queries
│ │ └── models/ # ORM models
│ ├── dtypes/ # Pydantic schemas and API data types
│ ├── routes/ # API route handlers
│ ├── utils/ # Shared utilities
│ └── .env.sample # Development environment variables
│
├── AGENTS.md
└── README.md
Code Style Guide
- Keep changes small and clear.
- Remove obsolete code when replacing old flows.
- Use built-in types for type hints, such as
listanddict. - Sort imports by length, starting with
importstatements and thenfromstatements. - Use | for union types instead of Optional
- All Python functions must include docstring (""" ... """) immediately after definition.
- Any non-trivial Python logic block must have standalone inline comment (# ...) above block.
- Include two blank lines between function definitions.
- Write test cases only when instructed
- Create a function when it gives you a meaningful abstraction boundary. Do not create one just to “split code”.
- Keep improving and cleanup the repository so that it follows the described architecture
- Cleanup any
.mdfile that is not strictly needed. Keep onlyAGENTS.mdandREADME.md. - Make sure to include in the
README.mdall the instructions on how to run the server. - Make sure that the repository is self-contained and portable