mirror of
https://github.com/kuhyx/testsAndMisc-archive.git
synced 2026-07-04 16:43:08 +02:00
Fix ruff violations in ~15 source files and ~60+ test files to minimize per-file-ignores in pyproject.toml. Remaining ignores are justified with comments explaining why each suppression is necessary. Source fixes: FBT003 (keyword args), S310 (URL validation), SLF001 (private access), T201 (print→logging), C901 (complexity), E501 (line length), E402 (import order). Test fixes: SIM117 (combined with), FBT (boolean args), PERF203 (try in loop), S310/S607 (URLs/executables), E402/E501 (imports/lines), S108 (tmp paths), PLR0913 (too many args), ARG (unused args), ANN (type annotations), RUF059 (unused unpacked vars), PT019 (fixture naming). Remaining per-file-ignores (with justifications): - Tests: ARG, D, PLC0415, PLR2004, S101, SLF001 - music_gen sources: PLC0415 (heavy ML lazy imports) - moviepy_showcase: PLC0415 (circular dependency) - generate_images: PLR0913 (matplotlib helpers need many params) - praca_magisterska_video: E501, E402 (long paths, mpl.use) |
||
|---|---|---|
| .. | ||
| tests | ||
| __init__.py | ||
| README.md | ||
| run.sh | ||
| warsaw_streets_anki.py | ||
Warsaw Streets Anki Generator
Generate Anki flashcards for learning major Warsaw streets.
Features
- Generates flashcards for major Warsaw streets (primary, secondary, tertiary roads)
- Uses real street data from OpenStreetMap
- Front of card: Map showing Warsaw with the street highlighted
- Back of card: Street name in Polish
- Self-contained .apkg file with embedded images
Data Source
Street data is fetched from OpenStreetMap via the Overpass API.
Installation
pip install matplotlib genanki geopandas requests shapely
Usage
# Generate flashcards (fetches data from OSM)
./run.sh
# Or run directly
python -m warsaw_streets_anki
Notes
- Only includes named streets tagged as primary, secondary, or tertiary highways
- Streets are filtered to remove duplicates and very short segments
- The first run will download data from Overpass API (may take a minute)