diff --git a/Makefile b/Makefile index 2b776e15..46b82626 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,9 @@ help: @echo " venv-status - Check if venv is active" @echo "" @echo "Development:" - @echo " test - Run all tests" + @echo " test - Run core tests (excluding capability-specific tests)" + @echo " test-capabilities - Run all capability-specific tests" + @echo " test-capability-* - Run specific capability tests (content, utils, finance, etc.)" @echo " test-status - Show test status summary without re-running" @echo " test-new - Create new test file template" @echo " test-coverage - Analyze test coverage" @@ -320,25 +322,77 @@ setup-dev: install-dev # Run tests test: $(VENV)/bin/activate - @echo "🧪 Running tests..." + @echo "🧪 Running core tests (excluding capability-specific tests)..." @if [ -f $(VENV)/bin/pytest ]; then \ - PYTHONPATH=. $(VENV)/bin/pytest tests/ -v; \ + PYTHONPATH=. $(VENV)/bin/pytest tests/ -v \ + --ignore=capabilities/markitect-content/tests/ \ + --ignore=capabilities/markitect-utils/tests/ \ + --ignore=markitect/finance/tests/ \ + --ignore=markitect/query_paradigms/tests/ \ + --ignore=markitect/graphql/tests/ \ + --ignore=markitect/plugins/tests/; \ else \ - PYTHONPATH=. $(VENV_PYTHON) -m pytest tests/ -v 2>/dev/null || \ + PYTHONPATH=. $(VENV_PYTHON) -m pytest tests/ -v \ + --ignore=capabilities/markitect-content/tests/ \ + --ignore=capabilities/markitect-utils/tests/ \ + --ignore=markitect/finance/tests/ \ + --ignore=markitect/query_paradigms/tests/ \ + --ignore=markitect/graphql/tests/ \ + --ignore=markitect/plugins/tests/ 2>/dev/null || \ PYTHONPATH=. $(VENV_PYTHON) -m unittest discover tests/ -v; \ fi +# Capability-Specific Test Targets +test-capabilities: test-capability-content test-capability-utils test-capability-finance test-capability-query test-capability-graphql test-capability-plugins + @echo "✅ All capability tests completed" + +test-capability-content: $(VENV)/bin/activate + @echo "🧪 Running markitect-content capability tests..." + @cd capabilities/markitect-content && python -m pytest tests/ -v + +test-capability-utils: $(VENV)/bin/activate + @echo "🧪 Running markitect-utils capability tests..." + @cd capabilities/markitect-utils && python -m pytest tests/ -v + +test-capability-finance: $(VENV)/bin/activate + @echo "🧪 Running finance capability tests..." + @PYTHONPATH=. $(VENV_PYTHON) -m pytest markitect/finance/tests/ -v + +test-capability-query: $(VENV)/bin/activate + @echo "🧪 Running query paradigms capability tests..." + @PYTHONPATH=. $(VENV_PYTHON) -m pytest markitect/query_paradigms/tests/ -v + +test-capability-graphql: $(VENV)/bin/activate + @echo "🧪 Running GraphQL capability tests..." + @PYTHONPATH=. $(VENV_PYTHON) -m pytest markitect/graphql/tests/ -v + +test-capability-plugins: $(VENV)/bin/activate + @echo "🧪 Running plugins capability tests..." + @PYTHONPATH=. $(VENV_PYTHON) -m pytest markitect/plugins/tests/ -v + # TDD8 Workflow Optimized Test Targets (Issue #57) # Fast test execution for TDD red phase test-red: $(VENV)/bin/activate @echo "🔴 TDD Red Phase - Fast test execution..." - PYTHONPATH=. $(VENV_PYTHON) -m pytest tests/ -x --maxfail=1 --tb=short -q + PYTHONPATH=. $(VENV_PYTHON) -m pytest tests/ -x --maxfail=1 --tb=short -q \ + --ignore=capabilities/markitect-content/tests/ \ + --ignore=capabilities/markitect-utils/tests/ \ + --ignore=markitect/finance/tests/ \ + --ignore=markitect/query_paradigms/tests/ \ + --ignore=markitect/graphql/tests/ \ + --ignore=markitect/plugins/tests/ # Comprehensive test execution for TDD green phase test-green: $(VENV)/bin/activate @echo "🟢 TDD Green Phase - Comprehensive validation..." - PYTHONPATH=. $(VENV_PYTHON) -m pytest tests/ --tb=short + PYTHONPATH=. $(VENV_PYTHON) -m pytest tests/ --tb=short \ + --ignore=capabilities/markitect-content/tests/ \ + --ignore=capabilities/markitect-utils/tests/ \ + --ignore=markitect/finance/tests/ \ + --ignore=markitect/query_paradigms/tests/ \ + --ignore=markitect/graphql/tests/ \ + --ignore=markitect/plugins/tests/ # Smart test selection - changed files only test-smart: $(VENV)/bin/activate @@ -354,12 +408,24 @@ test-smart: $(VENV)/bin/activate # Ultra-fast test execution test-ultra-fast: $(VENV)/bin/activate @echo "⚡ Ultra-fast test execution..." - PYTHONPATH=. $(VENV_PYTHON) -m pytest tests/ -m "not slow" --maxfail=1 -x -q + PYTHONPATH=. $(VENV_PYTHON) -m pytest tests/ -m "not slow" --maxfail=1 -x -q \ + --ignore=capabilities/markitect-content/tests/ \ + --ignore=capabilities/markitect-utils/tests/ \ + --ignore=markitect/finance/tests/ \ + --ignore=markitect/query_paradigms/tests/ \ + --ignore=markitect/graphql/tests/ \ + --ignore=markitect/plugins/tests/ # Test with performance monitoring test-perf: $(VENV)/bin/activate @echo "📊 Test execution with performance monitoring..." - PYTHONPATH=. $(VENV_PYTHON) -m pytest tests/ --durations=10 --tb=short + PYTHONPATH=. $(VENV_PYTHON) -m pytest tests/ --durations=10 --tb=short \ + --ignore=capabilities/markitect-content/tests/ \ + --ignore=capabilities/markitect-utils/tests/ \ + --ignore=markitect/finance/tests/ \ + --ignore=markitect/query_paradigms/tests/ \ + --ignore=markitect/graphql/tests/ \ + --ignore=markitect/plugins/tests/ # Test health check test-health: $(VENV)/bin/activate diff --git a/tests/test_issue_46_schema_generation_outline.py b/capabilities/markitect-content/tests/test_issue_46_schema_generation_outline.py similarity index 100% rename from tests/test_issue_46_schema_generation_outline.py rename to capabilities/markitect-content/tests/test_issue_46_schema_generation_outline.py diff --git a/tests/test_issue_50_metaschema_definition.py b/capabilities/markitect-content/tests/test_issue_50_metaschema_definition.py similarity index 100% rename from tests/test_issue_50_metaschema_definition.py rename to capabilities/markitect-content/tests/test_issue_50_metaschema_definition.py diff --git a/tests/test_issue_54_content_instructions.py b/capabilities/markitect-content/tests/test_issue_54_content_instructions.py similarity index 100% rename from tests/test_issue_54_content_instructions.py rename to capabilities/markitect-content/tests/test_issue_54_content_instructions.py diff --git a/tests/test_issue_55_schema_based_draft_generation.py b/capabilities/markitect-content/tests/test_issue_55_schema_based_draft_generation.py similarity index 100% rename from tests/test_issue_55_schema_based_draft_generation.py rename to capabilities/markitect-content/tests/test_issue_55_schema_based_draft_generation.py diff --git a/tests/test_issue_56_data_driven_draft_generation.py b/capabilities/markitect-content/tests/test_issue_56_data_driven_draft_generation.py similarity index 100% rename from tests/test_issue_56_data_driven_draft_generation.py rename to capabilities/markitect-content/tests/test_issue_56_data_driven_draft_generation.py diff --git a/tests/test_markdownmatters_integration.py b/capabilities/markitect-content/tests/test_markdownmatters_integration.py similarity index 100% rename from tests/test_markdownmatters_integration.py rename to capabilities/markitect-content/tests/test_markdownmatters_integration.py diff --git a/markitect/finance/tests/__init__.py b/markitect/finance/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/test_cost_cli_commands.py b/markitect/finance/tests/test_cost_cli_commands.py similarity index 100% rename from tests/test_cost_cli_commands.py rename to markitect/finance/tests/test_cost_cli_commands.py diff --git a/tests/test_cost_manager.py b/markitect/finance/tests/test_cost_manager.py similarity index 100% rename from tests/test_cost_manager.py rename to markitect/finance/tests/test_cost_manager.py diff --git a/tests/test_cost_report_generator.py b/markitect/finance/tests/test_cost_report_generator.py similarity index 100% rename from tests/test_cost_report_generator.py rename to markitect/finance/tests/test_cost_report_generator.py diff --git a/tests/test_finance_models.py b/markitect/finance/tests/test_finance_models.py similarity index 100% rename from tests/test_finance_models.py rename to markitect/finance/tests/test_finance_models.py diff --git a/tests/test_issue_122_worktime_tracking.py b/markitect/finance/tests/test_issue_122_worktime_tracking.py similarity index 100% rename from tests/test_issue_122_worktime_tracking.py rename to markitect/finance/tests/test_issue_122_worktime_tracking.py diff --git a/tests/test_period_cli_commands.py b/markitect/finance/tests/test_period_cli_commands.py similarity index 100% rename from tests/test_period_cli_commands.py rename to markitect/finance/tests/test_period_cli_commands.py diff --git a/tests/test_period_manager.py b/markitect/finance/tests/test_period_manager.py similarity index 100% rename from tests/test_period_manager.py rename to markitect/finance/tests/test_period_manager.py diff --git a/markitect/graphql/tests/__init__.py b/markitect/graphql/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/test_issue_10_graphql_mutations.py b/markitect/graphql/tests/test_issue_10_graphql_mutations.py similarity index 100% rename from tests/test_issue_10_graphql_mutations.py rename to markitect/graphql/tests/test_issue_10_graphql_mutations.py diff --git a/tests/test_issue_9_graphql_interface.py b/markitect/graphql/tests/test_issue_9_graphql_interface.py similarity index 100% rename from tests/test_issue_9_graphql_interface.py rename to markitect/graphql/tests/test_issue_9_graphql_interface.py diff --git a/markitect/plugins/tests/__init__.py b/markitect/plugins/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/test_issue_19_plugin_architecture.py b/markitect/plugins/tests/test_issue_19_plugin_architecture.py similarity index 100% rename from tests/test_issue_19_plugin_architecture.py rename to markitect/plugins/tests/test_issue_19_plugin_architecture.py diff --git a/tests/test_issue_83_full_text_search.py b/markitect/plugins/tests/test_issue_83_full_text_search.py similarity index 100% rename from tests/test_issue_83_full_text_search.py rename to markitect/plugins/tests/test_issue_83_full_text_search.py diff --git a/markitect/query_paradigms/tests/__init__.py b/markitect/query_paradigms/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/test_query_paradigms.py b/markitect/query_paradigms/tests/test_query_paradigms.py similarity index 100% rename from tests/test_query_paradigms.py rename to markitect/query_paradigms/tests/test_query_paradigms.py