Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Lint

on:
push:
branches: [main]
pull_request:

jobs:
lint:
if: github.event_name == 'push' || github.event.pull_request.draft == false
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up uv
uses: astral-sh/setup-uv@v6
with:
python-version: "3.13"
enable-cache: true
activate-environment: true

- name: Configure git credentials for private ASTRA repo
run: git config --global url."https://x-access-token:${{ secrets.ASP_TOKEN }}@github.com/".insteadOf "https://github.com/"

- name: Install dependencies
run: uv sync --group dev

- name: Ruff
run: ruff check src/ tests/

- name: Mypy
run: mypy src/
11 changes: 10 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,16 @@ ignore_missing_imports = true
follow_untyped_imports = true

[[tool.mypy.overrides]]
module = ["rocrate.*", "astra.*"]
module = ["rocrate.*"]
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = ["astra.*"]
ignore_missing_imports = true
follow_untyped_imports = true

[[tool.mypy.overrides]]
module = ["daytona_sdk", "daytona_sdk.*", "dotenv", "dotenv.*"]
ignore_missing_imports = true

[tool.pytest.ini_options]
Expand Down
2 changes: 1 addition & 1 deletion src/lightcone/cli/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def init(
# src/. We hold off on git init until our own files are in place so
# the initial commit captures the full project state.
try:
astra_init.callback(directory=directory, no_git=True)
astra_init.callback(directory=directory, no_git=True) # type: ignore[misc]
except SystemExit as e:
raise click.ClickException(
f"astra init failed (exit code {e.code})."
Expand Down
4 changes: 2 additions & 2 deletions src/lightcone/eval/build.py

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol, ok

Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ def _get_git_info(repo_root: Path) -> VersionInfo:
pass

try:
result = subprocess.run(
dirty = subprocess.run(
["git", "diff", "--quiet", "HEAD"],
capture_output=True, cwd=repo_root,
)
info.lightcone_dirty = result.returncode != 0
info.lightcone_dirty = dirty.returncode != 0
except subprocess.CalledProcessError:
info.lightcone_dirty = True

Expand Down
Loading