Skip to content

Add fastjsonschema, local schemas#276

Merged
jonhealy1 merged 14 commits intoStacLabs:mainfrom
jonhealy1:add-fastjsonschema
Apr 27, 2026
Merged

Add fastjsonschema, local schemas#276
jonhealy1 merged 14 commits intoStacLabs:mainfrom
jonhealy1:add-fastjsonschema

Conversation

@jonhealy1
Copy link
Copy Markdown
Collaborator

@jonhealy1 jonhealy1 commented Apr 27, 2026

Description

  • High-Speed Validation Engine: Added new stac-validator fast command for ultra-high performance validation using fastjsonschema.
    • Up to 50x faster execution per object compared to standard jsonschema validation.
    • Persistent Schema Caching: Local disk-based schema cache in local_schemas/.schemas to support offline validation and eliminate network latency.
    • Dynamic Multi-Level Caching: Implements RAM -> Disk -> Network fetch hierarchy for JSON schemas.
    • Robust Fallback: Automated fallback to standard jsonschema for complex schemas that fail to compile under fastjsonschema (e.g., Item Assets extension).
    • Intelligent Output: New summary report including execution metrics (setup time vs. execution time) and consolidated error breakdowns.
    • Added --verbose (-v) and --quiet (-q) support to the fast command for configurable output density.

Checklist

  • Linting: Code is formatted and linted
  • Tests: Tests pass. I have included new tests for these changes where applicable.
  • Edge Cases: I have manually verified "unhappy paths" and edge cases beyond the basic success criteria (e.g., database connection timeouts, malformed input, strict mapping rejections).
  • Documentation: I have updated README.md to reflect any new environment variables, configuration changes, or breaking updates.
  • Accountability: I can explain the implementation logic for every line of code submitted.

AI tool usage

  • AI (Copilot or something similar) supported my development of this PR. See our policy about AI tool use. Use of AI tools must be indicated.

Policy: We require a "human-in-the-loop." You are the author and are fully accountable for all submitted code. Please ensure all tool-generated content is thoroughly reviewed before submission to ensure it is not an "extractive contribution" that squanders maintainer time.

@jonhealy1 jonhealy1 marked this pull request as ready for review April 27, 2026 11:09
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new high-performance validation pathway to the STAC Validator CLI by introducing a fast subcommand backed by fastjsonschema and a multi-tier schema caching approach, along with documentation and packaging updates.

Changes:

  • Added FastValidator implementation and new stac-validator fast Click command.
  • Added a new pytest suite covering basic FastValidator behavior and CLI-output modes.
  • Updated packaging/docs/changelog metadata (including a distribution rename and new Dependabot config).

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
stac_validator/fast_validator.py Implements the fast validation engine, schema fetch/caching, and jsonschema fallback.
stac_validator/stac_validator.py Registers the new fast Click subcommand and options.
tests/test_fast_validator.py Adds tests for FastValidator correctness, output modes, and error cases.
pyproject.toml Adds fastjsonschema, adjusts optional-deps layout, and renames the distribution / adds a second console script.
README.md Documents the new fast command and updates installation instructions.
CHANGELOG.md Adds v4.2.0 release notes for the fast validator.
LICENSE Adds an additional copyright line.
.gitignore Ignores schema cache artifacts.
.github/dependabot.yml Introduces Dependabot configuration for pip and GitHub Actions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread stac_validator/fast_validator.py
Comment thread stac_validator/fast_validator.py
Comment thread stac_validator/fast_validator.py
Comment thread stac_validator/fast_validator.py Outdated
Comment thread stac_validator/stac_validator.py Outdated
Comment thread README.md
Comment thread stac_validator/fast_validator.py
Comment thread stac_validator/fast_validator.py
Comment thread pyproject.toml
Comment thread README.md
@jonhealy1 jonhealy1 merged commit 75c867e into StacLabs:main Apr 27, 2026
8 checks passed
@jonhealy1 jonhealy1 deleted the add-fastjsonschema branch April 27, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants