Skip to main content

Verifying provided files comply with HSDS specification.

Project description

HSDS Validator

The HSDS validator validates provided files against Human Services Data Specification (HSDS), ensuring that they have no extra or missing fields and returning a report if the validation fails.

The validator will be accessed via the Command Line Interface (CLI) locally or deployed as an API using Docker.

Set up

Clone the repository: git clone https://github.com/stevensblueprint/hsds-validator.git

Switch into the project directory: cd hsds-validator

Make sure you have a version of python >= 3.13 and pip installed.

Run pip install -r requirements.txt

Or:

Install uv via pip install uv and run uv sync to install dependencies.

Run the API

On macOS/Linux

source .venv/bin/activate # Activate the virtual environment

cd api # Navigate to the API folder

uv run api # Start the API server (Press Ctrl + C in the terminal to stop)

deactivate # Deactivate the virtual environment

On Windows (PowerShell)

.venv\Scripts\activate # Activate the virtual environment

cd api # Navigate to the API folder

uv run api # Start the API server (Press Ctrl + C in the terminal to stop)

deactivate # Deactivate the virtual environment

Run the CLI

On macOS/Linux

source .venv/bin/activate   # Activate the virtual environment

python3 -m cli.main <input_directory> <schema_directory> [-o]

deactivate                  # Deactivate the virtual environment

On Windows (PowerShell)

.venv\Scripts\activate      # Activate the virtual environment

python3 -m cli.main <input_directory> <schema_directory> [-o]

deactivate                  # Deactivate the virtual environment

Parameters

  • <input_directory>: Path to directory containing JSON files to validate (required)
  • <schema_directory>: Path to directory containing JSON schema files (required)
  • -o, --save: Optional flag to save validation results to validation_results.json in the input directory

Example

python3 -m cli.main examples/program examples/json_schema
python3 -m cli.main examples/program examples/json_schema -o

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hsds_validator-0.1.0.tar.gz (44.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hsds_validator-0.1.0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file hsds_validator-0.1.0.tar.gz.

File metadata

  • Download URL: hsds_validator-0.1.0.tar.gz
  • Upload date:
  • Size: 44.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hsds_validator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ecf21b2d0a1c48909739f51a65211cab521b960142652e2ae52020be9da5b024
MD5 de26dbff5653de3f32c43938e0f86b56
BLAKE2b-256 be9619f1a697d4a9f383f74d665575653af001b93400df7fd4152d11a39607ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for hsds_validator-0.1.0.tar.gz:

Publisher: publish_python_package.yml on stevensblueprint/hsds-validator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hsds_validator-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hsds_validator-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hsds_validator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa4ae73cc4bf030fcb97e29943aef694567995d62593d96174044bdc1ed38189
MD5 bf56b6e0b124909b499d4dd803f7d066
BLAKE2b-256 a61528565bda32fd22850153030f289053320622fad56eebd725a372853d3771

See more details on using hashes here.

Provenance

The following attestation bundles were made for hsds_validator-0.1.0-py3-none-any.whl:

Publisher: publish_python_package.yml on stevensblueprint/hsds-validator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page