Skip to content

Commit

Permalink
Merge branch 'main' into 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
duckontheweb committed Jul 22, 2022
2 parents 3a20657 + 8efe00a commit 929eb1d
Show file tree
Hide file tree
Showing 54 changed files with 3,194 additions and 805 deletions.
70 changes: 19 additions & 51 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,25 @@ jobs:
experimental:
- false
include:
- python-version: "3.11.0-alpha.3"
- python-version: "3.11.0-alpha.7"
os: ubuntu-latest
experimental: true
- python-version: "3.11.0-alpha.3"
- python-version: "3.11.0-alpha.7"
os: windows-latest
experimental: true
- python-version: "3.11.0-alpha.3"
- python-version: "3.11.0-alpha.7"
os: macos-latest
experimental: true

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: requirements-test.txt

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

- name: Cache dependencies (Linux)
if: startsWith(runner.os, 'Linux')
uses: actions/cache@v2
with:
path: ~/.cache/pip
# Cache based on OS, Python version, and dependency hash
key: pip-test-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}

- name: Cache dependencies (macOS)
if: startsWith(runner.os, 'macOS')
uses: actions/cache@v2
with:
path: ~/Library/Caches/pip
# Cache based on OS, Python version, and dependency hash
key: pip-test-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}

- name: Cache dependencies (Windows)
if: startsWith(runner.os, 'Windows')
uses: actions/cache@v2
with:
path: ~\AppData\Local\pip\Cache
# Cache based on OS, Python version, and dependency hash
key: pip-test-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}

- name: Install dependencies
run: |
pip install --upgrade pip
Expand All @@ -100,19 +78,14 @@ jobs:
name: coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.8"

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pip
# Cache based on OS, Python version, and dependency hash
key: pip-test-${{ runner.os }}-python3.8-${{ hashFiles('requirements-test.txt') }}
cache: 'pip'
cache-dependency-path: requirements-test.txt

- name: Install dependencies
run: |
Expand All @@ -131,7 +104,7 @@ jobs:
run: coverage xml --fail-under 0

- name: Upload All coverage to Codecov
uses: codecov/codecov-action@v2.1.0
uses: codecov/codecov-action@v3
if: ${{ env.GITHUB_REPOSITORY }} == 'stac-utils/pystac'
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -154,22 +127,17 @@ jobs:
- "3.8"
- "3.9"
- "3.10"
- "3.11.0-alpha.3"
- "3.11.0-alpha.7"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pip
# Cache based on OS, Python version, and dependency hash
key: lint-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}
cache: 'pip'
cache-dependency-path: requirements-test.txt

- name: Install dependencies
run: |
Expand All @@ -182,9 +150,9 @@ jobs:
vanilla:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: "3.8"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.repository }} == 'stac-utils/pystac'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python 3.x
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.x"

Expand Down
30 changes: 29 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,33 @@

### Fixed

## [v1.5.0]

### Added

