Skip to content

Commit 929eb1d

Browse files
committed
Merge branch 'main' into 1.0
2 parents 3a20657 + 8efe00a commit 929eb1d

Some content is hidden

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

54 files changed

+3194
-805
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 19 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,25 @@ jobs:
3232
experimental:
3333
- false
3434
include:
35-
- python-version: "3.11.0-alpha.3"
35+
- python-version: "3.11.0-alpha.7"
3636
os: ubuntu-latest
3737
experimental: true
38-
- python-version: "3.11.0-alpha.3"
38+
- python-version: "3.11.0-alpha.7"
3939
os: windows-latest
4040
experimental: true
41-
- python-version: "3.11.0-alpha.3"
41+
- python-version: "3.11.0-alpha.7"
4242
os: macos-latest
4343
experimental: true
4444

4545
steps:
46-
- uses: actions/checkout@v2
46+
- uses: actions/checkout@v3
4747

4848
- name: Set up Python ${{ matrix.python-version }}
49-
uses: actions/setup-python@v2
49+
uses: actions/setup-python@v4
5050
with:
5151
python-version: ${{ matrix.python-version }}
52+
cache: 'pip'
53+
cache-dependency-path: requirements-test.txt
5254

5355
- uses: actions-rs/toolchain@v1
5456
# Wheels for orjson are not available for Python 3.11. This sets up the Rust
@@ -60,30 +62,6 @@ jobs:
6062
default: true
6163
profile: minimal
6264

63-
- name: Cache dependencies (Linux)
64-
if: startsWith(runner.os, 'Linux')
65-
uses: actions/cache@v2
66-
with:
67-
path: ~/.cache/pip
68-
# Cache based on OS, Python version, and dependency hash
69-
key: pip-test-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}
70-
71-
- name: Cache dependencies (macOS)
72-
if: startsWith(runner.os, 'macOS')
73-
uses: actions/cache@v2
74-
with:
75-
path: ~/Library/Caches/pip
76-
# Cache based on OS, Python version, and dependency hash
77-
key: pip-test-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}
78-
79-
- name: Cache dependencies (Windows)
80-
if: startsWith(runner.os, 'Windows')
81-
uses: actions/cache@v2
82-
with:
83-
path: ~\AppData\Local\pip\Cache
84-
# Cache based on OS, Python version, and dependency hash
85-
key: pip-test-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}
86-
8765
- name: Install dependencies
8866
run: |
8967
pip install --upgrade pip
@@ -100,19 +78,14 @@ jobs:
10078
name: coverage
10179
runs-on: ubuntu-latest
10280
steps:
103-
- uses: actions/checkout@v2
81+
- uses: actions/checkout@v3
10482

10583
- name: Set up Python 3.8
106-
uses: actions/setup-python@v2
84+
uses: actions/setup-python@v4
10785
with:
10886
python-version: "3.8"
109-
110-
- name: Cache dependencies
111-
uses: actions/cache@v2
112-
with:
113-
path: ~/.cache/pip
114-
# Cache based on OS, Python version, and dependency hash
115-
key: pip-test-${{ runner.os }}-python3.8-${{ hashFiles('requirements-test.txt') }}
87+
cache: 'pip'
88+
cache-dependency-path: requirements-test.txt
11689

11790
- name: Install dependencies
11891
run: |
@@ -131,7 +104,7 @@ jobs:
131104
run: coverage xml --fail-under 0
132105

133106
- name: Upload All coverage to Codecov
134-
uses: codecov/codecov-action@v2.1.0
107+
uses: codecov/codecov-action@v3
135108
if: ${{ env.GITHUB_REPOSITORY }} == 'stac-utils/pystac'
136109
with:
137110
token: ${{ secrets.CODECOV_TOKEN }}
@@ -154,22 +127,17 @@ jobs:
154127
- "3.8"
155128
- "3.9"
156129
- "3.10"
157-
- "3.11.0-alpha.3"
130+
- "3.11.0-alpha.7"
158131

159132
steps:
160-
- uses: actions/checkout@v2
133+
- uses: actions/checkout@v3
161134

