Skip to content

aitomatic/datest

Repository files navigation

Datest πŸ§ͺ

Simple testing framework for Dana language files (.na)

Python 3.10+ MIT License uv

Datest is a minimal testing framework for Dana (.na) files. It provides basic test discovery and execution for neurosymbolic agent systems written in the Dana language.

Status: Early MVP - Basic functionality for discovering and validating Dana test files.


πŸš€ Quick Start

# Install and setup
git clone https://github.com/aitomatic/datest.git
cd datest
make quickstart

# Run datest (currently shows help and validates setup)
datest

# Future: Basic Dana file testing
datest test_example.na           # Run a Dana test file
datest tests/                    # Run all .na files in directory

πŸ§ͺ What Datest Does

Datest is a barebones MVP that focuses on the essentials:

Basic Test Discovery

  • Finds .na files in directories
  • Follows simple naming patterns (test_*.na)
  • Basic file validation

Simple Dana Test Format

// test_example.na - Basic Dana test
test "simple reasoning" {
    reason("What is 2 + 2?")
    expect(contains("4"))
}

test "basic memory" {
    remember("fact", "sky is blue")
    reason("What color is the sky?")
    expect(contains("blue"))
}

✨ Core Features (MVP)

  • πŸ” File Discovery: Finds Dana test files in directories
  • πŸ“„ Basic Parsing: Validates Dana test file syntax
  • πŸ“‹ Simple Output: Basic pass/fail reporting
  • 🎯 Minimal: Focused on essential functionality only

Not Included (Yet):

  • ❌ Advanced assertions
  • ❌ Parallel execution
  • ❌ Complex reporting
  • ❌ Plugin system
  • ❌ Coverage analysis

πŸ› οΈ Installation

# Quick setup
git clone https://github.com/aitomatic/datest.git
cd datest
make setup-dev

Or install directly:

pip install -e .

πŸ“– Basic Usage

Current Commands

# Show help and validate installation
datest

# Check version
datest --version

# Verbose output
datest --verbose

Planned Commands (Simple)

# Run Dana test files
datest test_example.na           # Single file
datest tests/                    # Directory of .na files
datest --list                    # Show discovered tests

πŸ§ͺ Writing Dana Tests (Basic)

Simple Test Structure

// test_basic.na
test "addition" {
    reason("What is 5 + 3?")
    expect(contains("8"))
}

test "memory recall" {
    remember("name", "Alice")
    reason("What name did I remember?")
    expect(contains("Alice"))
}

Basic Assertions (Planned)

  • expect(contains("text")) - Check if response contains text
  • expect(equals("exact")) - Exact match
  • expect(not_empty()) - Response is not empty

That's it. No complex patterns, no advanced features - just the basics.


πŸ—οΈ Current Status

What Works Now (v0.1.0)

  • βœ… CLI framework with basic argument parsing
  • βœ… Project structure and packaging
  • βœ… Development tooling setup
  • βœ… Installation and basic validation

Next Steps (v0.2.0)

  • 🚧 Simple Dana file discovery
  • 🚧 Basic Dana test parsing
  • 🚧 Minimal test execution
  • 🚧 Simple pass/fail output

Future (Maybe)

  • πŸ“‹ More assertion types
  • πŸ“‹ Better error messages
  • πŸ“‹ Configuration files
  • πŸ“‹ Integration with other tools

πŸ”§ Configuration (Minimal)

Basic datest.toml

# datest.toml - Simple configuration
[tool.datest]
test_dirs = ["tests"]
test_pattern = "test_*.na"

That's all the configuration needed for the MVP.


🀝 Contributing

This is a minimal MVP, so contributions should focus on:

Core Priorities

  1. Dana file parsing - Basic syntax validation
  2. Test discovery - Find .na files reliably
  3. Simple execution - Run tests and report results
  4. Error handling - Clear error messages

Non-Priorities (For Now)

  • Advanced features
  • Complex reporting
  • Performance optimization
  • Plugin systems

Getting Started

git clone https://github.com/your-username/datest.git
cd datest
make setup-dev
make test

πŸ“Š Why This MVP Approach?

Keep It Simple

  • Focus on core Dana testing needs
  • Get basic functionality working first
  • Avoid feature creep early on

Learn First

  • Understand how Dana tests should work
  • Get feedback from real usage
  • Build features that are actually needed

Sustainable Development

  • Small, manageable codebase
  • Clear scope and expectations
  • Room to grow based on user needs

πŸ”— Resources


πŸ“„ License

MIT License - see LICENSE.md for details.


Built with ❀️ by Aitomatic
Simple Dana testing, one step at a time

About

Pytest-inspired testing framework for Dana, the agent-first neurosymbolic language

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •