Skip to content

Commit b05a26b

Browse files
authored
🗺️ v3.1.4 Add ESRI CRS (#225)
# v3.1.4 - **Add support for ESRI CRS for `geometry` columns.** In addition to EPSG projections, pipes with geometry data may now sync shapefiles with ESRI (or other authorities, default EPSG) projections. ```python import meerschaum as mrsm pipe = mrsm.Pipe( 'demo', 'geometry', 'esri', columns={'primary': 'id'}, dtypes={'geo': 'geometry[esri:102003]'} ) pipe.sync([{'id': 1, 'geo': 'POINT (0 0)'}]) gdf = pipe.get_data() print(gdf.crs.to_authority()) # ('ESRI', '102003') ``` - **Add `Pipe.metric` and `Pipe.location` aliases.** Like `Pipe.connector_keys`, the keys `metric_key` and `location_key` may now be accessed via `metric` and `location`: ```python import meerschaum as mrsm pipe = mrsm.Pipe('demo', 'aliases', target='{{ self.metric }}') print(pipe.target) # aliases ``` - **Remove `None` return for `Pipe.connector` with invalid keys.** Rather than returning `None` for pipes with invalid connectors, return the verbatim connector keys string instead. ```python import meerschaum as mrsm pipe = mrsm.Pipe('demo', 'keys') print(f"{pipe.connector=}") # pipe.connector='demo' ``` - **Fix `api_key` login schemes for `api` connectors.** An issue with `api` connectors using the `api_key` login scheme has been fixed. - **Fix client credentials for remote jobs.** When executing a remote action or job using an `api` connector with client credentials (`client_id` and `client_secret`), scopes are now correctly evaluated.
1 parent 7f04b5d commit b05a26b

File tree

5,705 files changed

+319
-408179
lines changed

Some content is hidden

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

5,705 files changed

+319
-408179
lines changed

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,53 @@
44

55
This is the current release cycle, so stay tuned for future releases!
66

7+
### v3.1.4
8+
9+
- **Add support for ESRI CRS for `geometry` columns.**
10+
In addition to EPSG projections, pipes with geometry data may now sync shapefiles with ESRI (or other authorities, default EPSG) projections.
11+
12+
```python
13+
import meerschaum as mrsm
14+
15+
pipe = mrsm.Pipe(
16+
'demo', 'geometry', 'esri',
17+
columns={'primary': 'id'},
18+
dtypes={'geo': 'geometry[esri:102003]'}
19+
)
20+
pipe.sync([{'id': 1, 'geo': 'POINT (0 0)'}])
21+
gdf = pipe.get_data()
22+
print(gdf.crs.to_authority())
23+
# ('ESRI', '102003')
24+
```
25+
26+
- **Add `Pipe.metric` and `Pipe.location` aliases.**
27+
Like `Pipe.connector_keys`, the keys `metric_key` and `location_key` may now be accessed via `metric` and `location`:
28+
29+
```python
30+
import meerschaum as mrsm
31+
32+
pipe = mrsm.Pipe('demo', 'aliases', target='{{ self.metric }}')
33+
print(pipe.target)
34+
# aliases
35+
```
36+
37+
- **Remove `None` return for `Pipe.connector` with invalid keys.**
38+
Rather than returning `None` for pipes with invalid connectors, return the verbatim connector keys string instead.
39+
40+
```python
41+
import meerschaum as mrsm
42+
43+
pipe = mrsm.Pipe('demo', 'keys')
44+
print(f"{pipe.connector=}")
45+
# pipe.connector='demo'
46+
```
47+
48+
- **Fix `api_key` login schemes for `api` connectors.**
49+
An issue with `api` connectors using the `api_key` login scheme has been fixed.
50+
51+
- **Fix client credentials for remote jobs.**
52+
When executing a remote action or job using an `api` connector with client credentials (`client_id` and `client_secret`), scopes are now correctly evaluated.
53+
754
### v3.1.3
855

956
- **Fix syncing pipes with integer datetimes.**

docs/mkdocs/news/changelog.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,53 @@
44

55
This is the current release cycle, so stay tuned for future releases!
66

7+
### v3.1.4
8+
9+
- **Add support for ESRI CRS for `geometry` columns.**
10+
In addition to EPSG projections, pipes with geometry data may now sync shapefiles with ESRI (or other authorities, default EPSG) projections.
11+
12+
```python
13+
import meerschaum as mrsm
14+
15+
pipe = mrsm.Pipe(
16+
'demo', 'geometry', 'esri',
17+
columns={'primary': 'id'},
18+
dtypes={'geo': 'geometry[esri:102003]'}
19+
)
20+
pipe.sync([{'id': 1, 'geo': 'POINT (0 0)'}])
21+
gdf = pipe.get_data()
22+
print(gdf.crs.to_authority())
23+
# ('ESRI', '102003')
24+
```
25+
26+
- **Add `Pipe.metric` and `Pipe.location` aliases.**
27+
Like `Pipe.connector_keys`, the keys `metric_key` and `location_key` may now be accessed via `metric` and `location`:
28+
29+
```python
30+
import meerschaum as mrsm
31+
32+
pipe = mrsm.Pipe('demo', 'aliases', target='{{ self.metric }}')
33+
print(pipe.target)
34+
# aliases
35+
```
36+
37+
- **Remove `None` return for `Pipe.connector` with invalid keys.**
38+
Rather than returning `None` for pipes with invalid connectors, return the verbatim connector keys string instead.
39+
40+
```python
41+
import meerschaum as mrsm
42+
43+
pipe = mrsm.Pipe('demo', 'keys')
44+
print(f"{pipe.connector=}")
45+
# pipe.connector='demo'
46+
```
47+
48+
- **Fix `api_key` login schemes for `api` connectors.**
49+
An issue with `api` connectors using the `api_key` login scheme has been fixed.
50+
51+
- **Fix client credentials for remote jobs.**
52+
When executing a remote action or job using an `api` connector with client credentials (`client_id` and `client_secret`), scopes are now correctly evaluated.
53+
754
### v3.1.3
855

956
- **Fix syncing pipes with integer datetimes.**

meerschaum/api/dash/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import_html,
1515
)
1616
flask_compress = attempt_import('flask_compress', lazy=False)
17-
dash = attempt_import('dash', lazy=False)
17+
dash, dbc = attempt_import('dash', 'dash_bootstrap_components', lazy=False)
1818

