Graph-Native Infrastructure for Context and Accountable AI Systems
Python agent-memoryaiai-governanceai-infrastructureartificial-intelligencecontext-engineeringcontext-graphsdata-engineeringdecision-intelligencedeveloper-toolsexplainable-aigenerative-aigraph-ragknowledge-graphllmontologyprovenancepythonreasoningsemantic-search
chore: remove PR descriptions and temporary test output files
KaifAhmad1c8f745cef0d8
diff --git a/PR_DESCRIPTION_KG_ENHANCEMENTS.md b/PR_DESCRIPTION_KG_ENHANCEMENTS.mddeleted file mode 100644index 098aeabe..00000000--- a/PR_DESCRIPTION_KG_ENHANCEMENTS.md+++ /dev/null@@ -1,45 +0,0 @@-# feat: Knowledge Engineering Module Enhancements and Testing--## π Description-This PR significantly enhances the stability, test coverage, and documentation of the `knowledge-engineering` module and related components (`ontology`, `visualization`, `conflicts`, etc.). It addresses critical bugs preventing pipeline execution and establishes a comprehensive testing baseline.--## π Key Changes--### 1. π§ͺ Comprehensive Unit Testing-Added and verified over **100+ new unit tests** across multiple modules to ensure robustness:-- **Knowledge Graph (`semantica.kg`)**:- - `test_core_components.py`: Validates `GraphBuilder`, `EntityResolver`, `GraphValidator`, `ProvenanceTracker`.- - `test_algorithms.py`: Covers `CentralityCalculator`, `CommunityDetector`, `ConnectivityAnalyzer`.-- **Ontology (`semantica.ontology`)**:- - `test_ontology_classes.py`: Tests core ontology generation logic.- - `test_ontology_advanced.py`: Validates validation, metrics, and complex class relationships.-- **Visualization (`semantica.visualization`)**:- - Added tests for `GraphVisualizer` and interactive plotting components.-- **Data Handling**:- - `semantica.split`: Added `test_splitter.py`.- - `semantica.parse`: Added `test_parser.py` (with fixes for `pathlib` mocking).- - `semantica.vector_store` & `semantica.triple_store`: Enhanced with full CRUD operation tests.-- **Utilities**:- - `semantica.seed`: Validated seed management.- - `semantica.utils`: Verified shared utility functions.--### 2. π Bug Fixes & Stability Improvements-- **Conflict Resolution**: Implemented a placeholder `resolve_conflicts` method in `ConflictDetector` to unblock pipeline execution failures where this method was missing.-- **Inference Engine**: Fixed `TypeError: unhashable type: 'dict'` by handling unhashable facts in `InferenceEngine`.-- **Circular Imports**: Resolved circular dependency issues in `semantic_extract` by deferring imports.-- **Test Infrastructure**:- - Fixed `test_cookbook_integration.py` by mocking MCP server connections (`httpx`/`requests`) to prevent WinError 10061.- - Fixed `pathlib.Path` mocking issues in parser tests.--### 3. π Documentation Updates-- **`semantica/kg/kg_usage.md`**: Updated usage guide to reflect current capabilities and configuration options.-- **`semantica/conflicts/conflicts_usage.md`**: Added documentation for the `resolve_conflicts` convenience method.--## β Verification-- All new and existing unit tests pass.-- `python -m unittest discover tests/kg` runs successfully.-- Pipeline execution no longer crashes due to missing methods or unhashable types.--## π¦ Related Issues-- Fixes pipeline crashes during conflict resolution.-- Addresses missing test coverage for core KG components.diff --git a/PR_DESCRIPTION_NORMALIZE.md b/PR_DESCRIPTION_NORMALIZE.mddeleted file mode 100644index 6c957739..00000000--- a/PR_DESCRIPTION_NORMALIZE.md+++ /dev/null@@ -1,38 +0,0 @@-# Normalize Module Enhancements & Comprehensive Testing--## π Summary-This PR significantly enhances the stability and reliability of the `semantica.normalize` module. It addresses critical bugs in the method registry that caused recursion errors, expands test coverage to 100% across all submodules, and fixes various edge cases in data cleaning, date parsing, and number normalization.--## π οΈ Key Changes--### π Bug Fixes-- **Registry Recursion Fix**: Resolved a critical issue in `semantica/normalize/methods.py` where convenience functions (e.g., `clean_text`) were registered as default methods, causing infinite recursion loops.-- **Integration Fix**: Fixed argument mismatch in `clean_data` wrapper when interacting with the method registry.-- **Data Cleaner**: Updated `handle_missing_values` to correctly accept and pass `**options` (e.g., `fill_value`).-- **Entity Normalizer**: Fixed case-insensitive title removal and improved title-casing logic.-- **Date Normalizer**: Fixed timezone object comparison issues and relative date handling for offset-naive datetimes.-- **Number Normalizer**: Added support for plural units (e.g., "kilometers") in `UnitConverter`.--### π§ͺ Testing & Quality Assurance-- **Comprehensive Test Suite**: Added 8 new test files covering all submodules:- - `tests/normalize/test_integration.py` (End-to-end verification)- - `tests/normalize/test_data_cleaner.py`- - `tests/normalize/test_date_normalizer.py`- - `tests/normalize/test_entity_normalizer.py`- - `tests/normalize/test_number_normalizer.py`- - `tests/normalize/test_language_detector.py`- - `tests/normalize/test_encoding_handler.py`-- **Test Runner**: Included `run_normalize_tests_v2.py`, a robust, Windows-compatible test runner with dual logging (console + file).-- **Verification**: Achieved **100% pass rate (57/57 tests)** covering all core functionalities.--### β‘ Improvements-- **Windows Compatibility**: Fixed file path handling in test runners and log generation.-- **Documentation**: Updated docstrings in `methods.py` to reflect correct usage and registry behavior.--## π Test Results-All 57 tests passed successfully.-- **Log File**: `normalize_results_v3.log`-- **Modules Verified**: Text, Date, Number, Entity, Data Cleaning, Language Detection, Encoding.--## π Impact-These changes ensure the `normalize` module is production-ready, robust against edge cases, and fully verified, providing a stable foundation for the data ingestion pipeline.diff --git a/PR_DESCRIPTION_ONTOLOGY.md b/PR_DESCRIPTION_ONTOLOGY.mddeleted file mode 100644index 656f1049..00000000--- a/PR_DESCRIPTION_ONTOLOGY.md+++ /dev/null@@ -1,58 +0,0 @@-# feat(ontology): Comprehensive Testing and Bug Fixes for Ontology Module--## Summary-This PR introduces a comprehensive test suite for the `semantica.ontology` module, verifying the functionality of all core classes and the 6-stage generation pipeline. It also includes fixes for several critical bugs identified during testing, ensuring robust property generation, correct naming conventions, and accurate visualization. Additionally, it verifies that the examples documented in `cookbook/introduction/14_Ontology.ipynb` are functional.--## Key Changes--### 1. Comprehensive Testing-* **New Test Suite (`tests/ontology/test_ontology_comprehensive.py`)**: Added comprehensive tests covering `ClassInferrer`, `PropertyGenerator`, `NamingConventions`, `NamespaceManager`, `ModuleManager`, `OWLGenerator`, `OntologyValidator`, `LLMOntologyGenerator`, and `OntologyEngine`.-* **Documentation Verification (`tests/ontology/test_notebook_14.py`)**: Added a test file that replicates the logic in the `14_Ontology.ipynb` cookbook to ensure all documented examples work as expected.-* **Parsing Module Verification (`tests/parse/test_parse_comprehensive.py`)**: Added comprehensive tests for the `semantica.parse` module, covering CSV, PDF, JSON, XML, Email, DOCX, Code, HTML, and Document parsers.-* **Parsing Notebook Verification (`tests/parse/test_notebook_03.py`)**: Verified `cookbook/introduction/03_Document_Parsing.ipynb` functionality.--### 2. Bug Fixes & Improvements-* **Parsing Module Fixes**:- * Fixed `HTMLParser` to correctly handle metadata extraction and return a `HTMLData` dataclass with dictionary metadata, aligning with documentation and usage.- * Fixed `HTMLParser` to import missing `get_progress_tracker`.- * Fixed `StructuredDataParser` to initialize `progress_tracker` correctly.-* **Property Generation**:- * Fixed `PropertyGenerator` to correctly merge configuration options (specifically `min_occurrences`), ensuring properties are discovered even in small datasets.- * Updated `OntologyGenerator` to pass `entities` and `relationships` to the property inference stage during the full pipeline execution.-* **Naming Conventions**:- * Fixed `_to_singular` to correctly handle words ending in "ss" (e.g., "class" is now preserved instead of becoming "clas").- * Updated `_to_camel_case` to preserve existing camelCase names instead of forcing lowercase, ensuring property names like `hasName` remain correct.-* **Visualization**:- * Fixed `OntologyVisualizer` to handle properties with multiple domains or ranges (list type), preventing `TypeError` during graph generation.-* **Module Management**:- * Corrected method usage in tests (`create_module` instead of `register_module`).-* **LLM Generation**:- * Ensured `LLMOntologyGenerator` preserves the LLM-generated ontology name if one is provided.--## Verification-* **Ontology Test Suite**: All 32 tests in the `tests/ontology/` directory passed successfully.- * `test_ontology_classes.py`: Passed- * `test_ontology_advanced.py`: Passed- * `test_ontology_comprehensive.py`: Passed- * `test_notebook_14.py`: Passed-* **Parsing Test Suite**: All 10 tests in `tests/parse/test_parse_comprehensive.py` passed successfully.-* **Parsing Notebook Test**: `tests/parse/test_notebook_03.py` passed successfully.--## Modified Files-* `semantica/ontology/llm_generator.py`-* `semantica/ontology/naming_conventions.py`-* `semantica/ontology/namespace_manager.py`-* `semantica/ontology/ontology_generator.py`-* `semantica/ontology/property_generator.py`-* `semantica/visualization/ontology_visualizer.py`-* `semantica/parse/html_parser.py`-* `semantica/parse/structured_data_parser.py`-* `tests/ontology/test_notebook_14.py` (New)-* `tests/ontology/test_ontology_comprehensive.py` (New)-* `tests/parse/test_parse_comprehensive.py` (New)-* `tests/parse/test_notebook_03.py` (New)--## Checklist-- [x] All new and existing tests pass.-- [x] Documentation examples verified.-- [x] Code follows project style guidelines.diff --git a/all_kg_tests_output.txt b/all_kg_tests_output.txtdeleted file mode 100644index e3423ae4..00000000Binary files a/all_kg_tests_output.txt and /dev/null differdiff --git a/all_tests_output.txt b/all_tests_output.txtdeleted file mode 100644index f4aefb6e..00000000Binary files a/all_tests_output.txt and /dev/null differdiff --git a/all_tests_output_2.txt b/all_tests_output_2.txtdeleted file mode 100644index ed148fbf..00000000Binary files a/all_tests_output_2.txt and /dev/null differdiff --git a/conflicts_test_output.txt b/conflicts_test_output.txtdeleted file mode 100644index 276edfb1..00000000Binary files a/conflicts_test_output.txt and /dev/null differdiff --git a/cookbook_test_output.txt b/cookbook_test_output.txtdeleted file mode 100644index 473473c2..00000000Binary files a/cookbook_test_output.txt and /dev/null differdiff --git a/debug_git.py b/debug_git.pydeleted file mode 100644index 967ccae2..00000000--- a/debug_git.py+++ /dev/null@@ -1,17 +0,0 @@-import subprocess-import os--def run_git_cmd(cmd):- print(f"--- Running: {cmd} ---")- try:- result = subprocess.run(cmd, shell=True, check=False, capture_output=True, text=True)- print("STDOUT:", result.stdout)- print("STDERR:", result.stderr)- except Exception as e:- print(f"Error running {cmd}: {e}")--print(f"CWD: {os.getcwd()}")-run_git_cmd("git status")-run_git_cmd("git branch -v")-run_git_cmd("git remote -v")-run_git_cmd("git push origin knowledge-engineering")diff --git a/disease_network_output.txt b/disease_network_output.txtdeleted file mode 100644index cdb244e1..00000000Binary files a/disease_network_output.txt and /dev/null differdiff --git a/kg_tests_output.txt b/kg_tests_output.txtdeleted file mode 100644index 867f6ef4..00000000Binary files a/kg_tests_output.txt and /dev/null differdiff --git a/pr_log.txt b/pr_log.txtdeleted file mode 100644index 08cf6101..00000000--- a/pr_log.txt+++ /dev/null@@ -1 +0,0 @@-test content\ No newline at end of filediff --git a/push_and_pr.py b/push_and_pr.pydeleted file mode 100644index afca9cf4..00000000--- a/push_and_pr.py+++ /dev/null@@ -1,34 +0,0 @@-import subprocess-import sys--def log(msg):- with open(r"C:\Users\Mohd Kaif\semantica\pr_log.txt", "a") as f:- f.write(msg + "\n")- print(msg)--def run_command(command):- log(f"Running: {command}")- try:- result = subprocess.run(command, shell=True, check=False, capture_output=True, text=True)- log("STDOUT: " + result.stdout)- log("STDERR: " + result.stderr)- return result.stdout- except Exception as e:- log(f"Exception: {e}")- return None--with open(r"C:\Users\Mohd Kaif\semantica\pr_log.txt", "w") as f:- f.write("Starting PR process\n")--log("--- Pushing to origin ---")-run_command("git push origin knowledge-engineering")--log("\n--- Checking PR list ---")-pr_list = run_command("gh pr list --head knowledge-engineering")--if pr_list is not None and "knowledge-engineering" not in pr_list:- log("\n--- Creating PR ---")- run_command('gh pr create --title "feat: Knowledge Engineering Module Enhancements and Testing" --body "Enhancements to KG module including unit tests, conflict resolution placeholders, and documentation updates." --head knowledge-engineering --base main')-else:- log("\n--- PR might already exist ---")- log(f"PR List output: {pr_list}")diff --git a/run_normalize_tests_v2.py b/run_normalize_tests_v2.pydeleted file mode 100644index f1767741..00000000--- a/run_normalize_tests_v2.py+++ /dev/null@@ -1,55 +0,0 @@-import unittest-import sys-import os--def run_tests():- print("SCRIPT STARTED")- log_path = os.path.join(os.getcwd(), "normalize_results_v3.log")- print(f"Writing log to {log_path}")-- # Ensure we can import from semantica- sys.path.append(os.getcwd())-- try:- loader = unittest.TestLoader()- start_dir = 'tests/normalize'- print(f"Discovering tests in {start_dir}")- suite = loader.discover(start_dir)-- print(f"Discovered {suite.countTestCases()} tests.")-- runner = unittest.TextTestRunner(verbosity=2)-- # Open a log file to write results- with open(log_path, 'w') as f:- f.write("Test Execution Log:\n")- f.write("===================\n\n")-- # Use a custom runner that prints to both stdout and the file- class TeeStream:- def __init__(self, stream1, stream2):- self.stream1 = stream1- self.stream2 = stream2- def write(self, data):- self.stream1.write(data)- self.stream2.write(data)- def flush(self):- self.stream1.flush()- self.stream2.flush()-- runner = unittest.TextTestRunner(stream=TeeStream(sys.stdout, f), verbosity=2)- result = runner.run(suite)-- if result.wasSuccessful():- print("ALL TESTS PASSED")- sys.exit(0)- else:- print("SOME TESTS FAILED")- sys.exit(1)-- except Exception as e:- print(f"An error occurred: {e}")- sys.exit(1)--if __name__ == "__main__":- run_tests()diff --git a/semantic_extract_output.txt b/semantic_extract_output.txtdeleted file mode 100644index 43ab2bd6..00000000Binary files a/semantic_extract_output.txt and /dev/null differdiff --git a/semantic_extract_output_2.txt b/semantic_extract_output_2.txtdeleted file mode 100644index a8dd3800..00000000Binary files a/semantic_extract_output_2.txt and /dev/null differdiff --git a/semantic_extract_output_3.txt b/semantic_extract_output_3.txtdeleted file mode 100644index ac9f331d..00000000Binary files a/semantic_extract_output_3.txt and /dev/null differdiff --git a/simple_test.py b/simple_test.pydeleted file mode 100644index 4ebbdf91..00000000--- a/simple_test.py+++ /dev/null@@ -1,3 +0,0 @@-with open('test_write.txt', 'w') as f:- f.write('Hello World')-print("Wrote file")diff --git a/test_inference_output.txt b/test_inference_output.txtdeleted file mode 100644index ce598380..00000000Binary files a/test_inference_output.txt and /dev/null differdiff --git a/test_inference_output_2.txt b/test_inference_output_2.txtdeleted file mode 100644index ca122b16..00000000Binary files a/test_inference_output_2.txt and /dev/null differdiff --git a/test_output.txt b/test_output.txtdeleted file mode 100644index b0bcbf72..00000000Binary files a/test_output.txt and /dev/null differdiff --git a/test_output_2.txt b/test_output_2.txtdeleted file mode 100644index b1c6f13d..00000000Binary files a/test_output_2.txt and /dev/null differdiff --git a/test_output_3.txt b/test_output_3.txtdeleted file mode 100644index 5babeb17..00000000Binary files a/test_output_3.txt and /dev/null differdiff --git a/test_output_4.txt b/test_output_4.txtdeleted file mode 100644index 0867d166..00000000Binary files a/test_output_4.txt and /dev/null differdiff --git a/test_output_5.txt b/test_output_5.txtdeleted file mode 100644index 4b96c2a2..00000000Binary files a/test_output_5.txt and /dev/null differdiff --git a/test_output_6.txt b/test_output_6.txtdeleted file mode 100644index 9f0b38f4..00000000Binary files a/test_output_6.txt and /dev/null differdiff --git a/test_output_7.txt b/test_output_7.txtdeleted file mode 100644index 3801800d..00000000Binary files a/test_output_7.txt and /dev/null differdiff --git a/tests_core_output.txt b/tests_core_output.txtdeleted file mode 100644index bdd6d603..00000000Binary files a/tests_core_output.txt and /dev/null differdiff --git a/tests_ingest_cookbook_output.txt b/tests_ingest_cookbook_output.txtdeleted file mode 100644index f1663261..00000000Binary files a/tests_ingest_cookbook_output.txt and /dev/null differdiff --git a/tests_ingest_output.txt b/tests_ingest_output.txtdeleted file mode 100644index 806b9425..00000000Binary files a/tests_ingest_output.txt and /dev/null differdiff --git a/tests_ingest_pytest_output.txt b/tests_ingest_pytest_output.txtdeleted file mode 100644index 8af4440c..00000000Binary files a/tests_ingest_pytest_output.txt and /dev/null differdiff --git a/tests_ingest_pytest_output_2.txt b/tests_ingest_pytest_output_2.txtdeleted file mode 100644index fd6dcf58..00000000Binary files a/tests_ingest_pytest_output_2.txt and /dev/null differdiff --git a/tests_pipeline_output.txt b/tests_pipeline_output.txtdeleted file mode 100644index f49b8355..00000000Binary files a/tests_pipeline_output.txt and /dev/null differ