Skip to content

Commit 74bc9f3

Browse files
authored
Merge pull request #114 from azavea/develop
0.4.0 - Merge develop to master
2 parents 6ee2ba8 + f54a9d4 commit 74bc9f3

File tree

155 files changed

+11113
-3790
lines changed

Some content is hidden

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

155 files changed

+11113
-3790
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- master
8+
pull_request:
9+
10+
jobs:
11+
build:
12+
name: build
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version: ["3.6", "3.7", "3.8"]
17+
steps:
18+
- uses: actions/checkout@v2
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Cache dependencies
26+
uses: actions/cache@v2
27+
with:
28+
path: ~/.cache/pip
29+
key: pip-${{ hashFiles('requirements-dev.txt') }}
30+
restore-keys: pip-
31+
32+
- name: Execute linters and test suites
33+
run: ./scripts/cibuild

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
jobs:
9+
release:
10+
name: release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Set up Python 3.x
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: "3.x"
19+
20+
- name: Install release dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install setuptools wheel twine
24+
25+
- name: Build and publish package
26+
env:
27+
TWINE_USERNAME: ${{ secrets.PYPI_AZAVEA_USERNAME }}
28+
TWINE_PASSWORD: ${{ secrets.PYPI_AZAVEA_PASSWORD }}
29+
run: |
30+
python setup.py sdist bdist_wheel
31+
twine upload dist/*

.travis.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.travis/style_checks

Lines changed: 0 additions & 41 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,66 @@
11
# Changelog
22

3-
## Unreleased
3+
## [v0.4.0]
4+
5+
The two major changes for this release are:
6+
- Upgrade to STAC 0.9.0
7+
- Refactor the extensions API to accomidate items that implement multiple extesions (e.g. `eo` and `view`)
8+
9+
See the [stac-spec 0.9.0 changelog](https://github.com/radiantearth/stac-spec/blob/v0.9.0/CHANGELOG.md) and issue [#65](https://github.com/azavea/pystac/issues/65) for more information.
10+
11+
### API Changes
12+
13+
These are the major API changes that will have to be accounted for when upgrading PySTAC:
14+
15+
#### Extensions are wrappers around Catalogs, Collection and Items, and no longer inheret.
16+
17+
This change affects the two extensions that were implemented for Item - `EOItem` and `LabelItem`
18+
have become `EOItemExt` and `LabelItemExt`, and no longer inheret from Item.
19+
20+
This change was motivated by the 0.9 change that split some properties out from `eo` into
21+
the `view` extension. If we kept an inheritance-based extension architecture, we would not
22+
be able to account well for these new items that implemented both the `eo` and `view` extensions.
23+
24+
See the [Extensions section](https://pystac.readthedocs.io/en/0.4/concepts.html#extensions) in the
25+
documentation for more information on the new way to use extensions.
26+
27+
#### Extensions have moved to their own package:
28+
- `pystac.label` -> `pystac.extensions.label`
29+
- `pystac.eo` -> `pystac.extensions.eo`
30+
- `pystac.single_file_stac` -> `pystac.extensions.single_file_stac`
431

532
### Added
633

34+
- `pystac.read_file` as a convenience function for reading in a STACObject from a file at a URI which delegates to `STACObject.from_file`.
35+
- `pystac.read_file` as a convenience function for reading in a STACObject from a file at a URI.
36+
- Added support for the [view](https://github.com/radiantearth/stac-spec/tree/v0.9.0/extensions/view) extension.
37+
- Added support for the [commons](https://github.com/radiantearth/stac-spec/tree/v0.9.0/extensions/commons) extension.
38+
39+
### Changed
40+
- Migrated CI workflows from Travis CI to GitHub Actions [#108](https://github.com/azavea/pystac/pull/108)
41+
- Dropped support for Python 3.5 [#108](https://github.com/azavea/pystac/pull/108)
42+
43+
- Extension classes for label, eo and single-file-stac were moved to the `pystac.extensions` package.
44+
- the eo and label extensions changed from being a subclass of Item to wrapping items. __Note__: This is a major change in the API for dealing with extensions. See the note below for more information.
45+
- Renamed the class that enumerates extension names from `Extension` to `Extensions`
46+
- Asset properties always return a dict instead of being None for Assets that have non-core properties.
47+
- The `Band` constructor in the EO extension changed to taking a dict. To create a band from property values,
48+
use `Band.create`
49+
50+
51+
## [v0.3.4] - 2020-06-20
52+
753
### Changed
854

55+
- Further narrow version for SAR extension [#85](https://github.com/azavea/pystac/pull/85)
56+
957
### Fixed
1058

59+
- Fixed issue with reading ItemCollections directly. [#86](https://github.com/azavea/pystac/pull/86)
60+
- Fix bug in `make_absolute_href` [#94](https://github.com/azavea/pystac/pull/94)
61+
- Fixed issues with `fully_resolve` [#98](https://github.com/azavea/pystac/pull/98)
62+
- Fixed a bug when root link was not set [#100](https://github.com/azavea/pystac/pull/100)
63+
1164
## [v0.3.3] - 2020-02-05
1265

1366
### Added

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
This software is licensed under the Apache 2 license, quoted below.
22

3-
Copyright 2017 Azavea [http://www.azavea.com]
3+
Copyright 2020 Azavea [http://www.azavea.com]
44

55
Licensed under the Apache License, Version 2.0 (the "License"); you may not
66
use this file except in compliance with the License. You may obtain a copy of

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## PySTAC
2-
[![Build Status](https://api.travis-ci.org/azavea/pystac.svg?branch=develop)](https://travis-ci.org/azavea/pystac)
2+
![Build Status](https://github.com/azavea/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/)
55
[![Gitter chat](https://badges.gitter.im/azavea/pystac.svg)](https://gitter.im/azavea/pystac)
@@ -29,13 +29,14 @@ From source repository:
2929
To install a specific versions of STAC, install the matching version of pystac.
3030

3131
```bash
32-
> pip install pystac==0.3.*
32+
> pip install pystac==0.4.*
3333
```
3434

3535
The table below shows the corresponding versions between pystac and STAC:
3636

3737
| pystac | STAC |
38-
| ------ | ---- |
38+
| ------ | ----- |
39+
| 0.4.x | 0.9.x |
3940
| 0.3.x | 0.8.x |
4041

4142
## Documentation
@@ -58,6 +59,12 @@ Unit tests are in the `tests` folder. To run unit tests, use `unittest`:
5859
> python -m unittest discover tests
5960
```
6061

62+
To run linters, code formatters, and test suites all together, use `test`:
63+
64+
```
65+
> ./scripts/test
66+
```
67+
6168
### Code quality checks
6269

6370
PySTAC uses [flake8](http://flake8.pycqa.org/en/latest/) and [yapf](https://github.com/google/yapf) for code formatting and style checks.
@@ -76,7 +83,7 @@ To format code:
7683
> yapf -ipr tests
7784
```
7885

79-
You could also run the `.travis/style_checks` script to check flake8 and yapf.
86+
You can also run the `./scripts/test` script to check flake8 and yapf.
8087

8188
### Documentation
8289

0 commit comments

Comments
 (0)