Skip to content

Commit fb1b023

Browse files
committed
Merge branch 'main' into kyle/rfc
2 parents 3e12edc + 6b4073b commit fb1b023

File tree

113 files changed

+19957
-5259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+19957
-5259
lines changed

.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Stately Inspector is enabled when this is set to true
2+
XSTATE_INSPECT=false
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/build-binder-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: cache binder build on mybinder.org
13-
uses: jupyterhub/repo2docker-action@b3cd89ff99f95b00abb5b4db27ec49bb4d3f8c85
13+
uses: jupyterhub/repo2docker-action@c26a270c5694cd5b7f6121d6360da321d114ddc5
1414
with:
1515
NO_PUSH: true
1616
MYBINDERORG_TAG: ${{ github.event.ref }} # This builds the container on mybinder.org with the branch that was pushed on.

.github/workflows/test-js.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ name: CI
33
on:
44
push:
55
branches:
6-
- 'main'
6+
- "main"
77
pull_request:
88

99
concurrency:
1010
group: ${{ github.workflow }}-${{ github.ref }}
1111
cancel-in-progress: true
1212

13-
1413
jobs:
1514
lint-and-test:
1615
runs-on: ubuntu-latest
@@ -39,10 +38,10 @@ jobs:
3938
run: npm install
4039

4140
- name: Prettier check
42-
run: npm run fmt:check
41+
run: npm run prettier:check
4342

44-
- name: Type check
45-
run: npm run typecheck
43+
- name: Lint check
44+
run: npm run lint
4645

4746
- name: Test
4847
run: npm run test

.github/workflows/test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,16 @@ jobs:
7979
- name: Run tests
8080
run: poetry run pytest
8181

82+
- name: Run tests (all deps)
83+
run: |
84+
poetry install -E geopandas -E cli
85+
poetry run pytest
86+
87+
# Ensure docs build without warnings
88+
- name: Check docs
89+
if: matrix.python-version == 3.9
90+
run: poetry run mkdocs build --strict
91+
8292
- name: Cache pre-commit virtualenvs
8393
uses: actions/cache@v4
8494
if: matrix.python-version == 3.9

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,8 @@ static
2424
.pnp.loader.mjs
2525
node_modules
2626
*.h5
27+
28+
# Ignore environment variable files
29+
.env
30+
.env.local
31+
.env.*.local

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ repos:
1515
- id: trailing-whitespace
1616
- id: end-of-file-fixer
1717
- id: check-added-large-files
18-
args: ['--maxkb=5500']
18+
args: ["--maxkb=5500"]
1919

2020
- repo: https://github.com/astral-sh/ruff-pre-commit
21-
rev: v0.1.3
21+
rev: v0.3.4
2222
hooks:
2323
- id: ruff
24-
args: ['--fix']
24+
args: ["--fix"]
2525
- id: ruff-format

CHANGELOG.md

Lines changed: 161 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,176 @@
11
# Changelog
22

