Skip to content

Conversation

a-klos
Copy link
Member

@a-klos a-klos commented Sep 10, 2025

This pull request focuses on improving error logging, updating docstrings for clarity, and adding module-level documentation across the admin and extractor API libraries. The most significant changes include replacing logger error statements with logger.exception for better tracebacks, simplifying and clarifying docstrings, and adding module/class documentation headers.

Error Logging Improvements

  • Replaced logger.error calls with logger.exception in exception handlers throughout the codebase to automatically include stack traces, and removed manual traceback.format_exc() usage. This affects files such as default_file_uploader.py, default_source_uploader.py, default_document_reference_retriever.py, s3_service.py, langchain_summarizer.py, and general_file_extractor.py. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Docstring and Documentation Updates

  • Updated method docstrings for clarity and consistency, especially for upload methods, and simplified class initialization docstrings. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]
  • Added module-level docstrings to several files for improved documentation and readability, such as default_file_uploader.py, default_source_uploader.py, file_extractor.py, and source_extractor.py. [1] [2] [3] [4]

Code Quality and Style

  • Improved logging format consistency by switching from string interpolation to logger formatting where applicable.
  • Updated the extractor_type property in InformationExtractor to include a descriptive docstring.

Configuration and Linting

  • Updated pyproject.toml to add missing docstring linting ignores for test files and API base files, improving code style enforcement.

Cleanup

  • Removed unnecessary imports of traceback from files where it is no longer used due to logging improvements. [1] [2] [3] [4] [5]

Let me know if you have questions about any specific change or want to discuss best practices for error handling and documentation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant