Skip to content

Commit 012833a

Browse files
author
Jon Duckworth
authored
Merge pull request #452 from duckontheweb/change/ci-and-readme
Updates to CI and README
2 parents a729cd2 + 6174b4c commit 012833a

File tree

4 files changed

+64
-18
lines changed

4 files changed

+64
-18
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88

99
- [ ] Code is formatted (run `pre-commit run --all-files`)
1010
- [ ] Tests pass (run `scripts/test`)
11+
- [ ] Documentation has been updated to reflect changes, if applicable
1112
- [ ] This PR maintains or improves overall codebase code coverage.
1213
- [ ] Changes are added to the [CHANGELOG](https://github.com/stac-utils/pystac/blob/develop/CHANGELOG.md). See [the docs](https://pystac.readthedocs.io/en/latest/contributing.html#changelog) for information about adding to the changelog.

.github/workflows/continuous-integration.yml

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,23 @@ jobs:
3838
with:
3939
path: ~/.cache/pip
4040
# Cache based on OS, Python version, and dependency hash
41-
key: test-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}
41+
key: pip-test-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}
4242

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

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

5959
- name: Install dependencies
6060
run: |
@@ -67,15 +67,46 @@ jobs:
6767
shell: bash
6868
env:
6969
TMPDIR: "${{ matrix.os == 'windows-latest' && 'D:\\a\\_temp' || '' }}"
70+
71+
coverage:
72+
name: coverage
73+
runs-on: ubuntu-latest
74+
steps:
75+
- uses: actions/checkout@v2
76+
77+
- name: Set up Python 3.8
78+
uses: actions/setup-python@v2
79+
with:
80+
python-version: "3.8"
81+
82+
- name: Cache dependencies
83+
uses: actions/cache@v2
84+
with:
85+
path: ~/.cache/pip
86+
# Cache based on OS, Python version, and dependency hash
87+
key: pip-test-${{ runner.os }}-python3.8-${{ hashFiles('requirements-test.txt') }}
88+
89+
- name: Install dependencies
90+
run: |
91+
pip install --upgrade pip
92+
pip install -r requirements-test.txt
93+
pip install -e ".[validation]"
94+
95+
- name: Execute test suite
96+
# --fail-under=0 ensures we publish the coverage regardless of whether it meets
97+
# the minimum so we can use Codecov to evaluate gaps
98+
run: |
99+
coverage run --source=pystac/ -m unittest discover tests/
100+
coverage xml --fail-under=0
70101
71102
- name: Upload All coverage to Codecov
72103
uses: codecov/codecov-action@v1
73-
# Only upload this once...
74-
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8'}}
104+
if: ${{ env.GITHUB_REPOSITORY }} == 'stac-utils/pystac'
75105
with:
76106
token: ${{ secrets.CODECOV_TOKEN }}
77107
file: ./coverage.xml
78108
fail_ci_if_error: false
109+
79110
lint:
80111
runs-on: ubuntu-latest
81112
strategy:

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
release:
1010
name: release
1111
runs-on: ubuntu-latest
12+
if: ${{ env.GITHUB_REPOSITORY }} == 'stac-utils/pystac'
1213
steps:
1314
- uses: actions/checkout@v2
1415

README.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,39 @@
11
## PySTAC
2-
![Build Status](https://github.com/stac-utils/pystac/workflows/CI/badge.svg?branch=develop)
2+
![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)
44
[![Documentation](https://readthedocs.org/projects/pystac/badge/?version=latest)](https://pystac.readthedocs.io/en/latest/)
55
[![codecov](https://codecov.io/gh/stac-utils/pystac/branch/main/graph/badge.svg)](https://codecov.io/gh/stac-utils/pystac)
6-
[![Gitter chat](https://badges.gitter.im/azavea/pystac.svg)](https://gitter.im/azavea/pystac)
6+
[![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)
77
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
88

99
PySTAC is a library for working with [SpatialTemporal Asset Catalog](https://stacspec.org) in Python 3.
1010

1111
## Installation
1212

13-
PySTAC has a single dependency (`python-dateutil`).
13+
PySTAC has a single required dependency (`python-dateutil`).
1414
PySTAC can be installed from pip or the source repository.
1515

1616
```bash
1717
> pip install pystac
1818
```
1919

20-
if you'd like to enable the validation feature utilizing the [jsonschema](https://pypi.org/project/jsonschema/) project, install with the optional `validation` requirements:
20+
If you would like to enable the validation feature utilizing the
21+
[jsonschema](https://pypi.org/project/jsonschema/) project, install with the optional
22+
`validation` requirements:
2123

2224

2325
```bash
2426
> pip install pystac[validation]
2527
```
2628

29+
If you would like to use the [`orjson`](https://pypi.org/project/orjson/) instead of the
30+
standard `json` library for JSON serialization/deserialization, install with the
31+
optional `orjson` requirements:
32+
33+
```bash
34+
> pip install pystac[orjson]
35+
```
36+
2737
From source repository:
2838

2939
```bash
@@ -34,28 +44,31 @@ From source repository:
3444

3545

3646
#### Versions
37-
To install a specific versions of STAC, install the matching version of pystac.
38-
39-
```bash
40-
> pip install pystac==0.5.*
41-
```
47+
To install a version of PySTAC that works with a specific versions of the STAC
48+
specification, install the matching version of PySTAC from the following table.
4249

43-
The table below shows the corresponding versions between pystac and STAC:
44-
45-
| pystac | STAC |
50+
| PySTAC | STAC |
4651
| ------ | ----- |
4752
| 1.x | 1.0.x |
4853
| 0.5.x | 1.0.0-beta.* |
4954
| 0.4.x | 0.9.x |
5055
| 0.3.x | 0.8.x |
5156

57+
For instance, to work with STAC v0.9.x:
58+
59+
```bash
60+
pip install pystac==0.4.0
61+
```
62+
63+
STAC spec versions below 0.8 are not supported by PySTAC.
64+
5265
## Documentation
5366

5467
See the [documentation page](https://pystac.readthedocs.io/en/latest/) for the latest docs.
5568

5669
## Developing
5770

58-
See [contributing docs](docs/contributing.rst)
71+
See [contributing docs](docs/contributing.rst) for details on contributing to this project.
5972

6073
## Running the quickstart and tutorials
6174

0 commit comments

Comments
 (0)