Test Intelligence Engine
Project description
Aston AI
Aston is a code intelligence system for parsing, analyzing, and finding test coverage gaps in your code.
Installation
# Install from PyPI
pip install astonai
# For LLM-powered features (optional)
pip install "astonai[llm]"
Quick Start
# Initialize your repository
aston init --offline
# Generate knowledge graph relationships
aston graph build
# View knowledge graph statistics
aston graph stats
# Find critical paths and generate test suggestions
aston coverage --critical-path
aston test-suggest core/auth.py
Core Commands
Repository Initialization
# Initialize repository and create knowledge graph
aston init [--offline]
Options:
--offline: Skip Neo4j integration and work with local files only (default)--online: Use Neo4j if available (broken right now)
Test Coverage
# Run tests with coverage
aston test
# Find testing gaps
aston coverage [--threshold 80] [--json results.json] [--exit-on-gap]
# Identify critical implementation nodes
aston coverage --critical-path [--n 50] [--weight loc]
Options:
--threshold: Minimum coverage percentage (default: 0)--json: Output results in JSON format--exit-on-gap: Return code 1 if gaps found (useful for CI)--coverage-file: Specify custom coverage file location--critical-path: Identify critical code paths that need testing--n: Number of critical nodes to return (default: 50)--weight: Weight function for critical path (loc, calls, churn)
Knowledge Graph
# Build edge relationships between nodes
aston graph build
# View statistics about the knowledge graph
aston graph stats
# Export graph to DOT format
aston graph export [--output graph.dot] [--filter CALLS,IMPORTS] [--open]
# Open interactive graph viewer in browser
aston graph view [--filter CALLS,IMPORTS]
The graph command provides:
build: Analyzes your codebase to extract CALLS and IMPORTS edgesstats: Displays node and edge statisticsexport: Converts the graph to Graphviz DOT formatview: Opens an interactive D3.js visualization in your browser
Test Suggestions
# Generate test suggestions for a file or function
aston test-suggest <file_or_node> [--k 5] [--llm] [--model gpt-4o]
# Generate rich context for developers or AI agents
aston test-suggest <file_or_node> --prompt [--llm]
# Debug path resolution issues
aston test-suggest <file_or_node> --debug
Options:
--k: Number of suggestions to generate (default: 5)--llm: Use LLM fallback if heuristics fail--model: LLM model to use (default: gpt-4o)--budget: Maximum cost per suggestion (default: $0.03)--prompt,-p: Generate rich context for test development--debug: Enable detailed debugging output--json/--yaml: Output results in structured format
Environment Check
# Check if all required dependencies are installed
aston check
Options:
--no-env-check: Skip environment dependency check (also works with any command)
Repository-Centric Design
Aston follows a repository-centric approach:
- All operations are relative to the repository root (current directory)
- Data is stored in
.testindexdirectory at the repository root - Path resolution is normalized for consistent matching
- Works with both offline and Neo4j storage
Environment Variables
DEBUG=1 # Enable debug logging
NEO4J_URI=bolt://localhost:7687 # Optional Neo4j connection
NEO4J_USER=neo4j # Optional Neo4j username
NEO4J_PASS=password # Optional Neo4j password
ASTON_NO_ENV_CHECK=1 # Skip environment dependency check
OPENAI_API_KEY=sk-... # Required for --llm features
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
astonai-0.2.0.tar.gz
(232.7 kB
view details)
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
astonai-0.2.0-py3-none-any.whl
(300.0 kB
view details)
File details
Details for the file astonai-0.2.0.tar.gz.
File metadata
- Download URL: astonai-0.2.0.tar.gz
- Upload date:
- Size: 232.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5a49307614d52ffdacca55e11d9c38cf4903b6efcbae34bacb47aacf0138018
|
|
| MD5 |
d14e8e045c63740148e3096460206b2a
|
|
| BLAKE2b-256 |
5f435f72e4003aaad426518926326229507700b7db27a32505a38ed7a4b24105
|
File details
Details for the file astonai-0.2.0-py3-none-any.whl.
File metadata
- Download URL: astonai-0.2.0-py3-none-any.whl
- Upload date:
- Size: 300.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c542b21fe9231ead0bfc8ad1cd343c363cabd69d1ee79aed69ebf0b123ee2ae
|
|
| MD5 |
ee0689555e68028a12152fbd419043cc
|
|
| BLAKE2b-256 |
adffb4d4e7b1252d0874b360db12663e29a7f28c54cdf733524d8f1f057d2321
|