Skip to content

Commit

Permalink
add missing dependencies for linting checks + fix pystac custom valid…
Browse files Browse the repository at this point in the history
…ator dependency (relates to stac-utils/pystac#1320)
  • Loading branch information
fmigneault committed Mar 28, 2024
1 parent bebf7cc commit 1bebc0a
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.idea/
.vscode/
package-lock.json
/node_modules
[Mm]akefile.config
Expand Down
15 changes: 10 additions & 5 deletions pystac_ml_aoi/extensions/ml_aoi.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
Utilities to extend :mod:`pystac` objects with STAC ML-AOI extension.
"""
Expand Down Expand Up @@ -480,14 +479,20 @@ class ML_AOI_AssetExtension(
model = ML_AOI_AssetFields

asset_href: str
"""The ``href`` value of the :class:`~pystac.Asset` being extended."""
"""
The ``href`` value of the :class:`~pystac.Asset` being extended.
"""

properties: dict[str, Any]
"""The :class:`~pystac.Asset` fields, including extension properties."""
"""
The :class:`~pystac.Asset` fields, including extension properties.
"""

additional_read_properties: Optional[Iterable[dict[str, Any]]] = None
"""If present, this will be a list containing 1 dictionary representing the
properties of the owning :class:`~pystac.Item`."""
"""
If present, this will be a list containing 1 dictionary representing the properties of the owning
:class:`~pystac.Item`.
"""

def __init__(self, asset: pystac.Asset):
self.asset_href = asset.href
Expand Down
5 changes: 4 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ docformatter
flake8
flynt
isort
pylint
pydocstyle
pylint<3
pylint-per-file-ignores
pylint_quotes
pytest
safety
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
pystac
jsonschema
# FIXME: temporarily refer to the validator feature until released (https://github.com/stac-utils/pystac/pull/1320)
pystac @ git+https://github.com/crim-ca/pystac@custom-validator
shapely
1 change: 0 additions & 1 deletion tests/test_examples.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
Tests all files in the `examples` directory against the JSON-schema.
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pystac_extension.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
Test functionalities provided by :class:`MLAOI_Extension`.
"""
Expand Down Expand Up @@ -70,6 +69,7 @@ def make_base_stac_collection() -> pystac.Collection:

@pytest.fixture(scope="function", name="item")
def make_base_stac_item() -> pystac.Item:
# pylint: disable=line-too-long
"""
Generates a sample STAC Item with preloaded extensions relevant for testing ML-AOI.
Expand Down

0 comments on commit 1bebc0a

Please sign in to comment.