Skip to content

Commit

Permalink
Merge branch 'main' into fix/480
Browse files Browse the repository at this point in the history
  • Loading branch information
fnattino authored Aug 23, 2021
2 parents b547a85 + 6cbdd88 commit cdeab92
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 24 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@

### Removed

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

### Changed

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

### Fixed

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

### Deprecated

Expand Down
14 changes: 1 addition & 13 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
[mypy]
check_untyped_defs = True
disallow_any_generics = True
disallow_incomplete_defs = True
disallow_subclassing_any = True
disallow_untyped_calls = True
disallow_untyped_decorators = True
disallow_untyped_defs = True
no_implicit_optional = True
show_error_codes = True
strict_equality = True
warn_redundant_casts = True
warn_return_any = True
warn_unused_configs = True
warn_unused_ignores = True
strict = True

[mypy-jsonschema.*]
ignore_missing_imports = True
Expand Down
43 changes: 40 additions & 3 deletions pystac/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,43 @@
"""
PySTAC is a library for working with SpatioTemporal Asset Catalogs (STACs)
"""
__all__ = [
"__version__",
"STACError",
"STACTypeError",
"DuplicateObjectKeyError",
"ExtensionAlreadyExistsError",
"ExtensionNotImplemented",
"ExtensionTypeError",
"RequiredPropertyMissing",
"STACValidationError",
"MediaType",
"RelType",
"StacIO",
"STACObject",
"STACObjectType",
"Link",
"HIERARCHICAL_LINKS",
"Catalog",
"CatalogType",
"Collection",
"Extent",
"SpatialExtent",
"TemporalExtent",
"Summaries",
"CommonMetadata",
"RangeSummary",
"Item",
"Asset",
"ItemCollection",
"Provider",
"ProviderRole",
"read_file",
"read_dict",
"write_file",
"get_stac_version",
"set_stac_version",
]

from pystac.errors import (
STACError,
Expand Down Expand Up @@ -30,11 +67,11 @@
Extent,
SpatialExtent,
TemporalExtent,
Summaries,
)
from pystac.common_metadata import CommonMetadata
from pystac.summaries import RangeSummary
from pystac.item import Item, Asset
from pystac.summaries import RangeSummary, Summaries
from pystac.asset import Asset
from pystac.item import Item
from pystac.item_collection import ItemCollection
from pystac.provider import ProviderRole, Provider
import pystac.validation
Expand Down
3 changes: 2 additions & 1 deletion pystac/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
from pystac.utils import is_absolute_href, make_absolute_href, make_relative_href

if TYPE_CHECKING:
from pystac.item import Asset as Asset_Type, Item as Item_Type
from pystac.asset import Asset as Asset_Type
from pystac.item import Item as Item_Type
from pystac.collection import Collection as Collection_Type


Expand Down
7 changes: 7 additions & 0 deletions pystac/serialization/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
__all__ = [
"merge_common_properties",
"migrate_to_latest",
"STACVersionRange",
"identify_stac_object",
"identify_stac_object_type",
]
from pystac.serialization.identify import (
STACVersionRange,
identify_stac_object,
Expand Down
2 changes: 1 addition & 1 deletion requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ipython==7.26.0
Sphinx==4.1.2
sphinxcontrib-fulltoc==1.2.0
nbsphinx==0.8.6
nbsphinx==0.8.7

jinja2<4.0
8 changes: 4 additions & 4 deletions requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jsonschema==3.2.0
coverage==5.5
doc8==0.9.0

types-python-dateutil==0.1.4
types-orjson==0.1.1
types-python-dateutil==0.1.6
types-orjson==3.6.0

pre-commit==2.13.0
pre-commit==2.14.0

# optional dependencies
orjson==3.6.0
orjson==3.6.1
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
author="stac-utils",
author_email="stac@radiant.earth",
url="https://github.com/stac-utils/pystac",
packages=find_packages(),
packages=find_packages(exclude=["tests*"]),
package_data={"": ["py.typed"]},
py_modules=[splitext(basename(path))[0] for path in glob("pystac/*.py")],
python_requires=">=3.7",
Expand Down
2 changes: 1 addition & 1 deletion tests/extensions/test_scientific.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from pystac import ExtensionTypeError
from pystac.link import Link
from pystac.collection import Summaries
from pystac.summaries import Summaries
import unittest
from typing import List, Optional

Expand Down
7 changes: 7 additions & 0 deletions tests/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
__all__ = [
"TestCases",
"ARBITRARY_GEOM",
"ARBITRARY_BBOX",
"ARBITRARY_EXTENT",
"MockStacIO",
]
from typing import Any, Dict, TYPE_CHECKING, Type
import unittest
from tests.utils.test_cases import (
Expand Down

0 comments on commit cdeab92

Please sign in to comment.