From a3a0083065a570c85d6a1ef94d7202ba4ceaf29d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20P=C4=99dzim=C4=85=C5=BC?= Date: Wed, 1 Apr 2026 12:17:15 +0200 Subject: [PATCH] fix: remove stale submodule references from Dockerfile, README, AGENTS The Dockerfile was broken after the submodule removal: it tried to COPY submodules/asr-api-python and pip install it from a local path. Now it simply runs `pip install .` which fetches techmo-asr-api from GitHub via the VCS dependency declared in pyproject.toml. Also remove the "Manual submodule update" section from README.md and update AGENTS.md to reflect the new install workflow. --- AGENTS.md | 7 +++---- Dockerfile | 8 +------- README.md | 15 --------------- 3 files changed, 4 insertions(+), 26 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index dea56fc..58b5c84 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -6,7 +6,7 @@ Guidance for AI coding agents working in this repository. ## What this repo is -A gRPC CLI client and Python library for the Techmo ASR (Automatic Speech Recognition) Service. Entry point: `asr_client.__main__:main` (installed as `asr-client`). The gRPC stubs come from a Git submodule (`submodules/asr-api-python`) and are generated at install time — they are never committed. +A gRPC CLI client and Python library for the Techmo ASR (Automatic Speech Recognition) Service. Entry point: `asr_client.__main__:main` (installed as `asr-client`). The gRPC stubs come from `techmo-asr-api` (fetched from `github.com/techmo-pl/asr-api-python` at install time) and are generated at install time — they are never committed. --- @@ -15,7 +15,6 @@ A gRPC CLI client and Python library for the Techmo ASR (Automatic Speech Recogn Run once after cloning: ```bash -./setup.sh # initialise submodules ./install.sh # create .venv and install package + test deps ``` @@ -25,7 +24,7 @@ Run once after cloning: apt install python3-dev portaudio19-dev build-essential ``` -If `from asr_api import ...` fails, the submodule is not initialised. Run `./setup.sh` then `./install.sh`. +If `from asr_api import ...` fails, re-run `./install.sh` (it fetches `techmo-asr-api` from GitHub automatically). --- @@ -65,7 +64,7 @@ asr_client/ └── VERSION.py # __version__ string ``` -The `asr_api` package (gRPC stubs) is installed from `submodules/asr-api-python` under the name `techmo-asr-api`. It is not on PyPI. +The `asr_api` package (gRPC stubs) is installed as `techmo-asr-api @ git+https://github.com/techmo-pl/asr-api-python.git@1.1.4` — fetched from GitHub at install time, not from PyPI. --- diff --git a/Dockerfile b/Dockerfile index 7d2ecb9..aef5eb8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,10 +3,8 @@ FROM python:3.8-slim-bullseye as build-stage ARG DEBIAN_FRONTEND=noninteractive ENV PIP_ROOT_USER_ACTION=ignore -COPY submodules/asr-api-python /asr-client-python/submodules/asr-api-python/ COPY asr_client /asr-client-python/asr_client/ -COPY pyproject.toml .gitmodules /asr-client-python/ -COPY .git /asr-client-python/.git +COPY pyproject.toml /asr-client-python/ WORKDIR /asr-client-python @@ -26,7 +24,6 @@ RUN apt-get update \ # hadolint ignore=DL3013 RUN pip install --upgrade --no-cache-dir pip \ - && pip install --no-cache-dir ./submodules/asr-api-python \ && pip install --no-cache-dir . @@ -46,9 +43,6 @@ RUN apt-get update \ COPY --from=build-stage /usr/local/lib/python3.8/site-packages /usr/local/lib/python3.8/site-packages COPY --from=build-stage /asr-client-python/asr_client/ /asr-client-python/asr_client/ -COPY --from=build-stage /asr-client-python/submodules/asr-api-python/asr_api /asr-client-python/submodules/asr-api-python/asr_api -COPY --from=build-stage /asr-client-python/submodules/asr-api-python/techmo /asr-client-python/submodules/asr-api-python/techmo -COPY --from=build-stage /asr-client-python/submodules/asr-api-python/google /asr-client-python/submodules/asr-api-python/google WORKDIR /asr-client-python diff --git a/README.md b/README.md index a9afe90..e319ded 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ - [Overview](#overview) - [Setup](#setup) - [Requirements](#requirements) - - [Manual submodule update](#manual-submodule-update) - [Install](#install) - [Using the provided script](#using-the-provided-script) - [Manual installation](#manual-installation) @@ -22,26 +21,12 @@ For project details, its structure, and functionality, head to [the documentatio The project can be used as-is and does not require any additional setup. -*For basic development use, consider convenient `./setup.sh`.* - ### Requirements - [Python](https://www.python.org/) >=3.8 - [uv](https://docs.astral.sh/uv/) (install: `curl -LsSf https://astral.sh/uv/install.sh | sh`) - [PortAudio](https://files.portaudio.com/) 19.6.0 (required by the [PyAudio](https://people.csail.mit.edu/hubert/pyaudio/) Python package) -### Manual submodule update - -It is the duty of the build configuration to clone all the necessary submodules. However, it sometimes fails, for example, when building a Docker image from an uninitialized repository. In that case, the solution is to download the missing dependencies manually. - -Example: - -```sh -git submodule update --init --depth 1 submodules/asr-api-python -``` - -Do not forget about the submodules of the submodules. Eventually, use the `--recursive` flag. - ## Install ### Using the provided script