diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 34d4a15..12d3319 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,6 +26,10 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Read app version + id: version + run: echo "app_version=$(cat VERSION)" >> "$GITHUB_OUTPUT" + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -46,6 +50,7 @@ jobs: type=ref,event=branch,suffix=-lancedb-${{ matrix.lancedb }} type=ref,event=pr,suffix=-lancedb-${{ matrix.lancedb }} type=semver,pattern=app-{{version}}_lancedb-${{ matrix.lancedb }} + type=semver,pattern=v{{version}},enable=${{ matrix.lancedb == '0.29.2' && startsWith(github.ref, 'refs/tags/') }} type=raw,value=lancedb-${{ matrix.lancedb }} type=raw,value=latest,enable=${{ matrix.lancedb == '0.29.2' && github.ref == 'refs/heads/main' }} type=raw,value=stable,enable=${{ matrix.lancedb == '0.29.2' && startsWith(github.ref, 'refs/tags/') }} @@ -63,6 +68,7 @@ jobs: cache-to: type=gha,mode=max,scope=lancedb-${{ matrix.lancedb }} build-args: | LANCEDB_VERSION=${{ matrix.lancedb }} + APP_VERSION=${{ steps.version.outputs.app_version }} test: runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..becbc45 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,33 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [0.2.0] - 2026-04-16 + +### Added +- LanceDB 0.29.2 support with a matching container image tag (#15). +- Rendering for `FixedSizeList` vectors and nested Arrow schemas, plus a UI word-wrap toggle for long text columns (#14). +- Configurable listening port via the `PORT` environment variable (#36). +- `VERSION` file at repo root as the single source of truth for the app version, consumed by `backend/app.py` at import and by the Docker build via `APP_VERSION` build-arg. +- `v{version}` GHCR tag on the canonical Lance variant when a `v*` git tag is pushed, so users can pin to an app release without specifying a Lance version. + +### Fixed +- Native LanceDB pagination replaces full-table loads, avoiding OOM on large datasets (#18). +- Binary fields are decoded as UTF-8 where possible before falling back to base64 (#16). +- `docker/entrypoint.sh` is now used as the image ENTRYPOINT so `DATA_PATH` validation runs before uvicorn starts (#35). +- Version compatibility flags in `/healthz` use semantic comparison instead of string comparison (#34). + +### Docs +- README updated for 0.29.2 as the recommended tag, registry URL corrected, and `PORT` documented (#37). +- docker-compose example added to the README for pipeline integration (#38). +- CONTRIBUTING.md describing design philosophy and constraints. +- GitHub issue templates for bug reports and feature requests. + +## [0.1.0] + +Initial release. diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..0ea3a94 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.2.0 diff --git a/backend/app.py b/backend/app.py index 686e772..815ea55 100644 --- a/backend/app.py +++ b/backend/app.py @@ -18,16 +18,27 @@ logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) + +def _read_app_version() -> str: + here = Path(__file__).resolve().parent + for candidate in (here / "VERSION", here.parent / "VERSION"): + if candidate.exists(): + return candidate.read_text().strip() + return "0.0.0-dev" + + +APP_VERSION = _read_app_version() + app = FastAPI( title="Lance Data Viewer", description="Read-only web viewer for Lance datasets", - version="0.1.0" + version=APP_VERSION, ) @app.on_event("startup") async def startup_event(): """Log version information on startup""" - logger.info(f"Lance Data Viewer v0.1.0") + logger.info(f"Lance Data Viewer v{APP_VERSION}") logger.info(f"LanceDB: {lancedb.__version__}, PyArrow: {pa.__version__}") logger.info(f"Data path: {DATA_PATH}") @@ -145,11 +156,11 @@ async def health_check(): } # Generate build tag - build_tag = f"app-0.1.0_lancedb-{lancedb_version}" + build_tag = f"app-{APP_VERSION}_lancedb-{lancedb_version}" return { "ok": True, - "app_version": "0.1.0", + "app_version": APP_VERSION, "lancedb_version": lancedb_version, "pyarrow_version": pyarrow_version, "build_tag": build_tag, @@ -400,7 +411,7 @@ async def get_vector_preview( import uvicorn # Log version information on startup - logger.info(f"Lance Data Viewer v0.1.0") + logger.info(f"Lance Data Viewer v{APP_VERSION}") logger.info(f"LanceDB: {lancedb.__version__}, PyArrow: {pa.__version__}") logger.info(f"Data path: {DATA_PATH}") diff --git a/backend/pyproject.toml b/backend/pyproject.toml index b124af5..15c1594 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "lance-viewer" -version = "0.1.0" +version = "0.2.0" description = "Read-only web viewer for Lance datasets" authors = [{name = "Lance Viewer", email = "noreply@example.com"}] license = {text = "MIT"} diff --git a/docker/Dockerfile b/docker/Dockerfile index 2ac648e..cc3b11e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -22,6 +22,7 @@ COPY --from=builder /root/.local /home/appuser/.local WORKDIR /app COPY backend/*.py . +COPY VERSION . COPY docker/entrypoint.sh /app/entrypoint.sh COPY web/vanilla/ /web/ @@ -42,11 +43,12 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ # Build arguments for labels (redeclare after FROM) ARG LANCEDB_VERSION=0.29.2 +ARG APP_VERSION=0.0.0-dev LABEL org.opencontainers.image.title="Lance Data Viewer" LABEL org.opencontainers.image.description="Read-only web viewer for Lance datasets" -LABEL org.opencontainers.image.source="https://github.com/gordonmurray/lance-data-viewer" -LABEL org.opencontainers.image.version="0.1.0" +LABEL org.opencontainers.image.source="https://github.com/lance-format/lance-data-viewer" +LABEL org.opencontainers.image.version="${APP_VERSION}" LABEL org.opencontainers.image.licenses="MIT" LABEL com.github.lancedb.version="${LANCEDB_VERSION}"