Skip to content

Commit 18ccb7c

Browse files
committed
Merge branch 'main' into patch-1
2 parents b942f62 + 32bb58e commit 18ccb7c

File tree

75 files changed

+1562
-4463
lines changed

Some content is hidden

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

75 files changed

+1562
-4463
lines changed

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: daily
7+
commit-message:
8+
prefix: build(deps)
9+
- package-ecosystem: pip
10+
directory: /
11+
schedule:
12+
interval: daily

.github/workflows/continuous-integration.yml

Lines changed: 75 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,22 @@ on:
77
pull_request:
88

99
jobs:
10-
build:
11-
name: build
10+
test:
11+
name: test
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
# Allow other matrix jobs to complete if 1 fails
1515
fail-fast: false
1616
matrix:
17-
python-version: ["3.6", "3.7", "3.8"]
18-
os: [ubuntu-latest, windows-latest, macos-latest]
17+
python-version:
18+
- "3.6"
19+
- "3.7"
20+
- "3.8"
21+
os:
22+
- ubuntu-latest
23+
- windows-latest
24+
- macos-latest
25+
1926
steps:
2027
- uses: actions/checkout@v2
2128

@@ -24,15 +31,38 @@ jobs:
2431
with:
2532
python-version: ${{ matrix.python-version }}
2633

27-
- name: Cache dependencies
34+
- name: Cache dependencies (Linux)
35+
if: startsWith(runner.os, 'Linux')
2836
uses: actions/cache@v2
2937
with:
3038
path: ~/.cache/pip
3139
# Cache based on OS, Python version, and dependency hash
32-
key: pip-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-dev.txt') }}
40+
key: test-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}
41+
42+
- name: Cache dependencies (macOS)
43+
if: startsWith(runner.os, 'macOS')
44+
uses: actions/cache@v2
45+
with:
46+
path: ~/Library/Caches/pip
47+
# Cache based on OS, Python version, and dependency hash
48+
key: test-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}
49+
50+
- name: Cache dependencies (Windows)
51+
if: startsWith(runner.os, 'Windows')
52+
uses: actions/cache@v2
53+
with:
54+
path: ~\AppData\Local\pip\Cache
55+
# Cache based on OS, Python version, and dependency hash
56+
key: pip-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}
57+
58+
- name: Install dependencies
59+
run: |
60+
pip install -r requirements-test.txt
61+
pip install -e ".[validation]"
3362
34-
- name: Execute linters and test suites
35-
run: ./scripts/cibuild
63+
- name: Execute test suite
64+
run: ./scripts/test
65+
shell: bash
3666

3767
- name: Upload All coverage to Codecov
3868
uses: codecov/codecov-action@v1
@@ -42,14 +72,50 @@ jobs:
4272
token: ${{ secrets.CODECOV_TOKEN }}
4373
file: ./coverage.xml
4474
fail_ci_if_error: false
45-
vanilla:
75+
lint:
4676
runs-on: ubuntu-latest
77+
strategy:
78+
# Allow other matrix jobs to complete if 1 fails
79+
fail-fast: false
80+
matrix:
81+
python-version:
82+
- "3.6"
83+
- "3.7"
84+
- "3.8"
85+
4786
steps:
4887
- uses: actions/checkout@v2
88+
89+
- name: Set up Python ${{ matrix.python-version }}
90+
uses: actions/setup-python@v2
91+
with:
92+
python-version: ${{ matrix.python-version }}
93+
94+
- name: Cache dependencies
95+
uses: actions/cache@v2
96+
with:
97+
path: ~/.cache/pip
98+
# Cache based on OS, Python version, and dependency hash
99+
key: lint-${{ runner.os }}-python${{ matrix.python-version }}-${{ hashFiles('requirements-test.txt') }}
100+
101+
- name: Install dependencies
102+
run: |
103+
pip install -r requirements-test.txt
104+
105+
- name: Execute linters & type checkers
106+
run: ./scripts/lint
107+
108+
vanilla:
109+
runs-on: ubuntu-latest
110+
steps:
111+
- uses: actions/checkout@v2
112+
49113
- uses: actions/setup-python@v2
50114
with:
51115
python-version: "3.8"
116+
52117
- name: Install without orjson
53118
run: pip install '.[validation]'
119+
54120
- name: Run unittests
55121
run: python -m unittest discover tests

.gitignore

Lines changed: 144 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,160 @@
1+
tmp*
12
*.pyc
23
*.egg-info
3-
build/
4-
dist/
54
*.eggs
6-
MANIFEST
75
.DS_Store
8-
.coverage
9-
.cache
106
data
117
config.json
128
stdout*
139
/integration*
14-
.idea/
15-
docs/_build/
16-
coverage.xml
10+
.idea
11+
.vscode
1712

18-
# Sphinx documentation
19-
docs/_build/
2013

14+
# Sphinx documentation
2115
.ipynb_checkpoints/
2216

