Skip to content

Release v0.3.0: CLI Flexibility, Dynamic Strategies & Robustness Fixes

Choose a tag to compare

@EliasMPJunior EliasMPJunior released this 08 Mar 00:16
· 142 commits to master since this release
e7fd78b

This release significantly enhances the CLI architecture to support flexible argument ordering, dynamic strategy loading via configuration, and improves overall system robustness and test coverage.

Key Features

  • Flexible CLI Argument Parsing: Arguments like --file-type, --limit, --root-path, and --id can now be passed in any order. The new CliContextResolver correctly handles out-of-order flags.
  • Dynamic Strategy Extension: The CLI can now load custom CliContextStrategy implementations defined in config/context.yaml (under strategies or parameters keys), allowing users to extend CLI behavior without modifying the core codebase.
  • Explicit Help Command: Added dedicated support for --help handling in run.py to provide immediate usage information without triggering interactive modes or errors in non-interactive environments.

Fixes & Improvements

  • Repository Implementation: Fixed SimpleFileRepository to fully satisfy HasReadPermission checks by correctly implementing path and root_path properties and stubbing necessary FileRepositoryPort methods.
  • Capability Selection: Corrected FileNameStrategy and FileTypeStrategy to include param_uri metadata, ensuring capabilities like ListDocumentsByNamePattern are correctly selected when their required arguments are present.
  • Test Suite Robustness:
    • Refactored test/test runner to count individual pytest failures correctly.
    • Restored and fixed Python unit tests (test_run_capabilities.py, etc.) to align with new CLI behaviors.
    • Silenced irrelevant third-party DeprecationWarning from tableschema via pytest.ini.

Testing

  • All unit tests passed (./test/test).
  • Verified integration scenarios:
    • Flags out of order (--file-type pdf --limit 10 ...).
    • Capability selection via specific flags (--file-name).
    • Dynamic strategy loading (code implemented, manual verification recommended with custom config).

Breaking Changes

  • None. The changes are backward compatible with existing command usage.

Checklist

  • Code compiles/runs.
  • Tests pass (./test/test).
  • Documentation updated (implicit in code/help).
  • Ready for merge.