lszeremeta/knows: Knows v3.0.0: Define your own graph! π¨
Abstract
This is a major release introducing custom schema support, improved visualization controls, and important fixes. β¨ New Features π¨ Custom Schema Support (GQL-Inspired) Define your own graph structures using JSON schema files! This powerful new feature allows you to: Custom node and edge labels - No longer limited to Person/knows 25+ property types - String, Int, Float, Boolean, Date, DateTime, Email, UUID, and more Type constraints - Set min, max, precision for numeric types; date ranges for dates Enum values - Define fixed sets of allowed values Symmetric edge properties - Ensure AβB and BβA share consistent values Computed node properties - Calculate values from graph structure (e.g., degree) # Use a custom schema knows -n 100 -e 200 --schema my_schema.json π Full documentation: SCHEMA.md π 14 Ready-to-Use Example Schemas New schema-examples/ directory with templates for various domains: | Simple Examples | Real-World Examples | |-----------------|---------------------| | π₯ simple_friendship_schema.json | π’ employee_schema.json | | β
simple_task_schema.json | π ecommerce_schema.json | | π simple_webpage_schema.json | π citation_network_schema.json | | π¬ simple_message_schema.json | π¬ movie_database_schema.json | | | π transportation_schema.json | | | π° financial_schema.json | | | π₯οΈ infrastructure_schema.json | | | π§ knowledge_graph_schema.json | | | π± social_network_schema.json | π Large Graph Visualization Controls New options for handling large graphs in visual outputs (svg, png, jpg, pdf, -d): -l N, --limit N - Maximum nodes to display (default: 50) --no-limit - Show full graph without truncation --hide-info - Hide node count indicator from output # Display up to 100 nodes knows -n 500 -e 1000 -f svg -l 100 > graph.svg # Show all nodes (may be slow for large graphs) knows -n 200 -e 400 -f png --no-limit graph.png Visualizations now use BFS-based subgraph extraction centered on the most connected nodes, with improved spring layout spacing. π Breaking Changes π― friendCount Now Reflects Actual Connections friendCount property was previously generated as a random number (1-1000), which didn't match the actual graph topology. Now friendCount is computed as the actual node degree (number of unique connections) after graph generation. This ensures the property accurately represents the node's connectivity in the graph. π Python 3.10+ Required Dropped support for Python 3.9 (end of life). Minimum required version is now Python 3.10. π¦ Updated Dependencies | Package | Old Version | New Version | |---------|-------------|-------------| | networkx | β₯3.2.0 | β₯3.4.0 | | matplotlib | β₯3.8.4 | β₯3.10.0 | | scipy | β₯1.12.0 | β₯1.14.0 | | pytest | β₯8.0.0 | β₯8.4.0 | π New Dependency jsonschema β₯4.22.0 (for schema validation) π Other Changes π New documentation: Comprehensive SCHEMA.md with examples β
JSON Schema for validation: IDE autocompletion and validation support via knows/schema.json π§Ή Simplified codebase: Removed NetworkX version compatibility workarounds (now requires 3.4+) π§ͺ Expanded test suite: 737 new lines of tests for schema functionality π― Type hints: Improved type annotations throughout the codebase π CLI updates: New argument group for graphics output options π Full Changelog Files Added SCHEMA.md - Schema documentation knows/schema.py - Schema loading and validation knows/schema.json - JSON Schema for IDE validation tests/test_schema.py - Schema tests schema-examples/ - 14 example schema files Files Modified knows/__init__.py - Version bump knows/__main__.py - Schema and visualization options integration knows/command_line_interface.py - New CLI arguments knows/graph.py - Schema support, computed properties knows/graph_drawer.py - Subgraph extraction, layout improvements knows/output_format.py - Visualization limit support pyproject.toml - Version, dependencies, Python version README.md - Updated documentation All test files - Updated for new features π₯ Installation pip install knows --upgrade Or with Docker: docker pull lszeremeta/knows:3.0.0 Full Changelog: https://github.com/lszeremeta/knows/compare/v2.0.5...v3.0.0
Publication details
- Journal / source
- Zenodo (CERN European Organization for Nuclear Research)
- Publication date
- 5 January 2026