Skip to content

Latest commit

 

History

History
43 lines (37 loc) · 2.19 KB

File metadata and controls

43 lines (37 loc) · 2.19 KB

Repository Guidelines

Project Structure & Module Organization

  • create_map_poster.py is the main entry point; all generation logic lives here.
  • themes/ contains JSON theme definitions (color palettes and layer styling).
  • fonts/ stores bundled font files used in poster rendering.
  • posters/ holds generated PNG output (timestamped filenames).
  • cache/ stores cached OpenStreetMap data and Wikidata lookups to speed up repeats.
  • requirements.txt lists Python dependencies; README.md documents usage and examples.

Build, Test, and Development Commands

  • Install dependencies:
    • pip install -r requirements.txt
  • Generate a poster:
    • python create_map_poster.py -c "Dresden" -C "Germany" -t noir -d 10000
  • Include buildings and landuse layers:
    • python create_map_poster.py -c "Görlitz" -C "Germany" -t warm_beige -d 5000 -l -b
  • Hide rail lines:
    • python create_map_poster.py -c "Zittau" -C "Germany" -t urbanism -d 1400 -l -b --no-rails
  • List available themes:
    • python create_map_poster.py --list-themes

Coding Style & Naming Conventions

  • Python code uses 4-space indentation; keep functions focused and readable.
  • Prefer descriptive variable names that match domain concepts (e.g., landuse_polygons).
  • Theme files are lowercase snake_case JSON files in themes/ (e.g., midnight_blue.json).

Testing Guidelines

  • No automated test suite is configured.
  • Validate changes by generating at least one poster and checking output in posters/.
  • If you change theme handling, verify --list-themes and a theme render.
  • If you change city basics/rail rendering, verify the info block and rail lines in a fresh render.

Commit & Pull Request Guidelines

  • Commit messages follow a short, imperative style (e.g., Add urbanism theme, DPI option, and regional example posters).
  • PRs should include:
    • A clear description of changes and the command used to reproduce output.
    • Sample poster images when rendering or theme behavior changes.
    • Notes about cache or data impacts if relevant.

Configuration & Asset Notes

  • Avoid committing generated posters unless they serve as documented examples.
  • Cached data lives under cache/; keep it local and out of commits.