From 81edf3d78b65d6452542e3cfd99f53e1aaa13042 Mon Sep 17 00:00:00 2001 From: Jirka Borovec <6035284+Borda@users.noreply.github.com> Date: Mon, 19 Feb 2024 14:56:12 +0100 Subject: [PATCH] ci: resolve failings (#8) * version * init * mypy * Apply suggestions from code review --- .github/workflows/ci-checks.yml | 6 ++++-- lightning_data/__about__.py | 3 +-- lightning_data/__init__.py | 6 ++---- pyproject.toml | 2 +- requirements.txt | 3 +++ requirements/test.txt | 5 ----- 6 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci-checks.yml b/.github/workflows/ci-checks.yml index 48dd0b7e..e518784e 100644 --- a/.github/workflows/ci-checks.yml +++ b/.github/workflows/ci-checks.yml @@ -15,9 +15,11 @@ jobs: uses: Lightning-AI/utilities/.github/workflows/check-precommit.yml@v0.10.1 check-typing: - uses: Lightning-AI/utilities/.github/workflows/check-typing.yml@v0.10.1 + # TODO: switch to main after fix lends + uses: Lightning-AI/utilities/.github/workflows/check-typing.yml@ci/mypy-dir with: - actions-ref: v0.10.1 + actions-ref: ci/mypy-dir + source-dir: "" check-schema: uses: Lightning-AI/utilities/.github/workflows/check-schema.yml@v0.10.1 diff --git a/lightning_data/__about__.py b/lightning_data/__about__.py index 90cab9bf..6307cb19 100644 --- a/lightning_data/__about__.py +++ b/lightning_data/__about__.py @@ -14,6 +14,7 @@ import time +__version__ = "0.2.0.dev" __author__ = "Lightning AI et al." __author_email__ = "pytorch@lightning.ai" __license__ = "Apache-2.0" @@ -39,5 +40,3 @@ "__license__", "__version__", ] - -__version__ = "0.2.0.dev" diff --git a/lightning_data/__init__.py b/lightning_data/__init__.py index 0671e414..4507f70b 100644 --- a/lightning_data/__init__.py +++ b/lightning_data/__init__.py @@ -1,22 +1,20 @@ from lightning_utilities.core.imports import RequirementCache +from lightning_data.__about__ import * # noqa: F403 from lightning_data.processing.functions import map, optimize, walk from lightning_data.streaming.combined import CombinedStreamingDataset from lightning_data.streaming.dataloader import StreamingDataLoader from lightning_data.streaming.dataset import StreamingDataset __all__ = [ - "LightningDataset", "StreamingDataset", "CombinedStreamingDataset", "StreamingDataLoader", - "LightningIterableDataset", "map", "optimize", "walk", ] - if RequirementCache("lightning_sdk"): from lightning_sdk import Machine # noqa: F401 - __all__.append("Machine") + __all__ + ["Machine"] diff --git a/pyproject.toml b/pyproject.toml index c24a810d..78755b71 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -131,7 +131,7 @@ max-complexity = 10 [tool.mypy] files = [ - "src/lightning", + "lightning_data", ] # This section is for folders with "-" as they are not valid python modules exclude = [ diff --git a/requirements.txt b/requirements.txt index efc63699..40a47c42 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,8 +2,11 @@ lightning-utilities >=0.8.0, <0.10.0 lightning-cloud == 0.5.64 # Must be pinned to ensure compatibility # to be able to include also PL 2.0 and preserve `>` needed for CI min version bypass torch >=2.1.0, <=2.2.0 +lightning >=2.2.0 filelock tqdm numpy torchvision pillow +viztracer +pyarrow diff --git a/requirements/test.txt b/requirements/test.txt index 90b502be..58e5caad 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -4,9 +4,4 @@ pytest-cov ==4.1.0 pytest-timeout ==2.1.0 pytest-rerunfailures ==12.0 pytest-random-order ==1.1.0 -viztracer pandas -pyarrow -pillow -lightning -mypy