diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 5f80e23..8f37e39 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -7,7 +7,7 @@ on: jobs: - interrogate: + lint-interrogate: runs-on: ubuntu-latest steps: - name: Checkout source code @@ -16,33 +16,24 @@ jobs: uses: actions/setup-python@v5 with: python-version: "3.10" - - name: Install dependencies - run: pip install interrogate==1.5.0 - - name: Interrogate - run: make interrogate - - lint: - needs: [interrogate] - runs-on: ubuntu-latest - steps: - - name: Checkout source code - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.10" - cache: "pip" - cache-dependency-path: pyproject.toml - - name: Install dependencies - run: pip install ."[lint]" - - name: Run linter - run: make lint + - name: Install uv + run: curl -LsSf https://astral.sh/uv/install.sh | sh + # - name: Install & run interrogate + # run: | + # uv pip install interrogate==1.5.0 --system + # make interrogate + - name: Install & run linter + run: | + uv pip install ."[lint]" --system + make lint test: - needs: [lint] strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-latest + #, macos-latest + #, windows-latest + ] python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] runs-on: ${{ matrix.os }} steps: @@ -52,12 +43,12 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - cache: "pip" - cache-dependency-path: pyproject.toml - - name: Install dependencies - run: pip install ."[pandas,polars,test]" - - name: Run tests - run: make test + - name: Install uv + run: curl -LsSf https://astral.sh/uv/install.sh | sh + - name: Install dependencies and run tests + run: | + uv pip install -e ."[pandas,polars,test]" --system + make test doc-build: runs-on: ubuntu-latest @@ -68,9 +59,9 @@ jobs: uses: actions/setup-python@v5 with: python-version: "3.10" - cache: "pip" - cache-dependency-path: pyproject.toml - - name: Install dependencies - run: pip install ."[docs]" - - name: Build documentation - run: mkdocs build -v -s + - name: Install uv + run: curl -LsSf https://astral.sh/uv/install.sh | sh + - name: Install dependencies and check docs can build + run: | + uv pip install ."[docs]" --system + mkdocs build -v -s diff --git a/timebasedcv/utils/_types.py b/timebasedcv/utils/_types.py index 878fc31..952e171 100644 --- a/timebasedcv/utils/_types.py +++ b/timebasedcv/utils/_types.py @@ -17,7 +17,6 @@ if TYPE_CHECKING: import pandas as pd - DateTimeLike = TypeVar("DateTimeLike", datetime, date, "pd.Timestamp") NullableDatetime = Union[DateTimeLike, None]