mirror of
https://github.com/cu-3rd-party/3rd-view.git
synced 2026-10-27 16:07:14 +00:00
No description
- Python 49.1%
- HTML 48.9%
- JavaScript 1.5%
- CSS 0.2%
- Shell 0.2%
- Other 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Two things made the subject list wrong and slow. The catalog was built from every event ever parsed, so it listed last semester alongside this one: 903 entries of which only 259 had a class from today onwards. Students were scrolling past hundreds of subjects that no longer exist, and the browser built a DOM node for each. Build it from classes on or after --since (today by default); pass an older date to get the archive back. Picking a subject then showed a fraction of its classes. The "select everything the first time" check sat inside the per-teacher loop, so it fired once and only the alphabetically first teacher stayed checked -- 2 of 33 classes for a subject with 12 teachers. Decide once, before the loop, which is what the cards view already did. An empty set still means the student deselected everyone, so their choice is left alone. /api/courses drops from 214KB to 55KB. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
| .github/workflows | ||
| app | ||
| tests | ||
| tools | ||
| .dockerignore | ||
| .gitignore | ||
| cookie.example.txt | ||
| docker-compose-prod.yml | ||
| docker-compose.yml | ||
| Dockerfile | ||
| example.env | ||
| logs.sh | ||
| new_courses.csv | ||
| pyproject.toml | ||
| README.md | ||
| rerun.sh | ||
| sync_teachers_from_events.py | ||
| uv.lock | ||
cu 3rd view
Backend and frontend for collecting and serving university schedule data, matching recordings, and running a KTalk attendance worker.
Structure
app/
api/routes/ FastAPI route modules by domain
core/ config and logging
integrations/ Yandex and KTalk clients
services/ shared helpers
scripts/ operational utilities
workers/ background worker entrypoints
templates/ HTML pages
tests/ pytest suite
pyproject.toml uv project metadata
uv.lock locked dependency graph
docker-compose.yml local development stack
Dockerfile container image
Configuration
Copy example.env to .env and fill in the real values.
Required runtime files:
.env(copy fromexample.env)cookie.txt(copy fromcookie.example.txt, then paste the Yandex Calendar cookie header)ktalk_auth.txt
All three hold live credentials and are gitignored -- never commit them.
The app reads configuration only from environment variables and file paths declared in .env.
Local Development
Install dependencies:
uv sync --dev
Run the API:
uv run uvicorn app.main:app --reload --host 0.0.0.0 --port 8082
Run the worker:
uv run cu-3rd-view-worker
Run tests:
uv run pytest
Docker Compose
Start local development stack:
cp example.env .env
docker compose up --build
Services:
web: FastAPI app with live reloadworker: background KTalk/Yandex workerdb: PostgreSQL 16
Utility Scripts
Populate database from CSV:
uv run cu-3rd-view-parse
Insert a manual test event:
uv run cu-3rd-view-add-test-event
CI
GitHub Actions runs pytest on every push and pull request via .github/workflows/tests.yml.