Skip to content

Commit 805d630

Browse files
committed
removed timvt_local from gitignore
1 parent d89ee00 commit 805d630

Some content is hidden

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

77 files changed

+67884
-15
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
.venv
22
__pycache__
3-
deps
4-
macrostrat.toml
3+
macrostrat.toml

services/legacy-tileserver/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
.venv
33
__pycache__
44
.pytest_cache
5+
deps
56

services/tileserver/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
.venv
33
__pycache__
44
.pytest_cache
5+
./deps/macrostrat_tileserver_utils-0.1.0-py3-none-any.whl
56

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[bumpversion]
2+
current_version = 0.8.0a3
3+
commit = True
4+
tag = True
5+
tag_name = {new_version}
6+
7+
[bumpversion:file:timvt/__init__.py]
8+
search = __version__ = "{current_version}"
9+
replace = __version__ = "{new_version}"
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# DB connection
2+
POSTGRES_USER=username
3+
POSTGRES_PASS=password
4+
POSTGRES_DBNAME=postgis
5+
POSTGRES_HOST=0.0.0.0
6+
POSTGRES_PORT=5432
7+
8+
# You can also define the DATABASE_URL directly
9+
# DATABASE_URL=postgresql://username:[email protected]:5432/postgis
10+
11+
# Tile settings
12+
TIMVT_TILE_RESOLUTION=4096
13+
TIMVT_TILE_BUFFER=256
14+
TIMVT_MAX_FEATURES_PER_TILE=10000
15+
16+
# Default Table/Function min/max zoom
17+
TIMVT_DEFAULT_MINZOOM=8
18+
TIMVT_DEFAULT_MAXZOOM=19
19+
20+
# TiMVT settings
21+
TIMVT_NAME = "Fast MVT Server"
22+
TIMVT_CORS_ORIGINS="*"
23+
TIMVT_DEBUG=TRUE
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[flake8]
2+
ignore = E501,W503,E203
3+
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist
4+
max-complexity = 12
5+
max-line-length = 90
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: 22.3.0
4+
hooks:
5+
- id: black
6+
language_version: python
7+
8+
- repo: https://github.com/PyCQA/isort
9+
rev: 5.12.0
10+
hooks:
11+
- id: isort
12+
language_version: python
13+
14+
- repo: https://github.com/PyCQA/flake8
15+
rev: 3.8.3
16+
hooks:
17+
- id: flake8
18+
language_version: python
19+
20+
- repo: https://github.com/PyCQA/pydocstyle
21+
rev: 6.1.1
22+
hooks:
23+
- id: pydocstyle
24+
language_version: python
25+
additional_dependencies:
26+
- toml
27+
28+
- repo: https://github.com/pre-commit/mirrors-mypy
29+
rev: v0.991
30+
hooks:
31+
- id: mypy
32+
language_version: python
33+
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# Release Notes
2+
3+
## 0.8.0a3 (2023-03-14)
4+
5+
* fix factories `url_for` type (for starlette >=0.26)
6+
7+
## 0.8.0a2 (2022-12-14)
8+
9+
* replace `VectorTilerFactory.tms_dependency` attribute by `TilerFactory.supported_tms`. This attribute gets a `morecantile.defaults.TileMatrixSets` store and will create the tms dependencies dynamically
10+
* replace `TMSFactory.tms_dependency` attribute by `TMSFactory.supported_tms`. This attribute gets a `morecantile.defaults.TileMatrixSets` store and will create the tms dependencies dynamically
11+
* add `default_tms` in `VectorTilerFactory` to set the default TMS identifier supported by the tiler (e.g `WebMercatorQuad`)
12+
13+
## 0.8.0a1 (2022-11-21)
14+
15+
* update hatch config
16+
17+
## 0.8.0a0 (2022-11-16)
18+
19+
* remove `.pbf` extension in tiles endpoints
20+
* add `orjson` as an optional dependency (for faster JSON encoding/decoding within the database communication)
21+
* enable `geom` query parameter to select the `geometry column` (defaults to the first one)
22+
* add FastAPI application `exception handler` in default app
23+
* add `CacheControlMiddleware` middleware
24+
* enable more options to be forwarded to the `asyncpg` pool creation
25+
* add `PG_SCHEMAS` and `PG_TABLES` environment variable to specify Postgres schemas and tables
26+
* add `TIMVT_FUNCTIONS_DIRECTORY` environment variable to look for function SQL files
27+
* switch viewer to Maplibre
28+
* add `Point` and `LineString` feature support in viewer
29+
* Update dockerfiles to python3.10 and postgres14-postgis3.3
30+
* update FastAPI requirement to >0.87
31+
* remove endpoint Tags
32+
* make orjson a default requirement
33+
34+
**breaking changes**
35+
36+
* renamed `app.state.function_catalog` to `app.state.timvt_function_catalog`
37+
* changed `timvt.layer.Table` format
38+
* `table_catalog` is now of `Dict[str, Dict[str, Any]]` type (instead of `List[Dict[str, Any]]`)
39+
* renamed `timvt.db.table_index` to `timvt.dbmodel.get_table_index`
40+
* default to only view tables within the `public` schema
41+
* renamed *base exception class* to `TiMVTError`
42+
* remove python 3.7 support
43+
44+
## 0.7.0 (2022-06-09)
45+
46+
* update database settings input
47+
* add `default_tms` in Layer definition to specify the Min/Max zoom TileMatrixSet
48+
* update `starlette-cramjam` requirement
49+
50+
**breaking changes**
51+
52+
* deprecating the use of `.pbf` in tile's path
53+
54+
## 0.6.0 (2022-04-14)
55+
56+
* update `morecantile` requirement to `>3.1,=<4.0`
57+
58+
## 0.5.0 (2022-04-13)
59+
60+
* switch to `pyproject.toml` and repo cleanup
61+
62+
## 0.4.1 (2022-02-10)
63+
64+
* update viewer
65+
66+
## 0.4.0 (2022-02-10)
67+
68+
* Refactor Function Registry to be hosted in the application state (`app.state.function_catalog) as the Table catalog.
69+
* move `timvt.function.Registry` to `timvt.layer.FunctionRegistry`
70+
71+
## 0.3.0 (2022-02-09)
72+
73+
* update settings management from starlette to pydantic and use `TIMVT_` prefix
74+
75+
## 0.2.1 (2022-01-25)
76+
77+
* update FastAPI version requirement to allow `>=0.73`
78+
79+
## 0.2.0 (2022-01-05)
80+
81+
* Faster and cleaner SQL code
82+
* Compare Tile and Table geometries in Table CRS (speedup)
83+
* Allow non-epsg based TileMatrixSet
84+
* update morecantile requirement to `>=3.0.2`
85+
* add `geometry_srid` in Table metadata
86+
* refactor `Function` layers.
87+
88+
**breaking changes**
89+
90+
* Function layer signature change
91+
```sql
92+
-- before
93+
CREATE FUNCTION name(
94+
-- bounding box
95+
xmin float,
96+
ymin float,
97+
xmax float,
98+
ymax float,
99+
-- EPSG (SRID) of the bounding box coordinates
100+
epsg integer,
101+
-- additional parameters
102+
value0 int,
103+
value1 int
104+
)
105+
RETURNS bytea
106+
107+
-- now
108+
CREATE FUNCTION name(
109+
-- bounding box
110+
xmin float,
111+
ymin float,
112+
xmax float,
113+
ymax float,
114+
-- EPSG (SRID) of the bounding box coordinates
115+
epsg integer,
116+
-- additional parameters
117+
query_params json
118+
)
119+
RETURNS bytea
120+
```
121+
122+
## 0.1.0 (2021-10-12)
123+
124+
Initial release
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Development - Contributing
2+
3+
Issues and pull requests are more than welcome: https://github.com/developmentseed/timvt/issues
4+
5+
**dev install**
6+
7+
```bash
8+
$ git clone https://github.com/developmentseed/timvt.git
9+
$ cd timvt
10+
$ pip install -e .["test,dev"]
11+
```
12+
13+
You can then run the tests with the following command:
14+
15+
```sh
16+
python -m pytest --cov timvt --cov-report term-missing
17+
```
18+
19+
**pre-commit**
20+
21+
This repo is set to use `pre-commit` to run *isort*, *flake8*, *pydocstring*, *black* ("uncompromising Python code formatter") and mypy when committing new code.
22+
23+
```bash
24+
$ pre-commit install
25+
```
26+
27+
### Docs
28+
29+
```bash
30+
$ git clone https://github.com/developmentseed/timvt.git
31+
$ cd timvt
32+
$ pip install -e .["docs"]
33+
```
34+
35+
Hot-reloading docs:
36+
37+
```bash
38+
$ mkdocs serve
39+
```
40+
41+
To manually deploy docs (note you should never need to do this because Github
42+
Actions deploys automatically for new commits.):
43+
44+
```bash
45+
$ mkdocs gh-deploy
46+
```
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Development Seed
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)