diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index d577dd13..4f2b094a 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -33,7 +33,7 @@ jobs: --outdir dist/ - name: Publish distribution to PyPI - # if: startsWith(github.ref, 'refs/tags') + if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@v1.4.2 with: password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index fa9b7e21..94827a52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. The format is (loosely) based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## [Unreleased] +## [3.0.0] - 2022-03-11 ### Added @@ -13,6 +13,11 @@ The format is (loosely) based on [Keep a Changelog](http://keepachangelog.com/) ### Fixed - Item messages are now included even if `max_depth is None` +- Exit with non-zero code when validation fails + +### Removed + +- References to Python 3.6 ## [v2.5.0] - 2022-03-10 ### Changed @@ -128,7 +133,8 @@ The format is (loosely) based on [Keep a Changelog](http://keepachangelog.com/) - With the newest version - 1.0.0-beta.2 - items will run through jsonchema validation before the PySTAC validation. The reason for this is that jsonschema will give more informative error messages. This should be addressed better in the future. This is not the case with the --recursive option as time can be a concern here with larger collections. - Logging. Various additions were made here depending on the options selected. This was done to help assist people to update their STAC collections. -[v2.5.0]: +[v3.0.0]: +[v2.5.0]: [v2.4.0]: [v2.3.0]: [v2.2.0]: diff --git a/Dockerfile b/Dockerfile index 6769dce5..638d7e1d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,6 @@ WORKDIR /code COPY . /code/ RUN pip install . && \ - stac_validator --help + stac-validator --help -ENTRYPOINT ["stac_validator"] +ENTRYPOINT ["stac-validator"] diff --git a/Makefile b/Makefile index b04841ae..18acdbc8 100644 --- a/Makefile +++ b/Makefile @@ -14,13 +14,13 @@ code-check: ## Check and format code using pre-commit test: ## Run the tests pytest --verbose - pytest --mypy stac_validator + pytest --mypy stac-validator build-docker: ## Build a Docker container - docker build -t stac_validator:2.3.0 . + docker build -t stac-validator . build-tox: ## Test stac_validator on multiple Python versions docker build -f tox/Dockerfile-tox -t stac_tox . run: ## Run the Docker Container and enter into bash - docker run -it --entrypoint /bin/bash stac_validator:2.3.0 + docker run -it --entrypoint /bin/bash stac-validator diff --git a/README.md b/README.md index ab3eafd3..db077699 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ stac_validator https://raw.githubusercontent.com/radiantearth/stac-spec/master/e ## Requirements -- Python 3.6+ +- Python 3.7+ - Requests - Click - Pytest @@ -99,8 +99,8 @@ stac-validator --help Usage: stac-validator [OPTIONS] STAC_FILE Options: - --lint Use stac-check to lint stac object instead of - validating it. + --lint Use stac-check to lint the stac object in addition + to validating it. --core Validate core stac object only without extensions. --extensions Validate extensions only. --links Additionally validate links. Only works with @@ -110,8 +110,9 @@ Options: -c, --custom TEXT Validate against a custom schema (local filepath or remote schema). -r, --recursive Recursively validate all related stac objects. - -m, --max-depth INTEGER Maximum depth to traverse when recursing. Ignored - if `recursive == False`. + -m, --max-depth INTEGER Maximum depth to traverse when recursing. Omit this + argument to get full recursion. Ignored if + `recursive == False`. -v, --verbose Enables verbose output for recursive mode. --no_output Do not print output to console. --log_file TEXT Save full recursive output to log file (local diff --git a/setup.py b/setup.py index 058aac3d..98979cbc 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup -__version__ = "2.5.0" +__version__ = "3.0.0" with open("README.md", "r") as fh: long_description = fh.read() @@ -22,7 +22,7 @@ "Intended Audience :: Information Technology", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", "Topic :: Scientific/Engineering :: GIS", ], keywords="STAC validation raster", diff --git a/stac_validator/__init__.py b/stac_validator/__init__.py index 3d67cd6b..528787cf 100644 --- a/stac_validator/__init__.py +++ b/stac_validator/__init__.py @@ -1 +1 @@ -__version__ = "2.4.0" +__version__ = "3.0.0" diff --git a/stac_validator/stac_validator.py b/stac_validator/stac_validator.py index 202c12c2..811537e9 100644 --- a/stac_validator/stac_validator.py +++ b/stac_validator/stac_validator.py @@ -56,7 +56,7 @@ default="", help="Save full recursive output to log file (local filepath).", ) -@click.version_option(version="2.2.0") +@click.version_option(version="3.0.0") def main( stac_file, lint, diff --git a/tox.ini b/tox.ini index a579b928..0d057fcc 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py36,py37,py38,py39 +envlist = py37,py38,py39 [testenv] deps = pytest