3+
## [0.9.3] - 2024-05-27
4+
5+
### Fixes :bug:
6+
7+
- Fix reprojecting GeoArrow input by @kylebarron in https://github.com/developmentseed/lonboard/pull/532
8+
9+
**Full Changelog**: https://github.com/developmentseed/lonboard/compare/v0.9.2...v0.9.3
10+
11+
## [0.9.2] - 2024-05-14
12+
13+
### Fixes :bug:
14+
15+
- Reverse the layer order for automatically split geometry by @RaczeQ in https://github.com/developmentseed/lonboard/pull/516
16+
17+
### What's Changed
18+
19+
- Perf: Use ravel, not flatten, for numpy to pyarrow by @kylebarron in https://github.com/developmentseed/lonboard/pull/512
20+
- Update docstring in as_html by @kylebarron in https://github.com/developmentseed/lonboard/pull/519
21+
- Add type checks to fly_to by @kylebarron in https://github.com/developmentseed/lonboard/pull/521
22+
- Add pypi classifiers by @kylebarron in https://github.com/developmentseed/lonboard/pull/523
23+
24+
### New Contributors
25+
26+
- @RaczeQ made their first contribution in https://github.com/developmentseed/lonboard/pull/516
27+
28+
**Full Changelog**: https://github.com/developmentseed/lonboard/compare/v0.9.1...v0.9.2
29+
30+
## [0.9.1] - 2024-05-07
31+
32+
### Fixes :bug:
33+
34+
- Fix parquet-wasm WASM version mismatch by @kylebarron in https://github.com/developmentseed/lonboard/pull/508
35+
36+
**Full Changelog**: https://github.com/developmentseed/lonboard/compare/v0.9.0...v0.9.1
37+
38+
## [0.9.0] - 2024-05-06
39+
40+
### New! :sparkles:
41+
42+
- Direct [DuckDB Spatial](https://duckdb.org/docs/extensions/spatial.html) integration. Refer to the [DuckDB example notebook](https://developmentseed.org/lonboard/latest/examples/duckdb/) and the [DuckDB page](https://developmentseed.org/lonboard/latest/ecosystem/duckdb/) in the documentation. by @kylebarron in https://github.com/developmentseed/lonboard/pull/498
43+
- Add [overture buildings notebook](https://developmentseed.org/lonboard/latest/examples/overture-maps/) by @kylebarron in https://github.com/developmentseed/lonboard/pull/479
44+
- Adding [PathStyleExtension](https://developmentseed.org/lonboard/latest/api/layer-extensions/path-style-extension/) code by @shriv in https://github.com/developmentseed/lonboard/pull/487
45+
- Handle mixed geometry types in `viz` by @kylebarron in https://github.com/developmentseed/lonboard/pull/495
46+
- Render map as static HTML file by @kylebarron in https://github.com/developmentseed/lonboard/pull/474. You can use `Map.as_html` to render a map in notebook environments that support HTML but not widgets.
47+
- Improved integration with [geoarrow-pyarrow](https://geoarrow.org/geoarrow-python/main/pyarrow.html) by @kylebarron in https://github.com/developmentseed/lonboard/pull/470
48+
49+
### Fixes :bug:
50+
51+
- Updated Map keyword arguments by @kylebarron in https://github.com/developmentseed/lonboard/pull/496
52+
- validate basemap style is a url by @kylebarron in https://github.com/developmentseed/lonboard/pull/497
53+
54+
### New Contributors
55+
56+
- @willemarcel made their first contribution in https://github.com/developmentseed/lonboard/pull/486
57+
- @shriv made their first contribution in https://github.com/developmentseed/lonboard/pull/487
58+
59+
**Full Changelog**: https://github.com/developmentseed/lonboard/compare/v0.8.0...v0.9.0
60+
61+
## [0.8.0] - 2024-04-05
62+
63+
### New! :sparkles:
64+
65+
- A new [`PolygonLayer`](https://developmentseed.org/lonboard/v0.8.0/api/layers/polygon-layer/)! This layer renders polygon outlines for easier visibility. @kylebarron in https://github.com/developmentseed/lonboard/pull/330
66+
- An example using `PolygonLayer` by @naomatheus in https://github.com/developmentseed/lonboard/pull/351
67+
- Sync view state between JS and Python by @kylebarron in https://github.com/developmentseed/lonboard/pull/448
68+
- Support geoarrow array input into `viz()` by @kylebarron in https://github.com/developmentseed/lonboard/pull/427
69+
- Internal architecture documentation by @kylebarron in https://github.com/developmentseed/lonboard/pull/450
70+
71+
### Fixes :bug:
72+
73+
- Fix CLI with unset `geometry_name` by @kylebarron in https://github.com/developmentseed/lonboard/pull/451
74+
75+
**Full Changelog**: https://github.com/developmentseed/lonboard/compare/v0.7.1...v0.8.0
76+
77+
## [0.7.1] - 2024-03-22
78+
79+
### Fixes :bug:
80+
81+
- Fix CLI with geopackage files by @kylebarron in https://github.com/developmentseed/lonboard/pull/434
82+
83+
**Full Changelog**: https://github.com/developmentseed/lonboard/compare/v0.7.0...v0.7.1
84+
85+
## [0.7.0] - 2024-03-21
86+
87+
### New! :sparkles:
88+
89+
- There's a [new command-line interface (CLI)](https://developmentseed.org/lonboard/v0.7.0/cli)! Use the `lonboard` command to quickly visualize one or more data files readable by GDAL! For example: `lonboard admins.geojson features.gpkg`. By @kylebarron in https://github.com/developmentseed/lonboard/pull/379
90+
- Type hinting for constructors and `from_geopandas` method. This should make it easier to pass the correct parameters into layers. This has been tested to work in IDEs like VSCode, but unfortunately appears not to work in JupyterLab. By @kylebarron in https://github.com/developmentseed/lonboard/pull/399
91+
92+
![Type hints are now supported in constructors.](assets/type-hints-constructor.jpg)
93+
94+
- Warn on missing CRS. One of the most common reasons that you might see an empty map is from accidentally visualizing data that is not in EPSG 4326 (longitude-latitude). We now emit a warning for data that doesn't have a CRS defined on the data. By @kylebarron in https://github.com/developmentseed/lonboard/pull/395.
95+
- Lonboard is [now on `conda-forge`](https://prefix.dev/channels/conda-forge/packages/lonboard)! Install with `conda install -c conda-forge lonboard`. By @giswqs in https://github.com/developmentseed/lonboard/pull/223
96+
- Add [PointCloudLayer](https://developmentseed.org/lonboard/v0.7.0/api/layers/point-cloud-layer/). By @kylebarron in https://github.com/developmentseed/lonboard/pull/396
97+
- Add [fly-to map action](https://developmentseed.org/lonboard/v0.7.0/api/map/#lonboard.Map.fly_to) to "fly" the map to a new location. By @kylebarron in https://github.com/developmentseed/lonboard/pull/408
98+
- [Docs showcase page](https://developmentseed.org/lonboard/v0.7.0/examples/) by @kylebarron in https://github.com/developmentseed/lonboard/pull/401
99+
- Improve default colors in [`viz`](https://developmentseed.org/lonboard/v0.7.0/api/viz/). We now attempt to apply some basic styling onto data passed into `viz`. This will likely further improve in the future. By @kylebarron in https://github.com/developmentseed/lonboard/pull/389
100+
101+
### Fixes :bug:
102+
103+
- Set exported HTML height to 100% by @kylebarron in https://github.com/developmentseed/lonboard/pull/377
104+
- Raise error on single input to MultiRangeSlider by @kylebarron in https://github.com/developmentseed/lonboard/pull/367
105+
- Fix pandas `to_numeric` FutureWarning by @kylebarron in https://github.com/developmentseed/lonboard/pull/368
106+
- Fix viewing polygons in local html files by @kylebarron in https://github.com/developmentseed/lonboard/pull/387
107+
- Fix: fix sliced array input for reprojection by @kylebarron in https://github.com/developmentseed/lonboard/pull/391
108+
- Fix: Don't reproject for epsg:4326 input by @kylebarron in https://github.com/developmentseed/lonboard/pull/392
109+
- Fix: Fix weighted centroid calculation by @kylebarron in https://github.com/developmentseed/lonboard/pull/393
110+
- Fix `viz()` with `__geo_interface__` input by @kylebarron in https://github.com/developmentseed/lonboard/pull/426
111+
- Add DataFilterExtension notebook to website by @kylebarron in https://github.com/developmentseed/lonboard/pull/362
112+
- Allow non-compliant geoarrow CRS metadata by @kylebarron in https://github.com/developmentseed/lonboard/pull/369
113+
- Automatically parse geoarrow.wkb to native geoarrow by @kylebarron in https://github.com/developmentseed/lonboard/pull/372
114+
- Parse GeoParquet metadata by @kylebarron in https://github.com/developmentseed/lonboard/pull/407
115+
- CLI: 'crs' in geoparquet metadata should be optional. by @jwass in https://github.com/developmentseed/lonboard/pull/411
116+
117+
### Other changes
118+
119+
- Creating a new user bug report by @emmalu in https://github.com/developmentseed/lonboard/pull/386
120+
- Update epic template by @emmalu in https://github.com/developmentseed/lonboard/pull/382
121+
- NormalAccessor by @naomatheus in https://github.com/developmentseed/lonboard/pull/376
122+
- Conda: Try including `manifest.in` file for `static` folder inclusion by @kylebarron in https://github.com/developmentseed/lonboard/pull/421
123+
- Switch to animated hero image by @kylebarron in https://github.com/developmentseed/lonboard/pull/423
124+
- Add CRS to GeoDataFrame in notebook examples by @kylebarron in https://github.com/developmentseed/lonboard/pull/419
125+
126+
## New Contributors
127+
128+
- @emmalu made their first contribution in https://github.com/developmentseed/lonboard/pull/382
129+
- @naomatheus made their first contribution in https://github.com/developmentseed/lonboard/pull/376
130+
- @jwass made their first contribution in https://github.com/developmentseed/lonboard/pull/411
131+
- @giswqs made their first contribution in https://github.com/developmentseed/lonboard/pull/223
132+
133+
**Full Changelog**: https://github.com/developmentseed/lonboard/compare/v0.6.0...v0.7.0
134+
3135
## [0.6.0] - 2024-02-13
4136

5137
### New! :sparkles:
6138

7-
* DataFilterExtension by @kylebarron in https://github.com/developmentseed/lonboard/pull/278
8-
* Multi-range sliders for DataFilterExtension by @kylebarron in https://github.com/developmentseed/lonboard/pull/340
9-
* BitmapLayer and BitmapTileLayer by @kylebarron in https://github.com/developmentseed/lonboard/pull/288
10-
* Improved GeoArrow interop by @kylebarron in https://github.com/developmentseed/lonboard/pull/308
11-
* Allow passing a positional `layers` object into `Map` by @kylebarron in https://github.com/developmentseed/lonboard/pull/319
12-
* GeoArrow-based multithreaded coordinate reprojection by @kylebarron in https://github.com/developmentseed/lonboard/pull/337
13-
* Support `pyarrow.Table` with `geoarrow.pyarrow` extension types as geometry columns by @jorisvandenbossche in https://github.com/developmentseed/lonboard/pull/218
14-
* Add ecosystem/integrations documentation by @kylebarron in https://github.com/developmentseed/lonboard/pull/350
139+
- DataFilterExtension by @kylebarron in https://github.com/developmentseed/lonboard/pull/278
140+
- Multi-range sliders for DataFilterExtension by @kylebarron in https://github.com/developmentseed/lonboard/pull/340
141+
- BitmapLayer and BitmapTileLayer by @kylebarron in https://github.com/developmentseed/lonboard/pull/288
142+
- Improved GeoArrow interop by @kylebarron in https://github.com/developmentseed/lonboard/pull/308
143+
- Allow passing a positional `layers` object into `Map` by @kylebarron in https://github.com/developmentseed/lonboard/pull/319
144+
- GeoArrow-based multithreaded coordinate reprojection by @kylebarron in https://github.com/developmentseed/lonboard/pull/337
145+
- Support `pyarrow.Table` with `geoarrow.pyarrow` extension types as geometry columns by @jorisvandenbossche in https://github.com/developmentseed/lonboard/pull/218
146+
- Add ecosystem/integrations documentation by @kylebarron in https://github.com/developmentseed/lonboard/pull/350
15147

16148
### Fixes :bug:
17149

18-
* Add font to index.css to fix static HTML export by @jtmiclat in https://github.com/developmentseed/lonboard/pull/284
19-
* Fix displaying tooltip for first row by @kylebarron in https://github.com/developmentseed/lonboard/pull/287
20-
* accept matplotlib colormap input to apply_cmap by @kylebarron in https://github.com/developmentseed/lonboard/pull/289
21-
* Use preferred OSM tile url by @kylebarron in https://github.com/developmentseed/lonboard/pull/290
22-
* set max zoom on osm layer by @kylebarron in https://github.com/developmentseed/lonboard/pull/291
23-
* Update contributor docs by @kylebarron in https://github.com/developmentseed/lonboard/pull/316
24-
* Check epsg:4326 bounds in layer creation by @kylebarron in https://github.com/developmentseed/lonboard/pull/317
25-
* add reference for installing from source by @kylebarron in https://github.com/developmentseed/lonboard/pull/318
26-
* Fix inferring number of rows per chunk by @kylebarron in https://github.com/developmentseed/lonboard/pull/327
27-
* Fix null checks by @kylebarron in https://github.com/developmentseed/lonboard/pull/331
28-
* Set max number of chunks per layer by @kylebarron in https://github.com/developmentseed/lonboard/pull/332
29-
* Move accessor length validation to serialization by @kylebarron in https://github.com/developmentseed/lonboard/pull/333
30-
* Deduplicate serialization for accessors by @kylebarron in https://github.com/developmentseed/lonboard/pull/334
31-
* Multi-dimensional GPU-based data filtering by @kylebarron in https://github.com/developmentseed/lonboard/pull/335
32-
* Bump anywidget to 0.9 & simplify Wasm initialization by @kylebarron in https://github.com/developmentseed/lonboard/pull/344
33-
* Fix null checks by @kylebarron in https://github.com/developmentseed/lonboard/pull/348
34-
* docs fixes by @kylebarron in https://github.com/developmentseed/lonboard/pull/354
35-
* Add `DataFilterExtension` example by @kylebarron in https://github.com/developmentseed/lonboard/pull/358
36-
* fix arc layer default arguments by @kylebarron in https://github.com/developmentseed/lonboard/pull/359
150+
- Add font to index.css to fix static HTML export by @jtmiclat in https://github.com/developmentseed/lonboard/pull/284
151+
- Fix displaying tooltip for first row by @kylebarron in https://github.com/developmentseed/lonboard/pull/287
152+
- accept matplotlib colormap input to apply_cmap by @kylebarron in https://github.com/developmentseed/lonboard/pull/289
153+
- Use preferred OSM tile url by @kylebarron in https://github.com/developmentseed/lonboard/pull/290
154+
- set max zoom on osm layer by @kylebarron in https://github.com/developmentseed/lonboard/pull/291
155+
- Update contributor docs by @kylebarron in https://github.com/developmentseed/lonboard/pull/316
156+
- Check epsg:4326 bounds in layer creation by @kylebarron in https://github.com/developmentseed/lonboard/pull/317
157+
- add reference for installing from source by @kylebarron in https://github.com/developmentseed/lonboard/pull/318
158+
- Fix inferring number of rows per chunk by @kylebarron in https://github.com/developmentseed/lonboard/pull/327
159+
- Fix null checks by @kylebarron in https://github.com/developmentseed/lonboard/pull/331
160+
- Set max number of chunks per layer by @kylebarron in https://github.com/developmentseed/lonboard/pull/332
161+
- Move accessor length validation to serialization by @kylebarron in https://github.com/developmentseed/lonboard/pull/333
162+
- Deduplicate serialization for accessors by @kylebarron in https://github.com/developmentseed/lonboard/pull/334
163+
- Multi-dimensional GPU-based data filtering by @kylebarron in https://github.com/developmentseed/lonboard/pull/335
164+
- Bump anywidget to 0.9 & simplify Wasm initialization by @kylebarron in https://github.com/developmentseed/lonboard/pull/344
165+
- Fix null checks by @kylebarron in https://github.com/developmentseed/lonboard/pull/348
166+
- docs fixes by @kylebarron in https://github.com/developmentseed/lonboard/pull/354
167+
- Add `DataFilterExtension` example by @kylebarron in https://github.com/developmentseed/lonboard/pull/358
168+
- fix arc layer default arguments by @kylebarron in https://github.com/developmentseed/lonboard/pull/359
37169

38170
## New Contributors
39171

40-
* @jtmiclat made their first contribution in https://github.com/developmentseed/lonboard/pull/284
41-
* @jorisvandenbossche made their first contribution in https://github.com/developmentseed/lonboard/pull/218
172+
- @jtmiclat made their first contribution in https://github.com/developmentseed/lonboard/pull/284
173+
- @jorisvandenbossche made their first contribution in https://github.com/developmentseed/lonboard/pull/218
42174

43175
**Full Changelog**: https://github.com/developmentseed/lonboard/compare/v0.5.0...v0.6.0
44176

DEVELOP.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,26 @@ We use ESBuild to bundle into an ES Module, which the Jupyter Widget will then l
5656
npm run build:watch
5757
```
5858

59+
### Environment Variables
60+
61+
To use custom environment variables, copy the example environment file:
62+
63+
```sh
64+
cp .env.example .env
65+
```
66+
67+
This file contains the list of environment variables for the JavaScript component, and the build task will use them when available.
68+
69+
**Note: `.env` is in `.gitignore` and should never be committed.**
70+
71+
### Architectural notes
72+
5973
All models on the TypeScript side are combined into a single entry point, which is compiled by ESBuild and loaded by the Python `Map` class. (Refer to the `_esm` key on the `Map` class, which tells Jupyter/ipywidgets where to load the JavaScript bundle.)
6074

6175
Anywidget and its dependency ipywidgets handles the serialization from Python into JS, automatically keeping each side in sync.
6276

77+
State management is implemented using [XState](https://stately.ai/docs/xstate). The app is instrumented with [Stately Inspector](https://stately.ai/docs/inspector), and the use of the [VS Code extension](https://stately.ai/docs/xstate-vscode-extension) is highly recommended.
78+
6379
## Publishing
6480

6581
Push a new tag to the main branch of the format `v*`. A new version will be published to PyPI automatically.

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
recursive-include lonboard/static *

0 commit comments

Comments
 (0)