morecantile 6.1.0__tar.gz → 6.2.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.
Files changed (32) hide show
  1. {morecantile-6.1.0 → morecantile-6.2.0}/.pre-commit-config.yaml +5 -10
  2. {morecantile-6.1.0 → morecantile-6.2.0}/PKG-INFO +4 -3
  3. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/__init__.py +1 -1
  4. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/defaults.py +1 -1
  5. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/models.py +7 -4
  6. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/utils.py +4 -6
  7. {morecantile-6.1.0 → morecantile-6.2.0}/pyproject.toml +5 -4
  8. {morecantile-6.1.0 → morecantile-6.2.0}/.gitignore +0 -0
  9. {morecantile-6.1.0 → morecantile-6.2.0}/LICENSE +0 -0
  10. {morecantile-6.1.0 → morecantile-6.2.0}/README.md +0 -0
  11. {morecantile-6.1.0 → morecantile-6.2.0}/benchmarks/README.md +0 -0
  12. {morecantile-6.1.0 → morecantile-6.2.0}/benchmarks/benchmarks.py +0 -0
  13. {morecantile-6.1.0 → morecantile-6.2.0}/benchmarks/requirements.txt +0 -0
  14. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/commons.py +0 -0
  15. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/data/CDB1GlobalGrid.json +0 -0
  16. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/data/CanadianNAD83_LCC.json +0 -0
  17. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/data/EuropeanETRS89_LAEAQuad.json +0 -0
  18. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/data/GNOSISGlobalGrid.json +0 -0
  19. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/data/LINZAntarticaMapTilegrid.json +0 -0
  20. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/data/NZTM2000Quad.json +0 -0
  21. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/data/README.md +0 -0
  22. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/data/UPSAntarcticWGS84Quad.json +0 -0
  23. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/data/UPSArcticWGS84Quad.json +0 -0
  24. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/data/UTM31WGS84Quad.json +0 -0
  25. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/data/WGS1984Quad.json +0 -0
  26. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/data/WebMercatorQuad.json +0 -0
  27. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/data/WorldCRS84Quad.json +0 -0
  28. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/data/WorldMercatorWGS84Quad.json +0 -0
  29. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/errors.py +0 -0
  30. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/py.typed +0 -0
  31. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/scripts/__init__.py +0 -0
  32. {morecantile-6.1.0 → morecantile-6.2.0}/morecantile/scripts/cli.py +0 -0
@@ -4,26 +4,21 @@ repos:
4
4
  hooks:
5
5
  - id: validate-pyproject
6
6
 
7
- - repo: https://github.com/psf/black
8
- rev: 22.12.0
9
- hooks:
10
- - id: black
11
- language_version: python
12
-
13
7
  - repo: https://github.com/PyCQA/isort
14
- rev: 5.12.0
8
+ rev: 5.13.2
15
9
  hooks:
16
10
  - id: isort
17
11
  language_version: python
18
12
 
19
- - repo: https://github.com/charliermarsh/ruff-pre-commit
20
- rev: v0.0.238
13
+ - repo: https://github.com/astral-sh/ruff-pre-commit
14
+ rev: v0.3.5
21
15
  hooks:
22
16
  - id: ruff
23
17
  args: ["--fix"]
18
+ - id: ruff-format
24
19
 
25
20
  - repo: https://github.com/pre-commit/mirrors-mypy
26
- rev: v1.4.1
21
+ rev: v1.11.2
27
22
  hooks:
28
23
  - id: mypy
29
24
  language_version: python
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: morecantile
3
- Version: 6.1.0
3
+ Version: 6.2.0
4
4
  Summary: Construct and use map tile grids (a.k.a TileMatrixSet / TMS).
5
5
  Keywords: GIS,TMS,TileMatrixSet,Map Tile
6
6
  Author-email: Vincent Sarago <vincent@developmentseed.com>
@@ -14,9 +14,10 @@ Classifier: Programming Language :: Python :: 3.9
14
14
  Classifier: Programming Language :: Python :: 3.10
15
15
  Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
17
18
  Classifier: Topic :: Scientific/Engineering :: GIS
18
19
  Requires-Dist: attrs
19
- Requires-Dist: pyproj~=3.1
20
+ Requires-Dist: pyproj>=3.1,<4.0
20
21
  Requires-Dist: pydantic~=2.0
21
22
  Requires-Dist: pytest ; extra == "benchmark"
22
23
  Requires-Dist: pytest-benchmark ; extra == "benchmark"
@@ -8,7 +8,7 @@ Refs:
8
8
 
