From ec73a755c2e2c9938838c6efa4db74044e06dab7 Mon Sep 17 00:00:00 2001 From: Repo Bot Date: Sun, 19 Oct 2025 12:50:36 +0200 Subject: [PATCH] docs(ipm): remove README_en.md and keep canonical English README.md with link to README_fr.md --- app/ipm/README.md | 8 ++--- app/ipm/README_en.md | 85 -------------------------------------------- 2 files changed, 3 insertions(+), 90 deletions(-) delete mode 100644 app/ipm/README_en.md diff --git a/app/ipm/README.md b/app/ipm/README.md index 306b036..e6869f9 100644 --- a/app/ipm/README.md +++ b/app/ipm/README.md @@ -1,4 +1,3 @@ -````markdown # IPM native integration (app.ipm) This folder contains the Python wrapper that calls the native refifc libraries. @@ -15,7 +14,7 @@ The wrapper `app/ipm/simple_refrig_api.py` will look first in `app/ipm/lib/` (`windows` or `linux`) and fall back to the package directory if nothing is found. - -Do NOT commit native binaries --------------------------------- -Native binaries should not be committed to the repo (size, licensing, portability). The repo contains a `.gitignore` rule excluding `app/ipm/lib/windows/*.dll` and `app/ipm/lib/linux/*.so`. - -CI/CD -- Store binaries in a secure artifact repository (releases, internal storage, S3, etc.). -- During CI, download them and copy into `app/ipm/lib/` before building the image or deploying. - -Quick local test -1. Copy the binaries into the correct folder (e.g. `app/ipm/lib/windows/refifc.dll`). -2. Test locally: - -```powershell -.venv\Scripts\python -c "import app.ipm.simple_refrig_api as s; r=s.Refifc('R290'); print('hsl_px exists', hasattr(r,'hsl_px'))" -``` - -Best practices -- Avoid committing binaries in Git. -- Record the exact origin and version of native binaries in release notes. -- Provide small helper scripts (`scripts/copy-ipm-libs.*`) to automate copying binaries into build environments. - -For French documentation see: [README_fr.md](README_fr.md) -# IPM native integration (app.ipm) - -This folder contains the Python wrapper that calls the native refifc libraries. - -Goals -- Centralize the Python wrapper under `app/ipm` so application code can import `app.ipm.simple_refrig_api`. -- Provide a clear location for native binaries (DLLs for Windows, .so for Linux). - -Where to place native binaries -- Windows (local/dev): place DLL files in `app/ipm/lib/windows/`. -- Linux (container/production): place .so files in `app/ipm/lib/linux/`. - -The wrapper `app/ipm/simple_refrig_api.py` will look first in `app/ipm/lib/` (`windows` or `linux`) and fall back to the package directory if nothing is found. - -Do NOT commit native binaries --------------------------------- -Native binaries should not be committed to the repo (size, licensing, portability). The repo contains a `.gitignore` rule excluding `app/ipm/lib/windows/*.dll` and `app/ipm/lib/linux/*.so`. - -Deployment / Docker -- The Dockerfile should copy the appropriate native binaries into `app/ipm/lib/` during the build. Example (Linux image): - -```Dockerfile -FROM python:3.12-slim -WORKDIR /app -COPY . /app - -# Copy native linux libs into the package -COPY path/to/linlibs/*.so /app/app/ipm/lib/linux/ - -RUN pip install --no-cache-dir -r requirements.txt -CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"] -``` - -CI/CD -- Store binaries in a secure artifact repository (releases, internal storage, S3, etc.). -- During CI, download them and copy into `app/ipm/lib/` before building the image or deploying. - -Quick local test -1. Copy the binaries into the correct folder (e.g. `app/ipm/lib/windows/refifc.dll`). -2. Test locally: - -```powershell -.venv\Scripts\python -c "import app.ipm.simple_refrig_api as s; r=s.Refifc('R290'); print('hsl_px exists', hasattr(r,'hsl_px'))" -``` - -Best practices -- Avoid committing binaries in Git. -- Record the exact origin and version of native binaries in release notes. -- Provide small helper scripts (`scripts/copy-ipm-libs.*`) to automate copying binaries into build environments.