Skip to content

Conversation

@filipchristiansen
Copy link
Contributor

@filipchristiansen filipchristiansen commented Jan 8, 2025

Overview

This PR refactors several module filenames in the gitingest package to address naming clashes between modules and the functions they export. Additionally, the names of the corresponding test files have been updated to match the new module names.

Changes Made

  • Module Renaming:

    • clone.py is now repository_clone.py
    • ingest.py is now repository_ingest.py
    • ingest_from_query.py is now query_ingestion.py
    • parse_query.py is now query_parser.py
    • process_query.py is no query_processor.py
  • Test File Renaming:

    • Renamed test files to match their corresponding module names.
      • For example, test_clone.py is now test_repository_clone.py, and similarly for other modules.
  • Import Updates:

    • Updated the imports in gitingest/__init__.py to reflect the new module names.
    • Verified that all internal references to these modules are consistent with the new names.

Rationale

The original module names conflicted with their function names, which could lead to confusion and potential import issues. By renaming modules (and their associated test files) to more descriptive names, we improve the clarity of the codebase and prevent future naming conflicts.

Testing

  • Ran unit tests to ensure that all functionality remains intact after renaming.

Impact

These changes should be fully backward compatible as public API functions (clone_repo, ingest, ingest_from_query, and parse_query) remain the same. The only differences are internal file/module names, which do not affect end-user code relying on the public API.

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.

Tested, all good thank you!

- Renamed: - `clone.py` → `repository_clone.py` - `ingest.py` → `repository_ingest.py` - `ingest_from_query.py` → `query_ingestion.py` - `parse_query.py` → `query_parser.py` - Updated import statements accordingly in package `__init__.py`
@cyclotruc cyclotruc merged commit 6d92ed9 into coderamp-labs:main Jan 8, 2025
8 checks passed
@filipchristiansen filipchristiansen deleted the refactor/module-renames branch January 9, 2025 01:00
FOLKS-Tech pushed a commit to FOLKS-Tech/gitingest that referenced this pull request Sep 5, 2025
…coderamp-labs#114) - Renamed: - `clone.py` → `repository_clone.py` - `ingest.py` → `repository_ingest.py` - `ingest_from_query.py` → `query_ingestion.py` - `parse_query.py` → `query_parser.py`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants