-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e82777d
Showing
28 changed files
with
1,271 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[flake8] | ||
max-line-length = 100 | ||
|
||
## IGNORES | ||
|
||
# E127: flake8 reporting incorrect continuation line indent errors | ||
# on multi-line and multi-level indents | ||
|
||
# W503: flake8 reports this as incorrect, and scripts/format_code | ||
# changes code to it, so let format_code win. | ||
|
||
# E126: Continuation line over-indented for hanging indent | ||
# Conflicts with yapf formatting | ||
|
||
ignore = E127,W503,E126 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.6", "3.7", "3.8"] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-${{ hashFiles('requirements-dev.txt') }} | ||
restore-keys: pip- | ||
|
||
- name: Execute linters and test suites | ||
run: ./scripts/cibuild | ||
|
||
|
||
- name: Upload All coverage to Codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./coverage.xml | ||
fail_ci_if_error: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
release: | ||
name: release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install release dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish package | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_STACUTILS_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_STACUTILS_PASSWORD }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
*.pyc | ||
*.egg-info | ||
build/ | ||
dist/ | ||
*.eggs | ||
MANIFEST | ||
.DS_Store | ||
.coverage | ||
.cache | ||
data | ||
config.json | ||
stdout* | ||
/integration* | ||
.idea/ | ||
docs/_build/ | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
.ipynb_checkpoints/ | ||
|
||
docs/tutorials/pystac-example* | ||
docs/tutorials/spacenet-stac/ | ||
docs/tutorials/spacenet-cog-stac/ | ||
docs/tutorials/data/ | ||
docs/quickstart_stac/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Changelog | ||
|
||
## Unreleased | ||
|
||
### Added | ||
|
||
### Changed | ||
|
||
### Removed | ||
|
||
### Fixed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
This software is licensed under the Apache 2 license, quoted below. | ||
|
||
Copyright 2020 Azavea [http://www.azavea.com] | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
use this file except in compliance with the License. You may obtain a copy of | ||
the License at | ||
|
||
[http://www.apache.org/licenses/LICENSE-2.0] | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
License for the specific language governing permissions and limitations under | ||
the License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
## stactools | ||
 | ||
[](https://badge.fury.io/py/pystac) | ||
[](https://pystac.readthedocs.io/en/latest/) | ||
[](https://codecov.io/gh/stac-utils/pystac) | ||
[](https://gitter.im/azavea/pystac) | ||
[](https://opensource.org/licenses/Apache-2.0) | ||
|
||
`stactools` is a command line tool and library for working with [STAC](https://stacspec.org) based on [PySTAC](https://github.com/stac-utils/pystac). | ||
|
||
## Installation | ||
|
||
```bash | ||
> pip install stactools | ||
``` | ||
From source repository: | ||
|
||
```bash | ||
> git clone https://github.com/stac-utils/stactools.git | ||
> cd stactools | ||
> pip install . | ||
``` | ||
|
||
## Running | ||
|
||
``` | ||
> stactools --help | ||
``` | ||
|
||
#### Versions | ||
To install a specific versions of STAC, install the matching version of stactools. | ||
|
||
```bash | ||
> pip install stactools==0.1.* | ||
``` | ||
|
||
The table below shows the corresponding versions between pystac and STAC: | ||
|
||
| stactools | STAC | | ||
| --------- | ----- | | ||
| 0.1.x | 1.0.x | | ||
|
||
## Documentation | ||
|
||
See the [documentation page](https://stactools.readthedocs.io/en/latest/) for the latest docs. | ||
|
||
## Developing | ||
|
||
To ensure development libraries are installed, install everything in `requirements-dev.txt`: | ||
|
||
``` | ||
> pip install -r requirements-dev.txt | ||
``` | ||
|
||
### Unit Tests | ||
|
||
Unit tests are in the `tests` folder. To run unit tests, use `unittest`: | ||
|
||
``` | ||
> python -m unittest discover tests | ||
``` | ||
|
||
To run linters, code formatters, and test suites all together, use `test`: | ||
|
||
``` | ||
> ./scripts/test | ||
``` | ||
|
||
### Code quality checks | ||
|
||
stactools uses [flake8](http://flake8.pycqa.org/en/latest/) and [yapf](https://github.com/google/yapf) for code formatting and style checks. | ||
|
||
To run the flake8 style checks: | ||
|
||
``` | ||
> flake8 stactools | ||
> flake8 tests | ||
``` | ||
|
||
To format code: | ||
|
||
``` | ||
> yapf -ipr stactools | ||
> yapf -ipr tests | ||
``` | ||
|
||
You can also run the `./scripts/test` script to check flake8 and yapf. | ||
|
||
### Documentation | ||
|
||
To build and develop the documentation locally, make sure sphinx is available (which is installed with `requirements-dev.txt`), and use the Makefile in the docs folder: | ||
|
||
``` | ||
> cd docs | ||
> make html | ||
> make livehtml | ||
``` | ||
|
||
Use 'make' without arguments to see a list of available commands. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line. | ||
SPHINXOPTS = | ||
SPHINXBUILD = sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
livehtml: | ||
sphinx-autobuild -z ../stactools --host 0.0.0.0 ${SOURCEDIR} $(BUILDDIR)/html -d _build/doctrees | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
Oops, something went wrong.