Skip to content

Commit e87db07

Browse files
authored
Pv/collections validate items link rel (#81)
* validate Collection has items link rel * update contributing and reaDME * update tests matric * enable mypy * enable typeguard * fix nox mypy run * disable windows and macos test runs
1 parent f50fa01 commit e87db07

File tree

8 files changed

+151
-136
lines changed

8 files changed

+151
-136
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,11 @@ jobs:
1414
include:
1515
- { python: "3.10", os: "ubuntu-latest", session: "pre-commit" }
1616
- { python: "3.10", os: "ubuntu-latest", session: "safety" }
17-
# - { python: "3.10", os: "ubuntu-latest", session: "mypy" }
18-
# - { python: "3.9", os: "ubuntu-latest", session: "mypy" }
19-
# - { python: "3.8", os: "ubuntu-latest", session: "mypy" }
17+
- { python: "3.10", os: "ubuntu-latest", session: "mypy" }
2018
- { python: "3.10", os: "ubuntu-latest", session: "tests" }
21-
- { python: "3.9", os: "ubuntu-latest", session: "tests" }
22-
- { python: "3.8", os: "ubuntu-latest", session: "tests" }
23-
- { python: "3.10", os: "windows-latest", session: "tests" }
24-
- { python: "3.10", os: "macos-latest", session: "tests" }
25-
# - { python: "3.10", os: "ubuntu-latest", session: "typeguard" }
19+
# - { python: "3.10", os: "windows-latest", session: "tests" }
20+
# - { python: "3.10", os: "macos-latest", session: "tests" }
21+
- { python: "3.10", os: "ubuntu-latest", session: "typeguard" }
2622
- { python: "3.10", os: "ubuntu-latest", session: "xdoctest" }
2723
- { python: "3.10", os: "ubuntu-latest", session: "docs-build" }
2824

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ repos:
6464
rev: v2.6.0
6565
hooks:
6666
- id: prettier
67-
# - repo: https://github.com/pre-commit/mirrors-mypy
68-
# rev: v0.971
69-
# hooks:
70-
# - id: mypy
71-
# exclude: '(test_.*|noxfile)\.py'
72-
# additional_dependencies: ["types-requests", "types-click"]
67+
- repo: https://github.com/pre-commit/mirrors-mypy
68+
rev: v0.981
69+
hooks:
70+
- id: mypy
71+
exclude: '(test_.*|noxfile)\.py'
72+
additional_dependencies: ["types-requests", "types-click"]

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Request features on the [Issue Tracker].
3737

3838
## How to set up your development environment
3939

40-
You need Python 3.7+ and the following tools:
40+
You need Python 3.10 and the following tools:
4141

4242
- [Poetry]
4343
- [Nox]
@@ -57,6 +57,8 @@ $ poetry run python
5757
$ poetry run stac-api-validator
5858
```
5959

60+
Note: if `poetry update` or `poetry install` hang, try running `poetry cache clear --all pypi` to fix the issue.
61+
6062
[poetry]: https://python-poetry.org/
6163
[nox]: https://nox.thea.codes/
6264
[nox-poetry]: https://nox-poetry.readthedocs.io/

README.md

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
[pre-commit]: https://github.com/pre-commit/pre-commit
2222
[black]: https://github.com/psf/black
2323

24+
## Introduction
25+
26+
The STAC API Validator is the official validation suite for the
27+
[STAC API](https://github.com/radiantearth/stac-api-spec/) family of specifications.
28+
2429
## Installation
2530

2631
STAC API Validator requires Python 3.10.
@@ -39,30 +44,15 @@ $ stac-api-validator \
3944
--conformance core --conformance item-search
4045
```
4146

42-
To install from a clone of this repository for development, install [Poetry 1.2](https://python-poetry.org/docs/),
43-
and then install the package with development requirements:
44-
45-
```console
46-
$ poetry install
47-
```
48-
49-
Note: if `poetry update` or `poetry install` hang, try running `poetry cache clear --all pypi` to fix the issue.
50-
51-
You can now run the command-line interface:
47+
## Contributing
5248

53-
```console
54-
$ poetry run stac-api-validator
55-
```
49+
Contributions are very welcome.
50+
To learn more, see the [Contributor Guide].
5651

5752
## Usage
5853

5954
Please see the [Command-line Reference] for details.
6055

61-
## Contributing
62-
63-
Contributions are very welcome.
64-
To learn more, see the [Contributor Guide].
65-
6656
## Features
6757

6858
**Work in Progress** -- this currently only validates a subset of behavior

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def mypy(session: Session) -> None:
151151
"""Type-check using mypy."""
152152
args = session.posargs or ["src", "tests", "docs/conf.py"]
153153
session.install(".")
154-
session.install("mypy", "pytest")
154+
session.install("mypy", "pytest", "types-requests")
155155
session.run("mypy", *args)
156156
if not session.posargs:
157157
session.run("mypy", f"--python-executable={sys.executable}", "noxfile.py")

poetry.lock

Lines changed: 48 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ flake8-docstrings = ">=1.6.0"
3535
flake8-rst-docstrings = ">=0.2.5"
3636
furo = ">=2021.11.12"
3737
isort = ">=5.10.1"
38-
mypy = ">=0.971"
38+
mypy = ">=0.981"
3939
pep8-naming = ">=0.12.1"
4040
pre-commit = ">=2.16.0"
4141
pre-commit-hooks = ">=4.1.0"

0 commit comments

Comments
 (0)