1919
from meerschaum.utils.typing import List, Optional
2020
from meerschaum.api import (
@@ -41,7 +41,7 @@
4141
'/static/css/bootstrap.min.css',
4242
'/static/css/dbc_dark.css',
4343
'/static/css/dash.css',
44-
'/static/css/fontawesome/css/all.min.css',
44+
dbc.icons.FONT_AWESOME,
4545
]
4646
scripts = ['/static/js/node_modules/xterm/lib/xterm.js']
4747
dash_app = enrich.DashProxy(

meerschaum/api/dash/callbacks/tokens.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,12 @@ def edit_token_submit_button_click(
291291
component_dict = json.loads(ctx[0]['prop_id'].split('.' + 'n_clicks')[0])
292292
token_id = component_dict['index']
293293

294+
expiration_date = datetime.fromisoformat(expiration) if expiration is not None else None
295+
294296
token = Token(
295297
id=token_id,
296298
label=label,
297-
expiration=(datetime.fromisoformat(f"{expiration}T00:00:00Z") if expiration is not None else None),
299+
expiration=expiration_date,
298300
scopes=scopes,
299301
instance=get_api_connector(),
300302
)

meerschaum/api/resources/static/css/fontawesome/LICENSE.txt

Lines changed: 0 additions & 165 deletions
This file was deleted.

0 commit comments

Comments
 (0)