9
9
  """
10
10
 
11
- __version__ = "6.1.0"
11
+ __version__ = "6.2.0"
12
12
 
13
13
  from .commons import BoundingBox, Coords, Tile # noqa
14
14
  from .defaults import TileMatrixSets, tms # noqa
@@ -55,7 +55,7 @@ class TileMatrixSets:
55
55
  """Register TileMatrixSet(s)."""
56
56
  for identifier in custom_tms.keys():
57
57
  if identifier in self.tms and not overwrite:
58
- raise Exception(f"{identifier} is already a registered TMS.")
58
+ raise InvalidIdentifier(f"{identifier} is already a registered TMS.")
59
59
 
60
60
  return TileMatrixSets({**self.tms, **custom_tms})
61
61
 
@@ -510,6 +510,7 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True):
510
510
  "Could not create coordinate Transformer from input CRS to the given geographic CRS"
511
511
  "some methods might not be available.",
512
512
  UserWarning,
513
+ stacklevel=1,
513
514
  )
514
515
  self._to_geographic = None
515
516
  self._from_geographic = None
@@ -537,10 +538,8 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True):
537
538
  def is_variable(self) -> bool:
538
539
  """Check if TMS has variable width matrix."""
539
540
  return any(
540
- [
541
- True if matrix.variableMatrixWidths is not None else False
542
- for matrix in self.tileMatrices
543
- ]
541
+ True if matrix.variableMatrixWidths is not None else False
542
+ for matrix in self.tileMatrices
544
543
  )
545
544
 
546
545
  def __iter__(self):
@@ -800,6 +799,7 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True):
800
799
  warnings.warn(
801
800
  f"TileMatrix not found for level: {zoom} - Creating values from TMS Scale.",
802
801
  UserWarning,
802
+ stacklevel=1,
803
803
  )
804
804
 
805
805
  # TODO: what if we want to construct a matrix for a level up ?
@@ -894,6 +894,7 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True):
894
894
  warnings.warn(
895
895
  f"Point ({x}, {y}) is outside TMS bounds {list(self.xy_bbox)}.",
896
896
  PointOutsideTMSBounds,
897
+ stacklevel=1,
897
898
  )
898
899
 
899
900
  lng, lat = self._to_geographic.transform(x, y)
@@ -913,6 +914,7 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True):
913
914
  warnings.warn(
914
915
  f"Point ({lng}, {lat}) is outside TMS bounds {list(self.bbox)}.",
915
916
  PointOutsideTMSBounds,
917
+ stacklevel=1,
916
918
  )
917
919
 
918
920
  x, y = self._from_geographic.transform(lng, lat)
@@ -1372,6 +1374,7 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True):
1372
1374
  "CRS is no longer part of the GeoJSON specification."
1373
1375
  "Other projection than EPSG:4326 might not be supported.",
1374
1376
  UserWarning,
1377
+ stacklevel=1,
1375
1378
  )
1376
1379
  feat.update(
1377
1380
  {
@@ -118,12 +118,10 @@ def is_power_of_two(number: int) -> bool:
118
118
  def check_quadkey_support(tms: List) -> bool:
119
119
  """Check if a Tile Matrix Set supports quadkeys"""
120
120
  return all(
121
- [
122
- (t.matrixWidth == t.matrixHeight)
123
- and is_power_of_two(t.matrixWidth)
124
- and ((t.matrixWidth * 2) == tms[i + 1].matrixWidth)
125
- for i, t in enumerate(tms[:-1])
126
- ]
121
+ (t.matrixWidth == t.matrixHeight)
122
+ and is_power_of_two(t.matrixWidth)
123
+ and ((t.matrixWidth * 2) == tms[i + 1].matrixWidth)
124
+ for i, t in enumerate(tms[:-1])
127
125
  )
128
126
 
129
127
 
@@ -17,12 +17,13 @@ classifiers = [
17
17
  "Programming Language :: Python :: 3.10",
18
18
  "Programming Language :: Python :: 3.11",
19
19
  "Programming Language :: Python :: 3.12",
20
+ "Programming Language :: Python :: 3.13",
20
21
  "Topic :: Scientific/Engineering :: GIS",
21
22
  ]
22
23
  dynamic = ["version"]
23
24
  dependencies = [
24
25
  "attrs",
25
- "pyproj~=3.1",
26
+ "pyproj>=3.1,<4.0",
26
27
  "pydantic~=2.0",
27
28
  ]
28
29
 
@@ -95,7 +96,7 @@ default_section = "THIRDPARTY"
95
96
  [tool.mypy]
96
97
  no_strict_optional = true
97
98
 
98
- [tool.ruff]
99
+ [tool.ruff.lint]
99
100
  select = [
100
101
  "D1", # pydocstyle errors
101
102
  "E", # pycodestyle errors
@@ -110,7 +111,7 @@ ignore = [
110
111
  "B905", # ignore zip() without an explicit strict= parameter, only support with python >3.10
111
112
  ]
112
113
 
113
- [tool.ruff.per-file-ignores]
114
+ [tool.ruff.lint.per-file-ignores]
114
115
  "tests/*.py" = ["D1"]
115
116
 
116
117
 
@@ -120,7 +121,7 @@ filterwarnings = [
120
121
  ]
121
122
 
122
123
  [tool.bumpversion]
123
- current_version = "6.1.0"
124
+ current_version = "6.2.0"
124
125
 
125
126
  search = "{current_version}"
126
127
  replace = "{new_version}"
File without changes
File without changes
File without changes