Shared models, JSON Schemas, and a CLI validator for Infosourceful.
Project description
Infosourceful Kernel
Shared models, JSON Schemas, and a CLI validator for the Infosourceful ecosystem.
Overview
Infosourceful Kernel serves as the single source of truth for domain models, JSON schemas, and validation utilities used across the Infosourceful platform. It provides:
- Domain Models: Pydantic models for artifacts, decisions, relations, and actors
- JSON Schemas: Versioned meta schemas for artifact validation
- CLI Validator: Command-line tool for validating artifacts
- Validation Utilities: Reusable validation functions for applications
Installation
From PyPI (Recommended)
pip install infosourceful-kernel
From GitHub Packages
If the package is published to GitHub Packages, you can install it using:
# Configure pip to use GitHub Packages
pip install --index-url https://pypi.org/simple/ --extra-index-url https://pypi.github.com/infosourceful/infosourceful-kernel/simple/ infosourceful-kernel
Install Specific Version
# Install latest stable version
pip install infosourceful-kernel==1.0.0
# Install from source (development)
pip install git+https://github.com/Infosourceful/infosourceful-kernel.git@v1.0.0
Development Installation
For development or to contribute:
git clone https://github.com/Infosourceful/infosourceful-kernel.git
cd infosourceful-kernel
pip install -e .
Usage
CLI Validation
The ik command provides artifact validation:
# Validate a JSON file
ik artifact.json
# Validate from stdin
echo '{"schema_version": "1.0.0", ...}' | ik
# Validate with specific schema version
ik artifact.json --schema-version 1.0
# Validate YAML files
ik artifact.yaml --format yaml
# Verbose output
ik artifact.json --verbose
Python API
from infosourceful_kernel.models import Artifact, ArtifactType
from infosourceful_kernel.validation import validate_artifact_json
# Create an artifact
artifact = Artifact(
schema_version="1.0.0",
artifact_id="my_artifact_123",
artifact_type=ArtifactType.DECK,
project_key="my_project",
source_systems=["system1", "system2"],
hash="abcdef1234567890abcdef1234567890"
)
# Validate JSON content
result = validate_artifact_json(json_content)
if result.is_valid:
print("✅ Validation passed")
else:
print("❌ Validation failed:", result.errors)
Schema Versioning
Infosourceful Kernel follows semantic versioning for schemas:
- MAJOR: Breaking schema/API changes
- MINOR: Additive (non-breaking) changes
- PATCH: Bug fixes only
Schema files are stored as meta-v{N}.0.json in the schemas/ directory, with major versions kept side-by-side for backward compatibility.
Domain Models
Artifact
The core model representing any artifact in the Infosourceful system:
from infosourceful_kernel.models import Artifact, ArtifactType
artifact = Artifact(
schema_version="1.0.0",
artifact_id="unique_id_123",
artifact_type=ArtifactType.DECK,
project_key="project_name",
source_systems=["system1"],
hash="content_hash_here"
)
Actor
Represents people or systems involved in the process:
from infosourceful_kernel.models import Actor, ActorRole
actor = Actor(
name="John Doe",
role=ActorRole.OWNER,
email="john@example.com"
)
Decision
Represents decisions made during the process:
from infosourceful_kernel.models import Decision, DecisionStatus
from datetime import date
decision = Decision(
id="dec_001",
title="Approval Decision",
date=date(2024, 1, 15),
rationale="Based on requirements analysis",
status=DecisionStatus.APPROVED
)
Development
Setup
git clone https://github.com/Infosourceful/infosourceful-kernel.git
cd infosourceful-kernel
pip install -e .
Testing
pytest tests/ -v
Linting
flake8 infosourceful_kernel tests
black --check infosourceful_kernel tests
isort --check-only infosourceful_kernel tests
License
Proprietary - Infosourceful Works
Contributing
This repository is maintained by the Infosourceful team. For questions or issues, please contact support@infosourceful.com.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file infosourceful_kernel-1.0.6.tar.gz.
File metadata
- Download URL: infosourceful_kernel-1.0.6.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f72a2d90d6bc90bc4b0afb887e06e547e813c2bc2a523e404990ae7538451593
|
|
| MD5 |
3a40447a3b8e5a0b26cbad8629f6fce4
|
|
| BLAKE2b-256 |
05be4cbc9c4ea7471ba40581fecb51980d6c58dac4344c7f442c6f823e2a7b25
|
Provenance
The following attestation bundles were made for infosourceful_kernel-1.0.6.tar.gz:
Publisher:
release-pypi.yml on Infosourceful/infosourceful-kernel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
infosourceful_kernel-1.0.6.tar.gz -
Subject digest:
f72a2d90d6bc90bc4b0afb887e06e547e813c2bc2a523e404990ae7538451593 - Sigstore transparency entry: 641998602
- Sigstore integration time:
-
Permalink:
Infosourceful/infosourceful-kernel@42f3674aab4f46861d488b1214f40653e6b5d189 -
Branch / Tag:
refs/tags/v1.0.6 - Owner: https://github.com/Infosourceful
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@42f3674aab4f46861d488b1214f40653e6b5d189 -
Trigger Event:
push
-
Statement type:
File details
Details for the file infosourceful_kernel-1.0.6-py3-none-any.whl.
File metadata
- Download URL: infosourceful_kernel-1.0.6-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7fe1cfe634690eafea7b0f2d4d18fc0b4c00abeb5496fba303d3bd1475d4a2e
|
|
| MD5 |
83568b4c00e62b9dd4a37fc403933d37
|
|
| BLAKE2b-256 |
c5bd6d5fb2f61357dada999d96690d9c42e485df57be6a69bbd031de127dda11
|
Provenance
The following attestation bundles were made for infosourceful_kernel-1.0.6-py3-none-any.whl:
Publisher:
release-pypi.yml on Infosourceful/infosourceful-kernel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
infosourceful_kernel-1.0.6-py3-none-any.whl -
Subject digest:
d7fe1cfe634690eafea7b0f2d4d18fc0b4c00abeb5496fba303d3bd1475d4a2e - Sigstore transparency entry: 641998604
- Sigstore integration time:
-
Permalink:
Infosourceful/infosourceful-kernel@42f3674aab4f46861d488b1214f40653e6b5d189 -
Branch / Tag:
refs/tags/v1.0.6 - Owner: https://github.com/Infosourceful
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@42f3674aab4f46861d488b1214f40653e6b5d189 -
Trigger Event:
push
-
Statement type: