Thank you for your interest in contributing! This project is part of Neo4j Labs and follows the Apache-2.0 license.
# Clone the repository
git clone https://github.com/neo4j-labs/create-context-graph.git
cd create-context-graph
# Create a virtual environment and install dev dependencies
uv venv && uv pip install -e ".[dev]"
# Activate and run tests
source .venv/bin/activate
pytest tests/ -v- Create
src/create_context_graph/domains/{domain-id}.yamlfollowing the ontology YAML schema (seeCLAUDE.mdfor full spec) - Generate fixture data:
create-context-graph my-app --domain {domain-id} --framework pydanticai --demo-data - Copy the fixture to
src/create_context_graph/fixtures/{domain-id}.json - Verify:
pytest tests/test_ontology.py::TestLoadAllDomains -v
- Create the template at
src/create_context_graph/templates/backend/agents/{framework_key}/agent.py.j2 - Add the framework key to
SUPPORTED_FRAMEWORKS,FRAMEWORK_DISPLAY_NAMES, andFRAMEWORK_DEPENDENCIESinconfig.py - See
CLAUDE.mdfor template requirements and patterns
- Create
src/create_context_graph/connectors/{service}_connector.pyimplementingBaseConnector - Use
@register_connector("service-id")decorator - Create the template at
templates/backend/connectors/{service}_connector.py.j2 - Add tests to
tests/test_connectors.py - See
CLAUDE.mdfor the full connector guide
# Fast tests (no Neo4j or API keys required)
pytest tests/ -v # ~182 tests, ~5 seconds
# Full matrix (all 22 domains x 8 frameworks = 176 combos)
pytest tests/ -v --slow # ~358 tests, ~30 secondsTests are organized by module:
| File | What it tests |
|---|---|
test_config.py |
ProjectConfig model |
test_ontology.py |
Domain YAML loading and validation |
test_renderer.py |
Jinja2 template rendering |
test_generator.py |
Synthetic data generation |
test_cli.py |
CLI integration (8 domain/framework combos) |
test_custom_domain.py |
LLM-powered domain generation |
test_connectors.py |
SaaS connector mocks |
test_generated_project.py |
Deep validation of scaffolded projects |
test_matrix.py |
Full 176-combo matrix (slow) |
- Follow existing patterns in the codebase
- Use type annotations (Python 3.11+ syntax)
- All
.pyfiles must include the Apache-2.0 license header - Jinja2 templates use
{% raw %}...{% endraw %}for JSX/Python dict literals
- Fork the repository and create a feature branch
- Make your changes and add tests
- Ensure all tests pass:
pytest tests/ -v - Submit a pull request against
main - Describe what you changed and why
By contributing, you agree that your contributions will be licensed under the Apache License, Version 2.0. All source files must include the standard license header.