From 321be8f52c7b4b2e5d85ca4a21261d112fa6a79a Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Fri, 16 Dec 2022 12:16:27 +0300 Subject: [PATCH 1/7] move verbose messaging --- stac_validator/validate.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/stac_validator/validate.py b/stac_validator/validate.py index eaaf7829..e01a58b6 100644 --- a/stac_validator/validate.py +++ b/stac_validator/validate.py @@ -217,9 +217,14 @@ def recursive_validator(self, stac_type: str) -> bool: self.create_err_msg("JSONSchemaValidationError", err_msg) ) self.message.append(message) + if self.verbose is True: + click.echo(json.dumps(message, indent=4)) return False + message["valid_stac"] = True self.message.append(message) + if self.verbose is True: + click.echo(json.dumps(message, indent=4)) self.depth = self.depth + 1 if self.max_depth: if self.depth >= self.max_depth: @@ -243,9 +248,6 @@ def recursive_validator(self, stac_type: str) -> bool: stac_type = get_stac_type(self.stac_content).lower() if link["rel"] == "child": - - if self.verbose is True: - click.echo(json.dumps(message, indent=4)) self.recursive_validator(stac_type) if link["rel"] == "item": @@ -267,8 +269,6 @@ def recursive_validator(self, stac_type: str) -> bool: not self.max_depth or self.max_depth < 5 ): # TODO this should be configurable, correct? self.message.append(message) - if self.verbose is True: - click.echo(json.dumps(message, indent=4)) return True def validate_dict(self, stac_content): From b7c70ab44f7ec1557200bc2d39610a5b942e2576 Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Fri, 16 Dec 2022 12:20:53 +0300 Subject: [PATCH 2/7] verson 3.3.1 --- CHANGELOG.md | 9 ++++++++- setup.py | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 33abc232..ac9fda2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ 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/). +## [v3.3.1] - 2022-12-16 + +### Fixed + +- Moved --verbose messaging for --recursive https://github.com/stac-utils/stac-validator/pull/222 + ## [v3.3.0] - 2022-11-28 ### Added @@ -171,7 +177,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. -[Unreleased]: +[Unreleased]: +[v3.3.1]: [v3.3.0]: [v3.2.0]: [v3.1.0]: diff --git a/setup.py b/setup.py index 2f6ac182..8ebcd754 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup -__version__ = "3.3.0" +__version__ = "3.3.1" with open("README.md", "r") as fh: long_description = fh.read() From c3ec596a84c5e3ca23db9ed3c1bcd32dbd29dc0d Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Fri, 16 Dec 2022 12:23:31 +0300 Subject: [PATCH 3/7] update changelog message --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac9fda2a..6a75052d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ The format is (loosely) based on [Keep a Changelog](http://keepachangelog.com/) ### Fixed -- Moved --verbose messaging for --recursive https://github.com/stac-utils/stac-validator/pull/222 +- Moved --verbose messaging for --recursive as --verbose was printing out the wrong messages https://github.com/stac-utils/stac-validator/pull/222 ## [v3.3.0] - 2022-11-28 From b2c446c2bc76dd765dc12591ef0a7486588e7bcd Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Fri, 16 Dec 2022 12:43:37 +0300 Subject: [PATCH 4/7] update tox, test 3.10, 3.11 --- .github/workflows/test-runner.yml | 2 +- tox/Dockerfile-tox | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-runner.yml b/.github/workflows/test-runner.yml index c57939a9..7c587481 100644 --- a/.github/workflows/test-runner.yml +++ b/.github/workflows/test-runner.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9] + python-version: [3.7, 3.8, 3.9, 3.10, 3.11] steps: diff --git a/tox/Dockerfile-tox b/tox/Dockerfile-tox index 58d6a997..a24ddcfb 100644 --- a/tox/Dockerfile-tox +++ b/tox/Dockerfile-tox @@ -4,5 +4,5 @@ COPY . /code/ RUN export LC_ALL=C.UTF-8 && \ export LANG=C.UTF-8 && \ pip3 install . && \ - pip3 install tox==3.23.0 && \ + pip3 install tox==4.0.11 && \ tox \ No newline at end of file From 8b3357f15f9d671391c6b8bce7d7ef0249e87e84 Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Fri, 16 Dec 2022 12:46:02 +0300 Subject: [PATCH 5/7] gh thinks 3.10 is 3.1? --- .github/workflows/test-runner.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-runner.yml b/.github/workflows/test-runner.yml index 7c587481..3d59605f 100644 --- a/.github/workflows/test-runner.yml +++ b/.github/workflows/test-runner.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9, 3.10, 3.11] + python-version: [3.7, 3.8, 3.9, 3.10.1, 3.11] steps: From cc8b6dab0a2ca39d6564e24404d8e64782fc43fa Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Fri, 16 Dec 2022 12:47:16 +0300 Subject: [PATCH 6/7] rremove 3.10.1 --- .github/workflows/test-runner.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-runner.yml b/.github/workflows/test-runner.yml index 3d59605f..c9aef559 100644 --- a/.github/workflows/test-runner.yml +++ b/.github/workflows/test-runner.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9, 3.10.1, 3.11] + python-version: [3.7, 3.8, 3.9, 3.11] steps: From 99cc07e93eba5c4a87b0a88fc9fc0eb9c618ed8f Mon Sep 17 00:00:00 2001 From: jonhealy1 Date: Fri, 16 Dec 2022 18:33:04 +0300 Subject: [PATCH 7/7] put versions in quotes --- .github/workflows/test-runner.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-runner.yml b/.github/workflows/test-runner.yml index c9aef559..02701cd2 100644 --- a/.github/workflows/test-runner.yml +++ b/.github/workflows/test-runner.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9, 3.11] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] steps: