signalJourney
Python library for validating signalJourney JSON files against the official schema.
This validator helps ensure that your signalJourney files conform to the specification, promoting reproducibility and interoperability.
Installation
pip install signalJourney
# or
uv add signalJourney
The distribution is named signalJourney (PyPI normalizes it to signaljourney), but the import package is still signaljourney_validator and the command is still signaljourney-validate.
Renaming the import package would break every existing import, so it is a separate decision.
from signaljourney_validator import Validator
To include optional suggestion features (using fuzzy matching):
pip install "signalJourney[suggestions]"
Packaged Schema, Errors and Logging
The signalJourney schema (schema/, with its definitions, extensions, versioned copies and examples) is package data of signaljourney_validator.
Validator() loads it through importlib.resources, so an installed wheel needs no repository checkout and no schema_dir argument.
The library expects a regular filesystem install (a wheel installed into site-packages); running it from inside a zip archive is not supported.
schema_dir= (and --schema on the command line) override the packaged schema, and a wrong schema_dir is an error, not a silent switch to the packaged schema:
- a
schema_dirthat does not exist, or is not a directory, raisesSchemaResolutionError; - a schema file in it that cannot be read or parsed raises
SchemaResolutionError; - the one fallback is a
schema_dirthat exists but holds no schema version (noversions/entry): the packaged schema is used and a warning is logged on the loggersignaljourney_validator.
An unresolved $ref (a missing or unreadable referenced file, or a #/... pointer that points nowhere) raises SchemaResolutionError when the Validator is constructed.
SchemaResolutionError is a subclass of SignalJourneyValidationError.
The library writes nothing to standard output.
It logs on the logger signaljourney_validator (for example logging.basicConfig(level=logging.DEBUG) shows the reference inlining), and the command line prints its results as before.
Basic Usage
from signaljourney_validator import Validator, SignalJourneyValidationError
# Initialize with the default schema bundled with the package
validator = Validator()
# Validate a file
try:
validator.validate("path/to/your_signalJourney.json")
print("Validation successful!")
except SignalJourneyValidationError as e:
print(f"Validation failed: {e}")
for error_detail in e.errors:
print(f"- {error_detail}") # Includes suggestion if available
except FileNotFoundError:
print("File not found.")
# Validate a dictionary
my_data = {
"sj_version": "0.1.0",
"schema_version": "0.1.0",
"description": "Example data",
# ... other fields ...
}
try:
validator.validate(my_data)
print("Dictionary validation successful!")
except SignalJourneyValidationError as e:
print(f"Dictionary validation failed: {e}")
for error_detail in e.errors:
print(f"- {error_detail}")
# Get errors without raising an exception
validation_errors = validator.validate(
"path/to/invalid_signalJourney.json", raise_exceptions=False
)
if validation_errors: # Returns a list of ValidationErrorDetail objects
print(f"Found {len(validation_errors)} validation errors:")
for error_detail in validation_errors:
print(f"- {error_detail}")
else:
print("Validation successful (no errors found).")
Features
- Validates against the official signalJourney JSON Schema.
- Supports validation of JSON files, strings, or Python dictionaries.
- Provides detailed error reporting, including the validation message, path to the error, and schema validation rule.
- Offers basic suggestions for fixing common errors (e.g., type mismatches, missing required fields, enum value typos).
- Customizable: Load your own schema version or a modified schema.
Contributing
Please refer to the main project's CONTRIBUTING.md.
License
This project is licensed under the MIT License - see the LICENSE file for details.
(Details to be added)
Metadata
Release files for signalJourney 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| signaljourney-0.2.0.tar.gz | 44.7 kB | With provenance | Details for signaljourney-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| signaljourney-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for signaljourney-0.2.0-py3-none-any.whl |
Total release size: 105.9 kB
Release files / signaljourney-0.2.0.tar.gz
| Download URL | signaljourney-0.2.0.tar.gz |
|---|---|
| Size | 44.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6914852b3fec77741609c020b0dd617264821e80b4ee8d1cc1368ee8fe2eeabf
|
|
BLAKE2b-256 checksum How to use checksums |
3f935626ddcff06000e5f1674a888954b0863d10200d3a46685834585ceda6bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logRelease files / signaljourney-0.2.0-py3-none-any.whl
| Download URL | signaljourney-0.2.0-py3-none-any.whl |
|---|---|
| Size | 61.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0419e90d40fddf6771bd3992fc578fbe1343954e9ba0c813f46c2d8dcc866d6e
|
|
BLAKE2b-256 checksum How to use checksums |
b03475afa44e8695272db12f8fa98c36442a2c7cd6b7a1c0ac65aca8843dcf3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logSecurity for signalJourney 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for signaljourney-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.