Skip to content

Conversation

@filipchristiansen
Copy link
Contributor

This PR includes a combination of refactoring, documentation, and code cleanup tasks to improve the codebase's structure, readability, and maintainability. The changes include:

Refactoring:

  • Simplified logic in the _should_exclude function in ingest_from_query.py.
  • Reorganized clone.py by moving the clone_repo function to the top of the file, above helper functions.
  • Prefixed helper functions with an underscore for clarity and convention.

Documentation:

  • Added docstrings to functions in process_query.py and the logSliderToSize function in server_utils.py.
  • Enhanced main.py with docstrings and additional comments for clarity.

Style:

  • Moved the comment for the async_timeout function into its body for better placement.

Chores:

  • Added markdownlint to pre-commit hooks for enforcing markdown standards and disabling the line-length rule.

Fixes:

  • Updated README.md to remove inline HTML and add a top-level heading to comply with markdownlint rules.

Code Cleanup:

  • Removed the unused normalize_pattern function from client.py.
  • Improved type annotations across multiple modules.

These updates collectively improve the maintainability, readability, and consistency of the codebase, while also aligning with coding standards and best practices.

Copy link
Member

@cyclotruc cyclotruc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good once again you're doing wonders to the codebase, thank you

@cyclotruc cyclotruc merged commit 4e5c952 into coderamp-labs:main Dec 30, 2024
12 checks passed
@filipchristiansen filipchristiansen deleted the refactor/docs/code-cleanup branch December 30, 2024 11:21
FOLKS-Tech pushed a commit to FOLKS-Tech/gitingest that referenced this pull request Sep 5, 2025
Code Quality:
- Add markdownlint to pre-commit hooks for consistent markdown formatting
- Add missing type hints to constants and variables
- Prefix helper functions with underscore for better encapsulation

Documentation:
- Update README.md to follow markdown best practices
- Add docstrings to functions in process_query.py, server_utils.py and main.py

Refactoring:
- Remove redundant normalize_pattern function from client.py
- Simplify logic in should_exclude function in ingest_from_query.py
- Improve code organization in clone.py
- Move async_timeout comment into function body for better context
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.

2 participants