diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2187be81fc..1385c282e6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,10 +10,12 @@ repos: rev: 5.12.0 hooks: - id: isort - # Use the config file specific to each subproject so that each - # project can specify its own first/third-party packages. args: ["--config-root=python/", "--resolve-all-configs"] - files: (python|legate)/.* + files: python/.* + types_or: [python, cython, pyi] + - id: isort + args: ["--config-root=legate/", "--resolve-all-configs"] + files: legate/.* types_or: [python, cython, pyi] - repo: https://github.com/psf/black rev: 22.12.0 diff --git a/legate/benchmarks/single-node-io.py b/legate/benchmarks/single-node-io.py index abb98a568a..e700953cd0 100644 --- a/legate/benchmarks/single-node-io.py +++ b/legate/benchmarks/single-node-io.py @@ -12,12 +12,12 @@ from typing import ContextManager, Union import cunumeric as num -import kvikio.defaults from dask.utils import format_bytes, parse_bytes -from legate_kvikio import CuFile import kvikio +import kvikio.defaults import legate.core +from legate_kvikio import CuFile runtime = legate.core.get_legate_runtime() diff --git a/legate/benchmarks/zarr_read.py b/legate/benchmarks/zarr_read.py index 27ae2de45f..cde58de34a 100644 --- a/legate/benchmarks/zarr_read.py +++ b/legate/benchmarks/zarr_read.py @@ -11,9 +11,10 @@ import numpy as np import zarr -from kvikio.zarr import GDSStore from zarr.errors import ArrayNotFoundError +from kvikio.zarr import GDSStore + def try_open_zarr_array(dirpath, shape, chunks, dtype): try: @@ -78,9 +79,9 @@ def f(): @contextlib.contextmanager def run_legate(args): import cunumeric as num - from legate_kvikio.zarr import read_array from legate.core import get_legate_runtime + from legate_kvikio.zarr import read_array def f(): get_legate_runtime().issue_execution_fence(block=True) diff --git a/legate/examples/basic_io.py b/legate/examples/basic_io.py index 981e174175..50f29b3066 100644 --- a/legate/examples/basic_io.py +++ b/legate/examples/basic_io.py @@ -2,8 +2,8 @@ # See file LICENSE for terms. import cunumeric as num -import legate_kvikio as kvikio +import legate_kvikio as kvikio from legate.core import get_legate_runtime diff --git a/legate/legate_kvikio/library_description.py b/legate/legate_kvikio/library_description.py index 9810b022cd..8bfd185aa6 100644 --- a/legate/legate_kvikio/library_description.py +++ b/legate/legate_kvikio/library_description.py @@ -5,9 +5,8 @@ from enum import IntEnum from typing import Any -from legate_kvikio.install_info import header, libpath - from legate.core import Library, ResourceConfig, get_legate_runtime +from legate_kvikio.install_info import header, libpath class LibraryDescription(Library): diff --git a/legate/setup.cfg b/legate/setup.cfg index 9ca3d177c4..cf9d6957d8 100644 --- a/legate/setup.cfg +++ b/legate/setup.cfg @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2023, NVIDIA CORPORATION. +# Copyright (c) 2023, NVIDIA CORPORATION. # See the docstring in versioneer.py for instructions. Note that you must # re-run 'versioneer.py setup' after changing this section, and commit the diff --git a/legate/tests/test_basic_io.py b/legate/tests/test_basic_io.py index f24dabf048..9c62f89e72 100644 --- a/legate/tests/test_basic_io.py +++ b/legate/tests/test_basic_io.py @@ -5,10 +5,10 @@ import math import pytest -from legate_kvikio import CuFile -from legate_kvikio.tile import read_tiles, write_tiles from legate.core import get_legate_runtime +from legate_kvikio import CuFile +from legate_kvikio.tile import read_tiles, write_tiles num = pytest.importorskip("cunumeric") diff --git a/legate/tests/test_zarr.py b/legate/tests/test_zarr.py index f72de5c30f..90016ddb49 100644 --- a/legate/tests/test_zarr.py +++ b/legate/tests/test_zarr.py @@ -6,10 +6,10 @@ import numpy as np import pytest -from legate_kvikio.zarr import read_array, write_array from numpy.testing import assert_array_equal from legate.core import get_legate_runtime +from legate_kvikio.zarr import read_array, write_array num = pytest.importorskip("cunumeric") zarr = pytest.importorskip("zarr") diff --git a/python/setup.cfg b/python/setup.cfg index 7e82322b88..f6e16c6dfa 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -1,4 +1,4 @@ -# Copyright (c) 2018-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2023, NVIDIA CORPORATION. # See the docstring in versioneer.py for instructions. Note that you must # re-run 'versioneer.py setup' after changing this section, and commit the @@ -64,6 +64,7 @@ known_rapids= known_first_party= cufile kvikio + legate_kvikio default_section=THIRDPARTY sections=FUTURE,STDLIB,THIRDPARTY,RAPIDS,FIRSTPARTY,LOCALFOLDER skip=