Skip to content

Commit edc55a0

Browse files
author
Jon Duckworth
authored
Merge branch 'main' into upgrade-github-actions-automatically
2 parents c70edde + 9ba5eaf commit edc55a0

File tree

217 files changed

+2913
-1116
lines changed

Some content is hidden

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

217 files changed

+2913
-1116
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ updates:
66
interval: daily
77
commit-message:
88
prefix: build(deps)
9+
- package-ecosystem: pip
10+
directory: /
11+
schedule:
12+
interval: daily

.github/workflows/continuous-integration.yml

Lines changed: 75 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,22 @@ on:
77
pull_request:
88

99
jobs:
10-
build:
11-
name: build
10+
test:
11+
name: test
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
# Allow other matrix jobs to complete if 1 fails
1515
fail-fast: false
1616
matrix:
17-
python-version: ["3.6", "3.7", "3.8"]
18-
os: [ubuntu-latest, windows-latest, macos-latest]
17+
python-version:
18+
- "3.6"
19+
- "3.7"
20+
- "3.8"
21+
os:
22+
- ubuntu-latest
23+
- windows-latest
24+
- macos-latest
25+
1926
steps:
2027
- uses: actions/checkout@v2
2128

@@ -24,15 +31,38 @@ jobs:
2431
with:
2532
python-version: ${{ matrix.python-version }}
2633

27-
- name: Cache dependencies
34+
- name: Cache dependencies (Linux)
35+
if: startsWith(runner.os, 'Linux')
2836
uses: actions/cache@v2
2937
with:
3038
path: ~/.cache/pip
3139
# Cache based on OS, Python version, and dependency hash
32-
key: pip-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-dev.txt') }}
40+
key: test-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}
41+
42+
- name: Cache dependencies (macOS)
43+
if: startsWith(runner.os, 'macOS')
44+
uses: actions/cache@v2
45+
with:
46+
path: ~/Library/Caches/pip
47+
# Cache based on OS, Python version, and dependency hash
48+
key: test-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}
49+
50+
- name: Cache dependencies (Windows)
51+
if: startsWith(runner.os, 'Windows')
52+
uses: actions/cache@v2
53+
with:
54+
path: ~\AppData\Local\pip\Cache
55+
# Cache based on OS, Python version, and dependency hash
56+
key: pip-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}
57+
58+
- name: Install dependencies
59+
run: |
60+
pip install -r requirements-test.txt
61+
pip install -e ".[validation]"
3362
34-
- name: Execute linters and test suites
35-
run: ./scripts/cibuild
63+
- name: Execute test suite
64+
run: ./scripts/test
65+
shell: bash
3666

3767
- name: Upload All coverage to Codecov
3868
uses: codecov/codecov-action@v1
@@ -42,14 +72,50 @@ jobs:
4272
token: ${{ secrets.CODECOV_TOKEN }}
4373
file: ./coverage.xml
4474
fail_ci_if_error: false
45-
vanilla:
75+
lint:
4676
runs-on: ubuntu-latest
77+
strategy:
78+
# Allow other matrix jobs to complete if 1 fails
79+
fail-fast: false
80+
matrix:
81+
python-version:
82+
- "3.6"
83+
- "3.7"
84+
- "3.8"
85+
4786
steps:
4887
- uses: actions/checkout@v2
88+
89+
- name: Set up Python ${{ matrix.python-version }}
90+
uses: actions/setup-python@v2
91+
with:
92+
python-version: ${{ matrix.python-version }}
93+
94+
- name: Cache dependencies
95+
uses: actions/cache@v2
96+
with:
97+
path: ~/.cache/pip
98+
# Cache based on OS, Python version, and dependency hash
99+
key: lint-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}
100+
101+
- name: Install dependencies
102+
run: |
103+
pip install -r requirements-test.txt
104+
105+
- name: Execute linters & type checkers
106+
run: ./scripts/lint
107+
108+
vanilla:
109+
runs-on: ubuntu-latest
110+
steps:
111+
- uses: actions/checkout@v2
112+
49113
- uses: actions/setup-python@v2
50114
with:
51115
python-version: "3.8"
116+
52117
- name: Install without orjson
53118
run: pip install '.[validation]'
119+
54120
- name: Run unittests
55121
run: python -m unittest discover tests

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
tmp*
12
*.pyc
23
*.egg-info
34
build/

CHANGELOG.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,22 @@
44

55
### Added
66