- Enum MediaType entry for PDF documents ([#758](https://github.com/stac-utils/pystac/pull/758))
- Enum MediaType entry for HTML documents ([#816](https://github.com/stac-utils/pystac/pull/816))
- Updated Link to obtain stac_io from owner root ([#762](https://github.com/stac-utils/pystac/pull/762))
- Replace test.com with special-use domain name. ([#769](https://github.com/stac-utils/pystac/pull/769))
- Updated AssetDefinition to have create, apply methods ([#768](https://github.com/stac-utils/pystac/pull/768))
- Add Grid Extension support ([#799](https://github.com/stac-utils/pystac/pull/799))
- Rich HTML representations for Jupyter Notebook display ([#743](https://github.com/stac-utils/pystac/pull/743))
- 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))

### Changed

- Updated Raster Extension from v1.0.0 to v1.1.0 ([#809](https://github.com/stac-utils/pystac/pull/809))

### Fixed

- Mutating `Asset.extra_fields` on a cloned `Asset` also mutated the original asset ([#826](https://github.com/stac-utils/pystac/pull/826))
- "How to create STAC catalogs" tutorial ([#775](https://github.com/stac-utils/pystac/pull/775))
- 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))
- Deepcopy collection properties on clone. Implement `clone` method for `Summaries` ([#794](https://github.com/stac-utils/pystac/pull/794))
- Collection assets are now preserved when using `Collection.clone` ([#834](https://github.com/stac-utils/pystac/pull/834))
- 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))
- UTC timestamps now always have `tzutc` timezone even when system timezone is set to UTC. ([#848](https://github.com/stac-utils/pystac/pull/848))

## [v1.4.0]

### Added
Expand Down Expand Up @@ -575,7 +602,8 @@ use `Band.create`

Initial release.

[Unreleased]: <https://github.com/stac-utils/pystac/compare/v1.4.0..main>
[Unreleased]: <https://github.com/stac-utils/pystac/compare/v1.5.0..main>
[v1.5.0]: <https://github.com/stac-utils/pystac/compare/v1.4.0..v1.5.0>
[v1.4.0]: <https://github.com/stac-utils/pystac/compare/v1.3.0..v1.4.0>
[v1.3.0]: <https://github.com/stac-utils/pystac/compare/v1.2.0..v1.3.0>
[v1.2.0]: <https://github.com/stac-utils/pystac/compare/v1.1.0..v1.2.0>
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## PySTAC
![Build Status](https://github.com/stac-utils/pystac/workflows/CI/badge.svg?branch=main)
[![PyPI version](https://badge.fury.io/py/pystac.svg)](https://badge.fury.io/py/pystac)
[![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/pystac)](https://anaconda.org/conda-forge/pystac)
[![Documentation](https://readthedocs.org/projects/pystac/badge/?version=latest)](https://pystac.readthedocs.io/en/latest/)
[![codecov](https://codecov.io/gh/stac-utils/pystac/branch/main/graph/badge.svg)](https://codecov.io/gh/stac-utils/pystac)
[![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)
Expand All @@ -20,7 +21,9 @@ Note that while we support Python 3.10.\*, wheels for the `orjson` library are n
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
build the package from source.

Support for Python 3.11 should be considered experimental until further notice.
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
[#765(comment)](https://github.com/stac-utils/pystac/pull/765#pullrequestreview-908908772) for
some additional detail).

PySTAC has a single required dependency (`python-dateutil`).
PySTAC can be installed from pip or the source repository.
Expand Down
7 changes: 3 additions & 4 deletions docs/concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ for reading from AWS's S3 cloud object storage using `boto3
from pystac.stac_io import DefaultStacIO, StacIO
class CustomStacIO(DefaultStacIO):
def __init__():
def __init__(self):
self.s3 = boto3.resource("s3")
def read_text(
Expand All @@ -302,8 +302,7 @@ for reading from AWS's S3 cloud object storage using `boto3
if parsed.scheme == "s3":
bucket = parsed.netloc
key = parsed.path[1:]
s3 = boto3.resource("s3")
s3.Object(bucket, key).put(Body=txt, ContentEncoding="utf-8")
self.s3.Object(bucket, key).put(Body=txt, ContentEncoding="utf-8")
else:
super().write_text(dest, txt, *args, **kwargs)
Expand All @@ -322,7 +321,7 @@ to take advantage of connection pooling using a `requests.Session
from pystac.stac_io import DefaultStacIO, StacIO
class ConnectionPoolingIO(DefaultStacIO):
def __init__():
def __init__(self):
self.session = requests.Session()
def read_text(
Expand Down
9 changes: 0 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import subprocess
from typing import Any, Dict, List

from sphinx.util import logging

sys.path.insert(0, os.path.abspath("."))
sys.path.insert(0, os.path.abspath("../"))
Expand Down Expand Up @@ -239,11 +238,3 @@
# -- Substutition variables

rst_epilog = f".. |stac_version| replace:: {STACVersion.DEFAULT_STAC_VERSION}"

# -- Suppress warnings from the extlinks extension
# We do this to avoid warnings like the following in our Jupyter notebook tutorials
# where we do not want to use Sphinx constructs:
# WARNING: hardcoded link 'https://github.com/stac-extensions/eo' could be replaced
# by an extlink (try using ':stac-ext:`eo`' instead)
linklogger = logging.getLogger("sphinx.ext.extlinks")
linklogger.setLevel(40) # Ignore messages less severe than ERROR
Loading

0 comments on commit 929eb1d

Please sign in to comment.