Skip to content

feat: add Tailwind CSS pipeline, tag-aware cloning & CI/CD #352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 2, 2025

Conversation

filipchristiansen
Copy link
Contributor

Theme Highlights
Front-end • Introduces TailwindCSS
site.css compiled in CI
• New icon set + favicon pack
• Splits huge inline JS into /static/js/*.js modules
Docker • 3-stage build (node:20-alpine ➜ python:3.12-slim ➜ runtime)
• Copies compiled CSS into final layer
Core library • Ingest pipeline now recognises git tags in addition to branches & commits
• Compat helpers for Py 3.8 (readlink, removesuffix)
CI / CD ci.yml caches by pyproject.toml, installs with pip -e .[dev]
• New frontend job builds & uploads CSS artefact
publish.yml builds Tailwind ➜ wheel/sdist ➜ PyPI upload
Packaging [dev] replaces requirements-dev.txt
Docs CONTRIBUTING.md (Node ≥18 instructions, CSS build)

@filipchristiansen filipchristiansen marked this pull request as draft July 1, 2025 21:09
@filipchristiansen filipchristiansen requested review from cyclotruc, ix-56h, NicolasIRAGNE and Copilot and removed request for cyclotruc July 1, 2025 21:12
Copilot

This comment was marked as resolved.

@filipchristiansen filipchristiansen marked this pull request as ready for review July 1, 2025 21:32
@filipchristiansen filipchristiansen requested a review from Copilot July 1, 2025 21:40
Copilot

This comment was marked as off-topic.

cyclotruc

This comment was marked as resolved.

@cyclotruc

This comment was marked as off-topic.

@NicolasIRAGNE

This comment was marked as resolved.

@filipchristiansen

This comment was marked as resolved.

@filipchristiansen filipchristiansen force-pushed the frontend-and-tags branch 3 times, most recently from 93c30fe to 625cd19 Compare July 2, 2025 16:20
@filipchristiansen filipchristiansen requested review from ix-56h and removed request for NicolasIRAGNE and cyclotruc July 2, 2025 18:45
@filipchristiansen filipchristiansen requested review from NicolasIRAGNE, cyclotruc, ix-56h and Copilot and removed request for ix-56h July 2, 2025 18:45
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Introduces a Tailwind CSS build pipeline, adds tag-aware clone and parsing logic, and enhances CI/CD workflows.

  • Integrates Tailwind CSS into the frontend, extracts inline scripts into static JS modules, and sets up a Docker multi-stage build.
  • Extends URL parsing and clone utilities to recognize Git tags alongside branches and commits.
  • Revamps GitHub Actions and Docker workflows to build CSS, cache dependencies, publish artifacts, and deploy the Python package.

Reviewed Changes

Copilot reviewed 37 out of 51 changed files in this pull request and generated 1 comment.

Show a summary per file
File(s) Description
tests/query_parser/*.py Updated tests for tag field; removed outdated branch-fallback tests
tests/conftest.py Updated mocks to use new fetch_remote_branches_or_tags
src/static/js/ Extracted inline scripts into dedicated modules; added PostHog, navbar, git form, and git logic
src/static/css/tailwind.css Added custom utility classes and components
src/server/templates/**/*.jinja Moved inline JS to static files; updated layout for badges, favicons, and scripts
src/server/query_processor.py Changed error handling to return raw exception text
src/gitingest/utils/git_utils.py Renamed and enhanced branch/tag fetch with ref_type
src/gitingest/utils/compat_func.py Added Python 3.8 compatibility helpers (readlink, removesuffix)
src/gitingest/query_parser.py Tag-aware URL parsing and new _configure_branch_or_tag
src/gitingest/clone.py & entrypoint.py Context-managed cloning with tag support
src/gitingest/schemas/*.py Extended models to include tag field
src/gitingest/output_formatter.py Updated symlink handling to use compatibility helper
Dockerfile Multi-stage build: CSS, Python build, and runtime image
pyproject.toml & package.json Updated dev dependencies, package-data, and build scripts
.github/workflows/{ci,publish,scorecard}.yml Enhanced caching, CSS build, artifact publishing, and security checks
CONTRIBUTING.md & README.md Documentation updates for CSS pipeline and contribution guide
.pre-commit-config.yaml & dependabot.yml Streamlined pre-commit config; added Dependabot grouping
Comments suppressed due to low confidence (2)

tests/query_parser/test_query_parser.py:379

  • The test for handling failed git fetch (test_parse_repo_source_with_failed_git_command) was removed, leaving fallback logic untested. Consider adding tests for branch and tag fallback when remote fetch fails.
@pytest.mark.asyncio

src/server/query_processor.py:105

  • [nitpick] Returning raw exception messages may expose internal details and can be confusing. Consider sanitizing the message or mapping known errors to user-friendly messages.
        return IngestErrorResponse(error=str(exc), repo_url=short_repo_url)

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

Large squash commit that wires a proper frontend asset pipeline, modernises the container & release workflows, and expands repository-ingest features to understand Git tags.
@cyclotruc cyclotruc merged commit 016817d into main Jul 2, 2025
19 checks passed
@cyclotruc cyclotruc deleted the frontend-and-tags branch July 2, 2025 19:31
BareninVitalya pushed a commit to BareninVitalya/gitingest that referenced this pull request Jul 6, 2025
…oderamp-labs#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
BareninVitalya pushed a commit to BareninVitalya/gitingest that referenced this pull request Jul 6, 2025
…oderamp-labs#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
ix-56h pushed a commit to ix-56h/gitingest that referenced this pull request Jul 7, 2025
…oderamp-labs#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
filipchristiansen added a commit that referenced this pull request Jul 9, 2025
…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
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.

4 participants