162135
- name: Set up Python ${{ matrix.python-version }}
163-
uses: actions/setup-python@v2
136+
uses: actions/setup-python@v4
164137
with:
165138
python-version: ${{ matrix.python-version }}
166-
167-
- name: Cache dependencies
168-
uses: actions/cache@v2
169-
with:
170-
path: ~/.cache/pip
171-
# Cache based on OS, Python version, and dependency hash
172-
key: lint-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}
139+
cache: 'pip'
140+
cache-dependency-path: requirements-test.txt
173141

174142
- name: Install dependencies
175143
run: |
@@ -182,9 +150,9 @@ jobs:
182150
vanilla:
183151
runs-on: ubuntu-latest
184152
steps:
185-
- uses: actions/checkout@v2
153+
- uses: actions/checkout@v3
186154

187-
- uses: actions/setup-python@v2
155+
- uses: actions/setup-python@v4
188156
with:
189157
python-version: "3.8"
190158

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
runs-on: ubuntu-latest
1212
if: ${{ github.repository }} == 'stac-utils/pystac'
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515

1616
- name: Set up Python 3.x
17-
uses: actions/setup-python@v2
17+
uses: actions/setup-python@v4
1818
with:
1919
python-version: "3.x"
2020

CHANGELOG.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,33 @@
1010

1111
### Fixed
1212

