path-metadata-tdd

Develop pytest coverage for filesystem-path metadata extractors using real corpus examples and portable temp fixtures.

1|Updated Jul 16, 2023
One-click install
npx skills add https://github.com/jmservera/aithena --skill path-metadata-tdd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: path-metadata-tdd
Source: https://github.com/jmservera/aithena/tree/main/.squad/skills/path-metadata-tdd
Command: npx skills add https://github.com/jmservera/aithena --skill path-metadata-tdd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a robust testing framework for metadata extractors that rely on filesystem path heuristics, ensuring accuracy and reliability.

Core Features & Use Cases

  • TDD for Parsers: Facilitates Test-Driven Development for parsers driven by folder and filename conventions.
  • Hybrid Testing Strategy: Combines portable temp-path fixtures for general cases with real-library cases that can be skipped in CI.
  • Use Case: When developing a new book indexer that infers author and title from directory structures, use this Skill to write comprehensive tests that cover canonical patterns, edge cases, and real-world examples from your library.

Quick Start

Write pytest coverage for filesystem-path metadata extractors using real corpus examples plus portable temp fixtures.

Frequently Asked Questions about path-metadata-tdd

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test filesystem-path metadata extractors using pytest?

You test filesystem-path metadata extractors by writing pytest coverage that uses portable temporary fixtures and real corpus examples, ensuring parsers strictly follow folder and filename heuristics with clear failure reporting for unknown inputs.

How does TDD work for parsers driven by folder and filename conventions?

TDD for path-driven parsers involves creating tests from canonical patterns and real-world corpus examples before implementation, using temporary filesystem fixtures to validate that directory structures correctly infer metadata like authors and titles.

Can I run pytest tests for path metadata extractors in a CI pipeline?

Yes, the hybrid testing strategy uses portable temporary path fixtures for general cases that run in CI, while real-library corpus tests that depend on specific local filesystems can be automatically skipped during continuous integration runs.

What is the best way to test a book indexer that infers metadata from directory structures?

The best way is to use a hybrid testing framework that combines portable temporary fixtures for canonical edge cases with real-library corpus examples, ensuring the indexer strictly adheres to folder and filename patterns.

Why do my path metadata extractor tests fail on unknown inputs?

Tests for unknown inputs fail because the framework enforces strict adherence to folder and filename heuristics, providing clear failure reporting to ensure parsers only process recognized metadata patterns.