Set up CI: lint and tests on Linux, macOS and Windows

Abierto
#18 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
github-actions, python
Área
ci-cd, testing

Línea de trabajo

Start by reading .github/workflows and pyproject.toml, then inspect the existing setup and platform blockers in #16 and #17. Check how uv resolves the supported platforms and how the test suite is run with uv run pytest. Done means pull requests run changed-file lint, uv lock --check, and the default tests on Linux, macOS, and Windows, with failing required jobs blocking merges; workflow changes need maintainer review.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement

Follow-up to #17: run the test suite automatically on every push and pull request, on Linux, macOS and Windows.

What it should run

  • Lint, on changed files only for now: ruff check --no-fix and black --check. The tree has about 1,100 existing ruff errors and 47 files black would reformat, so linting the whole tree would fail. Clearing that backlog is a separate job, worth doing in one formatting-only PR.
  • uv lock --check, so uv.lock stays in sync with pyproject.toml.
  • The default test suite (uv run pytest): no GPU, network or models.
  • Optionally, on a schedule or on demand: a slow job that downloads the two embedding models into a cache and runs a real-model build.

Matrix

Python 3.12 on ubuntu-latest (x86_64), macos-latest (arm64) and windows-latest (x86_64).

Blockers

  1. The lock file only covers two platforms. [tool.uv] environments in pyproject.toml resolves only for Linux aarch64 and macOS arm64, so uv sync fails on x86_64 Linux and on Windows, which is what GitHub's standard runners are. Within those two platforms, torch is locked for macOS only: the cluster container installs a custom CUDA build of torch 2.5.1 from a local wheel, outside the lock file. The fix is to widen environments to the platforms we support and lock a regular torch for each (PyPI has torch 2.6.0 and faiss-cpu 1.8.0 wheels for all of them). The container keeps installing its CUDA wheel over that. A side effect: the cluster's torch 2.5.1 is still affected by CVE-2025-32434 (the macOS fix raised torch to 2.6 only on macOS), and locking 2.6 everywhere would make the container the only exception.
  2. litkit can't be imported on Windows (see #17). The Windows job only becomes meaningful once that check is relaxed to what cli.py already enforces.
  3. macOS OpenMP (#16): the macOS job either needs the #16 fix or KMP_DUPLICATE_LIB_OK=TRUE set in the workflow.

Policy

  • Enable branch protection on main to require the lint and test jobs to pass, once they are reliable.
  • Changing .github/workflows needs a maintainer's review.

Done when

Every pull request runs lint, uv lock --check and the test suite on all three platforms, and a red job blocks the merge.

Lenguaje dominante
Python
Estrellas
0
Forks
2
Merge medio
8 h 57 min
PR fusionados (30 d)
36

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de lanl/litkit

Todos los issues de lanl/litkit

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.