Skip to main content

Comprehensive metadata validation and testing framework for markdown documentation files

Project description

๐Ÿ“‹ Metadata Validator

PyPI version License: MIT Python 3.8+ Tests

A comprehensive Python package for validating and auto-filling metadata in markdown files with smart date normalization, changelog validation, and neurodiversity-aware design.

๐Ÿ“– Table of Contents

Project Info

  • Author: ViewtifulSlayer
  • Version: 1.0.0
  • Status: Active
  • Category: Python Package, Metadata Validation
  • License: MIT

Features

Core Validation

  • โœ… Required field validation with intelligent suggestions
  • โœ… ISO 8601 date format compliance and normalization
  • โœ… Automatic date format conversion (20+ formats supported)
  • โœ… Content-based title suggestions
  • โœ… Graceful error handling and timeout management

User Experience

  • โœ… Three operation modes: Interactive, Auto, and Manual
  • โœ… Smart auto-fill with user control
  • โœ… Comprehensive help system
  • โœ… Progress indicators and clear feedback

Advanced Features

  • โœ… Changelog validation and consistency checking
  • โœ… Context-aware placement recommendations
  • โœ… Neurodiversity-aware design principles
  • โœ… Zero external dependencies (Python standard library only)

Installation

# Install from PyPI
pip install metadata-validator

# Or install from source
git clone https://github.com/ViewtifulSlayer/metadata-validator.git
cd metadata-validator
pip install -e .

Quick Start

# Validate a markdown file (interactive mode)
metadata-validator path/to/file.md

# Auto-fill missing fields without prompts
metadata-validator path/to/file.md --auto

# Manual mode (report only, no changes)
metadata-validator path/to/file.md --manual

# Disable auto-update of 'Last Updated' field
metadata-validator path/to/file.md --no-auto-update

Usage

Basic Validation

The metadata validator ensures your markdown files have proper metadata blocks:

---
# Metadata
- **Document Title:** Example Document
- **Version:** 1.0.0
- **Author:** Your Name
- **Created:** 2025-01-15
- **Last Updated:** 2025-07-05
- **Status:** Active
- **Category:** Documentation
- **Description:** Brief description of the document
---

Date Format Support

Automatically normalizes 20+ date formats to ISO 8601:

# These all become 2025-07-05
2025-07-05
07/05/2025
July 5, 2025
5 Jul 2025
2025-07-05T00:00:00

Changelog Integration

Validates changelog consistency and provides smart suggestions:

# Checks if metadata version matches changelog version
metadata-validator README.md

# Validates both separate CHANGELOG.md and embedded sections
metadata-validator --check-changelog path/to/file.md

Development Transparency

This project was developed with assistance from AI tools, following modern best practices for AI-augmented development:

AI Development Tools Used:

  • Cursor IDE - AI-powered code completion, refactoring, and development assistance
  • GitHub Copilot - Code suggestions and documentation help
  • AI Pair Programming - Collaborative development with AI assistance

Development Approach:

The core logic, architecture decisions, and implementation details were developed collaboratively with AI assistance. This approach enabled:

  • Rapid prototyping and iterative development
  • Comprehensive testing with AI-generated test cases
  • Professional documentation with AI-assisted writing
  • Best practice implementation following industry standards

Quality Assurance:

  • Human oversight on all architectural decisions
  • Manual review of all generated code
  • Comprehensive testing (27/27 tests passing)
  • Professional standards maintained throughout development

This transparency reflects our commitment to honest development practices and the evolving landscape of AI-assisted software development.

Testing Framework

Phoenix Adversarial Testing

Systematic robustness testing through:

  • Input Validation: Malformed dates, special characters, whitespace issues
  • Edge Cases: Large files, missing files, corrupted metadata
  • Performance: Memory usage, processing time, resource consumption
  • Error Recovery: Graceful handling of invalid inputs

Sphinx Cognitive Pattern Testing

Accessibility testing across different cognitive patterns:

  • Linear Thinkers: Sequential, methodical approaches
  • Non-Linear Thinkers: Creative, associative approaches
  • Detail Focused: Precision and exact formatting
  • Big Picture Focused: Conceptual and approximate approaches
  • Executive Function Challenges: Task completion and interruption handling

Running Tests

# Run all tests
python -m pytest tests/ -v

# Run specific test suites
python tests/test_phoenix_adversarial.py
python tests/test_sphinx_cognitive.py
python tests/test_date_normalization.py

Package Structure

metadata_validator/
โ”œโ”€โ”€ __init__.py                    # Package initialization
โ”œโ”€โ”€ metadata_validator.py          # Main validation script
โ”œโ”€โ”€ config/                        # Configuration management
โ”‚   โ”œโ”€โ”€ config_loader.py          # Configuration loading
โ”‚   โ””โ”€โ”€ metadata_standards.json   # Validation standards
โ”œโ”€โ”€ tests/                         # Comprehensive test suite
โ”‚   โ”œโ”€โ”€ test_date_normalization.py # Date format testing
โ”‚   โ”œโ”€โ”€ test_phoenix_adversarial.py # Phoenix adversarial testing
โ”‚   โ”œโ”€โ”€ test_sphinx_cognitive.py   # Sphinx cognitive pattern analysis
โ”‚   โ””โ”€โ”€ test_files/               # Test markdown files
โ””โ”€โ”€ docs/                         # Documentation
    โ”œโ”€โ”€ testing_plan.md           # Comprehensive testing plan
    โ”œโ”€โ”€ phoenix_report.md         # Phoenix adversarial testing report
    โ””โ”€โ”€ sphinx_report.md          # Sphinx cognitive pattern report

Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

For Phoenix Seat Holders

  • Focus on robustness and failure mode analysis
  • Create comprehensive edge case tests
  • Document quality issues and improvements
  • Ensure graceful error handling

For Sphinx Seat Holders

  • Analyze usability across cognitive patterns
  • Identify accessibility barriers
  • Propose adaptive solutions
  • Ensure inclusive design principles

Documentation

Support

License

This project is licensed under the MIT License - see the LICENSE file for details.


Remember: This package embodies the collaborative wisdom of both Phoenix and Sphinx seats, ensuring that the metadata validator is both robust against failure and accessible to all minds.

"From the ashes of failure, we rise with renewed wisdom and strength." - Phoenix Motto

"The riddle of the Sphinx is not to be solved by one mind alone, but by the synthesis of many minds working together." - Sphinx Motto

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metadata_validator_dx-1.0.0.tar.gz (54.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

metadata_validator_dx-1.0.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file metadata_validator_dx-1.0.0.tar.gz.

File metadata

  • Download URL: metadata_validator_dx-1.0.0.tar.gz
  • Upload date:
  • Size: 54.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for metadata_validator_dx-1.0.0.tar.gz
Algorithm Hash digest
SHA256 272ffd5e3071331d0edc4ff796e58529f806a07fe94974f27761ea62ae249477
MD5 772995adf648cb4abb70d84cda51aaa0
BLAKE2b-256 797d7f12a1e2bf3a2b717d9321546927aa85126a5bf6cc7b7759748b4cb9967e

See more details on using hashes here.

File details

Details for the file metadata_validator_dx-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for metadata_validator_dx-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3284e9dcd47389691a3979048fbb2d22130ca8279c69d122d66a68cda29e3b38
MD5 e6897b70330c87952eb523b700ecd1d3
BLAKE2b-256 222d163ccf09e338bf269203d4db00e77d6524d6d651a0cbbe5f559dc392dfae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page