diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b51ab6559..3c17bc5a8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,10 +13,5 @@ jobs: - name: Check out repo uses: actions/checkout@v5 - - name: Set up uv - uses: astral-sh/setup-uv@v6 - with: - enable-cache: true - - name: Run prek uses: j178/prek-action@v1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a14a75748..a562c576b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,12 +36,8 @@ repos: # MD034: bare URL used args: [--disable, MD013, MD033, MD041, MD034, "--"] - - repo: local + - repo: https://github.com/astral-sh/ty-pre-commit + rev: v0.0.48 hooks: - id: ty - name: ty check - entry: env -u VIRTUAL_ENV UV_PROJECT_ENVIRONMENT=.venv_prek uv run --extra test --extra docs ty check - language: python - additional_dependencies: [uv] - types: [python] - pass_filenames: false + args: [--only-group, typecheck] diff --git a/pyproject.toml b/pyproject.toml index 55615ddaa..93c3286f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -148,6 +148,7 @@ markers = [ ] [tool.uv] +default-groups = ["dev", "typecheck"] # make these dependencies mutually exclusive since they use incompatible e3nn versions # see https://docs.astral.sh/uv/concepts/projects/config/#conflicting-dependencies for more details conflicts = [ @@ -179,6 +180,7 @@ conflicts = [ [dependency-groups] dev = ["prek>=0.3.4", "ty>=0.0.19"] +typecheck = ["torch-sim-atomistic[docs,test]"] [tool.ty.rules] unused-ignore-comment = "warn"