266 Commits

Author SHA1 Message Date
nvaldez 8eb3a8fd0c major refactor 2026-09-23 11:38:16 +02:00
nvaldez f1e52b648e minimize unused code 2026-09-22 14:11:22 +02:00
nvaldez 8caacf3b52 minimize unused code 2026-09-22 13:27:13 +02:00
nvaldez 263f14b92e ruff linter unsafe fix 2026-09-22 11:28:57 +02:00
nvaldez b906cfea2d ruff linter implemented 2026-09-22 09:33:34 +02:00
nvaldez 220ab121ec ruff linter implemented 2026-09-22 09:30:56 +02:00
nvaldez 099d1a6752 fix recursion 2026-09-21 21:29:17 +02:00
nvaldez 1a09e15b03 Markdownlint format improvement 2026-09-21 21:22:07 +02:00
nvaldez f289daaae1 MD Lint violation formatting tests 2026-09-21 20:44:39 +02:00
nvaldez 8ed4367702 MD Linte violation formatting tests 2026-09-21 20:16:42 +02:00
nvaldez e7827e615e pytest now called as module tot subprocess 2026-09-21 10:26:09 +02:00
nvaldez 49dab19b4d checkpoint 2026-09-20 15:58:14 +02:00
nvaldez 9425a2cc14 checkpoint 2026-09-20 15:57:57 +02:00
nvaldez 3c19502491 new todo 2026-09-20 15:28:23 +02:00
nvaldez d620e45c3c Run coverage by default, add --skip-cov to disable
- Change with_coverage default from False to True in run_pytest and run_all_tests
- Add --skip-cov argument to disable coverage
- Remove --coverage argument
- Update test expectations to match new default

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-09-20 15:28:02 +02:00
nvaldez 54fb14148a Add pytest-cov as a dev dependency
- Add pytest-cov>=4.0.0 to dev dependencies so coverage is available when installing with [dev]
- This enables the --coverage flag in run_tests.py to work properly

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-09-20 15:25:04 +02:00
nvaldez 2a71de3c08 Add --coverage flag to run_tests.py to show code coverage percentage
- Add --coverage CLI argument
- Add with_coverage parameter to run_pytest and run_all_tests methods
- Add _parse_coverage_output method to extract percentage from pytest-cov output
- Add coverage_percent to TestRunner class
- Display coverage percentage in summary when --coverage is used
- Run pytest with --cov=src --cov-report=term when coverage is enabled

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-09-20 15:23:22 +02:00
nvaldez 6fa275d6e2 Add comprehensive test coverage for run_tests.py
- Add TestTestRunnerInit class with 3 tests for __init__
- Add TestParsePytestOutput class with 5 tests for output parsing
- Add TestRunPytest class with 5 tests for pytest execution
- Add TestRunAllTests class with 2 tests for running all tests
- Add TestGetSummary class with 2 tests for summary generation
- Total: 17 new tests covering all TestRunner methods

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-09-20 15:19:29 +02:00
nvaldez 4dc98cb98e Fix run_tests.py to correctly count individual tests
- Always capture pytest output to parse test counts
- Parse pytest output to extract passed/failed counts using regex
- Track total_collected, total_passed, total_failed at class level
- Print pytest output when not in CI mode
- Now correctly shows 'Passed: 3/3' instead of 'Passed: 1/1'

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-09-20 15:16:20 +02:00
nvaldez 9412ff2e73 Fix run_tests.py to use correct test paths after refactoring
- Update test_paths from ['librarian/tests', 'mdoctor/tests'] to ['src/tests']
- Tests were moved to src/tests/ during refactoring

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-09-20 15:14:05 +02:00
nvaldez 0aa72d62c4 new todo 2026-09-20 15:12:44 +02:00
nvaldez c016fbe824 move some files 2026-09-20 15:05:22 +02:00
nvaldez 312db8549a Move pymarkdown imports to top of file (no inline imports)
- Move import pymarkdown and PyMarkdownLint from _run_pymarkdown_lint method to top-level imports
- Follows Python best practice of having all imports at the top of the file

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-09-20 15:04:46 +02:00
nvaldez 2f65eae18c Default to current directory when no directory argument provided
- librarian: Make directory argument optional with default '.'
- mdoctor: Default to 'list' subcommand with current directory when no args
- mdoctor: Add directory argument to list subcommand with default '.'
- chklint: Keep default '.' for directory argument

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-09-20 15:01:28 +02:00
nvaldez 1296c618cf Use pymarkdown library directly instead of subprocess
- Import pymarkdown and PyMarkdownLint directly
- Remove subprocess call to pymarkdownlnt CLI
- Use library's Python API with stdout/stderr redirection
- More portable as it doesn't rely on CLI entry points

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-09-20 15:00:26 +02:00
nvaldez 5ccffbb36f Simplify mdoctor to use only pymarkdownlnt as it is now a dependency
- Remove markdownlint fallback check since pymarkdownlnt is now a runtime dependency
- Simplify _get_linter_command() to just use pymarkdownlnt scan directly
- Rename _parse_pymarkdownlnt_output to _parse_output
- Remove json and shutil imports that are no longer needed

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-09-20 14:57:08 +02:00
nvaldez 2235e0dec7 Add pymarkdownlnt as a runtime dependency
- Add pymarkdownlnt>=0.9.0 to main dependencies so users don't need to install it manually
- This enables the mdoctor chklint command to work out of the box

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-09-20 14:52:23 +02:00
nvaldez 37efbcb069 Add mdoctor chklint command to check markdown files for lint violations
- Add list_all_md_files() method to MDoctor class using Librarian.list_all_md_files()
- Add check_markdown_lint() method to run markdownlint/pymarkdownlnt on .md files
- Add chklint subcommand to mdoctor CLI with directory argument
- Update fiona/__main__.py to pass subcommands to mdoctor
- Add test_list_all_md_files() test in test_librarian.py

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-09-20 14:50:10 +02:00
nvaldez 87b9b27f45 Add basic documentation stubs for project
- Add src/README.md with project overview, installation, and usage
- Update src/librarian/README.md with actual usage examples
- Add src/mdoctor/README.md with tool description and usage

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-09-20 14:31:52 +02:00
nvaldez d759e6798f Implemented complete local lifecycle for production and testing 2026-09-20 14:21:08 +02:00
nvaldez e73d9f170f rename project to avoid conflict with PyPI 2026-09-20 14:09:37 +02:00
nvaldez 494df03ddf follow toml and build standard practice 2026-09-20 13:40:38 +02:00
nvaldez ec577a779d new framework complete 2026-09-20 13:23:18 +02:00
nvaldez 171c20c2c1 Fix mistakes of the old harness with toml 2026-09-20 13:17:30 +02:00
nvaldez fac22f2e75 Fix mistakes of the old harness 2026-09-20 13:15:22 +02:00
nvaldez 895f5d0945 new harness refactor! 2026-09-20 12:50:29 +02:00
nvaldez 5bdd6009e4 entry point framework implemented! 2026-09-20 11:20:45 +02:00
nvaldez 5628fcde64 create main function 2026-09-20 11:19:09 +02:00
nvaldez 1d45b5dccf create main function 2026-09-20 11:18:32 +02:00
nvaldez 04b60f0fd2 unify tests 2026-09-20 10:41:53 +02:00
nvaldez 8382b7c25b fixed reorg pytest 2026-09-20 10:37:10 +02:00
nvaldez 7631066545 fixed reorg bootstrapping 2026-09-20 10:15:34 +02:00
nvaldez f4f5613d1b fixed reorg bootstrapping 2026-09-20 10:13:47 +02:00
nvaldez d5460c1276 reorganize folders 2026-09-20 09:13:52 +02:00
nvaldez 543616c6c8 Uncle BOB TTD framework setup complete! 2026-09-19 23:17:26 +02:00
nvaldez 703757bee7 first test 2026-09-19 23:04:20 +02:00
nvaldez 76f872542e first test 2026-09-19 23:03:40 +02:00
nvaldez 92be455dff fix pytest 2026-09-19 20:55:37 +02:00
nvaldez 974ddadc92 fix pytest 2026-09-19 20:52:21 +02:00
nvaldez fbe46a68a5 fix pytest 2026-09-19 20:35:22 +02:00