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

未关闭
#18 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
github-actions, python
领域
ci-cd, testing

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Python
星标
0
派生
2
平均合并
8 小时 57 分钟
30 天内合并 PR
36

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

lanl/litkit 的其他 Issue

查看 lanl/litkit 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。