2317
docs/tutorials/pystac-example*
2418
docs/tutorials/spacenet-stac/
2519
docs/tutorials/spacenet-cog-stac/
2620
docs/tutorials/data/
27-
docs/quickstart_stac/
21+
docs/quickstart_stac/
22+
23+
# Byte-compiled / optimized / DLL files
24+
__pycache__/
25+
*.py[cod]
26+
*$py.class
27+
28+
# C extensions
29+
*.so
30+
31+
# Distribution / packaging
32+
.Python
33+
build/
34+
develop-eggs/
35+
dist/
36+
downloads/
37+
eggs/
38+
.eggs/
39+
lib/
40+
lib64/
41+
parts/
42+
sdist/
43+
var/
44+
wheels/
45+
share/python-wheels/
46+
*.egg-info/
47+
.installed.cfg
48+
*.egg
49+
MANIFEST
50+
51+
# PyInstaller
52+
# Usually these files are written by a python script from a template
53+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
54+
*.manifest
55+
*.spec
56+
57+
# Installer logs
58+
pip-log.txt
59+
pip-delete-this-directory.txt
60+
61+
# Unit test / coverage reports
62+
htmlcov/
63+
.tox/
64+
.nox/
65+
.coverage
66+
.coverage.*
67+
.cache
68+
nosetests.xml
69+
coverage.xml
70+
*.cover
71+
*.py,cover
72+
.hypothesis/
73+
.pytest_cache/
74+
cover/
75+
76+
# Translations
77+
*.mo
78+
*.pot
79+
80+
# Django stuff:
81+
*.log
82+
local_settings.py
83+
db.sqlite3
84+
db.sqlite3-journal
85+
86+
# Flask stuff:
87+
instance/
88+
.webassets-cache
89+
90+
# Scrapy stuff:
91+
.scrapy
92+
93+
# Sphinx documentation
94+
docs/_build/
95+
96+
# PyBuilder
97+
.pybuilder/
98+
target/
99+
100+
# Jupyter Notebook
101+
.ipynb_checkpoints
102+
103+
# IPython
104+
profile_default/
105+
ipython_config.py
106+
107+
# pyenv
108+
# For a library or package, you might want to ignore these files since the code is
109+
# intended to run in multiple environments; otherwise, check them in:
110+
# .python-version
111+
112+
# pipenv
113+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
114+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
115+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
116+
# install all needed dependencies.
117+
#Pipfile.lock
118+
119+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
120+
__pypackages__/
121+
122+
# Celery stuff
123+
celerybeat-schedule
124+
celerybeat.pid
125+
126+
# SageMath parsed files
127+
*.sage.py
128+
129+
# Environments
130+
.env
131+
.venv
132+
env/
133+
venv/
134+
ENV/
135+
env.bak/
136+
venv.bak/
137+
138+
# Spyder project settings
139+
.spyderproject
140+
.spyproject
141+
142+
# Rope project settings
143+
.ropeproject
144+
145+
# mkdocs documentation
146+
/site
147+
148+
# mypy
149+
.mypy_cache/
150+
.dmypy.json
151+
dmypy.json
152+
153+
# Pyre type checker
154+
.pyre/
155+
156+
# pytype static type analyzer
157+
.pytype/
158+
159+
# Cython debug symbols
160+
cython_debug/

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,20 @@
44

55
### Added
66

7+
- License file included in distribution ([#409](https://github.com/stac-utils/pystac/pull/409))
8+
- Links to Issues, Discussions, and documentation sites ([#409](https://github.com/stac-utils/pystac/pull/409))
9+
- Python minimum version set to `>=3.6` ([#409](https://github.com/stac-utils/pystac/pull/409))
10+
711
### Changed
812

13+
- Package author to `stac-utils`, email to `stac@radiant.earth`, url to this repo ([#409](https://github.com/stac-utils/pystac/pull/409))
14+
915
### Fixed
1016

17+
- `EOExtension.get_bands` returns `None` for asset without EO bands ([#406](https://github.com/stac-utils/pystac/pull/406))
18+
- `identify_stac_object_type` returns `None` and `identify_stac_object` raises `STACTypeError` for non-STAC objects
19+
([#402](https://github.com/stac-utils/pystac/pull/402))
20+
1121
### Removed
1222

1323
## [1.0.0-beta.3]

docs/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
project = 'pystac'
3434
copyright = '2019, Azavea'
35-
author = 'Azavea'
35+
author = 'stac-utils'
3636

3737
# The short X.Y version
3838
version = __version__
@@ -60,7 +60,7 @@
6060
]
6161

6262
extlinks = {
63-
'tutorial': ('https://github.com/azavea/pystac/'
63+
'tutorial': ('https://github.com/stac-utils/pystac/'
6464
'tree/{}/docs/tutorials/%s'.format(git_branch), 'tutorial'),
6565
'stac-spec': ('https://github.com/radiantearth/stac-spec/tree/'
6666
'v{}/%s'.format(STACVersion.DEFAULT_STAC_VERSION), 'path'),
@@ -162,7 +162,7 @@
162162
# author, documentclass [howto, manual, or own class]).
163163
latex_documents = [
164164
(master_doc, 'pystac.tex', 'pystac Documentation',
165-
'Azavea', 'manual'),
165+
'stac-utils', 'manual'),
166166
]
167167

168168

docs/contributing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ To check doc formatting:
7070
> doc8 docs
7171
7272
You can also run the ``./scripts/test`` script to run unit tests, check code style with
73-
``flake8`` and ``black``, and check type annotations using ``mypy`` and ``pyright``.
73+
``flake8`` and ``black``, and check type annotations using ``mypy``.
7474

7575
CHANGELOG
7676
^^^^^^^^^

mypy.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
[mypy]
2+
disallow_any_generics = True
23
disallow_untyped_defs = True
34
ignore_missing_imports = True
5+
no_implicit_optional = True
46
show_error_codes = True
7+
warn_redundant_casts = True
8+
warn_return_any = True
9+
warn_unused_ignores = True

0 commit comments

Comments
 (0)