7+
### Changed
8+
9+
### Fixed
10+
11+
### Removed
12+
13+
## [1.0.0-beta.3]
14+
15+
### Added
16+
17+
- Summaries for View Geometry, Projection, and Scientific extensions ([#372](https://github.com/stac-utils/pystac/pull/372))
718
- Raster extension support ([#364](https://github.com/stac-utils/pystac/issues/364))
819
- solar_illumination field in eo extension ([#356](https://github.com/stac-utils/pystac/issues/356))
920
- Added `Link.canonical` static method for creating links with "canonical" rel type ([#351](https://github.com/stac-utils/pystac/pull/351))
1021
- Added `RelType` enum containing common `rel` values ([#351](https://github.com/stac-utils/pystac/pull/351))
11-
12-
### Changed
22+
- Added support for summaries ([#264](https://github.com/stac-utils/pystac/pull/264))
1323

1424
### Fixed
1525

@@ -324,7 +334,8 @@ use `Band.create`
324334

325335
Initial release.
326336

327-
[Unreleased]: <https://github.com/stac-utils/pystac/compare/v1.0.0-beta.2..main>
337+
[Unreleased]: <https://github.com/stac-utils/pystac/compare/v1.0.0-beta.3..main>
338+
[v1.0.0-beta.3]: <https://github.com/stac-utils/pystac/compare/v1.0.0-beta.2..v1.0.0-beta.3>
328339
[v1.0.0-beta.2]: <https://github.com/stac-utils/pystac/compare/v1.0.0-beta.1..v1.0.0-beta.2>
329340
[v1.0.0-beta.1]: <https://github.com/stac-utils/pystac/compare/v0.5.6..v1.0.0-beta.1>
330341
[v0.5.6]: <https://github.com/stac-utils/pystac/compare/v0.5.5..v0.5.6>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
![Build Status](https://github.com/stac-utils/pystac/workflows/CI/badge.svg?branch=develop)
33
[![PyPI version](https://badge.fury.io/py/pystac.svg)](https://badge.fury.io/py/pystac)
44
[![Documentation](https://readthedocs.org/projects/pystac/badge/?version=latest)](https://pystac.readthedocs.io/en/latest/)
5-
[![codecov](https://codecov.io/gh/stac-utils/pystac/branch/develop/graph/badge.svg)](https://codecov.io/gh/stac-utils/pystac)
5+
[![codecov](https://codecov.io/gh/stac-utils/pystac/branch/main/graph/badge.svg)](https://codecov.io/gh/stac-utils/pystac)
66
[![Gitter chat](https://badges.gitter.im/azavea/pystac.svg)](https://gitter.im/azavea/pystac)
77
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
88

docs/api.rst

Lines changed: 74 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -350,17 +350,63 @@ PointcloudItemExt
350350
Projection Extension
351351
--------------------
352352

353-
Implements the `Projection Extension <https://github.com/radiantearth/stac-spec/tree/v1.0.0-beta.2/extensions/projection>`_.
353+
These classes are representations of the :stac-ext:`Projection Extension Spec
354+
<projection>`.
354355

355-
ProjectionItemExt
356-
~~~~~~~~~~~~~~~~~
356+
ProjectionExtension
357+
~~~~~~~~~~~~~~~~~~~
357358

358-
**TEMPORARILY REMOVED**
359+
.. autoclass:: pystac.extensions.projection.ProjectionExtension
360+
:members:
361+
:show-inheritance:
359362

360-
.. .. autoclass:: pystac.extensions.projection.ProjectionItemExt
361-
.. :members:
362-
.. :undoc-members:
363-
.. :show-inheritance:
363+
ItemProjectionExtension
364+
~~~~~~~~~~~~~~~~~~~~~~~
365+
366+
.. autoclass:: pystac.extensions.projection.ItemProjectionExtension
367+
:members:
368+
:show-inheritance:
369+
370+
AssetProjectionExtension
371+
~~~~~~~~~~~~~~~~~~~~~~~~
372+
373+
.. autoclass:: pystac.extensions.projection.AssetProjectionExtension
374+
:members:
375+
:show-inheritance:
376+
377+
Scientific Extension
378+
--------------------
379+
380+
These classes are representations of the :stac-ext:`Scientific Extension Spec
381+
<scientific>`.
382+
383+
Publication
384+
~~~~~~~~~~~
385+
386+
.. autoclass:: pystac.extensions.scientific.Publication
387+
:members:
388+
:show-inheritance:
389+
390+
ScientificExtension
391+
~~~~~~~~~~~~~~~~~~~
392+
393+
.. autoclass:: pystac.extensions.scientific.ScientificExtension
394+
:members:
395+
:show-inheritance:
396+
397+
CollectionScientificExtension
398+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
399+
400+
.. autoclass:: pystac.extensions.scientific.CollectionScientificExtension
401+
:members:
402+
:show-inheritance:
403+
404+
ItemScientificExtension
405+
~~~~~~~~~~~~~~~~~~~~~~~
406+
407+
.. autoclass:: pystac.extensions.scientific.ItemScientificExtension
408+
:members:
409+
:show-inheritance:
364410

365411
Timestamps Extension
366412
--------------------
@@ -462,17 +508,29 @@ VersionItemExt
462508
View Geometry Extension
463509
-----------------------
464510

465-
Implements the :stac-ext:`View Geometry Extension <view>`.
511+
These classes are representations of the :stac-ext:`View Geometry Extension Spec
512+
<view>`.
466513

467-
ViewItemExt
468-
~~~~~~~~~~~
514+
ViewExtension
515+
~~~~~~~~~~~~~
469516

470-
**TEMPORARILY REMOVED**
517+
.. autoclass:: pystac.extensions.view.ViewExtension
518+
:members:
519+
:show-inheritance:
471520

472-
.. .. autoclass:: pystac.extensions.view.ViewItemExt
473-
.. :members:
474-
.. :undoc-members:
475-
.. :show-inheritance:
521+
ItemViewExtension
522+
~~~~~~~~~~~~~~~~~
523+
524+
.. autoclass:: pystac.extensions.view.ItemViewExtension
525+
:members:
526+
:show-inheritance:
527+
528+
AssetViewExtension
529+
~~~~~~~~~~~~~~~~~~
530+
531+
.. autoclass:: pystac.extensions.view.AssetViewExtension
532+
:members:
533+
:show-inheritance:
476534

477535
Serialization
478536
-------------

mypy.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
[mypy]
2+
disallow_any_generics = True
23
disallow_untyped_defs = True
34
ignore_missing_imports = True
5+
no_implicit_optional = True
46
show_error_codes = True
7+
warn_redundant_casts = True
8+
warn_return_any = True
9+
warn_unused_ignores = True

pystac/__init__.py

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,36 @@
44

55
# flake8: noqa
66
from pystac.errors import (
7-
STACError, # type:ignore
8-
STACTypeError, # type:ignore
9-
ExtensionAlreadyExistsError, # type:ignore
10-
ExtensionTypeError, # type:ignore
11-
RequiredPropertyMissing, # type:ignore
12-
STACValidationError, # type:ignore
7+
STACError,
8+
STACTypeError,
9+
ExtensionAlreadyExistsError,
10+
ExtensionTypeError,
11+
RequiredPropertyMissing,
12+
STACValidationError,
1313
)
1414

1515
from typing import Any, Dict, Optional
1616
from pystac.version import (
1717
__version__,
18-
get_stac_version, # type:ignore
19-
set_stac_version, # type:ignore
18+
get_stac_version,
19+
set_stac_version,
2020
)
21-
from pystac.media_type import MediaType # type:ignore
22-
from pystac.rel_type import RelType # type: ignore
23-
from pystac.stac_io import StacIO # type:ignore
24-
from pystac.stac_object import STACObject, STACObjectType # type:ignore
25-
from pystac.link import Link, HIERARCHICAL_LINKS # type:ignore
26-
from pystac.catalog import Catalog, CatalogType # type:ignore
21+
from pystac.media_type import MediaType
22+
from pystac.rel_type import RelType
23+
from pystac.stac_io import StacIO
24+
from pystac.stac_object import STACObject, STACObjectType
25+
from pystac.link import Link, HIERARCHICAL_LINKS
26+
from pystac.catalog import Catalog, CatalogType
2727
from pystac.collection import (
28-
Collection, # type:ignore
29-
Extent, # type:ignore
30-
SpatialExtent, # type:ignore
31-
TemporalExtent, # type:ignore
32-
Provider, # type:ignore
33-
Summaries, # type:ignore
34-
RangeSummary, # type:ignore
28+
Collection,
29+
Extent,
30+
SpatialExtent,
31+
TemporalExtent,
32+
Provider,
33+
Summaries,
3534
)
36-
from pystac.item import Item, Asset, CommonMetadata # type:ignore
35+
from pystac.summaries import RangeSummary
36+
from pystac.item import Item, Asset, CommonMetadata
3737

3838
import pystac.validation
3939

pystac/catalog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ def map_items(
798798
to the item_mapper function.
799799
"""
800800

801-
new_cat = cast(Catalog, self.full_copy())
801+
new_cat = self.full_copy()
802802

803803
def process_catalog(catalog: Catalog) -> None:
804804
for child in catalog.get_children():

0 commit comments

Comments
 (0)