mapsmith 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mapsmith-0.1.0/.github/workflows/ci.yml +31 -0
- mapsmith-0.1.0/.github/workflows/docker-publish.yml +34 -0
- mapsmith-0.1.0/.gitignore +29 -0
- mapsmith-0.1.0/CONTRIBUTING.md +37 -0
- mapsmith-0.1.0/Dockerfile +13 -0
- mapsmith-0.1.0/LICENSE +661 -0
- mapsmith-0.1.0/PKG-INFO +143 -0
- mapsmith-0.1.0/README.md +113 -0
- mapsmith-0.1.0/TRADEMARKS.md +15 -0
- mapsmith-0.1.0/deploy/k8s/deployment.yaml +86 -0
- mapsmith-0.1.0/deploy/k8s/ingress.yaml +24 -0
- mapsmith-0.1.0/docker-compose.yml +47 -0
- mapsmith-0.1.0/pyproject.toml +49 -0
- mapsmith-0.1.0/src/mapsmith/__init__.py +3 -0
- mapsmith-0.1.0/src/mapsmith/catalog.py +98 -0
- mapsmith-0.1.0/src/mapsmith/engines/__init__.py +1 -0
- mapsmith-0.1.0/src/mapsmith/engines/dispatch.py +64 -0
- mapsmith-0.1.0/src/mapsmith/engines/duckdb_engine.py +103 -0
- mapsmith-0.1.0/src/mapsmith/engines/sedona_engine.py +62 -0
- mapsmith-0.1.0/src/mapsmith/engines/vector.py +156 -0
- mapsmith-0.1.0/src/mapsmith/jobs.py +87 -0
- mapsmith-0.1.0/src/mapsmith/provenance.py +75 -0
- mapsmith-0.1.0/src/mapsmith/server.py +179 -0
- mapsmith-0.1.0/tests/test_engines.py +71 -0
- mapsmith-0.1.0/tests/test_smoke.py +69 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
python-version: ["3.10", "3.12"]
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: ${{ matrix.python-version }}
|
|
19
|
+
- name: Install
|
|
20
|
+
run: pip install -e .[test]
|
|
21
|
+
- name: Lint
|
|
22
|
+
run: ruff check .
|
|
23
|
+
- name: Test
|
|
24
|
+
run: pytest -q
|
|
25
|
+
|
|
26
|
+
docker:
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v4
|
|
30
|
+
- name: Build image
|
|
31
|
+
run: docker build -t mapsmith:ci .
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Publish image
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
tags: ["v*"]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
packages: write
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v7
|
|
16
|
+
- uses: docker/login-action@v4
|
|
17
|
+
with:
|
|
18
|
+
registry: ghcr.io
|
|
19
|
+
username: ${{ github.actor }}
|
|
20
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
21
|
+
- uses: docker/metadata-action@v6
|
|
22
|
+
id: meta
|
|
23
|
+
with:
|
|
24
|
+
images: ghcr.io/${{ github.repository }}
|
|
25
|
+
tags: |
|
|
26
|
+
type=ref,event=branch
|
|
27
|
+
type=semver,pattern={{version}}
|
|
28
|
+
type=raw,value=latest,enable={{is_default_branch}}
|
|
29
|
+
- uses: docker/build-push-action@v7
|
|
30
|
+
with:
|
|
31
|
+
context: .
|
|
32
|
+
push: true
|
|
33
|
+
tags: ${{ steps.meta.outputs.tags }}
|
|
34
|
+
labels: ${{ steps.meta.outputs.labels }}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
.venv/
|
|
8
|
+
venv/
|
|
9
|
+
.pytest_cache/
|
|
10
|
+
.ruff_cache/
|
|
11
|
+
|
|
12
|
+
# Data & outputs (never commit datasets)
|
|
13
|
+
*.gpkg
|
|
14
|
+
*.gpkg-journal
|
|
15
|
+
*.shp
|
|
16
|
+
*.shx
|
|
17
|
+
*.dbf
|
|
18
|
+
*.prj
|
|
19
|
+
*.tif
|
|
20
|
+
*.tiff
|
|
21
|
+
*.parquet
|
|
22
|
+
*.provenance.json
|
|
23
|
+
data/
|
|
24
|
+
|
|
25
|
+
# OS / editors
|
|
26
|
+
.DS_Store
|
|
27
|
+
Thumbs.db
|
|
28
|
+
.vscode/
|
|
29
|
+
.idea/
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Contributing to MapSmith
|
|
2
|
+
|
|
3
|
+
Thanks for your interest! A few ground rules keep this project sustainable for a small team.
|
|
4
|
+
|
|
5
|
+
## Ways to contribute
|
|
6
|
+
|
|
7
|
+
- **New operations**: open a PR adding an engine function + MCP tool + catalog entry + test. Small, focused PRs merge fastest. (There is deliberately no plugin API yet — new tools land in core through one review queue.)
|
|
8
|
+
- **Bug reports**: use the issue template. We aim for a **first response within 48 hours**.
|
|
9
|
+
- **Docs & analysis notebooks**: gallery examples (prompt → tool chain → map) are as valuable as code.
|
|
10
|
+
|
|
11
|
+
## Environment support policy
|
|
12
|
+
|
|
13
|
+
**Docker (or `uvx` where wheels work) is the only supported install path.** Issues that reduce to a broken local GDAL/compiler setup will be closed with a pointer to the container. This is not unfriendliness — it is how a small team keeps the 48h response promise.
|
|
14
|
+
|
|
15
|
+
## Development setup
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install -e .[test]
|
|
19
|
+
pytest -q
|
|
20
|
+
ruff check .
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Design rules (enforced in review)
|
|
24
|
+
|
|
25
|
+
1. **Deterministic outputs only.** No geometry or numeric result may originate from an LLM.
|
|
26
|
+
2. **Every writer emits provenance.** If your operation writes a dataset, it writes a manifest (`ProvenanceRecord`) — inputs with checksums, parameters, CRS decisions, engine versions.
|
|
27
|
+
3. **No silent CRS decisions.** Reprojections and unit assumptions must be recorded in `crs_decisions`.
|
|
28
|
+
4. **GPL isolation.** GPL engines (QGIS, GRASS) may only be invoked as external processes (CLI/files/JSON). Never `import qgis` or link GPL libraries in-process.
|
|
29
|
+
5. **Few semantic tools.** New MCP tools need a strong case; prefer extending the catalog + existing tools.
|
|
30
|
+
|
|
31
|
+
## Contributor License Agreement
|
|
32
|
+
|
|
33
|
+
To keep dual-licensing possible (AGPL + commercial), we ask contributors to sign a lightweight CLA on their first PR (automated via bot). Your code always remains available under AGPL-3.0.
|
|
34
|
+
|
|
35
|
+
## Code style
|
|
36
|
+
|
|
37
|
+
Python ≥3.10, `ruff` clean, type hints on public functions, tests for every operation.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
FROM python:3.12-slim
|
|
2
|
+
|
|
3
|
+
# Geospatial wheels (pyogrio/shapely/pyproj) bundle their native libs; no system GDAL needed.
|
|
4
|
+
WORKDIR /app
|
|
5
|
+
COPY pyproject.toml README.md LICENSE ./
|
|
6
|
+
COPY src ./src
|
|
7
|
+
RUN pip install --no-cache-dir .
|
|
8
|
+
|
|
9
|
+
# Workspace for datasets: mount your data here
|
|
10
|
+
VOLUME ["/data"]
|
|
11
|
+
WORKDIR /data
|
|
12
|
+
|
|
13
|
+
ENTRYPOINT ["mapsmith"]
|