Install & Compatibility
Where this runs
tested against v0.2.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 1.569s · 199.3MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 12.9s · import 1.497s · 191MB
205MB installed
● package 205MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
validate_project
✓ from eido import validate_project
validate_sample
✓ from eido import validate_sample
validate_config
✓ from eido import validate_config
This quickstart demonstrates how to use eido to validate a peppy Project object against a JSON schema. It involves creating temporary config and schema files, loading them with `peppy`, and then invoking `eido.validate_project` for both a valid and an intentionally invalid project.
import os
import peppy
import eido
import yaml
from jsonschema import ValidationError
# Create a dummy project config file
config_content = """
project_name: MyTestProject
output_dir: output/
samples:
- sample_name: sample1
file_path: data/sample1.txt
organism: human
- sample_name: sample2
file_path: data/sample2.txt
organism: mouse
"""
# Create a dummy schema file
schema_content = """
type: object
properties:
project_name: { type: string }
output_dir: { type: string }
samples:
type: array
items:
type: object
properties:
sample_name: { type: string }
file_path: { type: string }
organism: { type: string, enum: [human, mouse, rat] }
required: [sample_name, file_path, organism]
required: [project_name, samples]
"""
config_file = "_eido_test_config.yaml"
schema_file = "_eido_test_schema.yaml"
try:
# Write dummy files
with open(config_file, 'w') as f:
f.write(config_content)
with open(schema_file, 'w') as f:
f.write(schema_content)
# Load the project using peppy
project = peppy.Project(config_file)
# Validate the project using eido
print(f"Attempting to validate project '{project.name}'...")
eido.validate_project(project, schema_file)
print("Project validated successfully!")
# Example of validation failure (optional, for demonstration)
print("\n--- Demonstrating a validation failure ---")
bad_config_content = """
project_name: AnotherProject
samples:
- sample_name: invalid_sample
organism: alien # 'alien' is not in enum
"""
bad_config_file = "_eido_bad_config.yaml"
with open(bad_config_file, 'w') as f:
f.write(bad_config_content)
bad_project = peppy.Project(bad_config_file)
try:
print("Attempting to validate a project with invalid organism...")
eido.validate_project(bad_project, schema_file)
print("Unexpected: Validation passed for bad project!")
except ValidationError as e:
print(f"Caught expected validation error: {e.message}")
finally:
# Clean up dummy files
if os.path.exists(config_file):
os.remove(config_file)
if os.path.exists(schema_file):
os.remove(schema_file)
if os.path.exists(bad_config_file):
os.remove(bad_config_file)
eido --version
Errors
Common errors & fixes
jsonschema.exceptions.ValidationError: '...' is not valid under any of the given schemas
The data in your project configuration or sample table does not conform to the specified JSON schema. This error is directly from the underlying `jsonschema` library, which `eido` uses.
fixCarefully compare your project's `config.yaml` and `sample_table.csv` (or equivalent) against the `project_schema.yaml`. Pay attention to data types, required fields, enum values, and allowed patterns. The error message often includes details about the specific failing validation condition.
FileNotFoundError: [Errno 2] No such file or directory: 'your_schema.yaml'
The path provided for your project configuration, sample table, or schema file is incorrect or the file does not exist at the specified location.
fixDouble-check the file paths passed to `peppy.Project()` and `eido.validate_project()`. Ensure the files exist and are accessible from where your script is running. Use absolute paths or verify your current working directory.
AttributeError: 'NoneType' object has no attribute 'get' (or similar error when accessing project attributes)
This usually indicates that `peppy.Project()` failed to load your project configuration correctly, resulting in a `Project` object that is either `None` or incomplete. `eido` then tries to access non-existent attributes of this invalid project object.
fixInspect your `config.yaml` for syntax errors (e.g., incorrect YAML formatting, missing required sections). Ensure `peppy` can parse your project configuration independently before passing it to `eido`. Check `peppy`'s documentation for valid project structures and common parsing issues.
Upgrade
Version history
0.2.5latest on PyPI · released Feb 3, 2026
Audit
Dependencies
jsonschemarequiredCore dependency for JSON schema validation engine.
peppyrequiredPrimary interface for validating Portable Encapsulated Projects (PEPs). Required for `validate_project` and `validate_sample`.
logmuserequiredLogging utility.
yacmanrequiredYAML/Config file handling.