Skip to content

Commit

Permalink
Move content of the Python pkg to subdirectory python/kvikio/ (#392)
Browse files Browse the repository at this point in the history
* Move content of the Python pkg to subdirectory python/kvikio/

* Fix copyright year
  • Loading branch information
hcho3 authored Jun 10, 2024
1 parent 64b5129 commit 88033f4
Show file tree
Hide file tree
Showing 51 changed files with 23 additions and 23 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
hooks:
- id: black
files: python/.*
args: ["--config", "python/pyproject.toml"]
args: ["--config", "python/kvikio/pyproject.toml"]
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
Expand All @@ -37,11 +37,11 @@ repos:
hooks:
- id: mypy
additional_dependencies: [types-cachetools]
args: ["--config-file=python/pyproject.toml",
"python/kvikio",
"python/tests",
"python/examples",
"python/benchmarks"]
args: ["--config-file=python/kvikio/pyproject.toml",
"python/kvikio/kvikio",
"python/kvikio/tests",
"python/kvikio/examples",
"python/kvikio/benchmarks"]
pass_filenames: false
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.6
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ fi
# Build and install the kvikio Python package
if (( NUMARGS == 0 )) || hasArg kvikio; then
echo "building kvikio..."
cd ${REPODIR}/python
cd ${REPODIR}/python/kvikio
SKBUILD_CMAKE_ARGS="-DCMAKE_PREFIX_PATH=${INSTALL_PREFIX};-DCMAKE_LIBRARY_PATH=${LIBKVIKIO_BUILD_DIR};${EXTRA_CMAKE_ARGS}" \
python -m pip install --no-build-isolation --no-deps --config-settings rapidsai.disable-cuda=true .
fi
2 changes: 1 addition & 1 deletion ci/run_pytests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
set -euo pipefail

# Support invoking run_pytests.sh outside the script directory
cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../python/
cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../python/kvikio

pytest --cache-clear --verbose "$@" tests
8 changes: 4 additions & 4 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,30 +39,30 @@ files:
- py_version
py_build:
output: pyproject
pyproject_dir: python
pyproject_dir: python/kvikio
extras:
table: build-system
includes:
- rapids_build_skbuild
py_rapids_build:
output: pyproject
pyproject_dir: python
pyproject_dir: python/kvikio
extras:
table: tool.rapids-build-backend
key: requires
includes:
- build
py_run:
output: pyproject
pyproject_dir: python
pyproject_dir: python/kvikio
extras:
table: project
includes:
- depends_on_cupy
- run
py_optional_test:
output: pyproject
pyproject_dir: python
pyproject_dir: python/kvikio
extras:
table: project.optional-dependencies
key: test
Expand Down
2 changes: 1 addition & 1 deletion docs/source/zarr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ The following is an example of how to use the convenience function :py:meth:`kvi
to create a new Zarr array and how open an existing Zarr array.


.. literalinclude:: ../../python/examples/zarr_cupy_nvcomp.py
.. literalinclude:: ../../python/kvikio/examples/zarr_cupy_nvcomp.py
:language: python
1 change: 0 additions & 1 deletion python/README.md

This file was deleted.

File renamed without changes.
6 changes: 3 additions & 3 deletions python/CMakeLists.txt → python/kvikio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR)

include(../cpp/cmake/rapids_config.cmake)
include(../../cpp/cmake/rapids_config.cmake)
include(rapids-cpm)
rapids_cpm_init()
include(rapids-cuda)
Expand All @@ -31,7 +31,7 @@ option(FIND_KVIKIO_CPP
)

# TODO: Should we symlink FindcuFile.cmake into python/cmake? find cuFile
include(../cpp/cmake/Modules/FindcuFile.cmake)
include(../../cpp/cmake/Modules/FindcuFile.cmake)

if(FIND_KVIKIO_CPP)
find_package(KvikIO "${RAPIDS_VERSION}")
Expand All @@ -42,7 +42,7 @@ endif()
find_package(CUDAToolkit REQUIRED)

if(NOT KvikIO_FOUND)
add_subdirectory(../cpp kvikio-cpp)
add_subdirectory(../../cpp kvikio-cpp)
set(cython_lib_dir kvikio)
install(TARGETS kvikio DESTINATION ${cython_lib_dir})
endif()
Expand Down
1 change: 1 addition & 0 deletions python/kvikio/README.md
1 change: 0 additions & 1 deletion python/kvikio/VERSION

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions python/kvikio/kvikio/VERSION
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions python/pyproject.toml → python/kvikio/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2021-2024, NVIDIA CORPORATION. All rights reserved.
# See file LICENSE for terms.

[build-system]
build-backend = "rapids_build_backend.build"
requires = [
"rapids-build-backend>=0.3.0,<0.4.0.dev0",
"scikit-build-core[pyproject]>=0.7.0",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`.
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.

[project]
name = "kvikio"
Expand All @@ -24,7 +24,7 @@ dependencies = [
"numpy>=1.23,<2.0a0",
"packaging",
"zarr",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`.
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.
classifiers = [
"Intended Audience :: Developers",
"Topic :: Database",
Expand All @@ -42,7 +42,7 @@ test = [
"dask>=2022.05.2",
"pytest",
"pytest-cov",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`.
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.

[project.urls]
Homepage = "https://github.com/rapidsai/kvikio"
Expand Down Expand Up @@ -114,7 +114,7 @@ requires = [
"cmake>=3.26.4",
"cython>=3.0.0",
"ninja",
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`.
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`.

[tool.scikit-build]
build-dir = "build/{wheel_tag}"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 88033f4

Please sign in to comment.