13+
## [v1.5.0]
14+
15+
### Added
16+
17+
- Enum MediaType entry for PDF documents ([#758](https://github.com/stac-utils/pystac/pull/758))
18+
- Enum MediaType entry for HTML documents ([#816](https://github.com/stac-utils/pystac/pull/816))
19+
- Updated Link to obtain stac_io from owner root ([#762](https://github.com/stac-utils/pystac/pull/762))
20+
- Replace test.com with special-use domain name. ([#769](https://github.com/stac-utils/pystac/pull/769))
21+
- Updated AssetDefinition to have create, apply methods ([#768](https://github.com/stac-utils/pystac/pull/768))
22+
- Add Grid Extension support ([#799](https://github.com/stac-utils/pystac/pull/799))
23+
- Rich HTML representations for Jupyter Notebook display ([#743](https://github.com/stac-utils/pystac/pull/743))
24+
- Add `assets` argument to `Item` and `Collection` init methods to allow adding Assets during object initialization ([#834](https://github.com/stac-utils/pystac/pull/834))
25+
26+
### Changed
27+
28+
- Updated Raster Extension from v1.0.0 to v1.1.0 ([#809](https://github.com/stac-utils/pystac/pull/809))
29+
30+
### Fixed
31+
32+
- Mutating `Asset.extra_fields` on a cloned `Asset` also mutated the original asset ([#826](https://github.com/stac-utils/pystac/pull/826))
33+
- "How to create STAC catalogs" tutorial ([#775](https://github.com/stac-utils/pystac/pull/775))
34+
- Add a `variables` argument, to accompany `dimensions`, for the `apply` method of stac objects extended with datacube ([#782](https://github.com/stac-utils/pystac/pull/782))
35+
- Deepcopy collection properties on clone. Implement `clone` method for `Summaries` ([#794](https://github.com/stac-utils/pystac/pull/794))
36+
- Collection assets are now preserved when using `Collection.clone` ([#834](https://github.com/stac-utils/pystac/pull/834))
37+
- Docstrings for `StacIO.read_text` and `StacIO.write_text` now match the type annotations for the `source` argument. ([#835](https://github.com/stac-utils/pystac/pull/835))
38+
- UTC timestamps now always have `tzutc` timezone even when system timezone is set to UTC. ([#848](https://github.com/stac-utils/pystac/pull/848))
39+
1340
## [v1.4.0]
1441

1542
### Added
@@ -575,7 +602,8 @@ use `Band.create`
575602

576603
Initial release.
577604

578-
[Unreleased]: <https://github.com/stac-utils/pystac/compare/v1.4.0..main>
605+
[Unreleased]: <https://github.com/stac-utils/pystac/compare/v1.5.0..main>
606+
[v1.5.0]: <https://github.com/stac-utils/pystac/compare/v1.4.0..v1.5.0>
579607
[v1.4.0]: <https://github.com/stac-utils/pystac/compare/v1.3.0..v1.4.0>
580608
[v1.3.0]: <https://github.com/stac-utils/pystac/compare/v1.2.0..v1.3.0>
581609
[v1.2.0]: <https://github.com/stac-utils/pystac/compare/v1.1.0..v1.2.0>

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## PySTAC
22
![Build Status](https://github.com/stac-utils/pystac/workflows/CI/badge.svg?branch=main)
33
[![PyPI version](https://badge.fury.io/py/pystac.svg)](https://badge.fury.io/py/pystac)
4+
[![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/pystac)](https://anaconda.org/conda-forge/pystac)
45
[![Documentation](https://readthedocs.org/projects/pystac/badge/?version=latest)](https://pystac.readthedocs.io/en/latest/)
56
[![codecov](https://codecov.io/gh/stac-utils/pystac/branch/main/graph/badge.svg)](https://codecov.io/gh/stac-utils/pystac)
67
[![Gitter](https://badges.gitter.im/SpatioTemporal-Asset-Catalog/python.svg)](https://gitter.im/SpatioTemporal-Asset-Catalog/python?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
@@ -20,7 +21,9 @@ Note that while we support Python 3.10.\*, wheels for the `orjson` library are n
2021
platforms. If you install PySTAC with the `orjson` extra, you may need to have the Rust toolchain installed (e.g. via [rustup](https://rustup.rs/)) in order to
2122
build the package from source.
2223

23-
Support for Python 3.11 should be considered experimental until further notice.
24+
Support for Python 3.11 should be considered experimental until further notice. There is a known issue with failing build of `orjson` on 3.11.0 alpha releases prior to alpha.6 (see
25+
[#765(comment)](https://github.com/stac-utils/pystac/pull/765#pullrequestreview-908908772) for
26+
some additional detail).
2427

2528
PySTAC has a single required dependency (`python-dateutil`).
2629
PySTAC can be installed from pip or the source repository.

docs/concepts.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ for reading from AWS's S3 cloud object storage using `boto3
279279
from pystac.stac_io import DefaultStacIO, StacIO
280280
281281
class CustomStacIO(DefaultStacIO):
282-
def __init__():
282+
def __init__(self):
283283
self.s3 = boto3.resource("s3")
284284
285285
def read_text(
@@ -302,8 +302,7 @@ for reading from AWS's S3 cloud object storage using `boto3
302302
if parsed.scheme == "s3":
303303
bucket = parsed.netloc
304304
key = parsed.path[1:]
305-
s3 = boto3.resource("s3")
306-
s3.Object(bucket, key).put(Body=txt, ContentEncoding="utf-8")
305+
self.s3.Object(bucket, key).put(Body=txt, ContentEncoding="utf-8")
307306
else:
308307
super().write_text(dest, txt, *args, **kwargs)
309308
@@ -322,7 +321,7 @@ to take advantage of connection pooling using a `requests.Session
322321
from pystac.stac_io import DefaultStacIO, StacIO
323322
324323
class ConnectionPoolingIO(DefaultStacIO):
325-
def __init__():
324+
def __init__(self):
326325
self.session = requests.Session()
327326
328327
def read_text(

docs/conf.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import subprocess
1818
from typing import Any, Dict, List
1919

20-
from sphinx.util import logging
2120

2221
sys.path.insert(0, os.path.abspath("."))
2322
sys.path.insert(0, os.path.abspath("../"))
@@ -239,11 +238,3 @@
239238
# -- Substutition variables
240239

241240
rst_epilog = f".. |stac_version| replace:: {STACVersion.DEFAULT_STAC_VERSION}"
242-
243-
# -- Suppress warnings from the extlinks extension
244-
# We do this to avoid warnings like the following in our Jupyter notebook tutorials
245-
# where we do not want to use Sphinx constructs:
246-
# WARNING: hardcoded link 'https://github.com/stac-extensions/eo' could be replaced
247-
# by an extlink (try using ':stac-ext:`eo`' instead)
248-
linklogger = logging.getLogger("sphinx.ext.extlinks")
249-
linklogger.setLevel(40) # Ignore messages less severe than ERROR

0 commit comments

Comments
 (0)