Skip to content

Commit cdeab92

Browse files
authored
Merge branch 'main' into fix/480
2 parents b547a85 + 6cbdd88 commit cdeab92

File tree

10 files changed

+71
-24
lines changed

10 files changed

+71
-24
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,19 @@
66

77
### Removed
88

9+
- Exclude `tests` from package distribution. This should make the package lighter ([#604](https://github.com/stac-utils/pystac/pull/604))
10+
911
### Changed
1012

13+
- Enable [strict
14+
mode](https://mypy.readthedocs.io/en/latest/command_line.html?highlight=strict%20mode#cmdoption-mypy-strict)
15+
for `mypy` ([#591](https://github.com/stac-utils/pystac/pull/591))
16+
1117
### Fixed
1218

1319
- `generate_subcatalogs` can include multiple template values in a single subfolder layer
1420
([#595](https://github.com/stac-utils/pystac/pull/595))
21+
- Avoid implicit re-exports ([#591](https://github.com/stac-utils/pystac/pull/591))
1522

1623
### Deprecated
1724

mypy.ini

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
[mypy]
2-
check_untyped_defs = True
3-
disallow_any_generics = True
4-
disallow_incomplete_defs = True
5-
disallow_subclassing_any = True
6-
disallow_untyped_calls = True
7-
disallow_untyped_decorators = True
8-
disallow_untyped_defs = True
9-
no_implicit_optional = True
102
show_error_codes = True
11-
strict_equality = True
12-
warn_redundant_casts = True
13-
warn_return_any = True
14-
warn_unused_configs = True
15-
warn_unused_ignores = True
3+
strict = True
164

175
[mypy-jsonschema.*]
186
ignore_missing_imports = True

pystac/__init__.py

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,43 @@
11
"""
22
PySTAC is a library for working with SpatioTemporal Asset Catalogs (STACs)
33
"""
4+
__all__ = [
5+
"__version__",
6+
"STACError",
7+
"STACTypeError",
8+
"DuplicateObjectKeyError",
9+
"ExtensionAlreadyExistsError",
10+
"ExtensionNotImplemented",
11+
"ExtensionTypeError",
12+
"RequiredPropertyMissing",
13+
"STACValidationError",
14+
"MediaType",
15+
"RelType",
16+
"StacIO",
17+
"STACObject",
18+
"STACObjectType",
19+
"Link",
20+
"HIERARCHICAL_LINKS",
21+
"Catalog",
22+
"CatalogType",
23+
"Collection",
24+
"Extent",
25+
"SpatialExtent",
26+
"TemporalExtent",
27+
"Summaries",
28+
"CommonMetadata",
29+
"RangeSummary",
30+
"Item",
31+
"Asset",
32+
"ItemCollection",
33+
"Provider",
34+
"ProviderRole",
35+
"read_file",
36+
"read_dict",
37+
"write_file",
38+
"get_stac_version",
39+
"set_stac_version",
40+
]
441

542
from pystac.errors import (
643
STACError,
@@ -30,11 +67,11 @@
3067
Extent,
3168
SpatialExtent,
3269
TemporalExtent,
33-
Summaries,
3470
)
3571
from pystac.common_metadata import CommonMetadata
36-
from pystac.summaries import RangeSummary
37-
from pystac.item import Item, Asset
72+
from pystac.summaries import RangeSummary, Summaries
73+
from pystac.asset import Asset
74+
from pystac.item import Item
3875
from pystac.item_collection import ItemCollection
3976
from pystac.provider import ProviderRole, Provider
4077
import pystac.validation

pystac/catalog.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
from pystac.utils import is_absolute_href, make_absolute_href, make_relative_href
3333

3434
if TYPE_CHECKING:
35-
from pystac.item import Asset as Asset_Type, Item as Item_Type
35+
from pystac.asset import Asset as Asset_Type
36+
from pystac.item import Item as Item_Type
3637
from pystac.collection import Collection as Collection_Type
3738

3839

pystac/serialization/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
__all__ = [
2+
"merge_common_properties",
3+
"migrate_to_latest",
4+
"STACVersionRange",
5+
"identify_stac_object",
6+
"identify_stac_object_type",
7+
]
18
from pystac.serialization.identify import (
29
STACVersionRange,
310
identify_stac_object,

requirements-docs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ipython==7.26.0
22
Sphinx==4.1.2
33
sphinxcontrib-fulltoc==1.2.0
4-
nbsphinx==0.8.6
4+
nbsphinx==0.8.7
55

66
jinja2<4.0

requirements-test.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jsonschema==3.2.0
88
coverage==5.5
99
doc8==0.9.0
1010

11-
types-python-dateutil==0.1.4
12-
types-orjson==0.1.1
11+
types-python-dateutil==0.1.6
12+
types-orjson==3.6.0
1313

14-
pre-commit==2.13.0
14+
pre-commit==2.14.0
1515

1616
# optional dependencies
17-
orjson==3.6.0
17+
orjson==3.6.1

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
author="stac-utils",
2020
author_email="[email protected]",
2121
url="https://github.com/stac-utils/pystac",
22-
packages=find_packages(),
22+
packages=find_packages(exclude=["tests*"]),
2323
package_data={"": ["py.typed"]},
2424
py_modules=[splitext(basename(path))[0] for path in glob("pystac/*.py")],
2525
python_requires=">=3.7",

tests/extensions/test_scientific.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from pystac import ExtensionTypeError
66
from pystac.link import Link
7-
from pystac.collection import Summaries
7+
from pystac.summaries import Summaries
88
import unittest
99
from typing import List, Optional
1010

tests/utils/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
__all__ = [
2+
"TestCases",
3+
"ARBITRARY_GEOM",
4+
"ARBITRARY_BBOX",
5+
"ARBITRARY_EXTENT",
6+
"MockStacIO",
7+
]
18
from typing import Any, Dict, TYPE_CHECKING, Type
29
import unittest
310
from tests.utils.test_cases import (

0 commit comments

Comments
 (0)