Skip to content

Commit

Permalink
isort clean up (#205)
Browse files Browse the repository at this point in the history
Authors:
  - Mads R. B. Kristensen (https://github.com/madsbk)

Approvers:
  - Benjamin Zaitlen (https://github.com/quasiben)

URL: #205
  • Loading branch information
madsbk authored Apr 26, 2023
1 parent d230606 commit d9a0510
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 15 deletions.
8 changes: 5 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions legate/benchmarks/single-node-io.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
5 changes: 3 additions & 2 deletions legate/benchmarks/zarr_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion legate/examples/basic_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
3 changes: 1 addition & 2 deletions legate/legate_kvikio/library_description.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion legate/setup.cfg
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions legate/tests/test_basic_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion legate/tests/test_zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 2 additions & 1 deletion python/setup.cfg
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -64,6 +64,7 @@ known_rapids=
known_first_party=
cufile
kvikio
legate_kvikio
default_section=THIRDPARTY
sections=FUTURE,STDLIB,THIRDPARTY,RAPIDS,FIRSTPARTY,LOCALFOLDER
skip=
Expand Down

0 comments on commit d9a0510

Please sign in to comment.