Skip to content

Commit

Permalink
Convenient (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
mickvangelderen authored Jan 13, 2025
1 parent 5cd50bf commit c918a88
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,4 @@ jobs:
- name: uv sync
run: uv sync --all-extras
- name: pyright
# TODO: check more directories as we fix the violations
run: uv run -- pyright src/jax_loop_utils/metric_writers/
run: uv run -- pyright
37 changes: 37 additions & 0 deletions ci.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env bash

set -euo pipefail

cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null

# Lint
uv run -- ruff format
uv run -- ruff check --fix

# Type check
uv run -- pyright

# Test
uv sync
uv run -- pytest --capture=no --verbose --cov --cov-report=xml \
--ignore=src/jax_loop_utils/metric_writers/tf/ \
--ignore=src/jax_loop_utils/metric_writers/torch/ \
--ignore=src/jax_loop_utils/metric_writers/mlflow/ \
--ignore=src/jax_loop_utils/metric_writers/_audio_video/ \
src/jax_loop_utils/

uv sync --extra tensorflow
uv run -- pytest --capture=no --verbose --cov --cov-report=xml --cov-append \
src/jax_loop_utils/metric_writers/tf

uv sync --group dev-torch --extra torch
uv run -- pytest --capture=no --verbose --cov --cov-report=xml --cov-append \
src/jax_loop_utils/metric_writers/torch

uv sync --extra mlflow --extra audio-video
uv run -- pytest --capture=no --verbose --cov --cov-report=xml --cov-append \
src/jax_loop_utils/metric_writers/mlflow

uv sync --extra audio-video
uv run -- pytest --capture=no --verbose --cov --cov-report=xml --cov-append \
src/jax_loop_utils/metric_writers/_audio_video
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,7 @@ ignore = [

[tool.pyright]
typeCheckingMode = "standard"
include = [
# TODO: Fix issues in adopted code and enable for all sources
"src/jax_loop_utils/metric_writers/",
]

0 comments on commit c918a88

Please sign in to comment.