diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..7c260ad --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,37 @@ +# AGENTS.md + +## Current status + +Rebuild initialized. + +## Completed steps + +None yet. + +## Current step + +Step 1 - Public API contract and pure core. + +## Design decisions + +- Package is managed with uv. +- Public import is `import dpg_map as dpgm`. +- Dear PyGui calls are GUI-thread-only. +- Runtime public calls enqueue commands or update logical state. +- Overlay updates must not reset center/zoom. +- The widget uses child_window + measured-size drawlist. +- Tiles use a memory cache and persistent disk cache. +- Tile providers are interchangeable. + +## Known issues + +None yet. + +## Commands used + +- Read `STEPS.md`, `FEATURES.md`, and `ARCHITECTURE.md`. +- Created initial package, examples, tests, and agent-log structure. + +## Next action + +Implement Step 1. diff --git a/examples/.gitkeep b/examples/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/examples/.gitkeep @@ -0,0 +1 @@ + diff --git a/pyproject.toml b/pyproject.toml index 05954ee..039d6ee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,3 +27,13 @@ dev = [ "pytest>=9.0.3", "ruff>=0.15.14", ] + +[tool.ruff] +line-length = 100 +target-version = "py311" + +[tool.ruff.lint] +select = ["E", "F", "I", "UP", "B", "SIM"] + +[tool.pyright] +typeCheckingMode = "basic" diff --git a/src/dpg_map/api.py b/src/dpg_map/api.py new file mode 100644 index 0000000..7b4a3b9 --- /dev/null +++ b/src/dpg_map/api.py @@ -0,0 +1 @@ +"""Public API wrappers for dpg-map.""" diff --git a/src/dpg_map/cache.py b/src/dpg_map/cache.py new file mode 100644 index 0000000..4417749 --- /dev/null +++ b/src/dpg_map/cache.py @@ -0,0 +1 @@ +"""Memory and disk cache helpers.""" diff --git a/src/dpg_map/commands.py b/src/dpg_map/commands.py new file mode 100644 index 0000000..a723e65 --- /dev/null +++ b/src/dpg_map/commands.py @@ -0,0 +1 @@ +"""Command models for GUI-thread rendering work.""" diff --git a/src/dpg_map/diagnostics.py b/src/dpg_map/diagnostics.py new file mode 100644 index 0000000..af6a45e --- /dev/null +++ b/src/dpg_map/diagnostics.py @@ -0,0 +1 @@ +"""Diagnostics and debug state helpers.""" diff --git a/src/dpg_map/draw_layers.py b/src/dpg_map/draw_layers.py new file mode 100644 index 0000000..b7e39fa --- /dev/null +++ b/src/dpg_map/draw_layers.py @@ -0,0 +1 @@ +"""Draw layer bookkeeping helpers.""" diff --git a/src/dpg_map/exceptions.py b/src/dpg_map/exceptions.py new file mode 100644 index 0000000..de2e52c --- /dev/null +++ b/src/dpg_map/exceptions.py @@ -0,0 +1 @@ +"""Public exception types.""" diff --git a/src/dpg_map/interaction.py b/src/dpg_map/interaction.py new file mode 100644 index 0000000..f1b9a0e --- /dev/null +++ b/src/dpg_map/interaction.py @@ -0,0 +1 @@ +"""Map interaction state and handlers.""" diff --git a/src/dpg_map/overlays.py b/src/dpg_map/overlays.py new file mode 100644 index 0000000..0ba745a --- /dev/null +++ b/src/dpg_map/overlays.py @@ -0,0 +1 @@ +"""Logical overlay models.""" diff --git a/src/dpg_map/projection.py b/src/dpg_map/projection.py new file mode 100644 index 0000000..2debb42 --- /dev/null +++ b/src/dpg_map/projection.py @@ -0,0 +1 @@ +"""Web Mercator projection helpers.""" diff --git a/src/dpg_map/providers.py b/src/dpg_map/providers.py new file mode 100644 index 0000000..291b047 --- /dev/null +++ b/src/dpg_map/providers.py @@ -0,0 +1 @@ +"""Tile provider definitions and registry.""" diff --git a/src/dpg_map/renderer.py b/src/dpg_map/renderer.py new file mode 100644 index 0000000..39f103d --- /dev/null +++ b/src/dpg_map/renderer.py @@ -0,0 +1 @@ +"""GUI-thread renderer implementation.""" diff --git a/src/dpg_map/sizing.py b/src/dpg_map/sizing.py new file mode 100644 index 0000000..01de1a5 --- /dev/null +++ b/src/dpg_map/sizing.py @@ -0,0 +1 @@ +"""Map sizing measurement helpers.""" diff --git a/src/dpg_map/state.py b/src/dpg_map/state.py new file mode 100644 index 0000000..2c14f5a --- /dev/null +++ b/src/dpg_map/state.py @@ -0,0 +1 @@ +"""Thread-safe state models and registries.""" diff --git a/src/dpg_map/tiles.py b/src/dpg_map/tiles.py new file mode 100644 index 0000000..4db1a8a --- /dev/null +++ b/src/dpg_map/tiles.py @@ -0,0 +1 @@ +"""Tile identity, lifecycle, and worker coordination.""" diff --git a/src/dpg_map/types.py b/src/dpg_map/types.py new file mode 100644 index 0000000..7b1b16f --- /dev/null +++ b/src/dpg_map/types.py @@ -0,0 +1 @@ +"""Shared type aliases and small value objects.""" diff --git a/src/dpg_map/widget.py b/src/dpg_map/widget.py new file mode 100644 index 0000000..327d3c0 --- /dev/null +++ b/src/dpg_map/widget.py @@ -0,0 +1 @@ +"""Dear PyGui map widget construction.""" diff --git a/tests/.gitkeep b/tests/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/tests/.gitkeep @@ -0,0 +1 @@ +