diff --git a/.github/workflows/ci-checks.yml b/.github/workflows/ci-checks.yml index 4fe3fe83..90dc12c0 100644 --- a/.github/workflows/ci-checks.yml +++ b/.github/workflows/ci-checks.yml @@ -30,13 +30,14 @@ jobs: testing-matrix: | { "os": ["ubuntu-latest", "macos-14", "windows-latest"], - "python-version": ["3.9", "3.10"] + "python-version": ["3.10", "3.11"] } check-docs: uses: Lightning-AI/utilities/.github/workflows/check-docs.yml@main with: requirements-file: "requirements/docs.txt" + python-version: "3.10" check-md-links: uses: Lightning-AI/utilities/.github/workflows/check-md-links.yml@main diff --git a/.github/workflows/ci-testing.yml b/.github/workflows/ci-testing.yml index ca415ecc..e9ab9eef 100644 --- a/.github/workflows/ci-testing.yml +++ b/.github/workflows/ci-testing.yml @@ -19,7 +19,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-22.04", "macos-14", "windows-2022"] - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] exclude: - { os: "windows-2022", python-version: "3.13" } - { os: "windows-2022", python-version: "3.14" } diff --git a/.github/workflows/docs-build.yml b/.github/workflows/docs-build.yml index bbdcb821..b3616529 100644 --- a/.github/workflows/docs-build.yml +++ b/.github/workflows/docs-build.yml @@ -11,6 +11,7 @@ jobs: uses: Lightning-AI/utilities/.github/workflows/check-docs.yml@main with: requirements-file: "requirements/docs.txt" + python-version: "3.10" # https://github.com/marketplace/actions/deploy-to-github-pages docs-deploy: diff --git a/pyproject.toml b/pyproject.toml index 81317cf3..4a606d1e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,13 +13,10 @@ # limitations under the License. [build-system] -requires = [ - "setuptools", - "wheel", -] +requires = [ "setuptools", "wheel" ] [tool.ruff] -target-version = "py39" +target-version = "py310" line-length = 120 # Exclude a variety of commonly ignored directories. exclude = [ @@ -48,8 +45,10 @@ lint.extend-select = [ "SIM", # see: https://pypi.org/project/flake8-simplify ] lint.ignore = [ - "E731", # Do not assign a lambda expression, use a def - "S101", # todo: Use of `assert` detected + "E731", # Do not assign a lambda expression, use a def + "S101", # todo: Use of `assert` detected + "UP007", # todo: non-pep604-annotation-union + "UP045", # todo: non-pep604-annotation-optional ] lint.per-file-ignores."examples/**" = [ "D100", @@ -119,16 +118,8 @@ wrap-descriptions = 120 blank = true [tool.pytest.ini_options] -testpaths = [ - "tests", -] -norecursedirs = [ - ".git", - ".github", - "dist", - "build", - "docs", -] +testpaths = [ "tests" ] +norecursedirs = [ ".git", ".github", "dist", "build", "docs" ] addopts = [ "--strict-markers", "--doctest-modules", @@ -136,12 +127,8 @@ addopts = [ "--disable-pytest-warnings", "--ignore=legacy/checkpoints", ] -markers = [ - "cloud: Run the cloud tests for example", -] -filterwarnings = [ - "error::FutureWarning", -] +markers = [ "cloud: Run the cloud tests for example" ] +filterwarnings = [ "error::FutureWarning" ] xfail_strict = true junit_duration_report = "call" @@ -155,9 +142,7 @@ exclude_lines = [ ] [tool.mypy] -files = [ - "src", -] +files = [ "src" ] # This section is for folders with "-" as they are not valid python modules exclude = [ "src/litdata/utilities/_pytree.py", @@ -190,6 +175,5 @@ warn_no_return = "False" [[tool.mypy.overrides]] # the list can be generated with: # mypy --no-error-summary 2>&1 | tr ':' ' ' | awk '{print $1}' | sort | uniq | sed 's/\.py//g; s|src/||g; s|\/|\.|g' | xargs -I {} echo '"{}",' -module = [ -] +module = [ ] ignore_errors = "True" diff --git a/setup.py b/setup.py index e320d57d..d391c1b7 100644 --- a/setup.py +++ b/setup.py @@ -71,7 +71,7 @@ def _prepare_extras(requirements_dir: str = _PATH_REQUIRES, skip_files: tuple = include_package_data=True, zip_safe=False, keywords=["deep learning", "pytorch", "AI", "streaming", "cloud", "data processing"], - python_requires=">=3.9", + python_requires=">=3.10", setup_requires=["wheel"], install_requires=_load_requirements(), extras_require=_prepare_extras(), @@ -95,7 +95,6 @@ def _prepare_extras(requirements_dir: str = _PATH_REQUIRES, skip_files: tuple = # Specify the Python versions you support here. In particular, ensure # that you indicate whether you support Python 2, Python 3 or both. "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12",