Commit graph

65 commits

Author SHA1 Message Date
Nicolas IRAGNE
fb86ace8e8 test: add comprehensive MCP server testing and documentation
- Add complete test suite for MCP server functionality
- Test MCP tool registration, execution, and error handling
- Add async testing for stdio transport communication
- Update CHANGELOG.md with all feature additions
- Update README.md with MCP server installation and usage
- Document GitPython migration and MCP integration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 15:56:17 +02:00
Iwan Burel
fae3a8c3d5 test: add comprehensive MCP server testing and documentation
- Add complete test suite for MCP server functionality
- Test MCP tool registration, execution, and error handling
- Add async testing for stdio transport communication
- Update CHANGELOG.md with all feature additions
- Update README.md with MCP server installation and usage
- Document GitPython migration and MCP integration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-12 15:56:17 +02:00
Nicolas Iragne
c9fff75cc1
ci: remove codecov and reduce test matrix (#506)
Some checks failed
CI / test (macos-latest, 3.13) (push) Has been cancelled
CI / test (macos-latest, 3.8) (push) Has been cancelled
CI / test (true, ubuntu-latest, 3.13) (push) Has been cancelled
CI / test (ubuntu-latest, 3.8) (push) Has been cancelled
CI / test (windows-latest, 3.13) (push) Has been cancelled
CI / test (windows-latest, 3.8) (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
Build & Push Container / ECR (push) Has been cancelled
Build & Push Container / GHCR (push) Has been cancelled
release-please / release (push) Has been cancelled
OSSF Scorecard / Scorecard analysis (push) Has been cancelled
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2025-08-09 15:24:30 +02:00
Mickael
414e85189f
feat: implement S3 integration for storing and retrieving digest files (#427)
Co-authored-by: Filip Christiansen <22807962+filipchristiansen@users.noreply.github.com>
Co-authored-by: Nicolas Iragne <nicoragne@hotmail.fr>
2025-07-26 16:28:17 +02:00
Filip Christiansen
a99089ab11
refactor: consistent cloning & pattern-handling (#388)
Some checks are pending
CI / test (macos-latest, 3.10) (push) Waiting to run
CI / test (macos-latest, 3.11) (push) Waiting to run
CI / test (macos-latest, 3.12) (push) Waiting to run
CI / test (macos-latest, 3.13) (push) Waiting to run
CI / test (macos-latest, 3.8) (push) Waiting to run
CI / test (macos-latest, 3.9) (push) Waiting to run
CI / test (true, ubuntu-latest, 3.13) (push) Waiting to run
CI / test (ubuntu-latest, 3.10) (push) Waiting to run
CI / test (ubuntu-latest, 3.11) (push) Waiting to run
CI / test (ubuntu-latest, 3.12) (push) Waiting to run
CI / test (ubuntu-latest, 3.8) (push) Waiting to run
CI / test (ubuntu-latest, 3.9) (push) Waiting to run
CI / test (windows-latest, 3.10) (push) Waiting to run
CI / test (windows-latest, 3.11) (push) Waiting to run
CI / test (windows-latest, 3.12) (push) Waiting to run
CI / test (windows-latest, 3.13) (push) Waiting to run
CI / test (windows-latest, 3.8) (push) Waiting to run
CI / test (windows-latest, 3.9) (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Build & Push Container / docker-build (push) Waiting to run
release-please / release (push) Waiting to run
OSSF Scorecard / Scorecard analysis (push) Waiting to run
Co-authored-by: ix-56h <n.guintini@protonmail.com>
2025-07-23 16:35:32 +02:00
Mickael
590e55a4d2
feat: integrate Sentry for error tracking and performance monitoring (#408)
Some checks are pending
CI / test (macos-latest, 3.10) (push) Waiting to run
CI / test (macos-latest, 3.11) (push) Waiting to run
CI / test (macos-latest, 3.12) (push) Waiting to run
CI / test (macos-latest, 3.13) (push) Waiting to run
CI / test (macos-latest, 3.8) (push) Waiting to run
CI / test (macos-latest, 3.9) (push) Waiting to run
CI / test (true, ubuntu-latest, 3.13) (push) Waiting to run
CI / test (ubuntu-latest, 3.10) (push) Waiting to run
CI / test (ubuntu-latest, 3.11) (push) Waiting to run
CI / test (ubuntu-latest, 3.12) (push) Waiting to run
CI / test (ubuntu-latest, 3.8) (push) Waiting to run
CI / test (ubuntu-latest, 3.9) (push) Waiting to run
CI / test (windows-latest, 3.10) (push) Waiting to run
CI / test (windows-latest, 3.11) (push) Waiting to run
CI / test (windows-latest, 3.12) (push) Waiting to run
CI / test (windows-latest, 3.13) (push) Waiting to run
CI / test (windows-latest, 3.8) (push) Waiting to run
CI / test (windows-latest, 3.9) (push) Waiting to run
Build & Push Container / docker-build (push) Waiting to run
OSSF Scorecard / Scorecard analysis (push) Waiting to run
2025-07-13 17:02:00 +02:00
Filip Christiansen
03b015059c
ci: integrate Codecov and pytest-cov (#405) 2025-07-13 16:44:01 +02:00
Romain Courtois
f5b20dec44
chore: replace org name in repo urls (#396)
Some checks are pending
CI / test (macos-latest, 3.10) (push) Waiting to run
CI / test (macos-latest, 3.11) (push) Waiting to run
CI / test (macos-latest, 3.12) (push) Waiting to run
CI / test (macos-latest, 3.13) (push) Waiting to run
CI / test (macos-latest, 3.8) (push) Waiting to run
CI / test (macos-latest, 3.9) (push) Waiting to run
CI / test (ubuntu-latest, 3.10) (push) Waiting to run
CI / test (ubuntu-latest, 3.11) (push) Waiting to run
CI / test (ubuntu-latest, 3.12) (push) Waiting to run
CI / test (ubuntu-latest, 3.13) (push) Waiting to run
CI / test (ubuntu-latest, 3.8) (push) Waiting to run
CI / test (ubuntu-latest, 3.9) (push) Waiting to run
CI / test (windows-latest, 3.10) (push) Waiting to run
CI / test (windows-latest, 3.11) (push) Waiting to run
CI / test (windows-latest, 3.12) (push) Waiting to run
CI / test (windows-latest, 3.13) (push) Waiting to run
CI / test (windows-latest, 3.8) (push) Waiting to run
CI / test (windows-latest, 3.9) (push) Waiting to run
OSSF Scorecard / Scorecard analysis (push) Waiting to run
2025-07-09 11:30:37 +02:00
jpotw
38c23171a1
feat: include_submodules option (#313)
* feat: add optional --include-submodules flag to CLI and ingestion

- Adds --include-submodules CLI flag to control submodule analysis
- Propagates include_submodules through ingestion, schemas, and clone logic
- Updates tests to cover submodule inclusion
- Adds a helper function (_checkout_partial_clone) to avoid repetition
- Adds include_submodules example in README.md
- Web UI for this option is not implemented for now (https://github.com/cyclotruc/gitingest/pull/313#issuecomment-3019912523)

---------

Co-authored-by: Filip Christiansen <22807962+filipchristiansen@users.noreply.github.com>
2025-07-03 19:19:11 +02:00
Filip Christiansen
016817d559
feat: add Tailwind CSS pipeline, tag-aware cloning & overhaul CI/CD (#352)
Frontend

* introduce Tailwind CSS (package.json, tailwind.config.js, input CSS)
* build site.css on-the-fly (removed tracked artefact; added .gitignore)
* new favicon/icon assets & template cleanup
* split JS into modular files

Docker

* replace single-stage image with 3-stage build
  • css-builder (Node 20 alpine) → compiles Tailwind
  • python-builder installs project with PEP 621 metadata
  • runtime image copies site-packages + compiled CSS, runs as uid 1000

CI/CD

* ci.yml: cache by pyproject.toml, install with `pip -e .[dev]`
* new frontend job builds/archives CSS after tests
* publish.yml: build CSS first, then wheel/sdist; trusted OIDC upload
* tidy scorecard workflow

Core library

* clone.py, parser & utils now resolve tags in addition to branches/commits
* fallback branch/tag discovery when `git ls-remote` fails
* compat\_func.py back-ports Path.readlink / str.removesuffix for Py 3.8

Tooling & docs

* add `[dev]` extra, drop requirements-dev.txt & its pre-commit fixer
* refreshed CONTRIBUTING.md with Node/Tailwind instructions
* updated tests for new tag logic
2025-07-02 21:31:14 +02:00
Filip Christiansen
d099de5d3b
fix GitHub PAT regex (#341)
Some checks are pending
CI / test (macos-latest, 3.10) (push) Waiting to run
CI / test (macos-latest, 3.11) (push) Waiting to run
CI / test (macos-latest, 3.12) (push) Waiting to run
CI / test (macos-latest, 3.13) (push) Waiting to run
CI / test (macos-latest, 3.8) (push) Waiting to run
CI / test (macos-latest, 3.9) (push) Waiting to run
CI / test (ubuntu-latest, 3.10) (push) Waiting to run
CI / test (ubuntu-latest, 3.11) (push) Waiting to run
CI / test (ubuntu-latest, 3.12) (push) Waiting to run
CI / test (ubuntu-latest, 3.13) (push) Waiting to run
CI / test (ubuntu-latest, 3.8) (push) Waiting to run
CI / test (ubuntu-latest, 3.9) (push) Waiting to run
CI / test (windows-latest, 3.10) (push) Waiting to run
CI / test (windows-latest, 3.11) (push) Waiting to run
CI / test (windows-latest, 3.12) (push) Waiting to run
CI / test (windows-latest, 3.13) (push) Waiting to run
CI / test (windows-latest, 3.8) (push) Waiting to run
CI / test (windows-latest, 3.9) (push) Waiting to run
OSSF Scorecard / Scorecard analysis (push) Waiting to run
2025-06-30 22:00:51 +02:00
Filip Christiansen
2f447ae632
chore: switch to ruff + pydoclint, deprecate .gitingest, and perform a repo-wide quality sweep (#329)
Some checks failed
CI / test (macos-latest, 3.10) (push) Has been cancelled
CI / test (macos-latest, 3.11) (push) Has been cancelled
CI / test (macos-latest, 3.12) (push) Has been cancelled
CI / test (macos-latest, 3.13) (push) Has been cancelled
CI / test (macos-latest, 3.8) (push) Has been cancelled
CI / test (macos-latest, 3.9) (push) Has been cancelled
CI / test (ubuntu-latest, 3.10) (push) Has been cancelled
CI / test (ubuntu-latest, 3.11) (push) Has been cancelled
CI / test (ubuntu-latest, 3.12) (push) Has been cancelled
CI / test (ubuntu-latest, 3.13) (push) Has been cancelled
CI / test (ubuntu-latest, 3.8) (push) Has been cancelled
CI / test (ubuntu-latest, 3.9) (push) Has been cancelled
CI / test (windows-latest, 3.10) (push) Has been cancelled
CI / test (windows-latest, 3.11) (push) Has been cancelled
CI / test (windows-latest, 3.12) (push) Has been cancelled
CI / test (windows-latest, 3.13) (push) Has been cancelled
CI / test (windows-latest, 3.8) (push) Has been cancelled
CI / test (windows-latest, 3.9) (push) Has been cancelled
OSSF Scorecard / Scorecard analysis (push) Has been cancelled
* **Pre-commit**: replace `black` & `darglint` with `ruff-check` / `ruff-format`;
  add `pydoclint` for docstring quality
* **Deps**: drop `tomli`; tighten `typing_extensions`; add `eval-type-backport`;
  remove `black`, `djlint`, `pylint` from `requirements-dev`
* **Ignore files**: deprecate TOML-based `.gitingest`; introduce
  `.gitingestignore` (git-wildmatch, parsed via `_parse_ignore_file`)
* **Config**: new unified `[tool.ruff]` (lint + format + isort); delete
  `[tool.black]`, keep minimal `[tool.isort]` for now
* **Refactor/style**: adopt `from __future__ import annotations`, kw-only args,
  richer types; reorder params & `__all__`; move type-only imports under
  `if TYPE_CHECKING`; extract `_CLIArgs` `TypedDict`, migrate form data to
  `pydantic.QueryForm`; deduplicate `cli.main` / `_async_main`; use `pathlib`,
  avoid file-IO in async; replace magic numbers with constants; delete
  `is_text_file` (logic now lives in `FileSystemNode.content`)
* **Bug fix**: remove silent error in `notebook_utils._process_cell`
* **Docs**: refresh README badges
* **Tests**: update fixtures & assertions

**BREAKING**: new `.gitingestignore` file replaces (now-deprecated) `.gitingest`.

No functional API or CLI changes.
2025-06-28 18:49:37 +02:00
Arman
ba701a80c9
feat: ignore .gitignore files by default (use --include-gitignored to stay
Some checks are pending
CI / test (macos-latest, 3.10) (push) Waiting to run
CI / test (macos-latest, 3.11) (push) Waiting to run
CI / test (macos-latest, 3.12) (push) Waiting to run
CI / test (macos-latest, 3.13) (push) Waiting to run
CI / test (macos-latest, 3.8) (push) Waiting to run
CI / test (macos-latest, 3.9) (push) Waiting to run
CI / test (ubuntu-latest, 3.10) (push) Waiting to run
CI / test (ubuntu-latest, 3.11) (push) Waiting to run
CI / test (ubuntu-latest, 3.12) (push) Waiting to run
CI / test (ubuntu-latest, 3.13) (push) Waiting to run
CI / test (ubuntu-latest, 3.8) (push) Waiting to run
CI / test (ubuntu-latest, 3.9) (push) Waiting to run
CI / test (windows-latest, 3.10) (push) Waiting to run
CI / test (windows-latest, 3.11) (push) Waiting to run
CI / test (windows-latest, 3.12) (push) Waiting to run
CI / test (windows-latest, 3.13) (push) Waiting to run
CI / test (windows-latest, 3.8) (push) Waiting to run
CI / test (windows-latest, 3.9) (push) Waiting to run
OSSF Scorecard / Scorecard analysis (push) Waiting to run
* use_gitignore flag to exclude gitignore
---------

Co-authored-by: Filip Christiansen <22807962+filipchristiansen@users.noreply.github.com>
2025-06-25 05:04:50 +02:00
neo
c19f275010
docs: add links to other language versions of README (#311)
Some checks are pending
CI / test (macos-latest, 3.10) (push) Waiting to run
CI / test (macos-latest, 3.11) (push) Waiting to run
CI / test (macos-latest, 3.12) (push) Waiting to run
CI / test (macos-latest, 3.13) (push) Waiting to run
CI / test (macos-latest, 3.8) (push) Waiting to run
CI / test (macos-latest, 3.9) (push) Waiting to run
CI / test (ubuntu-latest, 3.10) (push) Waiting to run
CI / test (ubuntu-latest, 3.11) (push) Waiting to run
CI / test (ubuntu-latest, 3.12) (push) Waiting to run
CI / test (ubuntu-latest, 3.13) (push) Waiting to run
CI / test (ubuntu-latest, 3.8) (push) Waiting to run
CI / test (ubuntu-latest, 3.9) (push) Waiting to run
CI / test (windows-latest, 3.10) (push) Waiting to run
CI / test (windows-latest, 3.11) (push) Waiting to run
CI / test (windows-latest, 3.12) (push) Waiting to run
CI / test (windows-latest, 3.13) (push) Waiting to run
CI / test (windows-latest, 3.8) (push) Waiting to run
CI / test (windows-latest, 3.9) (push) Waiting to run
OSSF Scorecard / Scorecard analysis (push) Waiting to run
* docs: add links to other language versions of README

---------

Co-authored-by: Filip Christiansen <22807962+filipchristiansen@users.noreply.github.com>
2025-06-24 17:56:35 +02:00
Pokey Rule
52966287c4
Add subdirectory URL syntax documentation to README (#254)
* Add subdirectory URL syntax documentation to README

Document how to access specific subdirectories using GitHub tree URLs with gitingest repo examples.


Co-authored-by: Filip Christiansen <22807962+filipchristiansen@users.noreply.github.com>
2025-06-22 01:06:32 +02:00
Casey West
c656635f6d
Add option to output digest to stdout (#264)
Some checks failed
CI / test (macos-latest, 3.10) (push) Has been cancelled
CI / test (macos-latest, 3.11) (push) Has been cancelled
CI / test (macos-latest, 3.12) (push) Has been cancelled
CI / test (macos-latest, 3.13) (push) Has been cancelled
CI / test (macos-latest, 3.8) (push) Has been cancelled
CI / test (macos-latest, 3.9) (push) Has been cancelled
CI / test (ubuntu-latest, 3.10) (push) Has been cancelled
CI / test (ubuntu-latest, 3.11) (push) Has been cancelled
CI / test (ubuntu-latest, 3.12) (push) Has been cancelled
CI / test (ubuntu-latest, 3.13) (push) Has been cancelled
CI / test (ubuntu-latest, 3.8) (push) Has been cancelled
CI / test (ubuntu-latest, 3.9) (push) Has been cancelled
CI / test (windows-latest, 3.10) (push) Has been cancelled
CI / test (windows-latest, 3.11) (push) Has been cancelled
CI / test (windows-latest, 3.12) (push) Has been cancelled
CI / test (windows-latest, 3.13) (push) Has been cancelled
CI / test (windows-latest, 3.8) (push) Has been cancelled
CI / test (windows-latest, 3.9) (push) Has been cancelled
OSSF Scorecard / Scorecard analysis (push) Has been cancelled
* Add option to output digest to stdout

This change introduces the ability for users to direct the output of the gitingest tool to standard output (stdout) instead of writing to a file. This is useful for piping the output to other commands or viewing it directly in the terminal.

Co-authored-by: Filip Christiansen <22807962+filipchristiansen@users.noreply.github.com>
2025-06-19 09:21:13 +02:00
Amgad Hasan
2dea7c8865
Use gpt-4o's tokenizer (#258)
feat: switch to o200k_base, require tiktoken ≥ 0.7.0, drop Python 3.7

Context
-------
Token counting now uses **o200k_base** (native to GPT-4o / 4o-mini).  
That encoding ships only with **tiktoken ≥ 0.7.0**, whose wheels need Python 3.8+.  
CI already tests 3.8-3.13, so we align our documented minimums.

Changes
-------
* src/gitingest/output_formatters.py – `cl100k_base` → `o200k_base`
* README.md – “Python 3.7+” → “Python 3.8+”
* pyproject.toml  
  * `tiktoken` → `tiktoken>=0.7.0` (o200k support)  
  * remove classifier *Programming Language :: Python :: 3.7*
* requirements.txt – same `tiktoken` bump

Impact
------
* **Breaking** for users pinned to Python 3.7 → upgrade to 3.8+.  
* Environments on `tiktoken==0.6.*` must `pip install -U tiktoken>=0.7.0`.  
* No other runtime deps added.

Co-authored-by: Filip Christiansen <22807962+filipchristiansen@users.noreply.github.com>
2025-06-18 11:57:34 +02:00
Filip Christiansen
1dd133c3e0
feat: add private-repo support to CLI & core (UI coming next) (#282)
Some checks failed
CI / test (macos-latest, 3.10) (push) Has been cancelled
CI / test (macos-latest, 3.11) (push) Has been cancelled
CI / test (macos-latest, 3.12) (push) Has been cancelled
CI / test (macos-latest, 3.13) (push) Has been cancelled
CI / test (macos-latest, 3.8) (push) Has been cancelled
CI / test (macos-latest, 3.9) (push) Has been cancelled
CI / test (ubuntu-latest, 3.10) (push) Has been cancelled
CI / test (ubuntu-latest, 3.11) (push) Has been cancelled
CI / test (ubuntu-latest, 3.12) (push) Has been cancelled
CI / test (ubuntu-latest, 3.13) (push) Has been cancelled
CI / test (ubuntu-latest, 3.8) (push) Has been cancelled
CI / test (ubuntu-latest, 3.9) (push) Has been cancelled
CI / test (windows-latest, 3.10) (push) Has been cancelled
CI / test (windows-latest, 3.11) (push) Has been cancelled
CI / test (windows-latest, 3.12) (push) Has been cancelled
CI / test (windows-latest, 3.13) (push) Has been cancelled
CI / test (windows-latest, 3.8) (push) Has been cancelled
CI / test (windows-latest, 3.9) (push) Has been cancelled
OSSF Scorecard / Scorecard analysis (push) Has been cancelled
* fix: split sparse-checkout & commit checkout when cloning; refresh docs/CLI

* Run `git sparse-checkout set …` and `git checkout <sha>` as two calls—matches Git’s CLI rules and fixes failures.
* Tidy clone path creation via _ensure_directory; use DEFAULT_TIMEOUT.
* Clarify CLI/help strings and schema docstrings.
* Update tests for the new two-step checkout flow.

* feat(auth): support private GitHub repos & correct sparse-checkout flow

* CLI: new `--token/-t` flag (fallback to `GITHUB_TOKEN`)
* clone_repo:
  * injects Basic-auth header when a PAT is supplied
  * validates PAT format (`github_pat_*`)
* git_utils:
  * `create_git_auth_header`, `validate_github_token`, `create_git_command`
  * `_check_github_repo_exists` & branch-listing now work with tokens
* os_utils.ensure_directory extracted for reuse
* tests updated to reflect new call signatures

* allow git PAT to start with gth_

* fix GITHUB_PAT_PATTERN and add instructions to README

* fix gph_ to ghp_

* docs: add GITHUB_TOKEN env var example to README

* add GITHUB_TOKEN environment variable also in code
2025-06-15 23:30:46 +02:00
Alex Tyrode
d36b3a08d3
fix: adding missing suggested changes from #252 (#256)
Co-authored-by: Nicolas IRAGNE <nicoragne@hotmail.fr>
2025-04-07 18:10:53 +02:00
Tanner Woody
b4d87b5ebb add installation instructions 2025-04-04 11:48:22 -07:00
Romain Courtois
d6cb920660
Refactor/ingestion (#209)
Co-authored-by: Filip Christiansen <22807962+filipchristiansen@users.noreply.github.com>
2025-03-04 01:11:54 +01:00
CharlesCNorton
c96a7d3d48
fix: correct title attribute for Edge Add-ons link (#199)
The title attribute for the Microsoft Edge Add-ons link mistakenly referenced "Firefox Add-ons."  

Updated it to properly reflect "Microsoft Edge Add-ons" to avoid confusion.
2025-02-24 14:07:09 +01:00
Ninad Sachania
811fe698a7
Fix typos (#190) 2025-02-18 18:26:00 +01:00
Ninad Sachania
02afdab37c
Capitalize a couple of words (#180) 2025-02-17 17:55:51 +01:00
cyclotruc
e997c4b054 update readme for jupyter 2025-02-17 11:08:19 +00:00
Filip Christiansen
4397a45281
feat: Add Python 3.7 Support and Restore Compatibility with Older Syntax (#181)
* Add Python 3.9 support by using ParamSpec from typing_extensions and removing match statements

* Add Python 3.7 support by reverting inline generics and removing walrus usage

* Update pyproject.toml
2025-02-17 11:36:57 +01:00
cyclotruc
b3a5428d32 update readme 2025-02-13 06:42:50 +00:00
cyclotruc
4767697705 add ingest_async and made ingest function sync by default 2025-02-13 06:19:03 +00:00
Filip Christiansen
467a2e4218
docs: add CONTRIBUTING.md and reference it in README.md (#135) 2025-01-15 01:46:54 +01:00
Filip Christiansen
afd8e5a538
docs: add star history chart to README (#130) 2025-01-14 17:28:28 +01:00
Filip Christiansen
dd8f1e0aac
feat: enhance parser domain-agnostic support (#117)
* feat: make parser domain-agnostic to support multiple Git hosts

- added list of known domains/Git hosts in `query_parser.py`
- fixed bug from [#115](https://github.com/cyclotruc/gitingest/pull/115): corrected case handling for URL components—scheme, domain, username, and repository are case-insensitive, but paths beyond (e.g., file names, branches) are case-sensitive
- implemented `try_domains_for_user_and_repo` in `query_parser.py` to iteratively guess the correct domain until success or supported hosts are exhausted
- added helper functions `_get_user_and_repo_from_path`, `_validate_host`, and `_validate_scheme` in `query_parser.py`
- extended `_parse_repo_source` in `query_parser.py` to be Git host agnostic by using `try_domains_for_user_and_repo`
- added tests `test_parse_url_unsupported_host` and `test_parse_query_with_branch` in `test_query_parser.py`
- created new file `test_git_host_agnostic.py` to verify domain/Git host agnostic behavior
2025-01-13 05:46:29 +01:00
Filip Christiansen
0133021c53
fix(readme): fix linting issues and correct spelling error 2025-01-08 14:24:49 +01:00
Romain Courtois
f4f7853a9f
Update README.md 2025-01-07 11:00:25 +01:00
Filip Christiansen
835fcbbb4f
chore: standardize references to 'Gitingest' (resolves Issue #99) (#107) 2025-01-07 08:55:27 +01:00
cyclotruc
c5ef537a99 Fix CI 2025-01-05 10:54:08 +00:00
cirtron
e329b57964
Add Browser Extension (#59) 2025-01-05 11:51:16 +01:00
Waldir Pimenta
1f8a41a1ad
README.md: various small fixes (#100) 2025-01-04 08:44:09 +01:00
Filip Christiansen
d1b21d97ac
Refactor project structure, enhance logic, update configurations, and improve code quality (#85)
* Refactor project structure, enhance logic, update configurations, and improve code quality

Refactoring and Logic Improvements

- Refactored the `_scan_directory` function in `src/gitingest/ingest_from_query.py` by extracting loop logic into the new `_process_item` function, and further separating functionality into `_process_symlink` and `_process_file`
- Replaced multiple return statements with error raising and catching, introducing custom exceptions (`MaxFilesReachedError`, `MaxFileSizeReachedError`, `AlreadyVisitedError`) in the `_process_item` and `_scan_directory` functions
- Enhanced the logic in the `process_query` function in `src/process_query.py` for better flow and maintainability
- Improved the logic in `_generate_token_string` in `src/gitingest/ingest_from_query.py`
- Refined the `download_ingest` function in `src/routers/download.py` for better clarity and functionality

Exception Handling Enhancements

- Replaced broad `Exception` handling with specific `OSError` in the `_read_file_content` function in `src/gitingest/ingest_from_query.py`
- Refined exception handling throughout the codebase, including removing redundant try-except-raise blocks, e.g., in `clone_repo` function in `src/gitingest/clone.py`
- Added custom exceptions to `src/gitingest/exceptions.py`: `MaxFilesReachedError`, `MaxFileSizeReachedError`, and `AlreadyVisitedError`
- Included explicit re-raising of exceptions in various functions for improved error propagation

Test Suite Refactoring

- Cleaned up and reorganized test files:
  - Moved tests from `src/gitingest/tests/` to `tests/`
  - Consolidated fixtures from `tests/test_ingest.py` into `tests/conftest.py`
  - Removed redundant content from `tests/conftest.py`
- Migrated configuration from `pytest.ini` to `pyproject.toml`, deleted `pytest.ini`, and updated `.dockerignore`

Documentation Improvements

- Added `darglint` for enforcing `numpy` docstring style in `.pre-commit-config.yaml` for `src/` files
- Updated docstrings throughout the codebase, including adding module docstrings where needed
- Updated `README.md`:
  - Added "GitHub stars" badge
  - Moved the "Discord" badge to its own line
  - Replaced occurrences of "Gitingest" with "GitIngest" for consistency and clarity

Linting and Code Quality

- Integrated `pylint` into `.pre-commit-config.yaml` for both `src/` and `tests/` directories
- Created `tests/.pylintrc` for linting configuration specific to test files

Code Clean-up

- Removed the redundant `src/__init__.py` file

Naming Conventions and Code Style

- Renamed `logSliderToSize` to `log_slider_to_size` in `src/server_utils.py` for consistency with Python's naming conventions
- Added explicit encoding specification in multiple instances of `open` throughout the code
2025-01-03 08:33:28 +01:00
cyclotruc
d556b0abaf Update README.md 2024-12-31 06:30:01 +00:00
Romain Courtois
2cefa67859
Update README.md 2024-12-31 06:44:46 +01:00
Filip Christiansen
4e5c9521e8
Refactor, Documentation, and Code Cleanup (#70)
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
2024-12-30 02:53:17 +01:00
Filip Christiansen
eb73a0cc1f
chore: add pre-commit config, type hints, badges, and lint codebase (#57)
* chore: add pre-commit config, type hints, badges, and lint codebase

- Add .pre-commit-config.yaml and pyproject.toml for Black and isort
- Add missing type hints throughout the code (Dict[...] for Python 3.8 compatibility)
- Added badges and convert existing badges to use <a><img></a> format
- Lint Markdown files
- Lint Jinja templates with djlint

* Resolve error and fix remaining type hint violations

* Fix absolute imports and mock paths in test_clone.py to resolve test failures.

* Replace deprecated 'dotenv' with 'python-dotenv' in requirements.txt to resolve installation errors.
2024-12-28 05:59:11 +01:00
Romain Courtois
030c004669
Update README.md 2024-12-22 08:36:47 +01:00
Romain Courtois
f6ce264720
Update README.md 2024-12-22 07:47:03 +01:00
Justin Levi Winter
728c4af862
feat(cli): Add Global CLI Tool for Local Directory Analysis (#38)
* feat(cli): add comprehensive CLI documentation to README

- Add installation instructions for global CLI usage
- Document all CLI options and flags with examples
- Include detailed usage examples for common scenarios
- Describe output format and automatic file ignoring
- Maintain consistent formatting with existing README sections
2024-12-20 05:18:22 +01:00
Romain Courtois
eefcabb5ad
Add support for github alternatives (#34)
* authorize other git domains

---------

Co-authored-by: Alikae <etienne2ram@gmail.com>
2024-12-19 06:42:42 +01:00
Joshua J Coronado
11042425bb
feat: Make TrustedHostMiddleware configurable via ALLOWED_HOSTS env var (#31)
* feat: Make TrustedHostMiddleware configurable via ALLOWED_HOSTS env var

* feat: Make TrustedHostMiddleware configurable via ALLOWED_HOSTS env var

* feat: Make TrustedHostMiddleware configurable via ALLOWED_HOSTS env var
2024-12-16 21:41:20 +01:00
ebawen
823f01b3bc
test: add unit tests and coverage configuration (#28)
Co-authored-by: Mohamed Azerkane <mohamed.azerkane@cure51.com>
2024-12-14 23:59:10 +01:00
Romain Courtois
8edb799326
Update README.md 2024-12-11 19:13:50 +01:00
Lorenzo Corrias
518cce5d4b
added docker support (#9) 2024-12-10 15:56:16 +01:00