Skip to content

Conversation

@filipchristiansen
Copy link
Contributor

This PR reorganizes the Gitingest codebase to improve clarity and maintainability:

  1. Function Renaming:

    • clone is renamed to clone_repo for more explicit naming.
    • Internal Git-related helpers such as _check_repo_exists, _run_command, and check_git_installed are moved and renamed in gitingest.utils.git_utils.
  2. Schema Consolidation:

    • All schema definitions (FileSystemNode, FileSystemNodeType, FileSystemStats, CloneConfig, IngestionQuery) are extracted into a dedicated gitingest.schemas package.
  3. Utility Cleanup:

    • _get_encoding_list and is_textfile now reside in gitingest.utils.file_utils.
    • Removed the unused _get_status_code function.
    • Moved exceptions.py into gitingest.utils.exceptions.
  4. References & Tests:

    • Updated all references, imports, and tests to align with these changes.

These updates streamline the codebase and reduce duplication, making the package easier to extend and maintain.

@filipchristiansen filipchristiansen force-pushed the refactor/extract-schemas-and-rename-clone branch from 048bd6d to 7cadf8e Compare March 21, 2025 12:07
… modules

- Rename `clone` to `clone_repo` for clarity
- Move functions from `cloning` to `utils.git_utils`:
  - `_check_repo_exists` -> `check_repo_exists`
  - `fetch_remote_branch_list` remains `fetch_remote_branch_list`
  - `_run_command` -> `run_command`
  - `check_git_installed` -> `ensure_git_installed`
- Remove the now-unused `_get_status_code` function
- Move `exceptions.py` into `utils`
- Create a new `schemas` package:
  - `FileSystemNode`, `FileSystemNodeType`, `FileSystemStats`
  - `CloneConfig`, `IngestionQuery`
- Move `_get_encoding_list` and `is_textfile` to `utils.file_utils`
- Update all references, imports, and tests accordingly
@filipchristiansen filipchristiansen force-pushed the refactor/extract-schemas-and-rename-clone branch from 7cadf8e to d04c311 Compare March 21, 2025 16:55
@cyclotruc cyclotruc merged commit 8be6f56 into main Mar 22, 2025
18 checks passed
@cyclotruc cyclotruc deleted the refactor/extract-schemas-and-rename-clone branch March 22, 2025 17:56
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.

3 participants