You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(python): trim Layer.source redaction cost and document save_project (#1772)
* Address Claude review feedback
- Sweep only the source field in Layer.source. redact_layer copied an inlined
geojson blob first and then discarded it, which .data pays for deliberately
but .source has no reason to.
- Document that the top-level save_project writes verbatim, credentials
included, and why: it is the lossless primitive the MCP server round-trips a
user's own file through, where redacting on every edit would strip their own
API keys. Point at Map.save_project and redact_credentials for the sharing
case.
- Sync docs/python.md's Map API table with the methods this PR adds; it had
drifted from the expanded table in python/README.md.
* Address CodeRabbit review feedback
Fix the remove_layer row in python/README.md rather than docs/python.md. The two
tables disagreed and the README was the wrong one: the parameter is `layer_id`,
so `remove_layer(layer=...)` raises TypeError. Both now match the signature,
and the description already says it accepts an id, name, or handle.
|`set_zoom(zoom)` / `set_bearing(bearing)` / `set_pitch(pitch)` / `fit_project_bounds(bounds)`| Persist camera changes without requiring the widget to be displayed. |
257
+
|`center` / `zoom` / `bearing` / `pitch` / `basemap` / `name`| Read persisted project and camera state; `name` is writable. |
|`layer_properties(layer)` / `column_values(layer, column)` / `describe()`| Inspect inlined data and summarize a project without a browser round trip. |
260
+
|`remove_layer(layer_id)` / `clear_layers()`| Remove one layer by id, name, or handle, or remove all layers. |
257
261
|`to_project(keep_credentials=False)`| Return the current project as a dict, credentials redacted unless `keep_credentials=True`. |
258
262
|`load_project(src)`| Replace the project from a dict, JSON string, or `.geolibre.json` path. |
259
263
|`save_project(path, keep_credentials=False)`| Write the current project to a `.geolibre.json` file, credentials redacted unless `keep_credentials=True`. |
|`rename_layer` / `move_layer` / `duplicate_layer` / `show_layer` / `hide_layer`| Manage layers by id, name, or `Layer` handle. |
90
90
|`layer_properties(layer)` / `column_values(layer, column)` / `describe()`| Inspect inlined data and summarize a project without a browser round trip. |
91
-
|`remove_layer(layer)` / `clear_layers()`| Remove one layer by id, name, or handle, or remove all layers. |
91
+
|`remove_layer(layer_id)` / `clear_layers()`| Remove one layer by id, name, or handle, or remove all layers. |
92
92
|`center` / `zoom` / `bearing` / `pitch` / `basemap` / `name`| Read persisted project and camera state; `name` is writable. |
93
93
|`set_zoom` / `set_bearing` / `set_pitch` / `fit_project_bounds`| Persist camera changes without requiring the widget to be displayed. |
0 commit comments