From bc8ca9befdd77d3f4a270a64dae178b2ef355181 Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Fri, 16 Aug 2024 12:02:21 -0700 Subject: [PATCH] Setup pylibcudf package (#16299) Migrates cudf._lib.pylibcudf to a new pylibcudf package Authors: - Thomas Li (https://github.com/lithomas1) - Matthew Murray (https://github.com/Matt711) - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Vyas Ramasubramani (https://github.com/vyasr) - James Lamb (https://github.com/jameslamb) URL: https://github.com/rapidsai/cudf/pull/16299 --- .github/labeler.yml | 2 +- .github/workflows/pr.yaml | 12 +- build.sh | 15 +- ci/build_docs.sh | 2 +- ci/build_python.sh | 7 + ci/build_wheel_cudf.sh | 8 +- ci/build_wheel_pylibcudf.sh | 16 ++ ci/cudf_pandas_scripts/pandas-tests/run.sh | 2 + ci/cudf_pandas_scripts/run_tests.sh | 2 + ci/test_python_cudf.sh | 2 +- ci/test_wheel_cudf.sh | 10 +- ci/test_wheel_cudf_polars.sh | 6 +- ci/test_wheel_dask_cudf.sh | 5 +- .../all_cuda-118_arch-x86_64.yaml | 2 + .../all_cuda-125_arch-x86_64.yaml | 2 + conda/recipes/cudf/meta.yaml | 2 + conda/recipes/cudf_kafka/meta.yaml | 4 +- conda/recipes/pylibcudf/build.sh | 4 + .../recipes/pylibcudf/conda_build_config.yaml | 20 +++ conda/recipes/pylibcudf/meta.yaml | 108 ++++++++++++ dependencies.yaml | 165 +++++++++++++++++- .../api_docs/pylibcudf/aggregation.rst | 2 +- .../api_docs/pylibcudf/binaryop.rst | 2 +- .../user_guide/api_docs/pylibcudf/column.rst | 2 +- .../api_docs/pylibcudf/column_factories.rst | 2 +- .../api_docs/pylibcudf/concatenate.rst | 2 +- .../user_guide/api_docs/pylibcudf/copying.rst | 2 +- .../api_docs/pylibcudf/datetime.rst | 2 +- .../api_docs/pylibcudf/expressions.rst | 2 +- .../user_guide/api_docs/pylibcudf/filling.rst | 2 +- .../api_docs/pylibcudf/gpumemoryview.rst | 2 +- .../user_guide/api_docs/pylibcudf/groupby.rst | 2 +- .../user_guide/api_docs/pylibcudf/interop.rst | 2 +- .../user_guide/api_docs/pylibcudf/io/avro.rst | 2 +- .../user_guide/api_docs/pylibcudf/io/csv.rst | 2 +- .../api_docs/pylibcudf/io/index.rst | 2 +- .../user_guide/api_docs/pylibcudf/io/json.rst | 2 +- .../api_docs/pylibcudf/io/parquet.rst | 2 +- .../user_guide/api_docs/pylibcudf/join.rst | 2 +- .../user_guide/api_docs/pylibcudf/lists.rst | 2 +- .../user_guide/api_docs/pylibcudf/merge.rst | 2 +- .../api_docs/pylibcudf/quantiles.rst | 2 +- .../user_guide/api_docs/pylibcudf/reduce.rst | 2 +- .../user_guide/api_docs/pylibcudf/replace.rst | 2 +- .../user_guide/api_docs/pylibcudf/reshape.rst | 2 +- .../user_guide/api_docs/pylibcudf/rolling.rst | 2 +- .../user_guide/api_docs/pylibcudf/round.rst | 2 +- .../user_guide/api_docs/pylibcudf/scalar.rst | 2 +- .../user_guide/api_docs/pylibcudf/search.rst | 2 +- .../user_guide/api_docs/pylibcudf/sorting.rst | 2 +- .../api_docs/pylibcudf/stream_compaction.rst | 2 +- .../api_docs/pylibcudf/strings/capitalize.rst | 2 +- .../api_docs/pylibcudf/strings/char_types.rst | 2 +- .../api_docs/pylibcudf/strings/contains.rst | 2 +- .../api_docs/pylibcudf/strings/find.rst | 2 +- .../pylibcudf/strings/regex_flags.rst | 2 +- .../pylibcudf/strings/regex_program.rst | 2 +- .../api_docs/pylibcudf/strings/replace.rst | 2 +- .../api_docs/pylibcudf/strings/slice.rst | 2 +- .../user_guide/api_docs/pylibcudf/table.rst | 2 +- .../user_guide/api_docs/pylibcudf/traits.rst | 2 +- .../api_docs/pylibcudf/transform.rst | 2 +- .../user_guide/api_docs/pylibcudf/types.rst | 2 +- .../user_guide/api_docs/pylibcudf/unary.rst | 2 +- python/cudf/CMakeLists.txt | 4 +- python/cudf/cudf/_lib/CMakeLists.txt | 1 - python/cudf/cudf/_lib/__init__.py | 1 - python/cudf/cudf/_lib/aggregation.pyx | 3 +- python/cudf/cudf/_lib/avro.pyx | 4 +- python/cudf/cudf/_lib/binaryop.pyx | 3 +- python/cudf/cudf/_lib/column.pxd | 9 +- python/cudf/cudf/_lib/column.pyx | 20 +-- python/cudf/cudf/_lib/concat.pyx | 3 +- python/cudf/cudf/_lib/copying.pxd | 2 +- python/cudf/cudf/_lib/copying.pyx | 20 +-- python/cudf/cudf/_lib/csv.pyx | 21 ++- python/cudf/cudf/_lib/datetime.pyx | 13 +- python/cudf/cudf/_lib/filling.pyx | 4 +- python/cudf/cudf/_lib/groupby.pyx | 7 +- python/cudf/cudf/_lib/hash.pyx | 15 +- python/cudf/cudf/_lib/interop.pyx | 9 +- python/cudf/cudf/_lib/io/utils.pxd | 7 +- python/cudf/cudf/_lib/io/utils.pyx | 11 +- python/cudf/cudf/_lib/join.pyx | 2 +- python/cudf/cudf/_lib/json.pyx | 15 +- python/cudf/cudf/_lib/labeling.pyx | 10 +- python/cudf/cudf/_lib/lists.pyx | 7 +- python/cudf/cudf/_lib/merge.pyx | 2 +- python/cudf/cudf/_lib/null_mask.pyx | 11 +- .../cudf/_lib/nvtext/byte_pair_encode.pyx | 11 +- .../cudf/cudf/_lib/nvtext/edit_distance.pyx | 9 +- .../cudf/cudf/_lib/nvtext/generate_ngrams.pyx | 13 +- python/cudf/cudf/_lib/nvtext/jaccard.pyx | 11 +- python/cudf/cudf/_lib/nvtext/minhash.pyx | 11 +- .../cudf/cudf/_lib/nvtext/ngrams_tokenize.pyx | 13 +- python/cudf/cudf/_lib/nvtext/normalize.pyx | 9 +- python/cudf/cudf/_lib/nvtext/replace.pyx | 13 +- python/cudf/cudf/_lib/nvtext/stemmer.pyx | 11 +- .../cudf/_lib/nvtext/subword_tokenize.pyx | 7 +- python/cudf/cudf/_lib/nvtext/tokenize.pyx | 13 +- python/cudf/cudf/_lib/orc.pyx | 33 ++-- python/cudf/cudf/_lib/parquet.pyx | 39 +++-- python/cudf/cudf/_lib/partitioning.pyx | 13 +- python/cudf/cudf/_lib/pylibcudf/io/avro.pxd | 12 -- .../pylibcudf/libcudf/strings/extract.pxd | 15 -- .../_lib/pylibcudf/strings/char_types.pxd | 5 - .../cudf/_lib/pylibcudf/strings/contains.pxd | 7 - .../_lib/pylibcudf/strings/regex_flags.pxd | 2 - python/cudf/cudf/_lib/quantiles.pyx | 5 +- python/cudf/cudf/_lib/reduce.pyx | 3 +- python/cudf/cudf/_lib/replace.pyx | 3 +- python/cudf/cudf/_lib/reshape.pyx | 5 +- python/cudf/cudf/_lib/rolling.pyx | 3 +- python/cudf/cudf/_lib/round.pyx | 4 +- python/cudf/cudf/_lib/scalar.pxd | 3 +- python/cudf/cudf/_lib/scalar.pyx | 14 +- python/cudf/cudf/_lib/search.pyx | 2 +- python/cudf/cudf/_lib/sort.pyx | 13 +- python/cudf/cudf/_lib/stream_compaction.pyx | 2 +- python/cudf/cudf/_lib/string_casting.pyx | 21 +-- python/cudf/cudf/_lib/strings/attributes.pyx | 9 +- python/cudf/cudf/_lib/strings/capitalize.pyx | 2 +- python/cudf/cudf/_lib/strings/case.pyx | 2 +- python/cudf/cudf/_lib/strings/char_types.pyx | 11 +- python/cudf/cudf/_lib/strings/combine.pyx | 13 +- python/cudf/cudf/_lib/strings/contains.pyx | 19 +- .../strings/convert/convert_fixed_point.pyx | 11 +- .../_lib/strings/convert/convert_floats.pyx | 9 +- .../_lib/strings/convert/convert_integers.pyx | 9 +- .../_lib/strings/convert/convert_lists.pyx | 11 +- .../_lib/strings/convert/convert_urls.pyx | 9 +- python/cudf/cudf/_lib/strings/extract.pyx | 11 +- python/cudf/cudf/_lib/strings/find.pyx | 6 +- .../cudf/cudf/_lib/strings/find_multiple.pyx | 9 +- python/cudf/cudf/_lib/strings/findall.pyx | 11 +- python/cudf/cudf/_lib/strings/json.pyx | 11 +- python/cudf/cudf/_lib/strings/padding.pyx | 11 +- python/cudf/cudf/_lib/strings/repeat.pyx | 9 +- python/cudf/cudf/_lib/strings/replace.pyx | 5 +- python/cudf/cudf/_lib/strings/replace_re.pyx | 17 +- .../cudf/_lib/strings/split/partition.pyx | 11 +- python/cudf/cudf/_lib/strings/split/split.pyx | 19 +- python/cudf/cudf/_lib/strings/strip.pyx | 11 +- python/cudf/cudf/_lib/strings/substring.pyx | 2 +- python/cudf/cudf/_lib/strings/translate.pyx | 13 +- python/cudf/cudf/_lib/strings/wrap.pyx | 9 +- python/cudf/cudf/_lib/strings_udf.pyx | 12 +- python/cudf/cudf/_lib/text.pyx | 7 +- python/cudf/cudf/_lib/timezone.pyx | 5 +- python/cudf/cudf/_lib/transform.pyx | 24 +-- python/cudf/cudf/_lib/transpose.pyx | 7 +- python/cudf/cudf/_lib/types.pxd | 8 +- python/cudf/cudf/_lib/types.pyx | 12 +- python/cudf/cudf/_lib/unary.pyx | 3 +- python/cudf/cudf/_lib/utils.pxd | 4 +- python/cudf/cudf/_lib/utils.pyx | 9 +- .../cudf/cudf/core/_internals/expressions.py | 4 +- python/cudf/cudf/core/buffer/buffer.py | 3 +- python/cudf/cudf/core/column/numerical.py | 3 +- python/cudf/cudf/core/indexed_frame.py | 4 +- python/cudf/cudf/pandas/__init__.py | 3 +- python/cudf/pyproject.toml | 3 + .../cudf_kafka/cudf_kafka/_lib/CMakeLists.txt | 4 +- python/cudf_kafka/cudf_kafka/_lib/kafka.pxd | 5 +- python/cudf_kafka/cudf_kafka/_lib/kafka.pyx | 3 +- .../cudf_polars/containers/column.py | 2 +- .../cudf_polars/containers/dataframe.py | 3 +- python/cudf_polars/cudf_polars/dsl/expr.py | 3 +- python/cudf_polars/cudf_polars/dsl/ir.py | 3 +- .../cudf_polars/cudf_polars/dsl/translate.py | 3 +- .../cudf_polars/typing/__init__.py | 4 +- .../cudf_polars/cudf_polars/utils/dtypes.py | 3 +- .../cudf_polars/cudf_polars/utils/sorting.py | 2 +- python/cudf_polars/pyproject.toml | 2 +- .../tests/containers/test_column.py | 3 +- .../tests/containers/test_dataframe.py | 3 +- python/cudf_polars/tests/dsl/test_expr.py | 3 +- .../tests/expressions/test_literal.py | 3 +- .../tests/expressions/test_sort.py | 3 +- .../cudf_polars/tests/utils/test_broadcast.py | 3 +- python/pylibcudf/CMakeLists.txt | 100 +++++++++++ python/pylibcudf/README.md | 1 + .../cmake/Modules/LinkPyarrowHeaders.cmake | 0 .../cmake/Modules/WheelHelpers.cmake | 0 .../pylibcudf/CMakeLists.txt | 2 +- python/pylibcudf/pylibcudf/VERSION | 1 + .../_lib => pylibcudf}/pylibcudf/__init__.pxd | 0 .../_lib => pylibcudf}/pylibcudf/__init__.py | 1 + python/pylibcudf/pylibcudf/_version.py | 24 +++ .../pylibcudf/aggregation.pxd | 5 +- .../pylibcudf/aggregation.pyx | 21 +-- .../_lib => pylibcudf}/pylibcudf/binaryop.pxd | 3 +- .../_lib => pylibcudf}/pylibcudf/binaryop.pyx | 15 +- .../_lib => pylibcudf}/pylibcudf/column.pxd | 11 +- .../_lib => pylibcudf}/pylibcudf/column.pyx | 11 +- .../pylibcudf/column_factories.pxd | 3 +- .../pylibcudf/column_factories.pyx | 7 +- .../pylibcudf/concatenate.pxd | 0 .../pylibcudf/concatenate.pyx | 11 +- .../_lib => pylibcudf}/pylibcudf/copying.pxd | 5 +- .../_lib => pylibcudf}/pylibcudf/copying.pyx | 21 ++- .../_lib => pylibcudf}/pylibcudf/datetime.pxd | 0 .../_lib => pylibcudf}/pylibcudf/datetime.pyx | 7 +- .../pylibcudf/exception_handler.pxd | 0 .../pylibcudf/experimental.pxd | 0 .../pylibcudf/experimental.pyx | 3 +- .../pylibcudf/expressions.pxd | 3 +- .../pylibcudf/expressions.pyx | 15 +- .../_lib => pylibcudf}/pylibcudf/filling.pxd | 2 +- .../_lib => pylibcudf}/pylibcudf/filling.pyx | 9 +- .../pylibcudf/gpumemoryview.pxd | 0 .../pylibcudf/gpumemoryview.pyx | 0 .../_lib => pylibcudf}/pylibcudf/groupby.pxd | 9 +- .../_lib => pylibcudf}/pylibcudf/groupby.pyx | 15 +- .../_lib => pylibcudf}/pylibcudf/interop.pyx | 6 +- .../pylibcudf/io/CMakeLists.txt | 0 .../pylibcudf/io/__init__.pxd | 0 .../pylibcudf/io/__init__.py | 0 python/pylibcudf/pylibcudf/io/avro.pxd | 12 ++ .../_lib => pylibcudf}/pylibcudf/io/avro.pyx | 7 +- .../_lib => pylibcudf}/pylibcudf/io/csv.pyx | 11 +- .../pylibcudf/io/datasource.pxd | 5 +- .../pylibcudf/io/datasource.pyx | 5 +- .../_lib => pylibcudf}/pylibcudf/io/json.pxd | 7 +- .../_lib => pylibcudf}/pylibcudf/io/json.pyx | 19 +- .../pylibcudf/io/parquet.pxd | 11 +- .../pylibcudf/io/parquet.pyx | 15 +- .../_lib => pylibcudf}/pylibcudf/io/types.pxd | 7 +- .../_lib => pylibcudf}/pylibcudf/io/types.pyx | 13 +- .../_lib => pylibcudf}/pylibcudf/join.pxd | 2 +- .../_lib => pylibcudf}/pylibcudf/join.pyx | 9 +- .../pylibcudf/libcudf/CMakeLists.txt | 0 .../pylibcudf/libcudf/__init__.pxd | 0 .../pylibcudf/libcudf/__init__.py | 0 .../pylibcudf/libcudf/aggregation.pxd | 3 +- .../pylibcudf/libcudf/aggregation.pyx | 0 .../pylibcudf/libcudf/binaryop.pxd | 11 +- .../pylibcudf/libcudf/binaryop.pyx | 0 .../pylibcudf/libcudf/column/__init__.pxd | 0 .../pylibcudf/libcudf/column/__init__.py | 0 .../pylibcudf/libcudf/column/column.pxd | 9 +- .../libcudf/column/column_factories.pxd | 11 +- .../pylibcudf/libcudf/column/column_view.pxd | 7 +- .../pylibcudf/libcudf/concatenate.pxd | 7 +- .../pylibcudf/libcudf/contiguous_split.pxd | 5 +- .../pylibcudf/libcudf/copying.pxd | 19 +- .../pylibcudf/libcudf/copying.pyx | 0 .../pylibcudf/libcudf/datetime.pxd | 7 +- .../pylibcudf/libcudf/experimental.pxd | 0 .../pylibcudf/libcudf/expressions.pxd | 9 +- .../pylibcudf/libcudf/expressions.pyx | 0 .../pylibcudf/libcudf/filling.pxd | 13 +- .../pylibcudf/libcudf/groupby.pxd | 19 +- .../pylibcudf/libcudf/hash.pxd | 7 +- .../pylibcudf/libcudf/interop.pxd | 13 +- .../pylibcudf/libcudf/io/CMakeLists.txt | 0 .../pylibcudf/libcudf/io/__init__.pxd | 0 .../pylibcudf/libcudf/io/__init__.py | 0 .../pylibcudf/libcudf/io/arrow_io_source.pxd | 3 +- .../pylibcudf/libcudf/io/avro.pxd | 5 +- .../pylibcudf/libcudf/io/csv.pxd | 7 +- .../pylibcudf/libcudf/io/data_sink.pxd | 0 .../pylibcudf/libcudf/io/datasource.pxd | 0 .../pylibcudf/libcudf/io/json.pxd | 7 +- .../pylibcudf/libcudf/io/json.pyx | 0 .../pylibcudf/libcudf/io/orc.pxd | 7 +- .../pylibcudf/libcudf/io/orc_metadata.pxd | 5 +- .../pylibcudf/libcudf/io/parquet.pxd | 76 ++++---- .../pylibcudf/libcudf/io/parquet_metadata.pxd | 5 +- .../pylibcudf/libcudf/io/text.pxd | 3 +- .../pylibcudf/libcudf/io/timezone.pxd | 3 +- .../pylibcudf/libcudf/io/types.pxd | 11 +- .../pylibcudf/libcudf/io/types.pyx | 0 .../pylibcudf/libcudf/join.pxd | 9 +- .../pylibcudf/libcudf/labeling.pxd | 5 +- .../pylibcudf/libcudf/lists/__init__.pxd | 0 .../pylibcudf/libcudf/lists/__init__.py | 0 .../pylibcudf/libcudf/lists/combine.pxd | 7 +- .../pylibcudf/libcudf/lists/contains.pxd | 13 +- .../libcudf/lists/count_elements.pxd | 7 +- .../pylibcudf/libcudf/lists/explode.pxd | 7 +- .../pylibcudf/libcudf/lists/extract.pxd | 9 +- .../pylibcudf/libcudf/lists/filling.pxd | 5 +- .../pylibcudf/libcudf/lists/gather.pxd | 7 +- .../libcudf/lists/lists_column_view.pxd | 4 +- .../pylibcudf/libcudf/lists/reverse.pxd | 7 +- .../libcudf/lists/set_operations.pxd | 9 +- .../pylibcudf/libcudf/lists/sorting.pxd | 9 +- .../libcudf/lists/stream_compaction.pxd | 9 +- .../pylibcudf/libcudf/merge.pxd | 7 +- .../pylibcudf/libcudf/null_mask.pxd | 11 +- .../pylibcudf/libcudf/nvtext/__init__.pxd | 0 .../pylibcudf/libcudf/nvtext/__init__.py | 0 .../libcudf/nvtext/byte_pair_encode.pxd | 7 +- .../libcudf/nvtext/edit_distance.pxd | 5 +- .../libcudf/nvtext/generate_ngrams.pxd | 9 +- .../pylibcudf/libcudf/nvtext/jaccard.pxd | 7 +- .../pylibcudf/libcudf/nvtext/minhash.pxd | 7 +- .../libcudf/nvtext/ngrams_tokenize.pxd | 9 +- .../pylibcudf/libcudf/nvtext/normalize.pxd | 5 +- .../pylibcudf/libcudf/nvtext/replace.pxd | 9 +- .../pylibcudf/libcudf/nvtext/stemmer.pxd | 7 +- .../libcudf/nvtext/subword_tokenize.pxd | 5 +- .../pylibcudf/libcudf/nvtext/tokenize.pxd | 9 +- .../pylibcudf/libcudf/partitioning.pxd | 11 +- .../pylibcudf/libcudf/quantiles.pxd | 11 +- .../pylibcudf/libcudf/reduce.pxd | 14 +- .../pylibcudf/libcudf/reduce.pyx | 0 .../pylibcudf/libcudf/replace.pxd | 9 +- .../pylibcudf/libcudf/replace.pyx | 0 .../pylibcudf/libcudf/reshape.pxd | 9 +- .../pylibcudf/libcudf/rolling.pxd | 11 +- .../pylibcudf/libcudf/round.pxd | 5 +- .../pylibcudf/libcudf/round.pyx | 0 .../pylibcudf/libcudf/scalar/__init__.pxd | 0 .../pylibcudf/libcudf/scalar/__init__.py | 0 .../pylibcudf/libcudf/scalar/scalar.pxd | 9 +- .../libcudf/scalar/scalar_factories.pxd | 5 +- .../pylibcudf/libcudf/search.pxd | 9 +- .../pylibcudf/libcudf/sorting.pxd | 15 +- .../pylibcudf/libcudf/stream_compaction.pxd | 13 +- .../pylibcudf/libcudf/stream_compaction.pyx | 0 .../pylibcudf/libcudf/strings/CMakeLists.txt | 0 .../pylibcudf/libcudf/strings/__init__.pxd | 0 .../pylibcudf/libcudf/strings/__init__.py | 0 .../pylibcudf/libcudf/strings/attributes.pxd | 5 +- .../pylibcudf/libcudf/strings/capitalize.pxd | 11 +- .../pylibcudf/libcudf/strings/case.pxd | 5 +- .../pylibcudf/libcudf/strings/char_types.pxd | 7 +- .../pylibcudf/libcudf/strings/char_types.pyx | 0 .../pylibcudf/libcudf/strings/combine.pxd | 9 +- .../pylibcudf/libcudf/strings/contains.pxd | 9 +- .../libcudf/strings/convert/__init__.pxd | 0 .../libcudf/strings/convert/__init__.py | 0 .../strings/convert/convert_booleans.pxd | 7 +- .../strings/convert/convert_datetime.pxd | 7 +- .../strings/convert/convert_durations.pxd | 7 +- .../strings/convert/convert_fixed_point.pxd | 7 +- .../strings/convert/convert_floats.pxd | 7 +- .../strings/convert/convert_integers.pxd | 7 +- .../libcudf/strings/convert/convert_ipv4.pxd | 5 +- .../libcudf/strings/convert/convert_lists.pxd | 7 +- .../libcudf/strings/convert/convert_urls.pxd | 5 +- .../pylibcudf/libcudf/strings/extract.pxd | 14 ++ .../pylibcudf/libcudf/strings/find.pxd | 9 +- .../libcudf/strings/find_multiple.pxd | 5 +- .../pylibcudf/libcudf/strings/findall.pxd | 7 +- .../pylibcudf/libcudf/strings/json.pxd | 7 +- .../pylibcudf/libcudf/strings/padding.pxd | 11 +- .../pylibcudf/libcudf/strings/regex_flags.pxd | 0 .../pylibcudf/libcudf/strings/regex_flags.pyx | 0 .../libcudf/strings/regex_program.pxd | 3 +- .../pylibcudf/libcudf/strings/repeat.pxd | 7 +- .../pylibcudf/libcudf/strings/replace.pxd | 9 +- .../pylibcudf/libcudf/strings/replace_re.pxd | 13 +- .../pylibcudf/libcudf/strings/side_type.pxd | 0 .../libcudf/strings/split/__init__.pxd | 0 .../libcudf/strings/split/__init__.py | 0 .../libcudf/strings/split/partition.pxd | 9 +- .../pylibcudf/libcudf/strings/split/split.pxd | 13 +- .../pylibcudf/libcudf/strings/strip.pxd | 9 +- .../pylibcudf/libcudf/strings/substring.pxd | 9 +- .../pylibcudf/libcudf/strings/translate.pxd | 9 +- .../pylibcudf/libcudf/strings/wrap.pxd | 7 +- .../pylibcudf/libcudf/strings_udf.pxd | 7 +- .../pylibcudf/libcudf/table/__init__.pxd | 0 .../pylibcudf/libcudf/table/__init__.py | 0 .../pylibcudf/libcudf/table/table.pxd | 10 +- .../pylibcudf/libcudf/table/table_view.pxd | 5 +- .../pylibcudf/libcudf/transform.pxd | 17 +- .../pylibcudf/libcudf/transpose.pxd | 5 +- .../pylibcudf/libcudf/types.pxd | 0 .../pylibcudf/libcudf/types.pyx | 0 .../pylibcudf/libcudf/unary.pxd | 7 +- .../pylibcudf/libcudf/unary.pyx | 0 .../pylibcudf/libcudf/utilities/__init__.pxd | 0 .../pylibcudf/libcudf/utilities/__init__.py | 0 .../pylibcudf/libcudf/utilities/host_span.pxd | 0 .../pylibcudf/libcudf/utilities/traits.pxd | 3 +- .../libcudf/utilities/type_dispatcher.pxd | 2 +- .../pylibcudf/libcudf/wrappers/__init__.pxd | 0 .../pylibcudf/libcudf/wrappers/__init__.py | 0 .../pylibcudf/libcudf/wrappers/decimals.pxd | 3 +- .../pylibcudf/libcudf/wrappers/durations.pxd | 0 .../pylibcudf/libcudf/wrappers/timestamps.pxd | 0 .../_lib => pylibcudf}/pylibcudf/lists.pxd | 3 +- .../_lib => pylibcudf}/pylibcudf/lists.pyx | 29 ++- .../_lib => pylibcudf}/pylibcudf/merge.pxd | 0 .../_lib => pylibcudf}/pylibcudf/merge.pyx | 9 +- .../pylibcudf/quantiles.pxd | 3 +- .../pylibcudf/quantiles.pyx | 11 +- .../_lib => pylibcudf}/pylibcudf/reduce.pxd | 2 +- .../_lib => pylibcudf}/pylibcudf/reduce.pyx | 17 +- .../_lib => pylibcudf}/pylibcudf/replace.pxd | 3 +- .../_lib => pylibcudf}/pylibcudf/replace.pyx | 7 +- .../_lib => pylibcudf}/pylibcudf/reshape.pxd | 2 +- .../_lib => pylibcudf}/pylibcudf/reshape.pyx | 9 +- .../_lib => pylibcudf}/pylibcudf/rolling.pxd | 2 +- .../_lib => pylibcudf}/pylibcudf/rolling.pyx | 9 +- .../_lib => pylibcudf}/pylibcudf/round.pxd | 3 +- .../_lib => pylibcudf}/pylibcudf/round.pyx | 10 +- .../_lib => pylibcudf}/pylibcudf/scalar.pxd | 3 +- .../_lib => pylibcudf}/pylibcudf/scalar.pyx | 7 +- .../_lib => pylibcudf}/pylibcudf/search.pxd | 0 .../_lib => pylibcudf}/pylibcudf/search.pyx | 7 +- .../_lib => pylibcudf}/pylibcudf/sorting.pxd | 10 +- .../_lib => pylibcudf}/pylibcudf/sorting.pyx | 11 +- .../pylibcudf/stream_compaction.pxd | 6 +- .../pylibcudf/stream_compaction.pyx | 17 +- .../pylibcudf/strings/CMakeLists.txt | 0 .../pylibcudf/strings/__init__.pxd | 0 .../pylibcudf/strings/__init__.py | 0 .../pylibcudf/strings/capitalize.pxd | 4 +- .../pylibcudf/strings/capitalize.pyx | 15 +- .../pylibcudf/strings/case.pxd | 2 +- .../pylibcudf/strings/case.pyx | 7 +- .../pylibcudf/strings/char_types.pxd | 3 + .../pylibcudf/strings/char_types.pyx | 2 +- .../pylibcudf/pylibcudf/strings/contains.pxd | 7 + .../pylibcudf/strings/contains.pyx | 9 +- .../pylibcudf/strings/find.pxd | 6 +- .../pylibcudf/strings/find.pyx | 27 ++- .../pylibcudf/strings/regex_flags.pxd | 2 + .../pylibcudf/strings/regex_flags.pyx | 2 +- .../pylibcudf/strings/regex_program.pxd | 3 +- .../pylibcudf/strings/regex_program.pyx | 8 +- .../pylibcudf/strings/replace.pxd | 6 +- .../pylibcudf/strings/replace.pyx | 15 +- .../pylibcudf/strings/slice.pxd | 4 +- .../pylibcudf/strings/slice.pyx | 21 ++- .../_lib => pylibcudf}/pylibcudf/table.pxd | 5 +- .../_lib => pylibcudf}/pylibcudf/table.pyx | 7 +- .../pylibcudf/tests}/common/utils.py | 14 +- .../pylibcudf/tests}/conftest.py | 5 +- .../pylibcudf/tests}/io/test_avro.py | 3 +- .../pylibcudf/tests}/io/test_csv.py | 5 +- .../pylibcudf/tests}/io/test_json.py | 5 +- .../pylibcudf/tests}/io/test_parquet.py | 7 +- .../tests}/io/test_source_sink_info.py | 3 +- .../pylibcudf/tests}/pytest.ini | 0 .../pylibcudf/tests}/test_binaryops.py | 3 +- .../pylibcudf/tests}/test_column_factories.py | 3 +- .../tests}/test_column_from_device.py | 3 +- .../pylibcudf/tests}/test_copying.py | 3 +- .../pylibcudf/tests}/test_datetime.py | 6 +- .../pylibcudf/tests}/test_expressions.py | 3 +- .../pylibcudf/tests}/test_interop.py | 3 +- .../pylibcudf/tests}/test_join.py | 3 +- .../pylibcudf/tests}/test_lists.py | 6 +- .../pylibcudf/tests}/test_quantiles.py | 3 +- .../pylibcudf/tests}/test_regex_program.py | 3 +- .../pylibcudf/tests}/test_reshape.py | 3 +- .../pylibcudf/tests}/test_round.py | 8 +- .../tests}/test_string_capitalize.py | 10 +- .../pylibcudf/tests}/test_string_case.py | 10 +- .../pylibcudf/tests}/test_string_contains.py | 6 +- .../pylibcudf/tests}/test_string_find.py | 8 +- .../pylibcudf/tests}/test_string_replace.py | 8 +- .../pylibcudf/tests}/test_string_slice.py | 3 +- .../pylibcudf/tests}/test_table.py | 3 +- .../pylibcudf/tests}/test_traits.py | 2 +- .../pylibcudf/tests}/test_transform.py | 3 +- .../pylibcudf/tests}/test_unary.py | 2 +- .../_lib => pylibcudf}/pylibcudf/traits.pxd | 0 .../_lib => pylibcudf}/pylibcudf/traits.pyx | 3 +- .../pylibcudf/transform.pxd | 0 .../pylibcudf/transform.pyx | 5 +- .../_lib => pylibcudf}/pylibcudf/types.pxd | 3 +- .../_lib => pylibcudf}/pylibcudf/types.pyx | 27 ++- .../_lib => pylibcudf}/pylibcudf/unary.pxd | 3 +- .../_lib => pylibcudf}/pylibcudf/unary.pyx | 9 +- .../_lib => pylibcudf}/pylibcudf/utils.pxd | 5 +- .../_lib => pylibcudf}/pylibcudf/utils.pyx | 5 +- .../_lib => pylibcudf/pylibcudf}/variant.pxd | 0 python/pylibcudf/pyproject.toml | 123 +++++++++++++ 475 files changed, 1916 insertions(+), 1522 deletions(-) create mode 100755 ci/build_wheel_pylibcudf.sh create mode 100644 conda/recipes/pylibcudf/build.sh create mode 100644 conda/recipes/pylibcudf/conda_build_config.yaml create mode 100644 conda/recipes/pylibcudf/meta.yaml delete mode 100644 python/cudf/cudf/_lib/pylibcudf/io/avro.pxd delete mode 100644 python/cudf/cudf/_lib/pylibcudf/libcudf/strings/extract.pxd delete mode 100644 python/cudf/cudf/_lib/pylibcudf/strings/char_types.pxd delete mode 100644 python/cudf/cudf/_lib/pylibcudf/strings/contains.pxd delete mode 100644 python/cudf/cudf/_lib/pylibcudf/strings/regex_flags.pxd create mode 100644 python/pylibcudf/CMakeLists.txt create mode 120000 python/pylibcudf/README.md rename python/{cudf => pylibcudf}/cmake/Modules/LinkPyarrowHeaders.cmake (100%) rename python/{cudf => pylibcudf}/cmake/Modules/WheelHelpers.cmake (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/CMakeLists.txt (96%) create mode 120000 python/pylibcudf/pylibcudf/VERSION rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/__init__.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/__init__.py (99%) create mode 100644 python/pylibcudf/pylibcudf/_version.py rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/aggregation.pxd (96%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/aggregation.pyx (96%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/binaryop.pxd (90%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/binaryop.pyx (86%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/column.pxd (84%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/column.pyx (98%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/column_factories.pxd (92%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/column_factories.pyx (96%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/concatenate.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/concatenate.pyx (80%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/copying.pxd (94%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/copying.pyx (96%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/datetime.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/datetime.pyx (78%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/exception_handler.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/experimental.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/experimental.pyx (92%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/expressions.pxd (91%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/expressions.pyx (94%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/filling.pxd (90%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/filling.pyx (94%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/gpumemoryview.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/gpumemoryview.pyx (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/groupby.pxd (87%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/groupby.pyx (96%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/interop.pyx (98%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/io/CMakeLists.txt (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/io/__init__.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/io/__init__.py (100%) create mode 100644 python/pylibcudf/pylibcudf/io/avro.pxd rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/io/avro.pyx (89%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/io/csv.pyx (97%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/io/datasource.pxd (69%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/io/datasource.pyx (87%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/io/json.pxd (85%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/io/json.pyx (95%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/io/parquet.pxd (72%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/io/parquet.pyx (93%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/io/types.pxd (87%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/io/types.pyx (96%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/join.pxd (91%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/join.pyx (95%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/CMakeLists.txt (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/__init__.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/__init__.py (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/aggregation.pxd (98%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/aggregation.pyx (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/binaryop.pxd (85%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/binaryop.pyx (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/column/__init__.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/column/__init__.py (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/column/column.pxd (87%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/column/column_factories.pxd (93%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/column/column_view.pxd (97%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/concatenate.pxd (77%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/contiguous_split.pxd (85%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/copying.pxd (90%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/copying.pyx (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/datetime.pxd (92%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/experimental.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/expressions.pxd (90%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/expressions.pyx (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/filling.pxd (74%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/groupby.pxd (83%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/hash.pxd (86%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/interop.pxd (87%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/io/CMakeLists.txt (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/io/__init__.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/io/__init__.py (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/io/arrow_io_source.pxd (86%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/io/avro.pxd (91%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/io/csv.pxd (98%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/io/data_sink.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/io/datasource.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/io/json.pxd (96%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/io/json.pyx (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/io/orc.pxd (97%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/io/orc_metadata.pxd (94%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/io/parquet.pxd (80%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/io/parquet_metadata.pxd (89%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/io/text.pxd (96%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/io/timezone.pxd (86%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/io/types.pxd (92%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/io/types.pyx (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/join.pxd (88%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/labeling.pxd (78%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/lists/__init__.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/lists/__init__.py (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/lists/combine.pxd (78%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/lists/contains.pxd (75%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/lists/count_elements.pxd (61%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/lists/explode.pxd (59%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/lists/extract.pxd (64%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/lists/filling.pxd (76%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/lists/gather.pxd (67%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/lists/lists_column_view.pxd (86%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/lists/reverse.pxd (62%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/lists/set_operations.pxd (81%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/lists/sorting.pxd (69%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/lists/stream_compaction.pxd (68%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/merge.pxd (69%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/null_mask.pxd (80%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/nvtext/__init__.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/nvtext/__init__.py (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/nvtext/byte_pair_encode.pxd (73%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/nvtext/edit_distance.pxd (75%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/nvtext/generate_ngrams.pxd (69%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/nvtext/jaccard.pxd (61%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/nvtext/minhash.pxd (70%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/nvtext/ngrams_tokenize.pxd (58%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/nvtext/normalize.pxd (75%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/nvtext/replace.pxd (69%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/nvtext/stemmer.pxd (79%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/nvtext/subword_tokenize.pxd (92%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/nvtext/tokenize.pxd (84%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/partitioning.pxd (69%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/quantiles.pxd (70%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/reduce.pxd (69%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/reduce.pyx (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/replace.pxd (83%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/replace.pyx (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/reshape.pxd (57%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/rolling.pxd (64%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/round.pxd (75%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/round.pyx (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/scalar/__init__.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/scalar/__init__.py (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/scalar/scalar.pxd (91%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/scalar/scalar_factories.pxd (76%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/search.pxd (73%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/sorting.pxd (84%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/stream_compaction.pxd (85%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/stream_compaction.pyx (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/CMakeLists.txt (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/__init__.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/__init__.py (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/attributes.pxd (76%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/capitalize.pxd (63%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/case.pxd (81%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/char_types.pxd (82%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/char_types.pyx (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/combine.pxd (83%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/contains.pxd (69%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/convert/__init__.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/convert/__init__.py (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/convert/convert_booleans.pxd (69%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/convert/convert_datetime.pxd (76%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/convert/convert_durations.pxd (72%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/convert/convert_fixed_point.pxd (73%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/convert/convert_floats.pxd (71%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/convert/convert_integers.pxd (80%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/convert/convert_ipv4.pxd (76%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/convert/convert_lists.pxd (62%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/convert/convert_urls.pxd (72%) create mode 100644 python/pylibcudf/pylibcudf/libcudf/strings/extract.pxd rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/find.pxd (83%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/find_multiple.pxd (68%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/findall.pxd (56%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/json.pxd (79%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/padding.pxd (59%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/regex_flags.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/regex_flags.pyx (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/regex_program.pxd (84%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/repeat.pxd (67%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/replace.pxd (73%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/replace_re.pxd (63%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/side_type.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/split/__init__.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/split/__init__.py (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/split/partition.pxd (63%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/split/split.pxd (78%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/strip.pxd (52%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/substring.pxd (66%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/translate.pxd (73%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings/wrap.pxd (58%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/strings_udf.pxd (85%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/table/__init__.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/table/__init__.py (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/table/table.pxd (69%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/table/table_view.pxd (87%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/transform.pxd (73%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/transpose.pxd (69%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/types.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/types.pyx (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/unary.pxd (85%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/unary.pyx (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/utilities/__init__.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/utilities/__init__.py (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/utilities/host_span.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/utilities/traits.pxd (93%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/utilities/type_dispatcher.pxd (73%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/wrappers/__init__.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/wrappers/__init__.py (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/wrappers/decimals.pxd (90%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/wrappers/durations.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/libcudf/wrappers/timestamps.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/lists.pxd (94%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/lists.pyx (95%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/merge.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/merge.pyx (83%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/quantiles.pxd (86%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/quantiles.pyx (93%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/reduce.pxd (85%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/reduce.pyx (85%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/replace.pxd (92%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/replace.pyx (97%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/reshape.pxd (80%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/reshape.pyx (86%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/rolling.pxd (85%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/rolling.pyx (89%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/round.pxd (77%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/round.pyx (85%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/scalar.pxd (92%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/scalar.pyx (94%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/search.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/search.pyx (93%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/sorting.pxd (87%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/sorting.pyx (96%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/stream_compaction.pxd (89%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/stream_compaction.pyx (95%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/strings/CMakeLists.txt (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/strings/__init__.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/strings/__init__.py (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/strings/capitalize.pxd (64%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/strings/capitalize.pyx (84%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/strings/case.pxd (76%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/strings/case.pyx (79%) create mode 100644 python/pylibcudf/pylibcudf/strings/char_types.pxd rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/strings/char_types.pyx (64%) create mode 100644 python/pylibcudf/pylibcudf/strings/contains.pxd rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/strings/contains.pyx (75%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/strings/find.pxd (77%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/strings/find.pyx (90%) create mode 100644 python/pylibcudf/pylibcudf/strings/regex_flags.pxd rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/strings/regex_flags.pyx (59%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/strings/regex_program.pxd (70%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/strings/regex_program.pyx (84%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/strings/replace.pxd (71%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/strings/replace.pyx (90%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/strings/slice.pxd (69%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/strings/slice.pyx (81%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/table.pxd (78%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/table.pyx (93%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/common/utils.py (97%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/conftest.py (98%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/io/test_avro.py (98%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/io/test_csv.py (98%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/io/test_json.py (99%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/io/test_parquet.py (97%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/io/test_source_sink_info.py (98%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/pytest.ini (100%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_binaryops.py (99%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_column_factories.py (99%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_column_from_device.py (97%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_copying.py (99%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_datetime.py (83%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_expressions.py (97%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_interop.py (98%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_join.py (94%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_lists.py (99%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_quantiles.py (99%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_regex_program.py (89%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_reshape.py (96%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_round.py (86%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_string_capitalize.py (86%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_string_case.py (80%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_string_contains.py (92%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_string_find.py (97%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_string_replace.py (95%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_string_slice.py (98%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_table.py (93%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_traits.py (98%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_transform.py (95%) rename python/{cudf/cudf/pylibcudf_tests => pylibcudf/pylibcudf/tests}/test_unary.py (93%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/traits.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/traits.pyx (98%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/transform.pxd (100%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/transform.pyx (87%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/types.pxd (91%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/types.pyx (66%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/unary.pxd (87%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/unary.pyx (94%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/utils.pxd (71%) rename python/{cudf/cudf/_lib => pylibcudf}/pylibcudf/utils.pyx (93%) rename python/{cudf/cudf/_lib => pylibcudf/pylibcudf}/variant.pxd (100%) create mode 100644 python/pylibcudf/pyproject.toml diff --git a/.github/labeler.yml b/.github/labeler.yml index 48967417af3..90cdda4d3ca 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -12,7 +12,7 @@ cudf.polars: - 'python/cudf_polars/**' pylibcudf: - - 'python/cudf/cudf/_lib/pylibcudf/**' + - 'python/cudf/pylibcudf/**' libcudf: - 'cpp/**' diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index ea8a1762b2c..74bdc666c68 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -23,6 +23,7 @@ jobs: - static-configure - conda-notebook-tests - docs-build + - wheel-build-pylibcudf - wheel-build-cudf - wheel-tests-cudf - wheel-build-cudf-polars @@ -120,10 +121,17 @@ jobs: arch: "amd64" container_image: "rapidsai/ci-conda:latest" run_script: "ci/build_docs.sh" - wheel-build-cudf: + wheel-build-pylibcudf: needs: checks secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.10 + with: + build_type: pull-request + script: "ci/build_wheel_pylibcudf.sh" + wheel-build-cudf: + needs: wheel-build-pylibcudf + secrets: inherit + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.10 with: build_type: pull-request script: "ci/build_wheel_cudf.sh" @@ -135,7 +143,7 @@ jobs: build_type: pull-request script: ci/test_wheel_cudf.sh wheel-build-cudf-polars: - needs: wheel-build-cudf + needs: wheel-build-pylibcudf secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.10 with: diff --git a/build.sh b/build.sh index 52bb1e64d16..957f41aedac 100755 --- a/build.sh +++ b/build.sh @@ -17,11 +17,12 @@ ARGS=$* # script, and that this script resides in the repo dir! REPODIR=$(cd $(dirname $0); pwd) -VALIDARGS="clean libcudf cudf cudfjar dask_cudf benchmarks tests libcudf_kafka cudf_kafka custreamz -v -g -n --pydevelop -l --allgpuarch --disable_nvtx --opensource_nvcomp --show_depr_warn --ptds -h --build_metrics --incl_cache_stats --disable_large_strings" -HELP="$0 [clean] [libcudf] [cudf] [cudfjar] [dask_cudf] [benchmarks] [tests] [libcudf_kafka] [cudf_kafka] [custreamz] [-v] [-g] [-n] [-h] [--cmake-args=\\\"\\\"] +VALIDARGS="clean libcudf pylibcudf cudf cudfjar dask_cudf benchmarks tests libcudf_kafka cudf_kafka custreamz -v -g -n --pydevelop -l --allgpuarch --disable_nvtx --opensource_nvcomp --show_depr_warn --ptds -h --build_metrics --incl_cache_stats --disable_large_strings" +HELP="$0 [clean] [libcudf] [pylibcudf] [cudf] [cudfjar] [dask_cudf] [benchmarks] [tests] [libcudf_kafka] [cudf_kafka] [custreamz] [-v] [-g] [-n] [-h] [--cmake-args=\\\"\\\"] clean - remove all existing build artifacts and configuration (start over) libcudf - build the cudf C++ code only + pylibcudf - build the pylibcudf Python package cudf - build the cudf Python package cudfjar - build cudf JAR with static libcudf using devtoolset toolchain dask_cudf - build the dask_cudf Python package @@ -268,7 +269,7 @@ fi ################################################################################ # Configure, build, and install libcudf -if buildAll || hasArg libcudf || hasArg cudf || hasArg cudfjar; then +if buildAll || hasArg libcudf || hasArg pylibcudf || hasArg cudf || hasArg cudfjar; then if (( ${BUILD_ALL_GPU_ARCH} == 0 )); then CUDF_CMAKE_CUDA_ARCHITECTURES="${CUDF_CMAKE_CUDA_ARCHITECTURES:-NATIVE}" if [[ "$CUDF_CMAKE_CUDA_ARCHITECTURES" == "NATIVE" ]]; then @@ -340,6 +341,14 @@ if buildAll || hasArg libcudf; then fi fi +# Build and install the pylibcudf Python package +if buildAll || hasArg pylibcudf; then + + cd ${REPODIR}/python/pylibcudf + SKBUILD_CMAKE_ARGS="-DCMAKE_PREFIX_PATH=${INSTALL_PREFIX};-DCMAKE_LIBRARY_PATH=${LIBCUDF_BUILD_DIR};-DCMAKE_CUDA_ARCHITECTURES=${CUDF_CMAKE_CUDA_ARCHITECTURES};${EXTRA_CMAKE_ARGS}" \ + python ${PYTHON_ARGS_FOR_INSTALL} . +fi + # Build and install the cudf Python package if buildAll || hasArg cudf; then diff --git a/ci/build_docs.sh b/ci/build_docs.sh index 14dc7a59048..c67d127e635 100755 --- a/ci/build_docs.sh +++ b/ci/build_docs.sh @@ -29,7 +29,7 @@ PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python) rapids-mamba-retry install \ --channel "${CPP_CHANNEL}" \ --channel "${PYTHON_CHANNEL}" \ - libcudf cudf dask-cudf + libcudf pylibcudf cudf dask-cudf export RAPIDS_DOCS_DIR="$(mktemp -d)" diff --git a/ci/build_python.sh b/ci/build_python.sh index 79e09432779..2e3f70ba767 100755 --- a/ci/build_python.sh +++ b/ci/build_python.sh @@ -22,9 +22,16 @@ CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) # TODO: Remove `--no-test` flag once importing on a CPU # node works correctly # With boa installed conda build forwards to the boa builder + +RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \ + --no-test \ + --channel "${CPP_CHANNEL}" \ + conda/recipes/pylibcudf + RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \ --no-test \ --channel "${CPP_CHANNEL}" \ + --channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \ conda/recipes/cudf RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \ diff --git a/ci/build_wheel_cudf.sh b/ci/build_wheel_cudf.sh index 1b563bc499c..7c0fb1efebe 100755 --- a/ci/build_wheel_cudf.sh +++ b/ci/build_wheel_cudf.sh @@ -7,10 +7,14 @@ package_dir="python/cudf" export SKBUILD_CMAKE_ARGS="-DUSE_LIBARROW_FROM_PYARROW=ON" +# Download the pylibcudf built in the previous step +RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" +RAPIDS_PY_WHEEL_NAME="pylibcudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 /tmp/pylibcudf_dist + +echo "pylibcudf-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo /tmp/pylibcudf_dist/pylibcudf_*.whl)" > /tmp/constraints.txt +export PIP_CONSTRAINT="/tmp/constraints.txt" ./ci/build_wheel.sh ${package_dir} python -m auditwheel repair -w ${package_dir}/final_dist ${package_dir}/dist/* - -RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" RAPIDS_PY_WHEEL_NAME="cudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 ${package_dir}/final_dist diff --git a/ci/build_wheel_pylibcudf.sh b/ci/build_wheel_pylibcudf.sh new file mode 100755 index 00000000000..b25d118ff81 --- /dev/null +++ b/ci/build_wheel_pylibcudf.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Copyright (c) 2023-2024, NVIDIA CORPORATION. + +set -euo pipefail + +package_dir="python/pylibcudf" + +export SKBUILD_CMAKE_ARGS="-DUSE_LIBARROW_FROM_PYARROW=ON" + +./ci/build_wheel.sh ${package_dir} + +python -m auditwheel repair -w ${package_dir}/final_dist ${package_dir}/dist/* + + +RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" +RAPIDS_PY_WHEEL_NAME="pylibcudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 ${package_dir}/final_dist diff --git a/ci/cudf_pandas_scripts/pandas-tests/run.sh b/ci/cudf_pandas_scripts/pandas-tests/run.sh index 48ee4a05628..8deaeab78a3 100755 --- a/ci/cudf_pandas_scripts/pandas-tests/run.sh +++ b/ci/cudf_pandas_scripts/pandas-tests/run.sh @@ -11,7 +11,9 @@ rapids-logger "Running Pandas tests using $PANDAS_TESTS_BRANCH branch and rapids rapids-logger "PR number: ${RAPIDS_REF_NAME:-"unknown"}" RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" +RAPIDS_PY_WHEEL_NAME="pylibcudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-pylibcudf-dep RAPIDS_PY_WHEEL_NAME="cudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-cudf-dep +python -m pip install $(ls ./local-pylibcudf-dep/pylibcudf*.whl) python -m pip install $(ls ./local-cudf-dep/cudf*.whl)[test,pandas-tests] RESULTS_DIR=${RAPIDS_TESTS_DIR:-"$(mktemp -d)"} diff --git a/ci/cudf_pandas_scripts/run_tests.sh b/ci/cudf_pandas_scripts/run_tests.sh index 1c3b99953fb..bfb655db3ca 100755 --- a/ci/cudf_pandas_scripts/run_tests.sh +++ b/ci/cudf_pandas_scripts/run_tests.sh @@ -36,7 +36,9 @@ if [ "$no_cudf" = true ]; then echo "Skipping cudf install" else RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" + RAPIDS_PY_WHEEL_NAME="pylibcudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-pylibcudf-dep RAPIDS_PY_WHEEL_NAME="cudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-cudf-dep + python -m pip install $(ls ./local-pylibcudf-dep/pylibcudf*.whl) python -m pip install $(ls ./local-cudf-dep/cudf*.whl)[test,cudf-pandas-tests] fi diff --git a/ci/test_python_cudf.sh b/ci/test_python_cudf.sh index 217dd2fd9a8..ae34047e87f 100755 --- a/ci/test_python_cudf.sh +++ b/ci/test_python_cudf.sh @@ -15,7 +15,7 @@ trap "EXITCODE=1" ERR set +e rapids-logger "pytest pylibcudf" -pushd python/cudf/cudf/pylibcudf_tests +pushd python/pylibcudf/pylibcudf/tests python -m pytest \ --cache-clear \ --dist=worksteal \ diff --git a/ci/test_wheel_cudf.sh b/ci/test_wheel_cudf.sh index fdb61278d36..5a2c3ccac8f 100755 --- a/ci/test_wheel_cudf.sh +++ b/ci/test_wheel_cudf.sh @@ -3,11 +3,15 @@ set -eou pipefail +# Download the pylibcudf built in the previous step RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" +RAPIDS_PY_WHEEL_NAME="pylibcudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-pylibcudf-dep RAPIDS_PY_WHEEL_NAME="cudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./dist -# echo to expand wildcard before adding `[extra]` requires for pip -python -m pip install $(echo ./dist/cudf*.whl)[test] +# Install both pylibcudf and cudf +python -m pip install \ + "$(echo ./local-pylibcudf-dep/pylibcudf*.whl)[test]" \ + "$(echo ./dist/cudf*.whl)[test]" RESULTS_DIR=${RAPIDS_TESTS_DIR:-"$(mktemp -d)"} RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${RESULTS_DIR}/test-results"}/ @@ -15,7 +19,7 @@ mkdir -p "${RAPIDS_TESTS_DIR}" rapids-logger "pytest pylibcudf" -pushd python/cudf/cudf/pylibcudf_tests +pushd python/pylibcudf/pylibcudf/tests python -m pytest \ --cache-clear \ --dist=worksteal \ diff --git a/ci/test_wheel_cudf_polars.sh b/ci/test_wheel_cudf_polars.sh index cc9f5788685..357d4170d47 100755 --- a/ci/test_wheel_cudf_polars.sh +++ b/ci/test_wheel_cudf_polars.sh @@ -10,7 +10,7 @@ set -eou pipefail # files in cudf_polars/pylibcudf", rather than "are there changes # between upstream and this branch which touch cudf_polars/pylibcudf" # TODO: is the target branch exposed anywhere in an environment variable? -if [ -n "$(git diff --name-only origin/branch-24.10...HEAD -- python/cudf_polars/ python/cudf/cudf/_lib/pylibcudf/)" ]; +if [ -n "$(git diff --name-only origin/branch-24.10...HEAD -- python/cudf_polars/ python/pylibcudf/)" ]; then HAS_CHANGES=1 else @@ -21,8 +21,8 @@ RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" RAPIDS_PY_WHEEL_NAME="cudf_polars_${RAPIDS_PY_CUDA_SUFFIX}" RAPIDS_PY_WHEEL_PURE="1" rapids-download-wheels-from-s3 ./dist # Download the cudf built in the previous step -RAPIDS_PY_WHEEL_NAME="cudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-cudf-dep -python -m pip install ./local-cudf-dep/cudf*.whl +RAPIDS_PY_WHEEL_NAME="pylibcudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-pylibcudf-dep +python -m pip install ./local-pylibcudf-dep/pylibcudf*.whl rapids-logger "Install cudf_polars" python -m pip install $(echo ./dist/cudf_polars*.whl)[test] diff --git a/ci/test_wheel_dask_cudf.sh b/ci/test_wheel_dask_cudf.sh index c3800d3cc25..4d045472604 100755 --- a/ci/test_wheel_dask_cudf.sh +++ b/ci/test_wheel_dask_cudf.sh @@ -7,8 +7,11 @@ RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" RAPIDS_PY_WHEEL_NAME="dask_cudf_${RAPIDS_PY_CUDA_SUFFIX}" RAPIDS_PY_WHEEL_PURE="1" rapids-download-wheels-from-s3 ./dist # Download the cudf built in the previous step +RAPIDS_PY_WHEEL_NAME="pylibcudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-pylibcudf-dep RAPIDS_PY_WHEEL_NAME="cudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-cudf-dep -python -m pip install ./local-cudf-dep/cudf*.whl +python -m pip install \ + "$(echo ./local-pylibcudf-dep/pylibcudf*.whl)" \ + "$(echo ./local-cudf-dep/cudf*.whl)" # echo to expand wildcard before adding `[extra]` requires for pip python -m pip install $(echo ./dist/dask_cudf*.whl)[test] diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index 8d5fc2e31d9..d0d18e57abc 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -56,12 +56,14 @@ dependencies: - ninja - notebook - numba>=0.57 +- numpy - numpy>=1.23,<2.0a0 - numpydoc - nvcc_linux-64=11.8 - nvcomp==3.0.6 - nvtx>=0.2.1 - packaging +- pandas - pandas>=2.0,<2.2.3dev0 - pandoc - pip diff --git a/conda/environments/all_cuda-125_arch-x86_64.yaml b/conda/environments/all_cuda-125_arch-x86_64.yaml index 7b0485d7f29..caf39a32d79 100644 --- a/conda/environments/all_cuda-125_arch-x86_64.yaml +++ b/conda/environments/all_cuda-125_arch-x86_64.yaml @@ -55,11 +55,13 @@ dependencies: - ninja - notebook - numba>=0.57 +- numpy - numpy>=1.23,<2.0a0 - numpydoc - nvcomp==3.0.6 - nvtx>=0.2.1 - packaging +- pandas - pandas>=2.0,<2.2.3dev0 - pandoc - pip diff --git a/conda/recipes/cudf/meta.yaml b/conda/recipes/cudf/meta.yaml index 8d7ef63715b..7e86147732e 100644 --- a/conda/recipes/cudf/meta.yaml +++ b/conda/recipes/cudf/meta.yaml @@ -68,6 +68,7 @@ requirements: - numpy 1.23 - pyarrow ==16.1.0.* - libcudf ={{ version }} + - pylibcudf ={{ version }} - rmm ={{ minor_version }} {% if cuda_major == "11" %} - cudatoolkit @@ -87,6 +88,7 @@ requirements: - numpy >=1.23,<2.0a0 - {{ pin_compatible('pyarrow', max_pin='x.x') }} - libcudf ={{ version }} + - pylibcudf ={{ version }} - {{ pin_compatible('rmm', max_pin='x.x') }} - fsspec >=0.6.0 {% if cuda_major == "11" %} diff --git a/conda/recipes/cudf_kafka/meta.yaml b/conda/recipes/cudf_kafka/meta.yaml index 748a32e5518..d04d9b21a46 100644 --- a/conda/recipes/cudf_kafka/meta.yaml +++ b/conda/recipes/cudf_kafka/meta.yaml @@ -58,7 +58,7 @@ requirements: - python - cython >=3.0.3 - cuda-version ={{ cuda_version }} - - cudf ={{ version }} + - pylibcudf ={{ version }} - libcudf_kafka ={{ version }} - rapids-build-backend >=0.3.0,<0.4.0.dev0 - scikit-build-core >=0.10.0 @@ -69,7 +69,7 @@ requirements: - python - {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }} - libcudf_kafka ={{ version }} - - cudf ={{ version }} + - pylibcudf ={{ version }} {% if cuda_major != "11" %} - cuda-cudart {% endif %} diff --git a/conda/recipes/pylibcudf/build.sh b/conda/recipes/pylibcudf/build.sh new file mode 100644 index 00000000000..483346504db --- /dev/null +++ b/conda/recipes/pylibcudf/build.sh @@ -0,0 +1,4 @@ +# Copyright (c) 2018-2024, NVIDIA CORPORATION. + +# This assumes the script is executed from the root of the repo directory +./build.sh pylibcudf diff --git a/conda/recipes/pylibcudf/conda_build_config.yaml b/conda/recipes/pylibcudf/conda_build_config.yaml new file mode 100644 index 00000000000..af894cccda0 --- /dev/null +++ b/conda/recipes/pylibcudf/conda_build_config.yaml @@ -0,0 +1,20 @@ +c_compiler_version: + - 11 + +cxx_compiler_version: + - 11 + +c_stdlib: + - sysroot + +c_stdlib_version: + - "2.17" + +cmake_version: + - ">=3.26.4,!=3.30.0" + +cuda_compiler: + - cuda-nvcc + +cuda11_compiler: + - nvcc diff --git a/conda/recipes/pylibcudf/meta.yaml b/conda/recipes/pylibcudf/meta.yaml new file mode 100644 index 00000000000..f405fd10f5d --- /dev/null +++ b/conda/recipes/pylibcudf/meta.yaml @@ -0,0 +1,108 @@ +# Copyright (c) 2018-2024, NVIDIA CORPORATION. + +{% set version = environ['RAPIDS_PACKAGE_VERSION'].lstrip('v') %} +{% set minor_version = version.split('.')[0] + '.' + version.split('.')[1] %} +{% set py_version = environ['CONDA_PY'] %} +{% set cuda_version = '.'.join(environ['RAPIDS_CUDA_VERSION'].split('.')[:2]) %} +{% set cuda_major = cuda_version.split('.')[0] %} +{% set date_string = environ['RAPIDS_DATE_STRING'] %} + +package: + name: pylibcudf + version: {{ version }} + +source: + path: ../../.. + +build: + number: {{ GIT_DESCRIBE_NUMBER }} + string: cuda{{ cuda_major }}_py{{ py_version }}_{{ date_string }}_{{ GIT_DESCRIBE_HASH }}_{{ GIT_DESCRIBE_NUMBER }} + script_env: + - AWS_ACCESS_KEY_ID + - AWS_SECRET_ACCESS_KEY + - AWS_SESSION_TOKEN + - CMAKE_C_COMPILER_LAUNCHER + - CMAKE_CUDA_COMPILER_LAUNCHER + - CMAKE_CXX_COMPILER_LAUNCHER + - CMAKE_GENERATOR + - PARALLEL_LEVEL + - SCCACHE_BUCKET + - SCCACHE_IDLE_TIMEOUT + - SCCACHE_REGION + - SCCACHE_S3_KEY_PREFIX=pylibcudf-aarch64 # [aarch64] + - SCCACHE_S3_KEY_PREFIX=pylibcudf-linux64 # [linux64] + - SCCACHE_S3_USE_SSL + - SCCACHE_S3_NO_CREDENTIALS + ignore_run_exports: + # libcudf's run_exports pinning is looser than we would like + - libcudf + ignore_run_exports_from: + {% if cuda_major == "11" %} + - {{ compiler('cuda11') }} + {% else %} + - {{ compiler('cuda') }} + - cuda-cudart-dev + - libcufile-dev # [linux64] + {% endif %} + +requirements: + build: + - cmake {{ cmake_version }} + - ninja + - {{ compiler('c') }} + - {{ compiler('cxx') }} + {% if cuda_major == "11" %} + - {{ compiler('cuda11') }} ={{ cuda_version }} + {% else %} + - {{ compiler('cuda') }} + {% endif %} + - cuda-version ={{ cuda_version }} + - {{ stdlib("c") }} + host: + - python + - cython >=3.0.3 + - rapids-build-backend >=0.3.0,<0.4.0.dev0 + - scikit-build-core >=0.10.0 + - dlpack >=0.8,<1.0 + # TODO: Change to `2.0` for NumPy 2 + - numpy 1.23 + - pyarrow ==16.1.0.* + - libcudf ={{ version }} + - rmm ={{ minor_version }} + {% if cuda_major == "11" %} + - cudatoolkit + {% else %} + - cuda-cudart-dev + - cuda-nvrtc + - libcufile-dev # [linux64] + {% endif %} + - cuda-version ={{ cuda_version }} + run: + - python + - typing_extensions >=4.0.0 + - pandas >=2.0,<2.2.3dev0 + # TODO: Update `numpy` in `host` when dropping `<2.0a0` + - numpy >=1.23,<2.0a0 + - {{ pin_compatible('pyarrow', max_pin='x.x') }} + - {{ pin_compatible('rmm', max_pin='x.x') }} + - fsspec >=0.6.0 + {% if cuda_major == "11" %} + - cuda-python >=11.7.1,<12.0a0 + {% else %} + - cuda-python >=12.0,<13.0a0 + {% endif %} + - nvtx >=0.2.1 + - packaging + +test: + requires: + - cuda-version ={{ cuda_version }} + imports: + - pylibcudf + +about: + home: https://rapids.ai/ + license: Apache-2.0 + license_family: APACHE + license_file: LICENSE + summary: pylibcudf library diff --git a/dependencies.yaml b/dependencies.yaml index b0d62a9fb0d..ca615905a15 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -10,6 +10,7 @@ files: - build_all - build_cpp - build_python_common + - build_python_pylibcudf - build_python_cudf - cuda - cuda_version @@ -22,12 +23,14 @@ files: - rapids_build_setuptools - run_common - run_cudf + - run_pylibcudf - run_dask_cudf - run_custreamz - test_cpp - test_python_common - test_python_cudf - test_python_dask_cudf + - test_python_pylibcudf - depends_on_cupy test_static_build: output: none @@ -76,14 +79,14 @@ files: - docs - libarrow_run - py_version - py_rapids_build_cudf: + py_build_cudf: output: pyproject pyproject_dir: python/cudf extras: table: build-system includes: - rapids_build_skbuild - py_build_cudf: + py_rapids_build_cudf: output: pyproject pyproject_dir: python/cudf extras: @@ -93,6 +96,7 @@ files: - build_base - build_python_common - build_python_cudf + - pylibcudf_build_dep py_run_cudf: output: pyproject pyproject_dir: python/cudf @@ -103,6 +107,7 @@ files: - run_cudf - pyarrow_run - depends_on_cupy + - depends_on_pylibcudf py_test_cudf: output: pyproject pyproject_dir: python/cudf @@ -112,6 +117,40 @@ files: includes: - test_python_common - test_python_cudf + py_rapids_build_pylibcudf: + output: pyproject + pyproject_dir: python/pylibcudf + extras: + table: build-system + includes: + - rapids_build_skbuild + py_build_pylibcudf: + output: pyproject + pyproject_dir: python/pylibcudf + extras: + table: tool.rapids-build-backend + key: requires + includes: + - build_base + - build_python_common + - build_python_pylibcudf + py_run_pylibcudf: + output: pyproject + pyproject_dir: python/pylibcudf + extras: + table: project + includes: + - run_pylibcudf + - pyarrow_run + py_test_pylibcudf: + output: pyproject + pyproject_dir: python/pylibcudf + extras: + table: project.optional-dependencies + key: test + includes: + - test_python_common + - test_python_pylibcudf py_test_pandas_cudf: output: pyproject pyproject_dir: python/cudf @@ -142,7 +181,7 @@ files: table: project includes: - run_cudf_polars - - depends_on_cudf + - depends_on_pylibcudf py_test_cudf_polars: output: pyproject pyproject_dir: python/cudf_polars @@ -326,11 +365,36 @@ dependencies: # Sync with conda build constraint & wheel run constraint. # TODO: Change to `2.0.*` for NumPy 2 - numpy==1.23.* - build_python_cudf: + build_python_pylibcudf: common: - output_types: conda packages: - &rmm_unsuffixed rmm==24.10.*,>=0.0.0a0 + - output_types: requirements + packages: + # pip recognizes the index as a global option for the requirements.txt file + # This index is needed for rmm-cu{11,12}. + - --extra-index-url=https://pypi.nvidia.com + - --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple + specific: + - output_types: [requirements, pyproject] + matrices: + - matrix: + cuda: "12.*" + cuda_suffixed: "true" + packages: + - rmm-cu12==24.10.*,>=0.0.0a0 + - matrix: + cuda: "11.*" + cuda_suffixed: "true" + packages: + - rmm-cu11==24.10.*,>=0.0.0a0 + - {matrix: null, packages: [*rmm_unsuffixed]} + build_python_cudf: + common: + - output_types: conda + packages: + - *rmm_unsuffixed - pip - pip: - git+https://github.com/python-streamz/streamz.git@master @@ -349,12 +413,33 @@ dependencies: cuda_suffixed: "true" packages: - rmm-cu12==24.10.*,>=0.0.0a0 + - pylibcudf-cu12==24.10.*,>=0.0.0a0 - matrix: cuda: "11.*" cuda_suffixed: "true" packages: - rmm-cu11==24.10.*,>=0.0.0a0 + - pylibcudf-cu11==24.10.*,>=0.0.0a0 - {matrix: null, packages: [*rmm_unsuffixed]} + pylibcudf_build_dep: + common: + - output_types: conda + packages: + - &pylibcudf_unsuffixed pylibcudf==24.10.*,>=0.0.0a0 + specific: + - output_types: [pyproject] + matrices: + - matrix: + cuda: "12.*" + cuda_suffixed: "true" + packages: + - pylibcudf-cu12==24.10.*,>=0.0.0a0 + - matrix: + cuda: "11.*" + cuda_suffixed: "true" + packages: + - pylibcudf-cu11==24.10.*,>=0.0.0a0 + - {matrix: null, packages: [*pylibcudf_unsuffixed]} libarrow_build: common: - output_types: conda @@ -560,6 +645,45 @@ dependencies: # TODO: Update `numpy` in `build_python_common` when dropping `<2.0a0` - numpy>=1.23,<2.0a0 - pandas>=2.0,<2.2.3dev0 + run_pylibcudf: + common: + - output_types: [conda, requirements, pyproject] + packages: + - nvtx>=0.2.1 + - packaging + - typing_extensions>=4.0.0 + - output_types: conda + packages: + - *rmm_unsuffixed + - output_types: requirements + packages: + # pip recognizes the index as a global option for the requirements.txt file + # This index is needed for rmm. + - --extra-index-url=https://pypi.nvidia.com + - --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple + specific: + - output_types: [conda, requirements, pyproject] + matrices: + - matrix: {cuda: "12.*"} + packages: + - cuda-python>=12.0,<13.0a0 + - matrix: {cuda: "11.*"} + packages: &run_pylibcudf_packages_all_cu11 + - cuda-python>=11.7.1,<12.0a0 + - {matrix: null, packages: *run_pylibcudf_packages_all_cu11} + - output_types: [requirements, pyproject] + matrices: + - matrix: + cuda: "12.*" + cuda_suffixed: "true" + packages: + - rmm-cu12==24.10.*,>=0.0.0a0 + - matrix: + cuda: "11.*" + cuda_suffixed: "true" + packages: + - rmm-cu11==24.10.*,>=0.0.0a0 + - {matrix: null, packages: [*rmm_unsuffixed]} run_cudf: common: - output_types: [conda, requirements, pyproject] @@ -680,6 +804,14 @@ dependencies: - pytest<8 - pytest-cov - pytest-xdist + test_python_pylibcudf: + common: + - output_types: [conda, requirements, pyproject] + packages: + - fastavro>=0.22.9 + - hypothesis + - numpy + - pandas test_python_cudf: common: - output_types: [conda, requirements, pyproject] @@ -724,6 +856,31 @@ dependencies: packages: - dask-cuda==24.10.*,>=0.0.0a0 - *numba + depends_on_pylibcudf: + common: + - output_types: conda + packages: + - *pylibcudf_unsuffixed + - output_types: requirements + packages: + # pip recognizes the index as a global option for the requirements.txt file + # This index is needed for rmm, cubinlinker, ptxcompiler. + - --extra-index-url=https://pypi.nvidia.com + - --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple + specific: + - output_types: [requirements, pyproject] + matrices: + - matrix: + cuda: "12.*" + cuda_suffixed: "true" + packages: + - pylibcudf-cu12==24.10.*,>=0.0.0a0 + - matrix: + cuda: "11.*" + cuda_suffixed: "true" + packages: + - pylibcudf-cu11==24.10.*,>=0.0.0a0 + - {matrix: null, packages: [*pylibcudf_unsuffixed]} depends_on_cudf: common: - output_types: conda diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/aggregation.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/aggregation.rst index 739305af5d4..4b2b213b6c3 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/aggregation.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/aggregation.rst @@ -2,5 +2,5 @@ aggregation =========== -.. automodule:: cudf._lib.pylibcudf.aggregation +.. automodule:: pylibcudf.aggregation :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/binaryop.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/binaryop.rst index e5bc6aa7cda..8bbbfbf88c1 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/binaryop.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/binaryop.rst @@ -2,5 +2,5 @@ binaryop ======== -.. automodule:: cudf._lib.pylibcudf.binaryop +.. automodule:: pylibcudf.binaryop :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/column.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/column.rst index d1105d356b4..d26c8737cf4 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/column.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/column.rst @@ -2,5 +2,5 @@ Column ====== -.. automodule:: cudf._lib.pylibcudf.column +.. automodule:: pylibcudf.column :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/column_factories.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/column_factories.rst index c858135b6ce..8dfaa4bae03 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/column_factories.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/column_factories.rst @@ -2,5 +2,5 @@ column_factories ================ -.. automodule:: cudf._lib.pylibcudf.column_factories +.. automodule:: pylibcudf.column_factories :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/concatenate.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/concatenate.rst index e83739056f4..7912cb83767 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/concatenate.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/concatenate.rst @@ -2,5 +2,5 @@ concatenate =========== -.. automodule:: cudf._lib.pylibcudf.concatenate +.. automodule:: pylibcudf.concatenate :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/copying.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/copying.rst index fddd3ea440f..25e3ef50e6a 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/copying.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/copying.rst @@ -2,5 +2,5 @@ copying ======= -.. automodule:: cudf._lib.pylibcudf.copying +.. automodule:: pylibcudf.copying :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/datetime.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/datetime.rst index 558268ea495..71f7874cfbe 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/datetime.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/datetime.rst @@ -2,5 +2,5 @@ datetime ======== -.. automodule:: cudf._lib.pylibcudf.datetime +.. automodule:: pylibcudf.datetime :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/expressions.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/expressions.rst index 03f769ee861..5493d4662a9 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/expressions.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/expressions.rst @@ -2,5 +2,5 @@ expressions =========== -.. automodule:: cudf._lib.pylibcudf.expressions +.. automodule:: pylibcudf.expressions :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/filling.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/filling.rst index 542a5e12bc4..0d328a0b0e9 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/filling.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/filling.rst @@ -2,5 +2,5 @@ filling ======== -.. automodule:: cudf._lib.pylibcudf.filling +.. automodule:: pylibcudf.filling :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/gpumemoryview.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/gpumemoryview.rst index dffc7c24e02..5515a74adcc 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/gpumemoryview.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/gpumemoryview.rst @@ -2,5 +2,5 @@ gpumemoryview ============= -.. automodule:: cudf._lib.pylibcudf.gpumemoryview +.. automodule:: pylibcudf.gpumemoryview :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/groupby.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/groupby.rst index d6e994f7dbc..27cda383818 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/groupby.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/groupby.rst @@ -2,5 +2,5 @@ groupby ======= -.. automodule:: cudf._lib.pylibcudf.groupby +.. automodule:: pylibcudf.groupby :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/interop.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/interop.rst index 881ab8d7be4..0d2cb55212e 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/interop.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/interop.rst @@ -2,5 +2,5 @@ interop ======= -.. automodule:: cudf._lib.pylibcudf.interop +.. automodule:: pylibcudf.interop :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/io/avro.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/io/avro.rst index 495bd505fdc..1c57a6157f5 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/io/avro.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/io/avro.rst @@ -2,5 +2,5 @@ Avro ==== -.. automodule:: cudf._lib.pylibcudf.io.avro +.. automodule:: pylibcudf.io.avro :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/io/csv.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/io/csv.rst index 5a2276f8b2d..59f7d8fe54c 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/io/csv.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/io/csv.rst @@ -2,5 +2,5 @@ CSV === -.. automodule:: cudf._lib.pylibcudf.io.csv +.. automodule:: pylibcudf.io.csv :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/io/index.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/io/index.rst index e2d342ffe47..c8933981736 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/io/index.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/io/index.rst @@ -5,7 +5,7 @@ I/O I/O Utility Classes =================== -.. automodule:: cudf._lib.pylibcudf.io.types +.. automodule:: pylibcudf.io.types :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/io/json.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/io/json.rst index 6aeae1f322a..a4626f43cc3 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/io/json.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/io/json.rst @@ -2,5 +2,5 @@ JSON ==== -.. automodule:: cudf._lib.pylibcudf.io.json +.. automodule:: pylibcudf.io.json :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/io/parquet.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/io/parquet.rst index 9dfbadfa216..07c2503ab28 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/io/parquet.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/io/parquet.rst @@ -2,5 +2,5 @@ Parquet ======= -.. automodule:: cudf._lib.pylibcudf.io.parquet +.. automodule:: pylibcudf.io.parquet :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/join.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/join.rst index 05b9709d116..de065e4fc40 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/join.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/join.rst @@ -2,5 +2,5 @@ join ==== -.. automodule:: cudf._lib.pylibcudf.join +.. automodule:: pylibcudf.join :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/lists.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/lists.rst index a127dd6006a..0fe1a876073 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/lists.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/lists.rst @@ -2,5 +2,5 @@ lists ===== -.. automodule:: cudf._lib.pylibcudf.lists +.. automodule:: pylibcudf.lists :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/merge.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/merge.rst index ef1189a064a..3f634ffcfd7 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/merge.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/merge.rst @@ -2,5 +2,5 @@ merge ===== -.. automodule:: cudf._lib.pylibcudf.merge +.. automodule:: pylibcudf.merge :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/quantiles.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/quantiles.rst index 3417c1ff59d..0f0f701b5dc 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/quantiles.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/quantiles.rst @@ -2,5 +2,5 @@ quantiles ========= -.. automodule:: cudf._lib.pylibcudf.quantiles +.. automodule:: pylibcudf.quantiles :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/reduce.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/reduce.rst index e6f1b02331d..047f217c276 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/reduce.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/reduce.rst @@ -2,5 +2,5 @@ reduce ====== -.. automodule:: cudf._lib.pylibcudf.reduce +.. automodule:: pylibcudf.reduce :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/replace.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/replace.rst index 7f846872fca..7410b20e1b0 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/replace.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/replace.rst @@ -2,5 +2,5 @@ replace ======= -.. automodule:: cudf._lib.pylibcudf.replace +.. automodule:: pylibcudf.replace :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/reshape.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/reshape.rst index 964cef04923..09ec0501bb9 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/reshape.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/reshape.rst @@ -2,5 +2,5 @@ reshape ======= -.. automodule:: cudf._lib.pylibcudf.reshape +.. automodule:: pylibcudf.reshape :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/rolling.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/rolling.rst index 0817d117a94..1f8da467e84 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/rolling.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/rolling.rst @@ -2,5 +2,5 @@ rolling ======= -.. automodule:: cudf._lib.pylibcudf.rolling +.. automodule:: pylibcudf.rolling :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/round.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/round.rst index c97fda12301..e064357cbd1 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/round.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/round.rst @@ -2,5 +2,5 @@ round ===== -.. automodule:: cudf._lib.pylibcudf.round +.. automodule:: pylibcudf.round :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/scalar.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/scalar.rst index b12f47618fb..a9100c6bb2d 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/scalar.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/scalar.rst @@ -2,5 +2,5 @@ Scalar ====== -.. automodule:: cudf._lib.pylibcudf.scalar +.. automodule:: pylibcudf.scalar :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/search.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/search.rst index aa57bcd9d92..02307037994 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/search.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/search.rst @@ -2,5 +2,5 @@ search ====== -.. automodule:: cudf._lib.pylibcudf.search +.. automodule:: pylibcudf.search :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/sorting.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/sorting.rst index e9441366eeb..b8fd8fda9bd 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/sorting.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/sorting.rst @@ -2,5 +2,5 @@ sorting ======= -.. automodule:: cudf._lib.pylibcudf.sorting +.. automodule:: pylibcudf.sorting :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/stream_compaction.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/stream_compaction.rst index 00b479446d8..0252d0684d9 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/stream_compaction.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/stream_compaction.rst @@ -2,5 +2,5 @@ stream_compaction ================= -.. automodule:: cudf._lib.pylibcudf.stream_compaction +.. automodule:: pylibcudf.stream_compaction :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/capitalize.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/capitalize.rst index 578b2b75e37..6b9ed8d47e7 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/capitalize.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/capitalize.rst @@ -2,5 +2,5 @@ capitalize ========== -.. automodule:: cudf._lib.pylibcudf.strings.capitalize +.. automodule:: pylibcudf.strings.capitalize :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/char_types.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/char_types.rst index 577ec34915b..896fa6086db 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/char_types.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/char_types.rst @@ -2,5 +2,5 @@ char_types ========== -.. automodule:: cudf._lib.pylibcudf.strings.char_types +.. automodule:: pylibcudf.strings.char_types :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/contains.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/contains.rst index e5745331bc7..d2d164be638 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/contains.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/contains.rst @@ -2,5 +2,5 @@ contains ======== -.. automodule:: cudf._lib.pylibcudf.strings.contains +.. automodule:: pylibcudf.strings.contains :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/find.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/find.rst index 61d4079e9a3..7c540e99929 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/find.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/find.rst @@ -2,5 +2,5 @@ find ==== -.. automodule:: cudf._lib.pylibcudf.strings.find +.. automodule:: pylibcudf.strings.find :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/regex_flags.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/regex_flags.rst index 0126b6a3706..53fd712d864 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/regex_flags.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/regex_flags.rst @@ -2,5 +2,5 @@ regex_flags =========== -.. automodule:: cudf._lib.pylibcudf.strings.regex_flags +.. automodule:: pylibcudf.strings.regex_flags :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/regex_program.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/regex_program.rst index 2f398186d51..6f3d2f6681c 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/regex_program.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/regex_program.rst @@ -2,5 +2,5 @@ regex_program ============= -.. automodule:: cudf._lib.pylibcudf.strings.regex_program +.. automodule:: pylibcudf.strings.regex_program :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/replace.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/replace.rst index 9575ec226a7..d5417adac43 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/replace.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/replace.rst @@ -2,5 +2,5 @@ replace ======= -.. automodule:: cudf._lib.pylibcudf.strings.replace +.. automodule:: pylibcudf.strings.replace :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/slice.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/slice.rst index 0ee5af71c03..e9908904512 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/slice.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/strings/slice.rst @@ -2,5 +2,5 @@ slice ===== -.. automodule:: cudf._lib.pylibcudf.strings.slice +.. automodule:: pylibcudf.strings.slice :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/table.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/table.rst index d8337b6596d..e39ca18a12b 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/table.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/table.rst @@ -2,5 +2,5 @@ Table ===== -.. automodule:: cudf._lib.pylibcudf.table +.. automodule:: pylibcudf.table :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/traits.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/traits.rst index 294ca8dc78c..2cce7b9d7d7 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/traits.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/traits.rst @@ -2,5 +2,5 @@ traits ====== -.. automodule:: cudf._lib.pylibcudf.traits +.. automodule:: pylibcudf.traits :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/transform.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/transform.rst index ef04bbad7e6..839163f83fc 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/transform.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/transform.rst @@ -2,5 +2,5 @@ transform ========= -.. automodule:: cudf._lib.pylibcudf.transform +.. automodule:: pylibcudf.transform :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/types.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/types.rst index 8d5409bbd97..75521ac2f4d 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/types.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/types.rst @@ -2,5 +2,5 @@ types ===== -.. automodule:: cudf._lib.pylibcudf.types +.. automodule:: pylibcudf.types :members: diff --git a/docs/cudf/source/user_guide/api_docs/pylibcudf/unary.rst b/docs/cudf/source/user_guide/api_docs/pylibcudf/unary.rst index add4baa0a54..34077242b90 100644 --- a/docs/cudf/source/user_guide/api_docs/pylibcudf/unary.rst +++ b/docs/cudf/source/user_guide/api_docs/pylibcudf/unary.rst @@ -2,5 +2,5 @@ unary ===== -.. automodule:: cudf._lib.pylibcudf.unary +.. automodule:: pylibcudf.unary :members: diff --git a/python/cudf/CMakeLists.txt b/python/cudf/CMakeLists.txt index ecadbf5cbbc..e11d62b3bd5 100644 --- a/python/cudf/CMakeLists.txt +++ b/python/cudf/CMakeLists.txt @@ -79,7 +79,7 @@ if(NOT cudf_FOUND) # require access to libcudf, we place the library and all its dependent artifacts in the cudf # directory as a single source of truth and modify the other rpaths appropriately. set(cython_lib_dir cudf) - include(cmake/Modules/WheelHelpers.cmake) + include(../pylibcudf/cmake/Modules/WheelHelpers.cmake) # TODO: This install is currently overzealous. We should only install the libraries that are # downloaded by CPM during the build, not libraries that were found on the system. However, in # practice right this would only be a problem is if libcudf was not found but some of the @@ -92,7 +92,7 @@ endif() rapids_cython_init() -include(cmake/Modules/LinkPyarrowHeaders.cmake) +include(../pylibcudf/cmake/Modules/LinkPyarrowHeaders.cmake) add_subdirectory(cudf/_lib) add_subdirectory(udf_cpp) diff --git a/python/cudf/cudf/_lib/CMakeLists.txt b/python/cudf/cudf/_lib/CMakeLists.txt index d32a2d8e3f8..d6182673308 100644 --- a/python/cudf/cudf/_lib/CMakeLists.txt +++ b/python/cudf/cudf/_lib/CMakeLists.txt @@ -73,5 +73,4 @@ target_link_libraries(interop PUBLIC nanoarrow) add_subdirectory(io) add_subdirectory(nvtext) -add_subdirectory(pylibcudf) add_subdirectory(strings) diff --git a/python/cudf/cudf/_lib/__init__.py b/python/cudf/cudf/_lib/__init__.py index 34c0e29d0b1..918edb6d3f1 100644 --- a/python/cudf/cudf/_lib/__init__.py +++ b/python/cudf/cudf/_lib/__init__.py @@ -21,7 +21,6 @@ orc, parquet, partitioning, - pylibcudf, quantiles, reduce, replace, diff --git a/python/cudf/cudf/_lib/aggregation.pyx b/python/cudf/cudf/_lib/aggregation.pyx index 1616c24eec2..7c91533cf93 100644 --- a/python/cudf/cudf/_lib/aggregation.pyx +++ b/python/cudf/cudf/_lib/aggregation.pyx @@ -3,8 +3,9 @@ import pandas as pd from numba.np import numpy_support +import pylibcudf + import cudf -from cudf._lib import pylibcudf from cudf._lib.types import SUPPORTED_NUMPY_TO_PYLIBCUDF_TYPES from cudf.utils import cudautils diff --git a/python/cudf/cudf/_lib/avro.pyx b/python/cudf/cudf/_lib/avro.pyx index 3c132b22880..b1759635a36 100644 --- a/python/cudf/cudf/_lib/avro.pyx +++ b/python/cudf/cudf/_lib/avro.pyx @@ -2,8 +2,8 @@ from cudf._lib.utils cimport data_from_pylibcudf_io -import cudf._lib.pylibcudf as plc -from cudf._lib.pylibcudf.io.types import SourceInfo +import pylibcudf as plc +from pylibcudf.io.types import SourceInfo cpdef read_avro(datasource, columns=None, skip_rows=0, num_rows=-1): diff --git a/python/cudf/cudf/_lib/binaryop.pyx b/python/cudf/cudf/_lib/binaryop.pyx index 2e352dd7904..e2547476849 100644 --- a/python/cudf/cudf/_lib/binaryop.pyx +++ b/python/cudf/cudf/_lib/binaryop.pyx @@ -4,7 +4,8 @@ from cudf._lib.column cimport Column from cudf._lib.scalar cimport DeviceScalar from cudf._lib.types cimport dtype_to_pylibcudf_type -from cudf._lib import pylibcudf +import pylibcudf + from cudf._lib.scalar import as_device_scalar from cudf.core.buffer import acquire_spill_lock diff --git a/python/cudf/cudf/_lib/column.pxd b/python/cudf/cudf/_lib/column.pxd index 437f44af9f0..8ceea4920e2 100644 --- a/python/cudf/cudf/_lib/column.pxd +++ b/python/cudf/cudf/_lib/column.pxd @@ -5,14 +5,13 @@ from typing import Literal from libcpp cimport bool from libcpp.memory cimport unique_ptr -from rmm._lib.device_buffer cimport device_buffer - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport ( column_view, mutable_column_view, ) -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.types cimport size_type +from rmm._lib.device_buffer cimport device_buffer cdef class Column: diff --git a/python/cudf/cudf/_lib/column.pyx b/python/cudf/cudf/_lib/column.pyx index f0c07dfbc1b..2e400f775d3 100644 --- a/python/cudf/cudf/_lib/column.pyx +++ b/python/cudf/cudf/_lib/column.pyx @@ -7,11 +7,11 @@ import cupy as cp import numpy as np import pandas as pd +import pylibcudf import rmm import cudf import cudf._lib as libcudf -from cudf._lib import pylibcudf from cudf.core.buffer import ( Buffer, ExposureTrackedBuffer, @@ -39,18 +39,18 @@ from cudf._lib.types cimport ( from cudf._lib.null_mask import bitmask_allocation_size_bytes from cudf._lib.types import dtype_from_pylibcudf_column - -cimport cudf._lib.pylibcudf.libcudf.copying as cpp_copying -cimport cudf._lib.pylibcudf.libcudf.types as libcudf_types -cimport cudf._lib.pylibcudf.libcudf.unary as libcudf_unary -from cudf._lib.pylibcudf.libcudf.column.column cimport column, column_contents -from cudf._lib.pylibcudf.libcudf.column.column_factories cimport ( +cimport pylibcudf.libcudf.copying as cpp_copying +cimport pylibcudf.libcudf.types as libcudf_types +cimport pylibcudf.libcudf.unary as libcudf_unary +from pylibcudf.libcudf.column.column cimport column, column_contents +from pylibcudf.libcudf.column.column_factories cimport ( make_column_from_scalar as cpp_make_column_from_scalar, make_numeric_column, ) -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.null_mask cimport null_count as cpp_null_count -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.null_mask cimport null_count as cpp_null_count +from pylibcudf.libcudf.scalar.scalar cimport scalar + from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/concat.pyx b/python/cudf/cudf/_lib/concat.pyx index 89ddcfee99e..e661059faa3 100644 --- a/python/cudf/cudf/_lib/concat.pyx +++ b/python/cudf/cudf/_lib/concat.pyx @@ -5,7 +5,8 @@ from libcpp cimport bool from cudf._lib.column cimport Column from cudf._lib.utils cimport data_from_pylibcudf_table -from cudf._lib import pylibcudf +import pylibcudf + from cudf.core.buffer import acquire_spill_lock diff --git a/python/cudf/cudf/_lib/copying.pxd b/python/cudf/cudf/_lib/copying.pxd index 8fc7f4e1da0..14c7d2066d8 100644 --- a/python/cudf/cudf/_lib/copying.pxd +++ b/python/cudf/cudf/_lib/copying.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. -from cudf._lib.pylibcudf.libcudf.contiguous_split cimport packed_columns +from pylibcudf.libcudf.contiguous_split cimport packed_columns cdef class _CPackedColumns: diff --git a/python/cudf/cudf/_lib/copying.pyx b/python/cudf/cudf/_lib/copying.pyx index 796c70e615c..16182e31c08 100644 --- a/python/cudf/cudf/_lib/copying.pyx +++ b/python/cudf/cudf/_lib/copying.pyx @@ -10,8 +10,9 @@ from libcpp.vector cimport vector from rmm._lib.device_buffer cimport DeviceBuffer +import pylibcudf + import cudf -from cudf._lib import pylibcudf from cudf.core.buffer import Buffer, acquire_spill_lock, as_buffer from cudf._lib.column cimport Column @@ -26,17 +27,16 @@ from cudf.core.abc import Serializable from libcpp.memory cimport make_unique -cimport cudf._lib.pylibcudf.libcudf.contiguous_split as cpp_contiguous_split -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.lists.gather cimport ( +cimport pylibcudf.libcudf.contiguous_split as cpp_contiguous_split +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.lists.gather cimport ( segmented_gather as cpp_segmented_gather, ) -from cudf._lib.pylibcudf.libcudf.lists.lists_column_view cimport ( - lists_column_view, -) -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.lists.lists_column_view cimport lists_column_view +from pylibcudf.libcudf.scalar.scalar cimport scalar +from pylibcudf.libcudf.types cimport size_type + from cudf._lib.utils cimport columns_from_pylibcudf_table, data_from_table_view # workaround for https://github.com/cython/cython/issues/3885 diff --git a/python/cudf/cudf/_lib/csv.pyx b/python/cudf/cudf/_lib/csv.pyx index 099b61d62ae..e9aa97ecbc9 100644 --- a/python/cudf/cudf/_lib/csv.pyx +++ b/python/cudf/cudf/_lib/csv.pyx @@ -6,8 +6,9 @@ from libcpp.string cimport string from libcpp.utility cimport move from libcpp.vector cimport vector -cimport cudf._lib.pylibcudf.libcudf.types as libcudf_types -from cudf._lib.pylibcudf.io.datasource cimport Datasource, NativeFileDatasource +cimport pylibcudf.libcudf.types as libcudf_types +from pylibcudf.io.datasource cimport Datasource, NativeFileDatasource + from cudf._lib.types cimport dtype_to_pylibcudf_type import errno @@ -23,22 +24,24 @@ from cudf.core.buffer import acquire_spill_lock from libcpp cimport bool -from cudf._lib.io.utils cimport make_sink_info -from cudf._lib.pylibcudf.libcudf.io.csv cimport ( +from pylibcudf.libcudf.io.csv cimport ( csv_writer_options, write_csv as cpp_write_csv, ) -from cudf._lib.pylibcudf.libcudf.io.data_sink cimport data_sink -from cudf._lib.pylibcudf.libcudf.io.types cimport compression_type, sink_info -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.io.data_sink cimport data_sink +from pylibcudf.libcudf.io.types cimport compression_type, sink_info +from pylibcudf.libcudf.table.table_view cimport table_view + +from cudf._lib.io.utils cimport make_sink_info from cudf._lib.utils cimport data_from_pylibcudf_io, table_view_from_table from pyarrow.lib import NativeFile -import cudf._lib.pylibcudf as plc +import pylibcudf as plc + from cudf.api.types import is_hashable -from cudf._lib.pylibcudf.types cimport DataType +from pylibcudf.types cimport DataType CSV_HEX_TYPE_MAP = { "hex": np.dtype("int64"), diff --git a/python/cudf/cudf/_lib/datetime.pyx b/python/cudf/cudf/_lib/datetime.pyx index b30ef875a7b..483250dd36f 100644 --- a/python/cudf/cudf/_lib/datetime.pyx +++ b/python/cudf/cudf/_lib/datetime.pyx @@ -7,13 +7,14 @@ from cudf.core.buffer import acquire_spill_lock from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -cimport cudf._lib.pylibcudf.libcudf.datetime as libcudf_datetime +cimport pylibcudf.libcudf.datetime as libcudf_datetime +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.filling cimport calendrical_month_sequence +from pylibcudf.libcudf.scalar.scalar cimport scalar +from pylibcudf.libcudf.types cimport size_type + from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.filling cimport calendrical_month_sequence -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar -from cudf._lib.pylibcudf.libcudf.types cimport size_type from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/filling.pyx b/python/cudf/cudf/_lib/filling.pyx index b7302f3d07a..b2f4c620144 100644 --- a/python/cudf/cudf/_lib/filling.pyx +++ b/python/cudf/cudf/_lib/filling.pyx @@ -2,12 +2,12 @@ from cudf.core.buffer import acquire_spill_lock - from cudf._lib.column cimport Column from cudf._lib.scalar cimport DeviceScalar from cudf._lib.utils cimport columns_from_pylibcudf_table -from cudf._lib import pylibcudf +import pylibcudf + from cudf._lib.scalar import as_device_scalar diff --git a/python/cudf/cudf/_lib/groupby.pyx b/python/cudf/cudf/_lib/groupby.pyx index 9d18e023fe8..c199ed96d4f 100644 --- a/python/cudf/cudf/_lib/groupby.pyx +++ b/python/cudf/cudf/_lib/groupby.pyx @@ -18,10 +18,11 @@ from cudf._lib.utils cimport columns_from_pylibcudf_table from cudf._lib.scalar import as_device_scalar -from cudf._lib.pylibcudf.libcudf.replace cimport replace_policy -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar +from pylibcudf.libcudf.replace cimport replace_policy +from pylibcudf.libcudf.scalar.scalar cimport scalar + +import pylibcudf -from cudf._lib import pylibcudf from cudf._lib.aggregation import make_aggregation # The sets below define the possible aggregations that can be performed on diff --git a/python/cudf/cudf/_lib/hash.pyx b/python/cudf/cudf/_lib/hash.pyx index b8331d5a226..48f75b12a73 100644 --- a/python/cudf/cudf/_lib/hash.pyx +++ b/python/cudf/cudf/_lib/hash.pyx @@ -7,10 +7,9 @@ from libcpp.pair cimport pair from libcpp.utility cimport move from libcpp.vector cimport vector -cimport cudf._lib.pylibcudf.libcudf.types as libcudf_types -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.hash cimport ( +cimport pylibcudf.libcudf.types as libcudf_types +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.hash cimport ( md5, murmurhash3_x86_32, sha1, @@ -20,11 +19,13 @@ from cudf._lib.pylibcudf.libcudf.hash cimport ( sha512, xxhash_64, ) -from cudf._lib.pylibcudf.libcudf.partitioning cimport ( +from pylibcudf.libcudf.partitioning cimport ( hash_partition as cpp_hash_partition, ) -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view + +from cudf._lib.column cimport Column from cudf._lib.utils cimport columns_from_unique_ptr, table_view_from_columns diff --git a/python/cudf/cudf/_lib/interop.pyx b/python/cudf/cudf/_lib/interop.pyx index 37595b65e65..1dc586bb257 100644 --- a/python/cudf/cudf/_lib/interop.pyx +++ b/python/cudf/cudf/_lib/interop.pyx @@ -4,15 +4,16 @@ from cpython cimport pycapsule from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib import pylibcudf +import pylibcudf -from cudf._lib.pylibcudf.libcudf.interop cimport ( +from pylibcudf.libcudf.interop cimport ( DLManagedTensor, from_dlpack as cpp_from_dlpack, to_dlpack as cpp_to_dlpack, ) -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view + from cudf._lib.utils cimport ( columns_from_pylibcudf_table, columns_from_unique_ptr, diff --git a/python/cudf/cudf/_lib/io/utils.pxd b/python/cudf/cudf/_lib/io/utils.pxd index 680a87c789e..1938f00c179 100644 --- a/python/cudf/cudf/_lib/io/utils.pxd +++ b/python/cudf/cudf/_lib/io/utils.pxd @@ -3,14 +3,15 @@ from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.io.data_sink cimport data_sink -from cudf._lib.pylibcudf.libcudf.io.types cimport ( +from pylibcudf.libcudf.io.data_sink cimport data_sink +from pylibcudf.libcudf.io.types cimport ( column_name_info, sink_info, source_info, ) +from cudf._lib.column cimport Column + cdef source_info make_source_info(list src) except* cdef sink_info make_sinks_info( diff --git a/python/cudf/cudf/_lib/io/utils.pyx b/python/cudf/cudf/_lib/io/utils.pyx index 58956b9e9b7..b1900138d94 100644 --- a/python/cudf/cudf/_lib/io/utils.pyx +++ b/python/cudf/cudf/_lib/io/utils.pyx @@ -7,17 +7,18 @@ from libcpp.string cimport string from libcpp.utility cimport move from libcpp.vector cimport vector -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.io.datasource cimport Datasource -from cudf._lib.pylibcudf.libcudf.io.data_sink cimport data_sink -from cudf._lib.pylibcudf.libcudf.io.datasource cimport datasource -from cudf._lib.pylibcudf.libcudf.io.types cimport ( +from pylibcudf.io.datasource cimport Datasource +from pylibcudf.libcudf.io.data_sink cimport data_sink +from pylibcudf.libcudf.io.datasource cimport datasource +from pylibcudf.libcudf.io.types cimport ( column_name_info, host_buffer, sink_info, source_info, ) +from cudf._lib.column cimport Column + import codecs import errno import io diff --git a/python/cudf/cudf/_lib/join.pyx b/python/cudf/cudf/_lib/join.pyx index 0a54f0d67a0..2559358c21f 100644 --- a/python/cudf/cudf/_lib/join.pyx +++ b/python/cudf/cudf/_lib/join.pyx @@ -4,7 +4,7 @@ from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib import pylibcudf +import pylibcudf # The functions below return the *gathermaps* that represent # the join result when joining on the keys `lhs` and `rhs`. diff --git a/python/cudf/cudf/_lib/json.pyx b/python/cudf/cudf/_lib/json.pyx index 03bf9ed8b75..9bbbcf60dcf 100644 --- a/python/cudf/cudf/_lib/json.pyx +++ b/python/cudf/cudf/_lib/json.pyx @@ -9,18 +9,19 @@ from cudf.core.buffer import acquire_spill_lock from libcpp cimport bool -cimport cudf._lib.pylibcudf.libcudf.io.types as cudf_io_types +cimport pylibcudf.libcudf.io.types as cudf_io_types +from pylibcudf.io.types cimport compression_type +from pylibcudf.libcudf.io.json cimport json_recovery_mode_t +from pylibcudf.libcudf.io.types cimport compression_type +from pylibcudf.libcudf.types cimport data_type, type_id +from pylibcudf.types cimport DataType + from cudf._lib.column cimport Column from cudf._lib.io.utils cimport add_df_col_struct_names -from cudf._lib.pylibcudf.io.types cimport compression_type -from cudf._lib.pylibcudf.libcudf.io.json cimport json_recovery_mode_t -from cudf._lib.pylibcudf.libcudf.io.types cimport compression_type -from cudf._lib.pylibcudf.libcudf.types cimport data_type, type_id -from cudf._lib.pylibcudf.types cimport DataType from cudf._lib.types cimport dtype_to_data_type from cudf._lib.utils cimport _data_from_columns, data_from_pylibcudf_io -import cudf._lib.pylibcudf as plc +import pylibcudf as plc cdef json_recovery_mode_t _get_json_recovery_mode(object on_bad_lines): diff --git a/python/cudf/cudf/_lib/labeling.pyx b/python/cudf/cudf/_lib/labeling.pyx index 439a727a9ca..2e1959a348d 100644 --- a/python/cudf/cudf/_lib/labeling.pyx +++ b/python/cudf/cudf/_lib/labeling.pyx @@ -6,13 +6,11 @@ from libcpp cimport bool as cbool from libcpp.memory cimport unique_ptr from libcpp.utility cimport move +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.labeling cimport inclusive, label_bins as cpp_label_bins + from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.labeling cimport ( - inclusive, - label_bins as cpp_label_bins, -) # Note that the parameter input shadows a Python built-in in the local scope, diff --git a/python/cudf/cudf/_lib/lists.pyx b/python/cudf/cudf/_lib/lists.pyx index f6d9c8c404c..7e8710bedb6 100644 --- a/python/cudf/cudf/_lib/lists.pyx +++ b/python/cudf/cudf/_lib/lists.pyx @@ -4,13 +4,14 @@ from cudf.core.buffer import acquire_spill_lock from libcpp cimport bool +from pylibcudf.libcudf.types cimport null_order, size_type + from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.types cimport null_order, size_type from cudf._lib.utils cimport columns_from_pylibcudf_table -from cudf._lib import pylibcudf +import pylibcudf -from cudf._lib.pylibcudf cimport Scalar +from pylibcudf cimport Scalar @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/merge.pyx b/python/cudf/cudf/_lib/merge.pyx index fe7f7ad2918..9372acdab44 100644 --- a/python/cudf/cudf/_lib/merge.pyx +++ b/python/cudf/cudf/_lib/merge.pyx @@ -4,7 +4,7 @@ from libcpp cimport bool from cudf._lib.utils cimport columns_from_pylibcudf_table -from cudf._lib import pylibcudf +import pylibcudf def merge_sorted( diff --git a/python/cudf/cudf/_lib/null_mask.pyx b/python/cudf/cudf/_lib/null_mask.pyx index b00deae2270..3a7b6a59bf3 100644 --- a/python/cudf/cudf/_lib/null_mask.pyx +++ b/python/cudf/cudf/_lib/null_mask.pyx @@ -10,9 +10,8 @@ from libcpp.memory cimport make_unique, unique_ptr from libcpp.pair cimport pair from libcpp.utility cimport move -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.null_mask cimport ( +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.null_mask cimport ( bitmask_allocation_size_bytes as cpp_bitmask_allocation_size_bytes, bitmask_and as cpp_bitmask_and, bitmask_or as cpp_bitmask_or, @@ -20,8 +19,10 @@ from cudf._lib.pylibcudf.libcudf.null_mask cimport ( create_null_mask as cpp_create_null_mask, underlying_type_t_mask_state, ) -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view -from cudf._lib.pylibcudf.libcudf.types cimport mask_state, size_type +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.types cimport mask_state, size_type + +from cudf._lib.column cimport Column from cudf._lib.utils cimport table_view_from_columns diff --git a/python/cudf/cudf/_lib/nvtext/byte_pair_encode.pyx b/python/cudf/cudf/_lib/nvtext/byte_pair_encode.pyx index d60162d0656..0d768e24f39 100644 --- a/python/cudf/cudf/_lib/nvtext/byte_pair_encode.pyx +++ b/python/cudf/cudf/_lib/nvtext/byte_pair_encode.pyx @@ -6,15 +6,16 @@ from cudf.core.buffer import acquire_spill_lock from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.nvtext.byte_pair_encode cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.nvtext.byte_pair_encode cimport ( bpe_merge_pairs as cpp_bpe_merge_pairs, byte_pair_encoding as cpp_byte_pair_encoding, load_merge_pairs as cpp_load_merge_pairs, ) -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.scalar.scalar cimport string_scalar + +from cudf._lib.column cimport Column from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/nvtext/edit_distance.pyx b/python/cudf/cudf/_lib/nvtext/edit_distance.pyx index 514b6610575..e3c2273345a 100644 --- a/python/cudf/cudf/_lib/nvtext/edit_distance.pyx +++ b/python/cudf/cudf/_lib/nvtext/edit_distance.pyx @@ -5,14 +5,15 @@ from cudf.core.buffer import acquire_spill_lock from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.nvtext.edit_distance cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.nvtext.edit_distance cimport ( edit_distance as cpp_edit_distance, edit_distance_matrix as cpp_edit_distance_matrix, ) +from cudf._lib.column cimport Column + @acquire_spill_lock() def edit_distance(Column strings, Column targets): diff --git a/python/cudf/cudf/_lib/nvtext/generate_ngrams.pyx b/python/cudf/cudf/_lib/nvtext/generate_ngrams.pyx index a6b9a1e4f7a..6591b527eec 100644 --- a/python/cudf/cudf/_lib/nvtext/generate_ngrams.pyx +++ b/python/cudf/cudf/_lib/nvtext/generate_ngrams.pyx @@ -5,16 +5,17 @@ from cudf.core.buffer import acquire_spill_lock from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.nvtext.generate_ngrams cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.nvtext.generate_ngrams cimport ( generate_character_ngrams as cpp_generate_character_ngrams, generate_ngrams as cpp_generate_ngrams, hash_character_ngrams as cpp_hash_character_ngrams, ) -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.types cimport size_type + +from cudf._lib.column cimport Column from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/nvtext/jaccard.pyx b/python/cudf/cudf/_lib/nvtext/jaccard.pyx index 42fe15d6869..0ebf7c281e3 100644 --- a/python/cudf/cudf/_lib/nvtext/jaccard.pyx +++ b/python/cudf/cudf/_lib/nvtext/jaccard.pyx @@ -5,13 +5,14 @@ from cudf.core.buffer import acquire_spill_lock from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.nvtext.jaccard cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.nvtext.jaccard cimport ( jaccard_index as cpp_jaccard_index, ) -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.types cimport size_type + +from cudf._lib.column cimport Column @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/nvtext/minhash.pyx b/python/cudf/cudf/_lib/nvtext/minhash.pyx index 4c92999e190..5ee15d0e409 100644 --- a/python/cudf/cudf/_lib/nvtext/minhash.pyx +++ b/python/cudf/cudf/_lib/nvtext/minhash.pyx @@ -5,14 +5,15 @@ from cudf.core.buffer import acquire_spill_lock from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.nvtext.minhash cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.nvtext.minhash cimport ( minhash as cpp_minhash, minhash64 as cpp_minhash64, ) -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.types cimport size_type + +from cudf._lib.column cimport Column @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/nvtext/ngrams_tokenize.pyx b/python/cudf/cudf/_lib/nvtext/ngrams_tokenize.pyx index ccd8de8c96f..dec4f037d98 100644 --- a/python/cudf/cudf/_lib/nvtext/ngrams_tokenize.pyx +++ b/python/cudf/cudf/_lib/nvtext/ngrams_tokenize.pyx @@ -5,14 +5,15 @@ from cudf.core.buffer import acquire_spill_lock from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.nvtext.ngrams_tokenize cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.nvtext.ngrams_tokenize cimport ( ngrams_tokenize as cpp_ngrams_tokenize, ) -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.types cimport size_type + +from cudf._lib.column cimport Column from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/nvtext/normalize.pyx b/python/cudf/cudf/_lib/nvtext/normalize.pyx index 9f81f865bb7..5e86a9ce959 100644 --- a/python/cudf/cudf/_lib/nvtext/normalize.pyx +++ b/python/cudf/cudf/_lib/nvtext/normalize.pyx @@ -6,14 +6,15 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.nvtext.normalize cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.nvtext.normalize cimport ( normalize_characters as cpp_normalize_characters, normalize_spaces as cpp_normalize_spaces, ) +from cudf._lib.column cimport Column + @acquire_spill_lock() def normalize_spaces(Column strings): diff --git a/python/cudf/cudf/_lib/nvtext/replace.pyx b/python/cudf/cudf/_lib/nvtext/replace.pyx index ce2edc58d19..61ae3da5782 100644 --- a/python/cudf/cudf/_lib/nvtext/replace.pyx +++ b/python/cudf/cudf/_lib/nvtext/replace.pyx @@ -5,15 +5,16 @@ from cudf.core.buffer import acquire_spill_lock from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.nvtext.replace cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.nvtext.replace cimport ( filter_tokens as cpp_filter_tokens, replace_tokens as cpp_replace_tokens, ) -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.types cimport size_type + +from cudf._lib.column cimport Column from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/nvtext/stemmer.pyx b/python/cudf/cudf/_lib/nvtext/stemmer.pyx index 8f75953ae99..5bf25562fed 100644 --- a/python/cudf/cudf/_lib/nvtext/stemmer.pyx +++ b/python/cudf/cudf/_lib/nvtext/stemmer.pyx @@ -7,16 +7,17 @@ from libcpp.utility cimport move from enum import IntEnum -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.nvtext.stemmer cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.nvtext.stemmer cimport ( is_letter as cpp_is_letter, letter_type, porter_stemmer_measure as cpp_porter_stemmer_measure, underlying_type_t_letter_type, ) -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.types cimport size_type + +from cudf._lib.column cimport Column class LetterType(IntEnum): diff --git a/python/cudf/cudf/_lib/nvtext/subword_tokenize.pyx b/python/cudf/cudf/_lib/nvtext/subword_tokenize.pyx index 1112667a087..ee442ece5c6 100644 --- a/python/cudf/cudf/_lib/nvtext/subword_tokenize.pyx +++ b/python/cudf/cudf/_lib/nvtext/subword_tokenize.pyx @@ -9,9 +9,8 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string from libcpp.utility cimport move -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.nvtext.subword_tokenize cimport ( +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.nvtext.subword_tokenize cimport ( hashed_vocabulary as cpp_hashed_vocabulary, load_vocabulary_file as cpp_load_vocabulary_file, move as tr_move, @@ -19,6 +18,8 @@ from cudf._lib.pylibcudf.libcudf.nvtext.subword_tokenize cimport ( tokenizer_result as cpp_tokenizer_result, ) +from cudf._lib.column cimport Column + cdef class Hashed_Vocabulary: cdef unique_ptr[cpp_hashed_vocabulary] c_obj diff --git a/python/cudf/cudf/_lib/nvtext/tokenize.pyx b/python/cudf/cudf/_lib/nvtext/tokenize.pyx index 98afd94ab1c..a7e63f1e9ae 100644 --- a/python/cudf/cudf/_lib/nvtext/tokenize.pyx +++ b/python/cudf/cudf/_lib/nvtext/tokenize.pyx @@ -5,10 +5,9 @@ from cudf.core.buffer import acquire_spill_lock from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.nvtext.tokenize cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.nvtext.tokenize cimport ( character_tokenize as cpp_character_tokenize, count_tokens as cpp_count_tokens, detokenize as cpp_detokenize, @@ -17,8 +16,10 @@ from cudf._lib.pylibcudf.libcudf.nvtext.tokenize cimport ( tokenize_vocabulary as cpp_tokenize_vocabulary, tokenize_with_vocabulary as cpp_tokenize_with_vocabulary, ) -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.types cimport size_type + +from cudf._lib.column cimport Column from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/orc.pyx b/python/cudf/cudf/_lib/orc.pyx index 9609e3131b4..d506dcd4346 100644 --- a/python/cudf/cudf/_lib/orc.pyx +++ b/python/cudf/cudf/_lib/orc.pyx @@ -14,23 +14,17 @@ from libcpp.vector cimport vector import datetime from collections import OrderedDict -cimport cudf._lib.pylibcudf.libcudf.lists.lists_column_view as cpp_lists_column_view +cimport pylibcudf.libcudf.lists.lists_column_view as cpp_lists_column_view try: import ujson as json except ImportError: import json -cimport cudf._lib.pylibcudf.libcudf.io.types as cudf_io_types -from cudf._lib.column cimport Column -from cudf._lib.io.utils cimport ( - make_sink_info, - make_source_info, - update_column_struct_field_names, -) -from cudf._lib.pylibcudf.io.datasource cimport NativeFileDatasource -from cudf._lib.pylibcudf.libcudf.io.data_sink cimport data_sink -from cudf._lib.pylibcudf.libcudf.io.orc cimport ( +cimport pylibcudf.libcudf.io.types as cudf_io_types +from pylibcudf.io.datasource cimport NativeFileDatasource +from pylibcudf.libcudf.io.data_sink cimport data_sink +from pylibcudf.libcudf.io.orc cimport ( chunked_orc_writer_options, orc_chunked_writer, orc_reader_options, @@ -38,7 +32,7 @@ from cudf._lib.pylibcudf.libcudf.io.orc cimport ( read_orc as libcudf_read_orc, write_orc as libcudf_write_orc, ) -from cudf._lib.pylibcudf.libcudf.io.orc_metadata cimport ( +from pylibcudf.libcudf.io.orc_metadata cimport ( binary_statistics, bucket_statistics, column_statistics, @@ -53,7 +47,7 @@ from cudf._lib.pylibcudf.libcudf.io.orc_metadata cimport ( string_statistics, timestamp_statistics, ) -from cudf._lib.pylibcudf.libcudf.io.types cimport ( +from pylibcudf.libcudf.io.types cimport ( column_in_metadata, compression_type, sink_info, @@ -61,9 +55,16 @@ from cudf._lib.pylibcudf.libcudf.io.types cimport ( table_input_metadata, table_with_metadata, ) -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view -from cudf._lib.pylibcudf.libcudf.types cimport data_type, size_type, type_id -from cudf._lib.variant cimport get_if as std_get_if, holds_alternative +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.types cimport data_type, size_type, type_id +from pylibcudf.variant cimport get_if as std_get_if, holds_alternative + +from cudf._lib.column cimport Column +from cudf._lib.io.utils cimport ( + make_sink_info, + make_source_info, + update_column_struct_field_names, +) from cudf._lib.types import SUPPORTED_NUMPY_TO_LIBCUDF_TYPES diff --git a/python/cudf/cudf/_lib/parquet.pyx b/python/cudf/cudf/_lib/parquet.pyx index 0fffb6ade58..4bfb79ff651 100644 --- a/python/cudf/cudf/_lib/parquet.pyx +++ b/python/cudf/cudf/_lib/parquet.pyx @@ -31,40 +31,43 @@ from libcpp.unordered_map cimport unordered_map from libcpp.utility cimport move from libcpp.vector cimport vector -cimport cudf._lib.pylibcudf.libcudf.io.data_sink as cudf_io_data_sink -cimport cudf._lib.pylibcudf.libcudf.io.types as cudf_io_types -from cudf._lib.column cimport Column -from cudf._lib.io.utils cimport ( - add_df_col_struct_names, - make_sinks_info, - make_source_info, -) -from cudf._lib.pylibcudf.expressions cimport Expression -from cudf._lib.pylibcudf.io.datasource cimport NativeFileDatasource -from cudf._lib.pylibcudf.io.parquet cimport ChunkedParquetReader -from cudf._lib.pylibcudf.libcudf.io.parquet cimport ( +cimport pylibcudf.libcudf.io.data_sink as cudf_io_data_sink +cimport pylibcudf.libcudf.io.types as cudf_io_types +from pylibcudf.expressions cimport Expression +from pylibcudf.io.datasource cimport NativeFileDatasource +from pylibcudf.io.parquet cimport ChunkedParquetReader +from pylibcudf.libcudf.io.parquet cimport ( chunked_parquet_writer_options, merge_row_group_metadata as parquet_merge_metadata, parquet_chunked_writer as cpp_parquet_chunked_writer, parquet_writer_options, write_parquet as parquet_writer, ) -from cudf._lib.pylibcudf.libcudf.io.parquet_metadata cimport ( +from pylibcudf.libcudf.io.parquet_metadata cimport ( parquet_metadata, read_parquet_metadata as parquet_metadata_reader, ) -from cudf._lib.pylibcudf.libcudf.io.types cimport ( +from pylibcudf.libcudf.io.types cimport ( column_in_metadata, table_input_metadata, ) -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.types cimport size_type + +from cudf._lib.column cimport Column +from cudf._lib.io.utils cimport ( + add_df_col_struct_names, + make_sinks_info, + make_source_info, +) from cudf._lib.utils cimport table_view_from_table from pyarrow.lib import NativeFile -import cudf._lib.pylibcudf as plc -from cudf._lib.pylibcudf cimport Table +import pylibcudf as plc + +from pylibcudf cimport Table + from cudf.utils.ioutils import _ROW_GROUP_SIZE_BYTES_DEFAULT diff --git a/python/cudf/cudf/_lib/partitioning.pyx b/python/cudf/cudf/_lib/partitioning.pyx index 708ec4174aa..d94f0e1b564 100644 --- a/python/cudf/cudf/_lib/partitioning.pyx +++ b/python/cudf/cudf/_lib/partitioning.pyx @@ -7,19 +7,18 @@ from libcpp.pair cimport pair from libcpp.utility cimport move from libcpp.vector cimport vector +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.partitioning cimport partition as cpp_partition +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view + from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.partitioning cimport ( - partition as cpp_partition, -) -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view from cudf._lib.utils cimport columns_from_unique_ptr, table_view_from_columns from cudf._lib.reduce import minmax from cudf._lib.stream_compaction import distinct_count as cpp_distinct_count -cimport cudf._lib.pylibcudf.libcudf.types as libcudf_types +cimport pylibcudf.libcudf.types as libcudf_types @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/pylibcudf/io/avro.pxd b/python/cudf/cudf/_lib/pylibcudf/io/avro.pxd deleted file mode 100644 index 3695f36a6e7..00000000000 --- a/python/cudf/cudf/_lib/pylibcudf/io/avro.pxd +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.pylibcudf.io.types cimport SourceInfo, TableWithMetadata -from cudf._lib.pylibcudf.libcudf.io.avro cimport avro_reader_options -from cudf._lib.pylibcudf.libcudf.types cimport size_type - - -cpdef TableWithMetadata read_avro( - SourceInfo source_info, - list columns = *, - size_type skip_rows = *, - size_type num_rows = * -) diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/extract.pxd b/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/extract.pxd deleted file mode 100644 index 57903ca27de..00000000000 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/extract.pxd +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (c) 2020-2024, NVIDIA CORPORATION. - -from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.strings.regex_program cimport regex_program -from cudf._lib.pylibcudf.libcudf.table.table cimport table - - -cdef extern from "cudf/strings/extract.hpp" namespace "cudf::strings" nogil: - - cdef unique_ptr[table] extract( - column_view source_strings, - regex_program) except + diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/char_types.pxd b/python/cudf/cudf/_lib/pylibcudf/strings/char_types.pxd deleted file mode 100644 index a80e02f520c..00000000000 --- a/python/cudf/cudf/_lib/pylibcudf/strings/char_types.pxd +++ /dev/null @@ -1,5 +0,0 @@ -# Copyright (c) 2024, NVIDIA CORPORATION. - -from cudf._lib.pylibcudf.libcudf.strings.char_types cimport ( - string_character_types, -) diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/contains.pxd b/python/cudf/cudf/_lib/pylibcudf/strings/contains.pxd deleted file mode 100644 index 275aa95d97e..00000000000 --- a/python/cudf/cudf/_lib/pylibcudf/strings/contains.pxd +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright (c) 2024, NVIDIA CORPORATION. - -from cudf._lib.pylibcudf.column cimport Column -from cudf._lib.pylibcudf.strings.regex_program cimport RegexProgram - - -cpdef Column contains_re(Column input, RegexProgram prog) diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/regex_flags.pxd b/python/cudf/cudf/_lib/pylibcudf/strings/regex_flags.pxd deleted file mode 100644 index 79937bf574a..00000000000 --- a/python/cudf/cudf/_lib/pylibcudf/strings/regex_flags.pxd +++ /dev/null @@ -1,2 +0,0 @@ -# Copyright (c) 2020-2024, NVIDIA CORPORATION. -from cudf._lib.pylibcudf.libcudf.strings.regex_flags cimport regex_flags diff --git a/python/cudf/cudf/_lib/quantiles.pyx b/python/cudf/cudf/_lib/quantiles.pyx index 7b50c00919a..7666b7ff8da 100644 --- a/python/cudf/cudf/_lib/quantiles.pyx +++ b/python/cudf/cudf/_lib/quantiles.pyx @@ -13,10 +13,11 @@ from cudf._lib.types cimport ( from cudf._lib.types import Interpolation -from cudf._lib.pylibcudf.libcudf.types cimport interpolation, sorted +from pylibcudf.libcudf.types cimport interpolation, sorted + from cudf._lib.utils cimport columns_from_pylibcudf_table -import cudf._lib.pylibcudf as plc +import pylibcudf as plc @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/reduce.pyx b/python/cudf/cudf/_lib/reduce.pyx index 511bba20ef5..944753d28b8 100644 --- a/python/cudf/cudf/_lib/reduce.pyx +++ b/python/cudf/cudf/_lib/reduce.pyx @@ -8,7 +8,8 @@ from cudf._lib.column cimport Column from cudf._lib.scalar cimport DeviceScalar from cudf._lib.types cimport dtype_to_pylibcudf_type, is_decimal_type_id -from cudf._lib import pylibcudf +import pylibcudf + from cudf._lib.aggregation import make_aggregation diff --git a/python/cudf/cudf/_lib/replace.pyx b/python/cudf/cudf/_lib/replace.pyx index 2b5f32c7675..b50c6dd25e3 100644 --- a/python/cudf/cudf/_lib/replace.pyx +++ b/python/cudf/cudf/_lib/replace.pyx @@ -6,7 +6,8 @@ from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column from cudf._lib.scalar cimport DeviceScalar -from cudf._lib import pylibcudf +import pylibcudf + from cudf._lib.scalar import as_device_scalar diff --git a/python/cudf/cudf/_lib/reshape.pyx b/python/cudf/cudf/_lib/reshape.pyx index 6bba8f0df35..6cebeb2bc16 100644 --- a/python/cudf/cudf/_lib/reshape.pyx +++ b/python/cudf/cudf/_lib/reshape.pyx @@ -2,11 +2,12 @@ from cudf.core.buffer import acquire_spill_lock +from pylibcudf.libcudf.types cimport size_type + from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.types cimport size_type from cudf._lib.utils cimport columns_from_pylibcudf_table -import cudf._lib.pylibcudf as plc +import pylibcudf as plc @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/rolling.pyx b/python/cudf/cudf/_lib/rolling.pyx index 5439e70fdce..687b261c2c7 100644 --- a/python/cudf/cudf/_lib/rolling.pyx +++ b/python/cudf/cudf/_lib/rolling.pyx @@ -4,7 +4,8 @@ from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib import pylibcudf +import pylibcudf + from cudf._lib.aggregation import make_aggregation diff --git a/python/cudf/cudf/_lib/round.pyx b/python/cudf/cudf/_lib/round.pyx index f8ad57947c8..f961c09e6f6 100644 --- a/python/cudf/cudf/_lib/round.pyx +++ b/python/cudf/cudf/_lib/round.pyx @@ -4,8 +4,8 @@ from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -import cudf._lib.pylibcudf as plc -from cudf._lib.pylibcudf.round import RoundingMethod +import pylibcudf as plc +from pylibcudf.round import RoundingMethod @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/scalar.pxd b/python/cudf/cudf/_lib/scalar.pxd index b57acbb37f1..27095ca02d4 100644 --- a/python/cudf/cudf/_lib/scalar.pxd +++ b/python/cudf/cudf/_lib/scalar.pxd @@ -3,10 +3,9 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr +from pylibcudf.libcudf.scalar.scalar cimport scalar from rmm._lib.memory_resource cimport DeviceMemoryResource -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar - cdef class DeviceScalar: cdef public object c_value diff --git a/python/cudf/cudf/_lib/scalar.pyx b/python/cudf/cudf/_lib/scalar.pyx index e68398498d1..0dde91316fb 100644 --- a/python/cudf/cudf/_lib/scalar.pyx +++ b/python/cudf/cudf/_lib/scalar.pyx @@ -11,38 +11,40 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.utility cimport move +import pylibcudf + import cudf -from cudf._lib import pylibcudf from cudf._lib.types import LIBCUDF_TO_SUPPORTED_NUMPY_TYPES from cudf.core.dtypes import ListDtype, StructDtype from cudf.core.missing import NA, NaT -cimport cudf._lib.pylibcudf.libcudf.types as libcudf_types +cimport pylibcudf.libcudf.types as libcudf_types # We currently need this cimport because some of the implementations here # access the c_obj of the scalar, and because we need to be able to call # pylibcudf.Scalar.from_libcudf. Both of those are temporarily acceptable until # DeviceScalar is phased out entirely from cuDF Cython (at which point # cudf.Scalar will be directly backed by pylibcudf.Scalar). -from cudf._lib.pylibcudf cimport Scalar as plc_Scalar -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport ( +from pylibcudf cimport Scalar as plc_Scalar +from pylibcudf.libcudf.scalar.scalar cimport ( duration_scalar, list_scalar, scalar, struct_scalar, timestamp_scalar, ) -from cudf._lib.pylibcudf.libcudf.wrappers.durations cimport ( +from pylibcudf.libcudf.wrappers.durations cimport ( duration_ms, duration_ns, duration_s, duration_us, ) -from cudf._lib.pylibcudf.libcudf.wrappers.timestamps cimport ( +from pylibcudf.libcudf.wrappers.timestamps cimport ( timestamp_ms, timestamp_ns, timestamp_s, timestamp_us, ) + from cudf._lib.types cimport dtype_from_column_view, underlying_type_t_type_id diff --git a/python/cudf/cudf/_lib/search.pyx b/python/cudf/cudf/_lib/search.pyx index 1ee73949fd3..8108361052b 100644 --- a/python/cudf/cudf/_lib/search.pyx +++ b/python/cudf/cudf/_lib/search.pyx @@ -4,7 +4,7 @@ from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib import pylibcudf +import pylibcudf @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/sort.pyx b/python/cudf/cudf/_lib/sort.pyx index ff9565b9a89..185552ede82 100644 --- a/python/cudf/cudf/_lib/sort.pyx +++ b/python/cudf/cudf/_lib/sort.pyx @@ -9,18 +9,19 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from libcpp.vector cimport vector +from pylibcudf.libcudf.aggregation cimport rank_method +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.search cimport lower_bound, upper_bound +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.types cimport null_order, order as cpp_order + from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.aggregation cimport rank_method -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.search cimport lower_bound, upper_bound -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view -from cudf._lib.pylibcudf.libcudf.types cimport null_order, order as cpp_order from cudf._lib.utils cimport ( columns_from_pylibcudf_table, table_view_from_columns, ) -from cudf._lib import pylibcudf +import pylibcudf @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/stream_compaction.pyx b/python/cudf/cudf/_lib/stream_compaction.pyx index 834f91f48d9..1b8831940e3 100644 --- a/python/cudf/cudf/_lib/stream_compaction.pyx +++ b/python/cudf/cudf/_lib/stream_compaction.pyx @@ -7,7 +7,7 @@ from libcpp cimport bool from cudf._lib.column cimport Column from cudf._lib.utils cimport columns_from_pylibcudf_table -from cudf._lib import pylibcudf +import pylibcudf @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/string_casting.pyx b/python/cudf/cudf/_lib/string_casting.pyx index dfad7fd101c..8d463829a19 100644 --- a/python/cudf/cudf/_lib/string_casting.pyx +++ b/python/cudf/cudf/_lib/string_casting.pyx @@ -12,39 +12,40 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string from libcpp.utility cimport move -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.strings.convert.convert_booleans cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.strings.convert.convert_booleans cimport ( from_booleans as cpp_from_booleans, to_booleans as cpp_to_booleans, ) -from cudf._lib.pylibcudf.libcudf.strings.convert.convert_datetime cimport ( +from pylibcudf.libcudf.strings.convert.convert_datetime cimport ( from_timestamps as cpp_from_timestamps, is_timestamp as cpp_is_timestamp, to_timestamps as cpp_to_timestamps, ) -from cudf._lib.pylibcudf.libcudf.strings.convert.convert_durations cimport ( +from pylibcudf.libcudf.strings.convert.convert_durations cimport ( from_durations as cpp_from_durations, to_durations as cpp_to_durations, ) -from cudf._lib.pylibcudf.libcudf.strings.convert.convert_floats cimport ( +from pylibcudf.libcudf.strings.convert.convert_floats cimport ( from_floats as cpp_from_floats, to_floats as cpp_to_floats, ) -from cudf._lib.pylibcudf.libcudf.strings.convert.convert_integers cimport ( +from pylibcudf.libcudf.strings.convert.convert_integers cimport ( from_integers as cpp_from_integers, hex_to_integers as cpp_hex_to_integers, integers_to_hex as cpp_integers_to_hex, is_hex as cpp_is_hex, to_integers as cpp_to_integers, ) -from cudf._lib.pylibcudf.libcudf.strings.convert.convert_ipv4 cimport ( +from pylibcudf.libcudf.strings.convert.convert_ipv4 cimport ( integers_to_ipv4 as cpp_integers_to_ipv4, ipv4_to_integers as cpp_ipv4_to_integers, is_ipv4 as cpp_is_ipv4, ) -from cudf._lib.pylibcudf.libcudf.types cimport data_type, type_id +from pylibcudf.libcudf.types cimport data_type, type_id + from cudf._lib.types cimport underlying_type_t_type_id import cudf diff --git a/python/cudf/cudf/_lib/strings/attributes.pyx b/python/cudf/cudf/_lib/strings/attributes.pyx index 1f3d7c4eb1b..fe8c17c9e31 100644 --- a/python/cudf/cudf/_lib/strings/attributes.pyx +++ b/python/cudf/cudf/_lib/strings/attributes.pyx @@ -5,15 +5,16 @@ from cudf.core.buffer import acquire_spill_lock from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.strings.attributes cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.strings.attributes cimport ( code_points as cpp_code_points, count_bytes as cpp_count_bytes, count_characters as cpp_count_characters, ) +from cudf._lib.column cimport Column + @acquire_spill_lock() def count_characters(Column source_strings): diff --git a/python/cudf/cudf/_lib/strings/capitalize.pyx b/python/cudf/cudf/_lib/strings/capitalize.pyx index b3ca6a5ac8f..42c40e2e753 100644 --- a/python/cudf/cudf/_lib/strings/capitalize.pyx +++ b/python/cudf/cudf/_lib/strings/capitalize.pyx @@ -4,7 +4,7 @@ from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -import cudf._lib.pylibcudf as plc +import pylibcudf as plc @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/strings/case.pyx b/python/cudf/cudf/_lib/strings/case.pyx index 38f242a67d6..ad4cbb6f088 100644 --- a/python/cudf/cudf/_lib/strings/case.pyx +++ b/python/cudf/cudf/_lib/strings/case.pyx @@ -4,7 +4,7 @@ from cudf.core.buffer import acquire_spill_lock from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.strings import case +from pylibcudf.strings import case @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/strings/char_types.pyx b/python/cudf/cudf/_lib/strings/char_types.pyx index 5b7b6d19d9e..376a6f8af97 100644 --- a/python/cudf/cudf/_lib/strings/char_types.pyx +++ b/python/cudf/cudf/_lib/strings/char_types.pyx @@ -7,15 +7,16 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.strings.char_types cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.strings.char_types cimport ( all_characters_of_type as cpp_all_characters_of_type, filter_characters_of_type as cpp_filter_characters_of_type, string_character_types, ) + +from cudf._lib.column cimport Column from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/strings/combine.pyx b/python/cudf/cudf/_lib/strings/combine.pyx index 288f333d4d8..76cc13db0da 100644 --- a/python/cudf/cudf/_lib/strings/combine.pyx +++ b/python/cudf/cudf/_lib/strings/combine.pyx @@ -5,18 +5,19 @@ from cudf.core.buffer import acquire_spill_lock from libcpp.memory cimport unique_ptr from libcpp.utility cimport move -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.strings.combine cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.strings.combine cimport ( concatenate as cpp_concatenate, join_list_elements as cpp_join_list_elements, join_strings as cpp_join_strings, output_if_empty_list, separator_on_nulls, ) -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.table.table_view cimport table_view + +from cudf._lib.column cimport Column from cudf._lib.scalar cimport DeviceScalar from cudf._lib.utils cimport table_view_from_columns diff --git a/python/cudf/cudf/_lib/strings/contains.pyx b/python/cudf/cudf/_lib/strings/contains.pyx index 502a1d14696..82f5e06c547 100644 --- a/python/cudf/cudf/_lib/strings/contains.pyx +++ b/python/cudf/cudf/_lib/strings/contains.pyx @@ -9,21 +9,22 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string from libcpp.utility cimport move -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.strings.contains cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.strings.contains cimport ( count_re as cpp_count_re, like as cpp_like, matches_re as cpp_matches_re, ) -from cudf._lib.pylibcudf.libcudf.strings.regex_flags cimport regex_flags -from cudf._lib.pylibcudf.libcudf.strings.regex_program cimport regex_program +from pylibcudf.libcudf.strings.regex_flags cimport regex_flags +from pylibcudf.libcudf.strings.regex_program cimport regex_program + +from cudf._lib.column cimport Column from cudf._lib.scalar cimport DeviceScalar -from cudf._lib.pylibcudf.strings import contains -from cudf._lib.pylibcudf.strings.regex_program import RegexProgram +from pylibcudf.strings import contains +from pylibcudf.strings.regex_program import RegexProgram @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/strings/convert/convert_fixed_point.pyx b/python/cudf/cudf/_lib/strings/convert/convert_fixed_point.pyx index 6faff606226..a8df8c9a92c 100644 --- a/python/cudf/cudf/_lib/strings/convert/convert_fixed_point.pyx +++ b/python/cudf/cudf/_lib/strings/convert/convert_fixed_point.pyx @@ -7,15 +7,16 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.strings.convert.convert_fixed_point cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.strings.convert.convert_fixed_point cimport ( from_fixed_point as cpp_from_fixed_point, is_fixed_point as cpp_is_fixed_point, to_fixed_point as cpp_to_fixed_point, ) -from cudf._lib.pylibcudf.libcudf.types cimport data_type, type_id +from pylibcudf.libcudf.types cimport data_type, type_id + +from cudf._lib.column cimport Column @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/strings/convert/convert_floats.pyx b/python/cudf/cudf/_lib/strings/convert/convert_floats.pyx index 341cbc99dab..7965b588703 100644 --- a/python/cudf/cudf/_lib/strings/convert/convert_floats.pyx +++ b/python/cudf/cudf/_lib/strings/convert/convert_floats.pyx @@ -5,13 +5,14 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.strings.convert.convert_floats cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.strings.convert.convert_floats cimport ( is_float as cpp_is_float, ) +from cudf._lib.column cimport Column + @acquire_spill_lock() def is_float(Column source_strings): diff --git a/python/cudf/cudf/_lib/strings/convert/convert_integers.pyx b/python/cudf/cudf/_lib/strings/convert/convert_integers.pyx index 081b03cdc0d..8b6da2bfa1c 100644 --- a/python/cudf/cudf/_lib/strings/convert/convert_integers.pyx +++ b/python/cudf/cudf/_lib/strings/convert/convert_integers.pyx @@ -5,13 +5,14 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.strings.convert.convert_integers cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.strings.convert.convert_integers cimport ( is_integer as cpp_is_integer, ) +from cudf._lib.column cimport Column + @acquire_spill_lock() def is_integer(Column source_strings): diff --git a/python/cudf/cudf/_lib/strings/convert/convert_lists.pyx b/python/cudf/cudf/_lib/strings/convert/convert_lists.pyx index 4418bf2a72d..73aebf8ab35 100644 --- a/python/cudf/cudf/_lib/strings/convert/convert_lists.pyx +++ b/python/cudf/cudf/_lib/strings/convert/convert_lists.pyx @@ -5,14 +5,15 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.strings.convert.convert_lists cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.strings.convert.convert_lists cimport ( format_list_column as cpp_format_list_column, ) +from cudf._lib.column cimport Column + from cudf._lib.scalar import as_device_scalar from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/strings/convert/convert_urls.pyx b/python/cudf/cudf/_lib/strings/convert/convert_urls.pyx index 5f62efe5c00..e52116d6247 100644 --- a/python/cudf/cudf/_lib/strings/convert/convert_urls.pyx +++ b/python/cudf/cudf/_lib/strings/convert/convert_urls.pyx @@ -5,14 +5,15 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.strings.convert.convert_urls cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.strings.convert.convert_urls cimport ( url_decode as cpp_url_decode, url_encode as cpp_url_encode, ) +from cudf._lib.column cimport Column + @acquire_spill_lock() def url_decode(Column source_strings): diff --git a/python/cudf/cudf/_lib/strings/extract.pyx b/python/cudf/cudf/_lib/strings/extract.pyx index 3b80c4f6368..63f4d57e562 100644 --- a/python/cudf/cudf/_lib/strings/extract.pyx +++ b/python/cudf/cudf/_lib/strings/extract.pyx @@ -8,12 +8,13 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.strings.extract cimport extract as cpp_extract +from pylibcudf.libcudf.strings.regex_flags cimport regex_flags +from pylibcudf.libcudf.strings.regex_program cimport regex_program +from pylibcudf.libcudf.table.table cimport table + from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.strings.extract cimport extract as cpp_extract -from cudf._lib.pylibcudf.libcudf.strings.regex_flags cimport regex_flags -from cudf._lib.pylibcudf.libcudf.strings.regex_program cimport regex_program -from cudf._lib.pylibcudf.libcudf.table.table cimport table from cudf._lib.utils cimport data_from_unique_ptr diff --git a/python/cudf/cudf/_lib/strings/find.pyx b/python/cudf/cudf/_lib/strings/find.pyx index 3c0009ee569..2d284d1aa9d 100644 --- a/python/cudf/cudf/_lib/strings/find.pyx +++ b/python/cudf/cudf/_lib/strings/find.pyx @@ -1,10 +1,12 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. -import cudf._lib.pylibcudf as plc +import pylibcudf as plc + from cudf.core.buffer import acquire_spill_lock +from pylibcudf.libcudf.types cimport size_type + from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.types cimport size_type @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/strings/find_multiple.pyx b/python/cudf/cudf/_lib/strings/find_multiple.pyx index c75f28db21b..1358f8e3c2c 100644 --- a/python/cudf/cudf/_lib/strings/find_multiple.pyx +++ b/python/cudf/cudf/_lib/strings/find_multiple.pyx @@ -5,13 +5,14 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.strings.find_multiple cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.strings.find_multiple cimport ( find_multiple as cpp_find_multiple, ) +from cudf._lib.column cimport Column + @acquire_spill_lock() def find_multiple(Column source_strings, Column target_strings): diff --git a/python/cudf/cudf/_lib/strings/findall.pyx b/python/cudf/cudf/_lib/strings/findall.pyx index 0d409889bc8..3cf2084e30a 100644 --- a/python/cudf/cudf/_lib/strings/findall.pyx +++ b/python/cudf/cudf/_lib/strings/findall.pyx @@ -8,12 +8,13 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.strings.findall cimport findall as cpp_findall +from pylibcudf.libcudf.strings.regex_flags cimport regex_flags +from pylibcudf.libcudf.strings.regex_program cimport regex_program + from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.strings.findall cimport findall as cpp_findall -from cudf._lib.pylibcudf.libcudf.strings.regex_flags cimport regex_flags -from cudf._lib.pylibcudf.libcudf.strings.regex_program cimport regex_program @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/strings/json.pyx b/python/cudf/cudf/_lib/strings/json.pyx index 560f284b56c..c9b0bba088d 100644 --- a/python/cudf/cudf/_lib/strings/json.pyx +++ b/python/cudf/cudf/_lib/strings/json.pyx @@ -5,14 +5,15 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.strings.json cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.strings.json cimport ( get_json_object as cpp_get_json_object, get_json_object_options, ) + +from cudf._lib.column cimport Column from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/strings/padding.pyx b/python/cudf/cudf/_lib/strings/padding.pyx index 9226810951f..d0239e91ec3 100644 --- a/python/cudf/cudf/_lib/strings/padding.pyx +++ b/python/cudf/cudf/_lib/strings/padding.pyx @@ -6,18 +6,19 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.types cimport size_type + from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.types cimport size_type from enum import IntEnum -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.strings.padding cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.strings.padding cimport ( pad as cpp_pad, zfill as cpp_zfill, ) -from cudf._lib.pylibcudf.libcudf.strings.side_type cimport ( +from pylibcudf.libcudf.strings.side_type cimport ( side_type, underlying_type_t_side_type, ) diff --git a/python/cudf/cudf/_lib/strings/repeat.pyx b/python/cudf/cudf/_lib/strings/repeat.pyx index 2b8116848cf..42fcfa5d94e 100644 --- a/python/cudf/cudf/_lib/strings/repeat.pyx +++ b/python/cudf/cudf/_lib/strings/repeat.pyx @@ -5,11 +5,12 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.strings cimport repeat as cpp_repeat +from pylibcudf.libcudf.types cimport size_type + from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.strings cimport repeat as cpp_repeat -from cudf._lib.pylibcudf.libcudf.types cimport size_type @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/strings/replace.pyx b/python/cudf/cudf/_lib/strings/replace.pyx index 374831f1833..a260c4e4f45 100644 --- a/python/cudf/cudf/_lib/strings/replace.pyx +++ b/python/cudf/cudf/_lib/strings/replace.pyx @@ -4,11 +4,12 @@ from libc.stdint cimport int32_t from cudf.core.buffer import acquire_spill_lock +from pylibcudf.libcudf.types cimport size_type + from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.types cimport size_type from cudf._lib.scalar cimport DeviceScalar -import cudf._lib.pylibcudf as plc +import pylibcudf as plc @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/strings/replace_re.pyx b/python/cudf/cudf/_lib/strings/replace_re.pyx index e13880a6186..fffc8b7c3f6 100644 --- a/python/cudf/cudf/_lib/strings/replace_re.pyx +++ b/python/cudf/cudf/_lib/strings/replace_re.pyx @@ -8,17 +8,18 @@ from libcpp.vector cimport vector from cudf.core.buffer import acquire_spill_lock -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.strings.regex_flags cimport regex_flags -from cudf._lib.pylibcudf.libcudf.strings.regex_program cimport regex_program -from cudf._lib.pylibcudf.libcudf.strings.replace_re cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.strings.regex_flags cimport regex_flags +from pylibcudf.libcudf.strings.regex_program cimport regex_program +from pylibcudf.libcudf.strings.replace_re cimport ( replace_re as cpp_replace_re, replace_with_backrefs as cpp_replace_with_backrefs, ) -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.types cimport size_type + +from cudf._lib.column cimport Column from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/strings/split/partition.pyx b/python/cudf/cudf/_lib/strings/split/partition.pyx index be377c0f86b..a81fb18e752 100644 --- a/python/cudf/cudf/_lib/strings/split/partition.pyx +++ b/python/cudf/cudf/_lib/strings/split/partition.pyx @@ -5,14 +5,15 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.strings.split.partition cimport ( +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.strings.split.partition cimport ( partition as cpp_partition, rpartition as cpp_rpartition, ) -from cudf._lib.pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table cimport table + +from cudf._lib.column cimport Column from cudf._lib.scalar cimport DeviceScalar from cudf._lib.utils cimport data_from_unique_ptr diff --git a/python/cudf/cudf/_lib/strings/split/split.pyx b/python/cudf/cudf/_lib/strings/split/split.pyx index 942235686d7..f481fea4c51 100644 --- a/python/cudf/cudf/_lib/strings/split/split.pyx +++ b/python/cudf/cudf/_lib/strings/split/split.pyx @@ -7,13 +7,12 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.strings.regex_flags cimport regex_flags -from cudf._lib.pylibcudf.libcudf.strings.regex_program cimport regex_program -from cudf._lib.pylibcudf.libcudf.strings.split.split cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.strings.regex_flags cimport regex_flags +from pylibcudf.libcudf.strings.regex_program cimport regex_program +from pylibcudf.libcudf.strings.split.split cimport ( rsplit as cpp_rsplit, rsplit_re as cpp_rsplit_re, rsplit_record as cpp_rsplit_record, @@ -23,8 +22,10 @@ from cudf._lib.pylibcudf.libcudf.strings.split.split cimport ( split_record as cpp_split_record, split_record_re as cpp_split_record_re, ) -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.types cimport size_type + +from cudf._lib.column cimport Column from cudf._lib.scalar cimport DeviceScalar from cudf._lib.utils cimport data_from_unique_ptr diff --git a/python/cudf/cudf/_lib/strings/strip.pyx b/python/cudf/cudf/_lib/strings/strip.pyx index 199fa5fc3b6..acf52cb7b9f 100644 --- a/python/cudf/cudf/_lib/strings/strip.pyx +++ b/python/cudf/cudf/_lib/strings/strip.pyx @@ -5,12 +5,13 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.strings.side_type cimport side_type +from pylibcudf.libcudf.strings.strip cimport strip as cpp_strip + from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.strings.side_type cimport side_type -from cudf._lib.pylibcudf.libcudf.strings.strip cimport strip as cpp_strip from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/strings/substring.pyx b/python/cudf/cudf/_lib/strings/substring.pyx index 706c21c0634..db96d99c7b6 100644 --- a/python/cudf/cudf/_lib/strings/substring.pyx +++ b/python/cudf/cudf/_lib/strings/substring.pyx @@ -10,7 +10,7 @@ from cudf._lib.scalar import as_device_scalar from cudf._lib.scalar cimport DeviceScalar -import cudf._lib.pylibcudf as plc +import pylibcudf as plc @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/strings/translate.pyx b/python/cudf/cudf/_lib/strings/translate.pyx index 8846e2e280d..3fad91bbfc0 100644 --- a/python/cudf/cudf/_lib/strings/translate.pyx +++ b/python/cudf/cudf/_lib/strings/translate.pyx @@ -8,16 +8,17 @@ from libcpp.vector cimport vector from cudf.core.buffer import acquire_spill_lock -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.strings.translate cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.strings.translate cimport ( filter_characters as cpp_filter_characters, filter_type, translate as cpp_translate, ) -from cudf._lib.pylibcudf.libcudf.types cimport char_utf8 +from pylibcudf.libcudf.types cimport char_utf8 + +from cudf._lib.column cimport Column from cudf._lib.scalar cimport DeviceScalar diff --git a/python/cudf/cudf/_lib/strings/wrap.pyx b/python/cudf/cudf/_lib/strings/wrap.pyx index 92750f21e4d..eed5cf33b10 100644 --- a/python/cudf/cudf/_lib/strings/wrap.pyx +++ b/python/cudf/cudf/_lib/strings/wrap.pyx @@ -5,11 +5,12 @@ from libcpp.utility cimport move from cudf.core.buffer import acquire_spill_lock +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.strings.wrap cimport wrap as cpp_wrap +from pylibcudf.libcudf.types cimport size_type + from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.strings.wrap cimport wrap as cpp_wrap -from cudf._lib.pylibcudf.libcudf.types cimport size_type @acquire_spill_lock() diff --git a/python/cudf/cudf/_lib/strings_udf.pyx b/python/cudf/cudf/_lib/strings_udf.pyx index 7610cad0b40..78fc9f08bd8 100644 --- a/python/cudf/cudf/_lib/strings_udf.pyx +++ b/python/cudf/cudf/_lib/strings_udf.pyx @@ -2,7 +2,7 @@ from libc.stdint cimport uint8_t, uint16_t, uintptr_t -from cudf._lib.pylibcudf.libcudf.strings_udf cimport ( +from pylibcudf.libcudf.strings_udf cimport ( get_character_cases_table as cpp_get_character_cases_table, get_character_flags_table as cpp_get_character_flags_table, get_special_case_mapping_table as cpp_get_special_case_mapping_table, @@ -15,17 +15,17 @@ from libcpp.utility cimport move from cudf.core.buffer import as_buffer -from rmm._lib.device_buffer cimport DeviceBuffer, device_buffer - -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column, column_view -from cudf._lib.pylibcudf.libcudf.strings_udf cimport ( +from pylibcudf.libcudf.column.column cimport column, column_view +from pylibcudf.libcudf.strings_udf cimport ( column_from_udf_string_array as cpp_column_from_udf_string_array, free_udf_string_array as cpp_free_udf_string_array, get_cuda_build_version as cpp_get_cuda_build_version, to_string_view_array as cpp_to_string_view_array, udf_string, ) +from rmm._lib.device_buffer cimport DeviceBuffer, device_buffer + +from cudf._lib.column cimport Column def get_cuda_build_version(): diff --git a/python/cudf/cudf/_lib/text.pyx b/python/cudf/cudf/_lib/text.pyx index 6e63b8758b8..ece69b424bb 100644 --- a/python/cudf/cudf/_lib/text.pyx +++ b/python/cudf/cudf/_lib/text.pyx @@ -8,9 +8,8 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string from libcpp.utility cimport move -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.io.text cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.io.text cimport ( byte_range_info, data_chunk_source, make_source, @@ -20,6 +19,8 @@ from cudf._lib.pylibcudf.libcudf.io.text cimport ( parse_options, ) +from cudf._lib.column cimport Column + def read_text(object filepaths_or_buffers, object delimiter=None, diff --git a/python/cudf/cudf/_lib/timezone.pyx b/python/cudf/cudf/_lib/timezone.pyx index 53977e984c2..bff3b2c4ce4 100644 --- a/python/cudf/cudf/_lib/timezone.pyx +++ b/python/cudf/cudf/_lib/timezone.pyx @@ -5,10 +5,11 @@ from libcpp.optional cimport make_optional from libcpp.string cimport string from libcpp.utility cimport move -from cudf._lib.pylibcudf.libcudf.io.timezone cimport ( +from pylibcudf.libcudf.io.timezone cimport ( make_timezone_transition_table as cpp_make_timezone_transition_table, ) -from cudf._lib.pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table cimport table + from cudf._lib.utils cimport columns_from_unique_ptr diff --git a/python/cudf/cudf/_lib/transform.pyx b/python/cudf/cudf/_lib/transform.pyx index 622725e06a3..baa08a545ec 100644 --- a/python/cudf/cudf/_lib/transform.pyx +++ b/python/cudf/cudf/_lib/transform.pyx @@ -15,23 +15,23 @@ from libcpp.pair cimport pair from libcpp.string cimport string from libcpp.utility cimport move -from rmm._lib.device_buffer cimport DeviceBuffer, device_buffer - -cimport cudf._lib.pylibcudf.libcudf.transform as libcudf_transform -from cudf._lib.column cimport Column -from cudf._lib.pylibcudf cimport transform as plc_transform -from cudf._lib.pylibcudf.expressions cimport Expression -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.expressions cimport expression -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view -from cudf._lib.pylibcudf.libcudf.types cimport ( +cimport pylibcudf.libcudf.transform as libcudf_transform +from pylibcudf cimport transform as plc_transform +from pylibcudf.expressions cimport Expression +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.expressions cimport expression +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.types cimport ( bitmask_type, data_type, size_type, type_id, ) +from rmm._lib.device_buffer cimport DeviceBuffer, device_buffer + +from cudf._lib.column cimport Column from cudf._lib.types cimport underlying_type_t_type_id from cudf._lib.utils cimport ( columns_from_unique_ptr, diff --git a/python/cudf/cudf/_lib/transpose.pyx b/python/cudf/cudf/_lib/transpose.pyx index 82b23439e6a..f78fbd4c844 100644 --- a/python/cudf/cudf/_lib/transpose.pyx +++ b/python/cudf/cudf/_lib/transpose.pyx @@ -4,10 +4,11 @@ from libcpp.memory cimport unique_ptr from libcpp.pair cimport pair from libcpp.utility cimport move +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.transpose cimport transpose as cpp_transpose + from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view -from cudf._lib.pylibcudf.libcudf.transpose cimport transpose as cpp_transpose from cudf._lib.utils cimport columns_from_table_view, table_view_from_columns diff --git a/python/cudf/cudf/_lib/types.pxd b/python/cudf/cudf/_lib/types.pxd index 519d5ff8554..4fd3d31841e 100644 --- a/python/cudf/cudf/_lib/types.pxd +++ b/python/cudf/cudf/_lib/types.pxd @@ -3,11 +3,9 @@ from libc.stdint cimport int32_t from libcpp cimport bool -cimport cudf._lib.pylibcudf.libcudf.types as libcudf_types -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.lists.lists_column_view cimport ( - lists_column_view, -) +cimport pylibcudf.libcudf.types as libcudf_types +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.lists.lists_column_view cimport lists_column_view ctypedef bool underlying_type_t_order ctypedef bool underlying_type_t_null_order diff --git a/python/cudf/cudf/_lib/types.pyx b/python/cudf/cudf/_lib/types.pyx index 253fdf7b0d9..861bb063707 100644 --- a/python/cudf/cudf/_lib/types.pyx +++ b/python/cudf/cudf/_lib/types.pyx @@ -7,19 +7,19 @@ import pandas as pd from libcpp.memory cimport make_shared, shared_ptr -cimport cudf._lib.pylibcudf.libcudf.types as libcudf_types -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.lists.lists_column_view cimport ( - lists_column_view, -) +cimport pylibcudf.libcudf.types as libcudf_types +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.lists.lists_column_view cimport lists_column_view + from cudf._lib.types cimport ( underlying_type_t_interpolation, underlying_type_t_order, underlying_type_t_sorted, ) +import pylibcudf + import cudf -from cudf._lib import pylibcudf class TypeId(IntEnum): diff --git a/python/cudf/cudf/_lib/unary.pyx b/python/cudf/cudf/_lib/unary.pyx index 2f58c4512d6..d5602fd5a1c 100644 --- a/python/cudf/cudf/_lib/unary.pyx +++ b/python/cudf/cudf/_lib/unary.pyx @@ -5,7 +5,8 @@ from cudf._lib.types cimport dtype_to_pylibcudf_type import numpy as np -from cudf._lib import pylibcudf +import pylibcudf + from cudf.api.types import is_decimal_dtype from cudf.core.buffer import acquire_spill_lock diff --git a/python/cudf/cudf/_lib/utils.pxd b/python/cudf/cudf/_lib/utils.pxd index 1d55f7218dc..ff97fe80310 100644 --- a/python/cudf/cudf/_lib/utils.pxd +++ b/python/cudf/cudf/_lib/utils.pxd @@ -4,8 +4,8 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string from libcpp.vector cimport vector -from cudf._lib.pylibcudf.libcudf.column.column cimport column_view -from cudf._lib.pylibcudf.libcudf.table.table cimport table, table_view +from pylibcudf.libcudf.column.column cimport column_view +from pylibcudf.libcudf.table.table cimport table, table_view cdef data_from_unique_ptr( diff --git a/python/cudf/cudf/_lib/utils.pyx b/python/cudf/cudf/_lib/utils.pyx index 267432a0182..cae28d02ef4 100644 --- a/python/cudf/cudf/_lib/utils.pyx +++ b/python/cudf/cudf/_lib/utils.pyx @@ -10,11 +10,12 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from libcpp.vector cimport vector +from pylibcudf.libcudf.column.column cimport column, column_view +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.types cimport size_type + from cudf._lib.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column, column_view -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view -from cudf._lib.pylibcudf.libcudf.types cimport size_type try: import ujson as json diff --git a/python/cudf/cudf/core/_internals/expressions.py b/python/cudf/cudf/core/_internals/expressions.py index 63714a78572..67bde5a72b2 100644 --- a/python/cudf/cudf/core/_internals/expressions.py +++ b/python/cudf/cudf/core/_internals/expressions.py @@ -6,8 +6,8 @@ import pyarrow as pa -import cudf._lib.pylibcudf as plc -from cudf._lib.pylibcudf.expressions import ( +import pylibcudf as plc +from pylibcudf.expressions import ( ASTOperator, ColumnReference, Expression, diff --git a/python/cudf/cudf/core/buffer/buffer.py b/python/cudf/cudf/core/buffer/buffer.py index 80dbbe4c048..32ae8c5ee53 100644 --- a/python/cudf/cudf/core/buffer/buffer.py +++ b/python/cudf/cudf/core/buffer/buffer.py @@ -11,6 +11,7 @@ import numpy from typing_extensions import Self +import pylibcudf import rmm import cudf @@ -501,7 +502,7 @@ def get_ptr_and_size(array_interface: Mapping) -> tuple[int, int]: shape = array_interface["shape"] or (1,) strides = array_interface["strides"] itemsize = cudf.dtype(array_interface["typestr"]).itemsize - if strides is None or cudf._lib.pylibcudf.column.is_c_contiguous( + if strides is None or pylibcudf.column.is_c_contiguous( shape, strides, itemsize ): nelem = math.prod(shape) diff --git a/python/cudf/cudf/core/column/numerical.py b/python/cudf/cudf/core/column/numerical.py index ac36813202a..a37355dfcda 100644 --- a/python/cudf/cudf/core/column/numerical.py +++ b/python/cudf/cudf/core/column/numerical.py @@ -9,9 +9,10 @@ import pandas as pd from typing_extensions import Self +import pylibcudf + import cudf from cudf import _lib as libcudf -from cudf._lib import pylibcudf from cudf.api.types import is_integer, is_scalar from cudf.core.column import ColumnBase, as_column, column, string from cudf.core.dtypes import CategoricalDtype diff --git a/python/cudf/cudf/core/indexed_frame.py b/python/cudf/cudf/core/indexed_frame.py index 8eb6de79bce..2263dfd5c98 100644 --- a/python/cudf/cudf/core/indexed_frame.py +++ b/python/cudf/cudf/core/indexed_frame.py @@ -24,6 +24,8 @@ import pandas as pd from typing_extensions import Self +import pylibcudf + import cudf import cudf._lib as libcudf import cudf.core @@ -6311,7 +6313,7 @@ def rank( if method not in {"average", "min", "max", "first", "dense"}: raise KeyError(method) - method_enum = libcudf.pylibcudf.aggregation.RankMethod[method.upper()] + method_enum = pylibcudf.aggregation.RankMethod[method.upper()] if na_option not in {"keep", "top", "bottom"}: raise ValueError( "na_option must be one of 'keep', 'top', or 'bottom'" diff --git a/python/cudf/cudf/pandas/__init__.py b/python/cudf/cudf/pandas/__init__.py index e88e795671e..bacf1f7e77b 100644 --- a/python/cudf/cudf/pandas/__init__.py +++ b/python/cudf/cudf/pandas/__init__.py @@ -5,10 +5,9 @@ import os import warnings +import pylibcudf import rmm.mr -from cudf._lib import pylibcudf - from .fast_slow_proxy import is_proxy_object from .magics import load_ipython_extension from .profiler import Profiler diff --git a/python/cudf/pyproject.toml b/python/cudf/pyproject.toml index 60ac171f3d7..9db52164eca 100644 --- a/python/cudf/pyproject.toml +++ b/python/cudf/pyproject.toml @@ -30,6 +30,7 @@ dependencies = [ "pandas>=2.0,<2.2.3dev0", "ptxcompiler", "pyarrow>=16.1.0,<16.2.0a0", + "pylibcudf==24.10.*,>=0.0.0a0", "rich", "rmm==24.10.*,>=0.0.0a0", "typing_extensions>=4.0.0", @@ -88,6 +89,7 @@ known_dask = [ ] known_rapids = [ "rmm", + "pylibcudf" ] known_first_party = [ "cudf", @@ -127,6 +129,7 @@ requires = [ "ninja", "numpy==1.23.*", "pyarrow==16.1.0.*", + "pylibcudf==24.10.*,>=0.0.0a0", "rmm==24.10.*,>=0.0.0a0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. diff --git a/python/cudf_kafka/cudf_kafka/_lib/CMakeLists.txt b/python/cudf_kafka/cudf_kafka/_lib/CMakeLists.txt index 4f3b9220a4f..1b205537d73 100644 --- a/python/cudf_kafka/cudf_kafka/_lib/CMakeLists.txt +++ b/python/cudf_kafka/cudf_kafka/_lib/CMakeLists.txt @@ -1,5 +1,5 @@ # ============================================================================= -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except # in compliance with the License. You may obtain a copy of the License at @@ -20,5 +20,5 @@ rapids_cython_create_modules( SOURCE_FILES "${cython_sources}" LINKED_LIBRARIES "${linked_libraries}" ) -include(../../../cudf/cmake/Modules/LinkPyarrowHeaders.cmake) +include(../../../pylibcudf/cmake/Modules/LinkPyarrowHeaders.cmake) link_to_pyarrow_headers("${RAPIDS_CYTHON_CREATED_TARGETS}") diff --git a/python/cudf_kafka/cudf_kafka/_lib/kafka.pxd b/python/cudf_kafka/cudf_kafka/_lib/kafka.pxd index 2de0bf39785..e65b0d233b9 100644 --- a/python/cudf_kafka/cudf_kafka/_lib/kafka.pxd +++ b/python/cudf_kafka/cudf_kafka/_lib/kafka.pxd @@ -6,9 +6,8 @@ from libcpp.map cimport map from libcpp.memory cimport unique_ptr from libcpp.string cimport string from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.io.datasource cimport Datasource -from cudf._lib.pylibcudf.libcudf.io.datasource cimport datasource +from pylibcudf.io.datasource cimport Datasource +from pylibcudf.libcudf.io.datasource cimport datasource cdef extern from "cudf_kafka/kafka_callback.hpp" \ diff --git a/python/cudf_kafka/cudf_kafka/_lib/kafka.pyx b/python/cudf_kafka/cudf_kafka/_lib/kafka.pyx index 2927dc0aa9a..20aa43b0134 100644 --- a/python/cudf_kafka/cudf_kafka/_lib/kafka.pyx +++ b/python/cudf_kafka/cudf_kafka/_lib/kafka.pyx @@ -6,8 +6,7 @@ from libcpp.map cimport map from libcpp.memory cimport make_unique, unique_ptr from libcpp.string cimport string from libcpp.utility cimport move - -from cudf._lib.pylibcudf.libcudf.io.datasource cimport datasource +from pylibcudf.libcudf.io.datasource cimport datasource from cudf_kafka._lib.kafka cimport kafka_consumer diff --git a/python/cudf_polars/cudf_polars/containers/column.py b/python/cudf_polars/cudf_polars/containers/column.py index 02018548b2c..dd3b771e305 100644 --- a/python/cudf_polars/cudf_polars/containers/column.py +++ b/python/cudf_polars/cudf_polars/containers/column.py @@ -8,7 +8,7 @@ import functools from typing import TYPE_CHECKING -import cudf._lib.pylibcudf as plc +import pylibcudf as plc if TYPE_CHECKING: from typing_extensions import Self diff --git a/python/cudf_polars/cudf_polars/containers/dataframe.py b/python/cudf_polars/cudf_polars/containers/dataframe.py index dba76855329..7c28e7b9a6c 100644 --- a/python/cudf_polars/cudf_polars/containers/dataframe.py +++ b/python/cudf_polars/cudf_polars/containers/dataframe.py @@ -10,11 +10,10 @@ from typing import TYPE_CHECKING, cast import pyarrow as pa +import pylibcudf as plc import polars as pl -import cudf._lib.pylibcudf as plc - from cudf_polars.containers.column import NamedColumn from cudf_polars.utils import dtypes diff --git a/python/cudf_polars/cudf_polars/dsl/expr.py b/python/cudf_polars/cudf_polars/dsl/expr.py index 9e0fca3f52f..e1b4d30b76b 100644 --- a/python/cudf_polars/cudf_polars/dsl/expr.py +++ b/python/cudf_polars/cudf_polars/dsl/expr.py @@ -21,11 +21,10 @@ from typing import TYPE_CHECKING, Any, ClassVar, NamedTuple import pyarrow as pa +import pylibcudf as plc from polars.polars import _expr_nodes as pl_expr -import cudf._lib.pylibcudf as plc - from cudf_polars.containers import Column, NamedColumn from cudf_polars.utils import dtypes, sorting diff --git a/python/cudf_polars/cudf_polars/dsl/ir.py b/python/cudf_polars/cudf_polars/dsl/ir.py index 3754addeb11..019f00f4fca 100644 --- a/python/cudf_polars/cudf_polars/dsl/ir.py +++ b/python/cudf_polars/cudf_polars/dsl/ir.py @@ -21,12 +21,11 @@ from typing import TYPE_CHECKING, Any, Callable, ClassVar import pyarrow as pa +import pylibcudf as plc from typing_extensions import assert_never import polars as pl -import cudf._lib.pylibcudf as plc - import cudf_polars.dsl.expr as expr from cudf_polars.containers import DataFrame, NamedColumn from cudf_polars.utils import sorting diff --git a/python/cudf_polars/cudf_polars/dsl/translate.py b/python/cudf_polars/cudf_polars/dsl/translate.py index dec45679c75..6dc97c7cb51 100644 --- a/python/cudf_polars/cudf_polars/dsl/translate.py +++ b/python/cudf_polars/cudf_polars/dsl/translate.py @@ -11,14 +11,13 @@ from typing import Any import pyarrow as pa +import pylibcudf as plc from typing_extensions import assert_never import polars as pl import polars.polars as plrs from polars.polars import _expr_nodes as pl_expr, _ir_nodes as pl_ir -import cudf._lib.pylibcudf as plc - from cudf_polars.dsl import expr, ir from cudf_polars.typing import NodeTraverser from cudf_polars.utils import dtypes diff --git a/python/cudf_polars/cudf_polars/typing/__init__.py b/python/cudf_polars/cudf_polars/typing/__init__.py index c04eac41bb7..02440e67fde 100644 --- a/python/cudf_polars/cudf_polars/typing/__init__.py +++ b/python/cudf_polars/cudf_polars/typing/__init__.py @@ -8,9 +8,9 @@ from collections.abc import Mapping from typing import TYPE_CHECKING, Literal, Protocol, Union -from polars.polars import _expr_nodes as pl_expr, _ir_nodes as pl_ir +import pylibcudf as plc -import cudf._lib.pylibcudf as plc +from polars.polars import _expr_nodes as pl_expr, _ir_nodes as pl_ir if TYPE_CHECKING: from typing import Callable diff --git a/python/cudf_polars/cudf_polars/utils/dtypes.py b/python/cudf_polars/cudf_polars/utils/dtypes.py index cd68d021286..7f6ea1edfd9 100644 --- a/python/cudf_polars/cudf_polars/utils/dtypes.py +++ b/python/cudf_polars/cudf_polars/utils/dtypes.py @@ -8,12 +8,11 @@ from functools import cache import pyarrow as pa +import pylibcudf as plc from typing_extensions import assert_never import polars as pl -import cudf._lib.pylibcudf as plc - __all__ = ["from_polars", "downcast_arrow_lists"] diff --git a/python/cudf_polars/cudf_polars/utils/sorting.py b/python/cudf_polars/cudf_polars/utils/sorting.py index 57f94c4ec4c..17ea44e5b1b 100644 --- a/python/cudf_polars/cudf_polars/utils/sorting.py +++ b/python/cudf_polars/cudf_polars/utils/sorting.py @@ -7,7 +7,7 @@ from typing import TYPE_CHECKING -import cudf._lib.pylibcudf as plc +import pylibcudf as plc if TYPE_CHECKING: from collections.abc import Sequence diff --git a/python/cudf_polars/pyproject.toml b/python/cudf_polars/pyproject.toml index 424c83a5199..c380853035d 100644 --- a/python/cudf_polars/pyproject.toml +++ b/python/cudf_polars/pyproject.toml @@ -19,8 +19,8 @@ authors = [ license = { text = "Apache 2.0" } requires-python = ">=3.9" dependencies = [ - "cudf==24.10.*,>=0.0.0a0", "polars>=1.0,<1.3", + "pylibcudf==24.10.*,>=0.0.0a0", ] # 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", diff --git a/python/cudf_polars/tests/containers/test_column.py b/python/cudf_polars/tests/containers/test_column.py index 4f3c0de5975..19919877f84 100644 --- a/python/cudf_polars/tests/containers/test_column.py +++ b/python/cudf_polars/tests/containers/test_column.py @@ -6,10 +6,9 @@ from functools import partial import pyarrow +import pylibcudf as plc import pytest -import cudf._lib.pylibcudf as plc - from cudf_polars.containers import Column, NamedColumn diff --git a/python/cudf_polars/tests/containers/test_dataframe.py b/python/cudf_polars/tests/containers/test_dataframe.py index 87508e17407..6b470268084 100644 --- a/python/cudf_polars/tests/containers/test_dataframe.py +++ b/python/cudf_polars/tests/containers/test_dataframe.py @@ -3,12 +3,11 @@ from __future__ import annotations +import pylibcudf as plc import pytest import polars as pl -import cudf._lib.pylibcudf as plc - from cudf_polars.containers import DataFrame, NamedColumn diff --git a/python/cudf_polars/tests/dsl/test_expr.py b/python/cudf_polars/tests/dsl/test_expr.py index ddc3ca66d86..b7d4672daca 100644 --- a/python/cudf_polars/tests/dsl/test_expr.py +++ b/python/cudf_polars/tests/dsl/test_expr.py @@ -3,10 +3,9 @@ from __future__ import annotations +import pylibcudf as plc import pytest -import cudf._lib.pylibcudf as plc - from cudf_polars.dsl import expr diff --git a/python/cudf_polars/tests/expressions/test_literal.py b/python/cudf_polars/tests/expressions/test_literal.py index 5bd3131d1d7..ced49bdc254 100644 --- a/python/cudf_polars/tests/expressions/test_literal.py +++ b/python/cudf_polars/tests/expressions/test_literal.py @@ -2,12 +2,11 @@ # SPDX-License-Identifier: Apache-2.0 from __future__ import annotations +import pylibcudf as plc import pytest import polars as pl -import cudf._lib.pylibcudf as plc - from cudf_polars.testing.asserts import ( assert_gpu_result_equal, assert_ir_translation_raises, diff --git a/python/cudf_polars/tests/expressions/test_sort.py b/python/cudf_polars/tests/expressions/test_sort.py index d46df92db94..76c7648813a 100644 --- a/python/cudf_polars/tests/expressions/test_sort.py +++ b/python/cudf_polars/tests/expressions/test_sort.py @@ -4,12 +4,11 @@ import itertools +import pylibcudf as plc import pytest import polars as pl -import cudf._lib.pylibcudf as plc - from cudf_polars import translate_ir from cudf_polars.testing.asserts import assert_gpu_result_equal diff --git a/python/cudf_polars/tests/utils/test_broadcast.py b/python/cudf_polars/tests/utils/test_broadcast.py index 69ad1e519e2..35aaef44e1f 100644 --- a/python/cudf_polars/tests/utils/test_broadcast.py +++ b/python/cudf_polars/tests/utils/test_broadcast.py @@ -3,10 +3,9 @@ from __future__ import annotations +import pylibcudf as plc import pytest -import cudf._lib.pylibcudf as plc - from cudf_polars.containers import NamedColumn from cudf_polars.dsl.ir import broadcast diff --git a/python/pylibcudf/CMakeLists.txt b/python/pylibcudf/CMakeLists.txt new file mode 100644 index 00000000000..424d8372280 --- /dev/null +++ b/python/pylibcudf/CMakeLists.txt @@ -0,0 +1,100 @@ +# ============================================================================= +# Copyright (c) 2022-2024, NVIDIA CORPORATION. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except +# in compliance with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software distributed under the License +# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express +# or implied. See the License for the specific language governing permissions and limitations under +# the License. +# ============================================================================= + +cmake_minimum_required(VERSION 3.26.4 FATAL_ERROR) + +include(../../rapids_config.cmake) +include(rapids-cuda) +rapids_cuda_init_architectures(pylibcudf) + +project( + pylibcudf + VERSION "${RAPIDS_VERSION}" + LANGUAGES CXX CUDA +) + +option(FIND_CUDF_CPP "Search for existing CUDF C++ installations before defaulting to local files" + OFF +) +option(USE_LIBARROW_FROM_PYARROW "Only use the libarrow contained in pyarrow" OFF) +mark_as_advanced(USE_LIBARROW_FROM_PYARROW) + +# Find Python early so that later commands can use it +find_package(Python 3.9 REQUIRED COMPONENTS Interpreter) + +# If the user requested it we attempt to find CUDF. +if(FIND_CUDF_CPP) + include(rapids-cpm) + include(rapids-export) + include(rapids-find) + rapids_cpm_init() + + if(USE_LIBARROW_FROM_PYARROW) + # We need to find arrow before libcudf since libcudf requires it but doesn't bundle arrow + # libraries. These variables have no effect because we are always searching for arrow via + # pyarrow, but they must be set as they are required arguments to the function in + # get_arrow.cmake. + set(CUDF_USE_ARROW_STATIC OFF) + set(CUDF_ENABLE_ARROW_S3 OFF) + set(CUDF_ENABLE_ARROW_ORC OFF) + set(CUDF_ENABLE_ARROW_PYTHON OFF) + set(CUDF_ENABLE_ARROW_PARQUET OFF) + include(../../cpp/cmake/thirdparty/get_arrow.cmake) + endif() + + find_package(cudf "${RAPIDS_VERSION}" REQUIRED) + + # an installed version of libcudf doesn't provide the dlpack headers so we need to download dlpack + # for the interop.pyx + include(../../cpp/cmake/thirdparty/get_dlpack.cmake) +else() + set(cudf_FOUND OFF) +endif() + +include(rapids-cython-core) + +if(NOT cudf_FOUND) + set(BUILD_TESTS OFF) + set(BUILD_BENCHMARKS OFF) + set(CUDF_BUILD_TESTUTIL OFF) + set(CUDF_BUILD_STREAMS_TEST_UTIL OFF) + set(CUDA_STATIC_RUNTIME ON) + + add_subdirectory(../../cpp cudf-cpp EXCLUDE_FROM_ALL) + + # libcudf targets are excluded by default above via EXCLUDE_FROM_ALL to remove extraneous + # components like headers from libcudacxx, but we do need the libraries. However, we want to + # control where they are installed to. Since there are multiple subpackages of pylibcudf that + # require access to libcudf, we place the library and all its dependent artifacts in the cudf + # directory as a single source of truth and modify the other rpaths appropriately. + set(cython_lib_dir pylibcudf) + include(cmake/Modules/WheelHelpers.cmake) + # TODO: This install is currently overzealous. We should only install the libraries that are + # downloaded by CPM during the build, not libraries that were found on the system. However, in + # practice right this would only be a problem is if libcudf was not found but some of the + # dependencies were, and we have no real use cases where that happens. + install_aliased_imported_targets( + TARGETS cudf arrow_shared nvcomp::nvcomp nvcomp::nvcomp_gdeflate nvcomp::nvcomp_bitcomp + DESTINATION ${cython_lib_dir} + ) +endif() + +rapids_cython_init() + +include(cmake/Modules/LinkPyarrowHeaders.cmake) +add_subdirectory(pylibcudf) + +if(DEFINED cython_lib_dir) + rapids_cython_add_rpath_entries(TARGET cudf PATHS "${cython_lib_dir}") +endif() diff --git a/python/pylibcudf/README.md b/python/pylibcudf/README.md new file mode 120000 index 00000000000..fe840054137 --- /dev/null +++ b/python/pylibcudf/README.md @@ -0,0 +1 @@ +../../README.md \ No newline at end of file diff --git a/python/cudf/cmake/Modules/LinkPyarrowHeaders.cmake b/python/pylibcudf/cmake/Modules/LinkPyarrowHeaders.cmake similarity index 100% rename from python/cudf/cmake/Modules/LinkPyarrowHeaders.cmake rename to python/pylibcudf/cmake/Modules/LinkPyarrowHeaders.cmake diff --git a/python/cudf/cmake/Modules/WheelHelpers.cmake b/python/pylibcudf/cmake/Modules/WheelHelpers.cmake similarity index 100% rename from python/cudf/cmake/Modules/WheelHelpers.cmake rename to python/pylibcudf/cmake/Modules/WheelHelpers.cmake diff --git a/python/cudf/cudf/_lib/pylibcudf/CMakeLists.txt b/python/pylibcudf/pylibcudf/CMakeLists.txt similarity index 96% rename from python/cudf/cudf/_lib/pylibcudf/CMakeLists.txt rename to python/pylibcudf/pylibcudf/CMakeLists.txt index da32d530928..ab21bfe97ab 100644 --- a/python/cudf/cudf/_lib/pylibcudf/CMakeLists.txt +++ b/python/pylibcudf/pylibcudf/CMakeLists.txt @@ -54,7 +54,7 @@ rapids_cython_create_modules( ) include(${rapids-cmake-dir}/export/find_package_root.cmake) -include(../../../../../cpp/cmake/thirdparty/get_nanoarrow.cmake) +include(../../../cpp/cmake/thirdparty/get_nanoarrow.cmake) target_link_libraries(pylibcudf_interop PUBLIC nanoarrow) add_subdirectory(libcudf) diff --git a/python/pylibcudf/pylibcudf/VERSION b/python/pylibcudf/pylibcudf/VERSION new file mode 120000 index 00000000000..d62dc733efd --- /dev/null +++ b/python/pylibcudf/pylibcudf/VERSION @@ -0,0 +1 @@ +../../../VERSION \ No newline at end of file diff --git a/python/cudf/cudf/_lib/pylibcudf/__init__.pxd b/python/pylibcudf/pylibcudf/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/__init__.pxd rename to python/pylibcudf/pylibcudf/__init__.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/__init__.py b/python/pylibcudf/pylibcudf/__init__.py similarity index 99% rename from python/cudf/cudf/_lib/pylibcudf/__init__.py rename to python/pylibcudf/pylibcudf/__init__.py index 9705eba84b1..677fdaf80d0 100644 --- a/python/cudf/cudf/_lib/pylibcudf/__init__.py +++ b/python/pylibcudf/pylibcudf/__init__.py @@ -12,6 +12,7 @@ filling, groupby, interop, + io, join, lists, merge, diff --git a/python/pylibcudf/pylibcudf/_version.py b/python/pylibcudf/pylibcudf/_version.py new file mode 100644 index 00000000000..d2765e5d53c --- /dev/null +++ b/python/pylibcudf/pylibcudf/_version.py @@ -0,0 +1,24 @@ +# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +# SPDX-License-Identifier: Apache-2.0 + +from __future__ import annotations + +import importlib.resources + +__version__ = ( + importlib.resources.files(__package__) + .joinpath("VERSION") + .read_text() + .strip() +) +try: + __git_commit__ = ( + importlib.resources.files(__package__) + .joinpath("GIT_COMMIT") + .read_text() + .strip() + ) +except FileNotFoundError: + __git_commit__ = "" + +__all__ = ["__git_commit__", "__version__"] diff --git a/python/cudf/cudf/_lib/pylibcudf/aggregation.pxd b/python/pylibcudf/pylibcudf/aggregation.pxd similarity index 96% rename from python/cudf/cudf/_lib/pylibcudf/aggregation.pxd rename to python/pylibcudf/pylibcudf/aggregation.pxd index 0981d0e855a..c9ab1eab21c 100644 --- a/python/cudf/cudf/_lib/pylibcudf/aggregation.pxd +++ b/python/pylibcudf/pylibcudf/aggregation.pxd @@ -1,8 +1,7 @@ # Copyright (c) 2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.aggregation cimport ( +from pylibcudf.libcudf.aggregation cimport ( Kind as kind_t, aggregation, correlation_type, @@ -15,7 +14,7 @@ from cudf._lib.pylibcudf.libcudf.aggregation cimport ( rolling_aggregation, scan_aggregation, ) -from cudf._lib.pylibcudf.libcudf.types cimport ( +from pylibcudf.libcudf.types cimport ( interpolation, nan_equality, null_equality, diff --git a/python/cudf/cudf/_lib/pylibcudf/aggregation.pyx b/python/pylibcudf/pylibcudf/aggregation.pyx similarity index 96% rename from python/cudf/cudf/_lib/pylibcudf/aggregation.pyx rename to python/pylibcudf/pylibcudf/aggregation.pyx index eed2f6de585..e510b738f70 100644 --- a/python/cudf/cudf/_lib/pylibcudf/aggregation.pyx +++ b/python/pylibcudf/pylibcudf/aggregation.pyx @@ -4,8 +4,7 @@ from cython.operator cimport dereference from libcpp.cast cimport dynamic_cast from libcpp.memory cimport unique_ptr from libcpp.utility cimport move - -from cudf._lib.pylibcudf.libcudf.aggregation cimport ( +from pylibcudf.libcudf.aggregation cimport ( aggregation, correlation_type, ewm_history, @@ -41,7 +40,7 @@ from cudf._lib.pylibcudf.libcudf.aggregation cimport ( rolling_aggregation, scan_aggregation, ) -from cudf._lib.pylibcudf.libcudf.types cimport ( +from pylibcudf.libcudf.types cimport ( interpolation, nan_equality, null_equality, @@ -51,18 +50,16 @@ from cudf._lib.pylibcudf.libcudf.types cimport ( size_type, ) -from cudf._lib.pylibcudf.libcudf.aggregation import Kind # no-cython-lint -from cudf._lib.pylibcudf.libcudf.aggregation import \ +from pylibcudf.libcudf.aggregation import Kind # no-cython-lint +from pylibcudf.libcudf.aggregation import \ correlation_type as CorrelationType # no-cython-lint -from cudf._lib.pylibcudf.libcudf.aggregation import \ +from pylibcudf.libcudf.aggregation import \ ewm_history as EWMHistory # no-cython-lint -from cudf._lib.pylibcudf.libcudf.aggregation import \ +from pylibcudf.libcudf.aggregation import \ rank_method as RankMethod # no-cython-lint -from cudf._lib.pylibcudf.libcudf.aggregation import \ +from pylibcudf.libcudf.aggregation import \ rank_percentage as RankPercentage # no-cython-lint -from cudf._lib.pylibcudf.libcudf.aggregation import ( # no-cython-lint - udf_type as UdfType, -) +from pylibcudf.libcudf.aggregation import udf_type as UdfType # no-cython-lint from .types cimport DataType @@ -71,7 +68,7 @@ cdef class Aggregation: """A type of aggregation to perform. Aggregations are passed to APIs like - :py:func:`~cudf._lib.pylibcudf.groupby.GroupBy.aggregate` to indicate what + :py:func:`~pylibcudf.groupby.GroupBy.aggregate` to indicate what operations to perform. Using a class for aggregations provides a unified API for handling parametrizable aggregations. This class should never be instantiated directly, only via one of the factory functions. diff --git a/python/cudf/cudf/_lib/pylibcudf/binaryop.pxd b/python/pylibcudf/pylibcudf/binaryop.pxd similarity index 90% rename from python/cudf/cudf/_lib/pylibcudf/binaryop.pxd rename to python/pylibcudf/pylibcudf/binaryop.pxd index 2411e28ac66..06625e9e2db 100644 --- a/python/cudf/cudf/_lib/pylibcudf/binaryop.pxd +++ b/python/pylibcudf/pylibcudf/binaryop.pxd @@ -1,8 +1,7 @@ # Copyright (c) 2024, NVIDIA CORPORATION. from libcpp cimport bool - -from cudf._lib.pylibcudf.libcudf.binaryop cimport binary_operator +from pylibcudf.libcudf.binaryop cimport binary_operator from .column cimport Column from .scalar cimport Scalar diff --git a/python/cudf/cudf/_lib/pylibcudf/binaryop.pyx b/python/pylibcudf/pylibcudf/binaryop.pyx similarity index 86% rename from python/cudf/cudf/_lib/pylibcudf/binaryop.pyx rename to python/pylibcudf/pylibcudf/binaryop.pyx index 44d9f4ad04a..5a67f4d6cdb 100644 --- a/python/cudf/cudf/_lib/pylibcudf/binaryop.pyx +++ b/python/pylibcudf/pylibcudf/binaryop.pyx @@ -5,12 +5,11 @@ from cython.operator import dereference from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.utility cimport move +from pylibcudf.libcudf cimport binaryop as cpp_binaryop +from pylibcudf.libcudf.binaryop cimport binary_operator +from pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf cimport binaryop as cpp_binaryop -from cudf._lib.pylibcudf.libcudf.binaryop cimport binary_operator -from cudf._lib.pylibcudf.libcudf.column.column cimport column - -from cudf._lib.pylibcudf.libcudf.binaryop import \ +from pylibcudf.libcudf.binaryop import \ binary_operator as BinaryOperator # no-cython-lint from .column cimport Column @@ -27,9 +26,9 @@ cpdef Column binary_operation( """Perform a binary operation between a column and another column or scalar. ``lhs`` and ``rhs`` may be a - :py:class:`~cudf._lib.pylibcudf.column.Column` or a - :py:class:`~cudf._lib.pylibcudf.scalar.Scalar`, but at least one must be a - :py:class:`~cudf._lib.pylibcudf.column.Column`. + :py:class:`~pylibcudf.column.Column` or a + :py:class:`~pylibcudf.scalar.Scalar`, but at least one must be a + :py:class:`~pylibcudf.column.Column`. For details, see :cpp:func:`binary_operation`. diff --git a/python/cudf/cudf/_lib/pylibcudf/column.pxd b/python/pylibcudf/pylibcudf/column.pxd similarity index 84% rename from python/cudf/cudf/_lib/pylibcudf/column.pxd rename to python/pylibcudf/pylibcudf/column.pxd index 13ee0a70681..92d63e4e495 100644 --- a/python/cudf/cudf/_lib/pylibcudf/column.pxd +++ b/python/pylibcudf/pylibcudf/column.pxd @@ -2,16 +2,13 @@ from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport ( column_view, mutable_column_view, ) -from cudf._lib.pylibcudf.libcudf.lists.lists_column_view cimport ( - lists_column_view, -) -from cudf._lib.pylibcudf.libcudf.types cimport bitmask_type, size_type +from pylibcudf.libcudf.lists.lists_column_view cimport lists_column_view +from pylibcudf.libcudf.types cimport bitmask_type, size_type from .gpumemoryview cimport gpumemoryview from .types cimport DataType diff --git a/python/cudf/cudf/_lib/pylibcudf/column.pyx b/python/pylibcudf/pylibcudf/column.pyx similarity index 98% rename from python/cudf/cudf/_lib/pylibcudf/column.pyx rename to python/pylibcudf/pylibcudf/column.pyx index 1d9902b0374..a37a12fc7e1 100644 --- a/python/cudf/cudf/_lib/pylibcudf/column.pyx +++ b/python/pylibcudf/pylibcudf/column.pyx @@ -3,16 +3,13 @@ from cython.operator cimport dereference from libcpp.memory cimport make_unique, unique_ptr from libcpp.utility cimport move +from pylibcudf.libcudf.column.column cimport column, column_contents +from pylibcudf.libcudf.column.column_factories cimport make_column_from_scalar +from pylibcudf.libcudf.scalar.scalar cimport scalar +from pylibcudf.libcudf.types cimport size_type from rmm._lib.device_buffer cimport DeviceBuffer -from cudf._lib.pylibcudf.libcudf.column.column cimport column, column_contents -from cudf._lib.pylibcudf.libcudf.column.column_factories cimport ( - make_column_from_scalar, -) -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar -from cudf._lib.pylibcudf.libcudf.types cimport size_type - from .gpumemoryview cimport gpumemoryview from .scalar cimport Scalar from .types cimport DataType, size_of, type_id diff --git a/python/cudf/cudf/_lib/pylibcudf/column_factories.pxd b/python/pylibcudf/pylibcudf/column_factories.pxd similarity index 92% rename from python/cudf/cudf/_lib/pylibcudf/column_factories.pxd rename to python/pylibcudf/pylibcudf/column_factories.pxd index 9dbd74ab16c..fef02359240 100644 --- a/python/cudf/cudf/_lib/pylibcudf/column_factories.pxd +++ b/python/pylibcudf/pylibcudf/column_factories.pxd @@ -1,8 +1,7 @@ # Copyright (c) 2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.utility cimport move - -from cudf._lib.pylibcudf.libcudf.types cimport mask_state, size_type +from pylibcudf.libcudf.types cimport mask_state, size_type from .column cimport Column from .types cimport DataType, size_type, type_id diff --git a/python/cudf/cudf/_lib/pylibcudf/column_factories.pyx b/python/pylibcudf/pylibcudf/column_factories.pyx similarity index 96% rename from python/cudf/cudf/_lib/pylibcudf/column_factories.pyx rename to python/pylibcudf/pylibcudf/column_factories.pyx index ef7f512f0e5..4601cba515a 100644 --- a/python/cudf/cudf/_lib/pylibcudf/column_factories.pyx +++ b/python/pylibcudf/pylibcudf/column_factories.pyx @@ -1,9 +1,8 @@ # Copyright (c) 2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.utility cimport move - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_factories cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_factories cimport ( make_duration_column as cpp_make_duration_column, make_empty_column as cpp_make_empty_column, make_fixed_point_column as cpp_make_fixed_point_column, @@ -11,7 +10,7 @@ from cudf._lib.pylibcudf.libcudf.column.column_factories cimport ( make_numeric_column as cpp_make_numeric_column, make_timestamp_column as cpp_make_timestamp_column, ) -from cudf._lib.pylibcudf.libcudf.types cimport mask_state, size_type +from pylibcudf.libcudf.types cimport mask_state, size_type from .types cimport DataType, type_id diff --git a/python/cudf/cudf/_lib/pylibcudf/concatenate.pxd b/python/pylibcudf/pylibcudf/concatenate.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/concatenate.pxd rename to python/pylibcudf/pylibcudf/concatenate.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/concatenate.pyx b/python/pylibcudf/pylibcudf/concatenate.pyx similarity index 80% rename from python/cudf/cudf/_lib/pylibcudf/concatenate.pyx rename to python/pylibcudf/pylibcudf/concatenate.pyx index 5e40f921b2c..8bdcc086e0f 100644 --- a/python/cudf/cudf/_lib/pylibcudf/concatenate.pyx +++ b/python/pylibcudf/pylibcudf/concatenate.pyx @@ -3,12 +3,11 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf cimport concatenate as cpp_concatenate -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf cimport concatenate as cpp_concatenate +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view from .column cimport Column from .table cimport Table diff --git a/python/cudf/cudf/_lib/pylibcudf/copying.pxd b/python/pylibcudf/pylibcudf/copying.pxd similarity index 94% rename from python/cudf/cudf/_lib/pylibcudf/copying.pxd rename to python/pylibcudf/pylibcudf/copying.pxd index 06543d3ca92..7dfed437673 100644 --- a/python/cudf/cudf/_lib/pylibcudf/copying.pxd +++ b/python/pylibcudf/pylibcudf/copying.pxd @@ -1,12 +1,11 @@ # Copyright (c) 2023-2024, NVIDIA CORPORATION. from libcpp cimport bool as cbool - -from cudf._lib.pylibcudf.libcudf.copying cimport ( +from pylibcudf.libcudf.copying cimport ( mask_allocation_policy, out_of_bounds_policy, ) -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.types cimport size_type from .column cimport Column from .scalar cimport Scalar diff --git a/python/cudf/cudf/_lib/pylibcudf/copying.pyx b/python/pylibcudf/pylibcudf/copying.pyx similarity index 96% rename from python/cudf/cudf/_lib/pylibcudf/copying.pyx rename to python/pylibcudf/pylibcudf/copying.pyx index 2d59deb3864..9743119d92a 100644 --- a/python/cudf/cudf/_lib/pylibcudf/copying.pyx +++ b/python/pylibcudf/pylibcudf/copying.pyx @@ -6,29 +6,28 @@ from libcpp.functional cimport reference_wrapper from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from libcpp.vector cimport vector - # TODO: We want to make cpp a more full-featured package so that we can access # directly from that. It will make namespacing much cleaner in pylibcudf. What # we really want here would be # cimport libcudf... libcudf.copying.algo(...) -from cudf._lib.pylibcudf.libcudf cimport copying as cpp_copying -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport ( +from pylibcudf.libcudf cimport copying as cpp_copying +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport ( column_view, mutable_column_view, ) -from cudf._lib.pylibcudf.libcudf.copying cimport ( +from pylibcudf.libcudf.copying cimport ( mask_allocation_policy, out_of_bounds_policy, ) -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.scalar.scalar cimport scalar +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.types cimport size_type -from cudf._lib.pylibcudf.libcudf.copying import \ +from pylibcudf.libcudf.copying import \ mask_allocation_policy as MaskAllocationPolicy # no-cython-lint -from cudf._lib.pylibcudf.libcudf.copying import \ +from pylibcudf.libcudf.copying import \ out_of_bounds_policy as OutOfBoundsPolicy # no-cython-lint from .column cimport Column diff --git a/python/cudf/cudf/_lib/pylibcudf/datetime.pxd b/python/pylibcudf/pylibcudf/datetime.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/datetime.pxd rename to python/pylibcudf/pylibcudf/datetime.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/datetime.pyx b/python/pylibcudf/pylibcudf/datetime.pyx similarity index 78% rename from python/cudf/cudf/_lib/pylibcudf/datetime.pyx rename to python/pylibcudf/pylibcudf/datetime.pyx index 82351327de6..0ddc68bcb9d 100644 --- a/python/cudf/cudf/_lib/pylibcudf/datetime.pyx +++ b/python/pylibcudf/pylibcudf/datetime.pyx @@ -1,11 +1,8 @@ # Copyright (c) 2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.utility cimport move - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.datetime cimport ( - extract_year as cpp_extract_year, -) +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.datetime cimport extract_year as cpp_extract_year from .column cimport Column diff --git a/python/cudf/cudf/_lib/pylibcudf/exception_handler.pxd b/python/pylibcudf/pylibcudf/exception_handler.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/exception_handler.pxd rename to python/pylibcudf/pylibcudf/exception_handler.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/experimental.pxd b/python/pylibcudf/pylibcudf/experimental.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/experimental.pxd rename to python/pylibcudf/pylibcudf/experimental.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/experimental.pyx b/python/pylibcudf/pylibcudf/experimental.pyx similarity index 92% rename from python/cudf/cudf/_lib/pylibcudf/experimental.pyx rename to python/pylibcudf/pylibcudf/experimental.pyx index 1e2a682d879..b25a53e13b2 100644 --- a/python/cudf/cudf/_lib/pylibcudf/experimental.pyx +++ b/python/pylibcudf/pylibcudf/experimental.pyx @@ -2,8 +2,7 @@ from libcpp cimport bool from libcpp.string cimport string - -from cudf._lib.pylibcudf.libcudf cimport experimental as cpp_experimental +from pylibcudf.libcudf cimport experimental as cpp_experimental cpdef enable_prefetching(str key): diff --git a/python/cudf/cudf/_lib/pylibcudf/expressions.pxd b/python/pylibcudf/pylibcudf/expressions.pxd similarity index 91% rename from python/cudf/cudf/_lib/pylibcudf/expressions.pxd rename to python/pylibcudf/pylibcudf/expressions.pxd index 64825b89d9f..65660b7c449 100644 --- a/python/cudf/cudf/_lib/pylibcudf/expressions.pxd +++ b/python/pylibcudf/pylibcudf/expressions.pxd @@ -1,8 +1,7 @@ # Copyright (c) 2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.string cimport string - -from cudf._lib.pylibcudf.libcudf.expressions cimport ( +from pylibcudf.libcudf.expressions cimport ( ast_operator, expression, table_reference, diff --git a/python/cudf/cudf/_lib/pylibcudf/expressions.pyx b/python/pylibcudf/pylibcudf/expressions.pyx similarity index 94% rename from python/cudf/cudf/_lib/pylibcudf/expressions.pyx rename to python/pylibcudf/pylibcudf/expressions.pyx index b983a617533..a44c9e25987 100644 --- a/python/cudf/cudf/_lib/pylibcudf/expressions.pyx +++ b/python/pylibcudf/pylibcudf/expressions.pyx @@ -1,7 +1,7 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.pylibcudf.libcudf.expressions import \ +from pylibcudf.libcudf.expressions import \ ast_operator as ASTOperator # no-cython-lint -from cudf._lib.pylibcudf.libcudf.expressions import \ +from pylibcudf.libcudf.expressions import \ table_reference as TableReference # no-cython-lint from cython.operator cimport dereference @@ -9,22 +9,21 @@ from libc.stdint cimport int32_t, int64_t from libcpp.memory cimport make_unique, unique_ptr from libcpp.string cimport string from libcpp.utility cimport move - -from cudf._lib.pylibcudf.libcudf cimport expressions as libcudf_exp -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport ( +from pylibcudf.libcudf cimport expressions as libcudf_exp +from pylibcudf.libcudf.scalar.scalar cimport ( duration_scalar, numeric_scalar, string_scalar, timestamp_scalar, ) -from cudf._lib.pylibcudf.libcudf.types cimport size_type, type_id -from cudf._lib.pylibcudf.libcudf.wrappers.durations cimport ( +from pylibcudf.libcudf.types cimport size_type, type_id +from pylibcudf.libcudf.wrappers.durations cimport ( duration_ms, duration_ns, duration_s, duration_us, ) -from cudf._lib.pylibcudf.libcudf.wrappers.timestamps cimport ( +from pylibcudf.libcudf.wrappers.timestamps cimport ( timestamp_ms, timestamp_ns, timestamp_s, diff --git a/python/cudf/cudf/_lib/pylibcudf/filling.pxd b/python/pylibcudf/pylibcudf/filling.pxd similarity index 90% rename from python/cudf/cudf/_lib/pylibcudf/filling.pxd rename to python/pylibcudf/pylibcudf/filling.pxd index 3560ebf2ea2..b9345f8cd42 100644 --- a/python/cudf/cudf/_lib/pylibcudf/filling.pxd +++ b/python/pylibcudf/pylibcudf/filling.pxd @@ -1,5 +1,5 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.types cimport size_type from .column cimport Column from .scalar cimport Scalar diff --git a/python/cudf/cudf/_lib/pylibcudf/filling.pyx b/python/pylibcudf/pylibcudf/filling.pyx similarity index 94% rename from python/cudf/cudf/_lib/pylibcudf/filling.pyx rename to python/pylibcudf/pylibcudf/filling.pyx index 05f67681428..61b430e64aa 100644 --- a/python/cudf/cudf/_lib/pylibcudf/filling.pyx +++ b/python/pylibcudf/pylibcudf/filling.pyx @@ -3,16 +3,15 @@ from cython.operator cimport dereference from libcpp.memory cimport unique_ptr from libcpp.utility cimport move - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.filling cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.filling cimport ( fill as cpp_fill, fill_in_place as cpp_fill_in_place, repeat as cpp_repeat, sequence as cpp_sequence, ) -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.types cimport size_type from .column cimport Column from .scalar cimport Scalar diff --git a/python/cudf/cudf/_lib/pylibcudf/gpumemoryview.pxd b/python/pylibcudf/pylibcudf/gpumemoryview.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/gpumemoryview.pxd rename to python/pylibcudf/pylibcudf/gpumemoryview.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/gpumemoryview.pyx b/python/pylibcudf/pylibcudf/gpumemoryview.pyx similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/gpumemoryview.pyx rename to python/pylibcudf/pylibcudf/gpumemoryview.pyx diff --git a/python/cudf/cudf/_lib/pylibcudf/groupby.pxd b/python/pylibcudf/pylibcudf/groupby.pxd similarity index 87% rename from python/cudf/cudf/_lib/pylibcudf/groupby.pxd rename to python/pylibcudf/pylibcudf/groupby.pxd index eaa05c26986..79af2f1b746 100644 --- a/python/cudf/cudf/_lib/pylibcudf/groupby.pxd +++ b/python/pylibcudf/pylibcudf/groupby.pxd @@ -3,20 +3,19 @@ from libcpp.memory cimport unique_ptr from libcpp.pair cimport pair from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf.aggregation cimport ( +from pylibcudf.libcudf.aggregation cimport ( aggregation, groupby_aggregation, groupby_scan_aggregation, ) -from cudf._lib.pylibcudf.libcudf.groupby cimport ( +from pylibcudf.libcudf.groupby cimport ( aggregation_request, aggregation_result, groupby, scan_request, ) -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.types cimport null_order, order +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.types cimport null_order, order from .column cimport Column from .table cimport Table diff --git a/python/cudf/cudf/_lib/pylibcudf/groupby.pyx b/python/pylibcudf/pylibcudf/groupby.pyx similarity index 96% rename from python/cudf/cudf/_lib/pylibcudf/groupby.pyx rename to python/pylibcudf/pylibcudf/groupby.pyx index f5bb46ca6a2..ae5d33aaa46 100644 --- a/python/cudf/cudf/_lib/pylibcudf/groupby.pyx +++ b/python/pylibcudf/pylibcudf/groupby.pyx @@ -6,18 +6,17 @@ from libcpp.memory cimport make_unique, unique_ptr from libcpp.pair cimport pair from libcpp.utility cimport move from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf.groupby cimport ( +from pylibcudf.libcudf.groupby cimport ( aggregation_request, aggregation_result, groupby, groups, scan_request, ) -from cudf._lib.pylibcudf.libcudf.replace cimport replace_policy -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.replace cimport replace_policy +from pylibcudf.libcudf.scalar.scalar cimport scalar +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.types cimport size_type from .aggregation cimport Aggregation from .column cimport Column @@ -156,7 +155,7 @@ cdef class GroupBy: Parameters ---------- requests : List[GroupByRequest] - The list of `~.cudf._lib.pylibcudf.groupby.GroupByRequest` , each + The list of `~.pylibcudf.groupby.GroupByRequest` , each representing a set of aggregations to perform on a given column of values. Returns @@ -188,7 +187,7 @@ cdef class GroupBy: Parameters ---------- requests : List[GroupByRequest] - The list of `~.cudf._lib.pylibcudf.groupby.GroupByRequest` , each + The list of `~.pylibcudf.groupby.GroupByRequest` , each representing a set of aggregations to perform on a given column of values. Returns diff --git a/python/cudf/cudf/_lib/pylibcudf/interop.pyx b/python/pylibcudf/pylibcudf/interop.pyx similarity index 98% rename from python/cudf/cudf/_lib/pylibcudf/interop.pyx rename to python/pylibcudf/pylibcudf/interop.pyx index caa19724786..d54e5b7ba1f 100644 --- a/python/cudf/cudf/_lib/pylibcudf/interop.pyx +++ b/python/pylibcudf/pylibcudf/interop.pyx @@ -11,8 +11,8 @@ from functools import singledispatch from pyarrow import lib as pa -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.interop cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.interop cimport ( ArrowArray, ArrowArrayStream, ArrowSchema, @@ -22,7 +22,7 @@ from cudf._lib.pylibcudf.libcudf.interop cimport ( to_arrow_host_raw, to_arrow_schema_raw, ) -from cudf._lib.pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table cimport table from . cimport copying from .column cimport Column diff --git a/python/cudf/cudf/_lib/pylibcudf/io/CMakeLists.txt b/python/pylibcudf/pylibcudf/io/CMakeLists.txt similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/io/CMakeLists.txt rename to python/pylibcudf/pylibcudf/io/CMakeLists.txt diff --git a/python/cudf/cudf/_lib/pylibcudf/io/__init__.pxd b/python/pylibcudf/pylibcudf/io/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/io/__init__.pxd rename to python/pylibcudf/pylibcudf/io/__init__.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/io/__init__.py b/python/pylibcudf/pylibcudf/io/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/io/__init__.py rename to python/pylibcudf/pylibcudf/io/__init__.py diff --git a/python/pylibcudf/pylibcudf/io/avro.pxd b/python/pylibcudf/pylibcudf/io/avro.pxd new file mode 100644 index 00000000000..8696fcb3c15 --- /dev/null +++ b/python/pylibcudf/pylibcudf/io/avro.pxd @@ -0,0 +1,12 @@ +# Copyright (c) 2024, NVIDIA CORPORATION. +from pylibcudf.io.types cimport SourceInfo, TableWithMetadata +from pylibcudf.libcudf.io.avro cimport avro_reader_options +from pylibcudf.libcudf.types cimport size_type + + +cpdef TableWithMetadata read_avro( + SourceInfo source_info, + list columns = *, + size_type skip_rows = *, + size_type num_rows = * +) diff --git a/python/cudf/cudf/_lib/pylibcudf/io/avro.pyx b/python/pylibcudf/pylibcudf/io/avro.pyx similarity index 89% rename from python/cudf/cudf/_lib/pylibcudf/io/avro.pyx rename to python/pylibcudf/pylibcudf/io/avro.pyx index 538bd8aa322..667c67f4c36 100644 --- a/python/cudf/cudf/_lib/pylibcudf/io/avro.pyx +++ b/python/pylibcudf/pylibcudf/io/avro.pyx @@ -3,13 +3,12 @@ from libcpp.string cimport string from libcpp.utility cimport move from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.io.types cimport SourceInfo, TableWithMetadata -from cudf._lib.pylibcudf.libcudf.io.avro cimport ( +from pylibcudf.io.types cimport SourceInfo, TableWithMetadata +from pylibcudf.libcudf.io.avro cimport ( avro_reader_options, read_avro as cpp_read_avro, ) -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.types cimport size_type cpdef TableWithMetadata read_avro( diff --git a/python/cudf/cudf/_lib/pylibcudf/io/csv.pyx b/python/pylibcudf/pylibcudf/io/csv.pyx similarity index 97% rename from python/cudf/cudf/_lib/pylibcudf/io/csv.pyx rename to python/pylibcudf/pylibcudf/io/csv.pyx index e9efb5befee..b53d6771cd6 100644 --- a/python/cudf/cudf/_lib/pylibcudf/io/csv.pyx +++ b/python/pylibcudf/pylibcudf/io/csv.pyx @@ -5,19 +5,18 @@ from libcpp.map cimport map from libcpp.string cimport string from libcpp.utility cimport move from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.io.types cimport SourceInfo, TableWithMetadata -from cudf._lib.pylibcudf.libcudf.io.csv cimport ( +from pylibcudf.io.types cimport SourceInfo, TableWithMetadata +from pylibcudf.libcudf.io.csv cimport ( csv_reader_options, read_csv as cpp_read_csv, ) -from cudf._lib.pylibcudf.libcudf.io.types cimport ( +from pylibcudf.libcudf.io.types cimport ( compression_type, quote_style, table_with_metadata, ) -from cudf._lib.pylibcudf.libcudf.types cimport data_type, size_type -from cudf._lib.pylibcudf.types cimport DataType +from pylibcudf.libcudf.types cimport data_type, size_type +from pylibcudf.types cimport DataType cdef tuple _process_parse_dates_hex(list cols): diff --git a/python/cudf/cudf/_lib/pylibcudf/io/datasource.pxd b/python/pylibcudf/pylibcudf/io/datasource.pxd similarity index 69% rename from python/cudf/cudf/_lib/pylibcudf/io/datasource.pxd rename to python/pylibcudf/pylibcudf/io/datasource.pxd index a0a9c3fa0d4..05c03dceee2 100644 --- a/python/cudf/cudf/_lib/pylibcudf/io/datasource.pxd +++ b/python/pylibcudf/pylibcudf/io/datasource.pxd @@ -1,9 +1,8 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport shared_ptr - -from cudf._lib.pylibcudf.libcudf.io.arrow_io_source cimport arrow_io_source -from cudf._lib.pylibcudf.libcudf.io.datasource cimport datasource +from pylibcudf.libcudf.io.arrow_io_source cimport arrow_io_source +from pylibcudf.libcudf.io.datasource cimport datasource cdef class Datasource: diff --git a/python/cudf/cudf/_lib/pylibcudf/io/datasource.pyx b/python/pylibcudf/pylibcudf/io/datasource.pyx similarity index 87% rename from python/cudf/cudf/_lib/pylibcudf/io/datasource.pyx rename to python/pylibcudf/pylibcudf/io/datasource.pyx index 8f265f585de..6cc509b74cb 100644 --- a/python/cudf/cudf/_lib/pylibcudf/io/datasource.pyx +++ b/python/pylibcudf/pylibcudf/io/datasource.pyx @@ -3,9 +3,8 @@ from libcpp.memory cimport shared_ptr from pyarrow.includes.libarrow cimport CRandomAccessFile from pyarrow.lib cimport NativeFile - -from cudf._lib.pylibcudf.libcudf.io.arrow_io_source cimport arrow_io_source -from cudf._lib.pylibcudf.libcudf.io.datasource cimport datasource +from pylibcudf.libcudf.io.arrow_io_source cimport arrow_io_source +from pylibcudf.libcudf.io.datasource cimport datasource import warnings diff --git a/python/cudf/cudf/_lib/pylibcudf/io/json.pxd b/python/pylibcudf/pylibcudf/io/json.pxd similarity index 85% rename from python/cudf/cudf/_lib/pylibcudf/io/json.pxd rename to python/pylibcudf/pylibcudf/io/json.pxd index 2e0e92a054f..ab9b5b99ce2 100644 --- a/python/cudf/cudf/_lib/pylibcudf/io/json.pxd +++ b/python/pylibcudf/pylibcudf/io/json.pxd @@ -1,14 +1,13 @@ # Copyright (c) 2024, NVIDIA CORPORATION. from libcpp cimport bool - -from cudf._lib.pylibcudf.io.types cimport ( +from pylibcudf.io.types cimport ( SinkInfo, SourceInfo, TableWithMetadata, compression_type, ) -from cudf._lib.pylibcudf.libcudf.io.json cimport json_recovery_mode_t -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.io.json cimport json_recovery_mode_t +from pylibcudf.libcudf.types cimport size_type cpdef TableWithMetadata read_json( diff --git a/python/cudf/cudf/_lib/pylibcudf/io/json.pyx b/python/pylibcudf/pylibcudf/io/json.pyx similarity index 95% rename from python/cudf/cudf/_lib/pylibcudf/io/json.pyx rename to python/pylibcudf/pylibcudf/io/json.pyx index 2710ee60075..ce086f4a489 100644 --- a/python/cudf/cudf/_lib/pylibcudf/io/json.pyx +++ b/python/pylibcudf/pylibcudf/io/json.pyx @@ -5,14 +5,9 @@ from libcpp.map cimport map from libcpp.string cimport string from libcpp.utility cimport move from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.concatenate cimport concatenate -from cudf._lib.pylibcudf.io.types cimport ( - SinkInfo, - SourceInfo, - TableWithMetadata, -) -from cudf._lib.pylibcudf.libcudf.io.json cimport ( +from pylibcudf.concatenate cimport concatenate +from pylibcudf.io.types cimport SinkInfo, SourceInfo, TableWithMetadata +from pylibcudf.libcudf.io.json cimport ( json_reader_options, json_recovery_mode_t, json_writer_options, @@ -20,13 +15,13 @@ from cudf._lib.pylibcudf.libcudf.io.json cimport ( schema_element, write_json as cpp_write_json, ) -from cudf._lib.pylibcudf.libcudf.io.types cimport ( +from pylibcudf.libcudf.io.types cimport ( compression_type, table_metadata, table_with_metadata, ) -from cudf._lib.pylibcudf.libcudf.types cimport data_type, size_type -from cudf._lib.pylibcudf.types cimport DataType +from pylibcudf.libcudf.types cimport data_type, size_type +from pylibcudf.types cimport DataType cdef map[string, schema_element] _generate_schema_map(list dtypes): @@ -270,7 +265,7 @@ cpdef void write_json( str false_value = "false" ): """ - Writes a :py:class:`~cudf._lib.pylibcudf.table.Table` to JSON format. + Writes a :py:class:`~pylibcudf.table.Table` to JSON format. Parameters ---------- diff --git a/python/cudf/cudf/_lib/pylibcudf/io/parquet.pxd b/python/pylibcudf/pylibcudf/io/parquet.pxd similarity index 72% rename from python/cudf/cudf/_lib/pylibcudf/io/parquet.pxd rename to python/pylibcudf/pylibcudf/io/parquet.pxd index 93ef849b813..47458b00159 100644 --- a/python/cudf/cudf/_lib/pylibcudf/io/parquet.pxd +++ b/python/pylibcudf/pylibcudf/io/parquet.pxd @@ -3,14 +3,13 @@ from libc.stdint cimport int64_t from libcpp cimport bool from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.expressions cimport Expression -from cudf._lib.pylibcudf.io.types cimport SourceInfo, TableWithMetadata -from cudf._lib.pylibcudf.libcudf.io.parquet cimport ( +from pylibcudf.expressions cimport Expression +from pylibcudf.io.types cimport SourceInfo, TableWithMetadata +from pylibcudf.libcudf.io.parquet cimport ( chunked_parquet_reader as cpp_chunked_parquet_reader, ) -from cudf._lib.pylibcudf.libcudf.types cimport size_type -from cudf._lib.pylibcudf.types cimport DataType +from pylibcudf.libcudf.types cimport size_type +from pylibcudf.types cimport DataType cdef class ChunkedParquetReader: diff --git a/python/cudf/cudf/_lib/pylibcudf/io/parquet.pyx b/python/pylibcudf/pylibcudf/io/parquet.pyx similarity index 93% rename from python/cudf/cudf/_lib/pylibcudf/io/parquet.pyx rename to python/pylibcudf/pylibcudf/io/parquet.pyx index 84a79f9565f..fb5244a2a9e 100644 --- a/python/cudf/cudf/_lib/pylibcudf/io/parquet.pyx +++ b/python/pylibcudf/pylibcudf/io/parquet.pyx @@ -5,17 +5,16 @@ from libcpp cimport bool from libcpp.string cimport string from libcpp.utility cimport move from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.expressions cimport Expression -from cudf._lib.pylibcudf.io.types cimport SourceInfo, TableWithMetadata -from cudf._lib.pylibcudf.libcudf.expressions cimport expression -from cudf._lib.pylibcudf.libcudf.io.parquet cimport ( +from pylibcudf.expressions cimport Expression +from pylibcudf.io.types cimport SourceInfo, TableWithMetadata +from pylibcudf.libcudf.expressions cimport expression +from pylibcudf.libcudf.io.parquet cimport ( chunked_parquet_reader as cpp_chunked_parquet_reader, parquet_reader_options, read_parquet as cpp_read_parquet, ) -from cudf._lib.pylibcudf.libcudf.io.types cimport table_with_metadata -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.io.types cimport table_with_metadata +from pylibcudf.libcudf.types cimport size_type cdef parquet_reader_options _setup_parquet_reader_options( @@ -169,7 +168,7 @@ cpdef read_parquet( row_groups : list[list[size_type]], default None List of row groups to be read. filters : Expression, default None - An AST :py:class:`cudf._lib.pylibcudf.expressions.Expression` + An AST :py:class:`pylibcudf.expressions.Expression` to use for predicate pushdown. convert_strings_to_categories : bool, default False Whether to convert string columns to the category type diff --git a/python/cudf/cudf/_lib/pylibcudf/io/types.pxd b/python/pylibcudf/pylibcudf/io/types.pxd similarity index 87% rename from python/cudf/cudf/_lib/pylibcudf/io/types.pxd rename to python/pylibcudf/pylibcudf/io/types.pxd index 0094bf6032c..0ab28cb0973 100644 --- a/python/cudf/cudf/_lib/pylibcudf/io/types.pxd +++ b/python/pylibcudf/pylibcudf/io/types.pxd @@ -1,9 +1,8 @@ # Copyright (c) 2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf.io.data_sink cimport data_sink -from cudf._lib.pylibcudf.libcudf.io.types cimport ( +from pylibcudf.libcudf.io.data_sink cimport data_sink +from pylibcudf.libcudf.io.types cimport ( column_encoding, column_in_metadata, column_name_info, @@ -19,7 +18,7 @@ from cudf._lib.pylibcudf.libcudf.io.types cimport ( table_metadata, table_with_metadata, ) -from cudf._lib.pylibcudf.table cimport Table +from pylibcudf.table cimport Table cdef class TableWithMetadata: diff --git a/python/cudf/cudf/_lib/pylibcudf/io/types.pyx b/python/pylibcudf/pylibcudf/io/types.pyx similarity index 96% rename from python/cudf/cudf/_lib/pylibcudf/io/types.pyx rename to python/pylibcudf/pylibcudf/io/types.pyx index 95fa7d4c2ee..1600a805b37 100644 --- a/python/cudf/cudf/_lib/pylibcudf/io/types.pyx +++ b/python/pylibcudf/pylibcudf/io/types.pyx @@ -6,11 +6,10 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string from libcpp.utility cimport move from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.io.datasource cimport Datasource -from cudf._lib.pylibcudf.libcudf.io.data_sink cimport data_sink -from cudf._lib.pylibcudf.libcudf.io.datasource cimport datasource -from cudf._lib.pylibcudf.libcudf.io.types cimport ( +from pylibcudf.io.datasource cimport Datasource +from pylibcudf.libcudf.io.data_sink cimport data_sink +from pylibcudf.libcudf.io.datasource cimport datasource +from pylibcudf.libcudf.io.types cimport ( column_name_info, host_buffer, source_info, @@ -22,9 +21,9 @@ import errno import io import os -from cudf._lib.pylibcudf.libcudf.io.json import \ +from pylibcudf.libcudf.io.json import \ json_recovery_mode_t as JSONRecoveryMode # no-cython-lint -from cudf._lib.pylibcudf.libcudf.io.types import \ +from pylibcudf.libcudf.io.types import \ compression_type as CompressionType # no-cython-lint diff --git a/python/cudf/cudf/_lib/pylibcudf/join.pxd b/python/pylibcudf/pylibcudf/join.pxd similarity index 91% rename from python/cudf/cudf/_lib/pylibcudf/join.pxd rename to python/pylibcudf/pylibcudf/join.pxd index 83b4776c16e..06969b4a2db 100644 --- a/python/cudf/cudf/_lib/pylibcudf/join.pxd +++ b/python/pylibcudf/pylibcudf/join.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.pylibcudf.libcudf.types cimport null_equality +from pylibcudf.libcudf.types cimport null_equality from .column cimport Column from .table cimport Table diff --git a/python/cudf/cudf/_lib/pylibcudf/join.pyx b/python/pylibcudf/pylibcudf/join.pyx similarity index 95% rename from python/cudf/cudf/_lib/pylibcudf/join.pyx rename to python/pylibcudf/pylibcudf/join.pyx index 2ded84d84d1..25664286f19 100644 --- a/python/cudf/cudf/_lib/pylibcudf/join.pyx +++ b/python/pylibcudf/pylibcudf/join.pyx @@ -4,14 +4,13 @@ from cython.operator import dereference from libcpp.memory cimport make_unique, unique_ptr from libcpp.utility cimport move +from pylibcudf.libcudf cimport join as cpp_join +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.types cimport null_equality from rmm._lib.device_buffer cimport device_buffer -from cudf._lib.pylibcudf.libcudf cimport join as cpp_join -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.types cimport null_equality - from .column cimport Column from .table cimport Table diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/CMakeLists.txt b/python/pylibcudf/pylibcudf/libcudf/CMakeLists.txt similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/CMakeLists.txt rename to python/pylibcudf/pylibcudf/libcudf/CMakeLists.txt diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/__init__.pxd b/python/pylibcudf/pylibcudf/libcudf/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/__init__.pxd rename to python/pylibcudf/pylibcudf/libcudf/__init__.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/__init__.py b/python/pylibcudf/pylibcudf/libcudf/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/__init__.py rename to python/pylibcudf/pylibcudf/libcudf/__init__.py diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/aggregation.pxd b/python/pylibcudf/pylibcudf/libcudf/aggregation.pxd similarity index 98% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/aggregation.pxd rename to python/pylibcudf/pylibcudf/libcudf/aggregation.pxd index fe04db52094..58c579b86de 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/aggregation.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/aggregation.pxd @@ -5,8 +5,7 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.string cimport string from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf.types cimport ( +from pylibcudf.libcudf.types cimport ( data_type, interpolation, nan_equality, diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/aggregation.pyx b/python/pylibcudf/pylibcudf/libcudf/aggregation.pyx similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/aggregation.pyx rename to python/pylibcudf/pylibcudf/libcudf/aggregation.pyx diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/binaryop.pxd b/python/pylibcudf/pylibcudf/libcudf/binaryop.pxd similarity index 85% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/binaryop.pxd rename to python/pylibcudf/pylibcudf/libcudf/binaryop.pxd index 78da5980db4..d39767b4aa8 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/binaryop.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/binaryop.pxd @@ -4,12 +4,11 @@ from libc.stdint cimport int32_t from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.string cimport string - -from cudf._lib.pylibcudf.exception_handler cimport libcudf_exception_handler -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar -from cudf._lib.pylibcudf.libcudf.types cimport data_type +from pylibcudf.exception_handler cimport libcudf_exception_handler +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport scalar +from pylibcudf.libcudf.types cimport data_type cdef extern from "cudf/binaryop.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/binaryop.pyx b/python/pylibcudf/pylibcudf/libcudf/binaryop.pyx similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/binaryop.pyx rename to python/pylibcudf/pylibcudf/libcudf/binaryop.pyx diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/column/__init__.pxd b/python/pylibcudf/pylibcudf/libcudf/column/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/column/__init__.pxd rename to python/pylibcudf/pylibcudf/libcudf/column/__init__.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/column/__init__.py b/python/pylibcudf/pylibcudf/libcudf/column/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/column/__init__.py rename to python/pylibcudf/pylibcudf/libcudf/column/__init__.py diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/column/column.pxd b/python/pylibcudf/pylibcudf/libcudf/column/column.pxd similarity index 87% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/column/column.pxd rename to python/pylibcudf/pylibcudf/libcudf/column/column.pxd index dd184d31cc6..7a369701bbd 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/column/column.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/column/column.pxd @@ -3,14 +3,13 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector - -from rmm._lib.device_buffer cimport device_buffer - -from cudf._lib.pylibcudf.libcudf.column.column_view cimport ( +from pylibcudf.libcudf.column.column_view cimport ( column_view, mutable_column_view, ) -from cudf._lib.pylibcudf.libcudf.types cimport data_type, size_type +from pylibcudf.libcudf.types cimport data_type, size_type + +from rmm._lib.device_buffer cimport device_buffer cdef extern from "cudf/column/column.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/column/column_factories.pxd b/python/pylibcudf/pylibcudf/libcudf/column/column_factories.pxd similarity index 93% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/column/column_factories.pxd rename to python/pylibcudf/pylibcudf/libcudf/column/column_factories.pxd index 2faff21a77b..f1a326bcd40 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/column/column_factories.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/column/column_factories.pxd @@ -1,12 +1,9 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from rmm._lib.device_buffer cimport device_buffer - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar -from cudf._lib.pylibcudf.libcudf.types cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.scalar.scalar cimport scalar +from pylibcudf.libcudf.types cimport ( bitmask_type, data_type, mask_state, @@ -14,6 +11,8 @@ from cudf._lib.pylibcudf.libcudf.types cimport ( type_id, ) +from rmm._lib.device_buffer cimport device_buffer + cdef extern from "cudf/column/column_factories.hpp" namespace "cudf" nogil: cdef unique_ptr[column] make_numeric_column(data_type type, diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/column/column_view.pxd b/python/pylibcudf/pylibcudf/libcudf/column/column_view.pxd similarity index 97% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/column/column_view.pxd rename to python/pylibcudf/pylibcudf/libcudf/column/column_view.pxd index c6403babe89..c0e971eb5bd 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/column/column_view.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/column/column_view.pxd @@ -2,12 +2,7 @@ from libcpp cimport bool from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf.types cimport ( - bitmask_type, - data_type, - size_type, -) +from pylibcudf.libcudf.types cimport bitmask_type, data_type, size_type cdef extern from "cudf/column/column_view.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/concatenate.pxd b/python/pylibcudf/pylibcudf/libcudf/concatenate.pxd similarity index 77% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/concatenate.pxd rename to python/pylibcudf/pylibcudf/libcudf/concatenate.pxd index 0c362390ff2..92f5a185a54 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/concatenate.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/concatenate.pxd @@ -2,13 +2,12 @@ from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector +from pylibcudf.libcudf.column.column cimport column, column_view +from pylibcudf.libcudf.table.table cimport table, table_view +from pylibcudf.libcudf.utilities.host_span cimport host_span from rmm._lib.device_buffer cimport device_buffer -from cudf._lib.pylibcudf.libcudf.column.column cimport column, column_view -from cudf._lib.pylibcudf.libcudf.table.table cimport table, table_view -from cudf._lib.pylibcudf.libcudf.utilities.host_span cimport host_span - cdef extern from "cudf/concatenate.hpp" namespace "cudf" nogil: # The versions of concatenate taking vectors don't exist in libcudf diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/contiguous_split.pxd b/python/pylibcudf/pylibcudf/libcudf/contiguous_split.pxd similarity index 85% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/contiguous_split.pxd rename to python/pylibcudf/pylibcudf/libcudf/contiguous_split.pxd index b06feacb016..cadac6a0022 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/contiguous_split.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/contiguous_split.pxd @@ -3,12 +3,11 @@ from libc.stdint cimport uint8_t from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.types cimport size_type from rmm._lib.device_buffer cimport device_buffer -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view -from cudf._lib.pylibcudf.libcudf.types cimport size_type - cdef extern from "cudf/contiguous_split.hpp" namespace "cudf" nogil: cdef cppclass packed_columns: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/copying.pxd b/python/pylibcudf/pylibcudf/libcudf/copying.pxd similarity index 90% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/copying.pxd rename to python/pylibcudf/pylibcudf/libcudf/copying.pxd index af3a16ad01b..4d4a4ba9b89 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/copying.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/copying.pxd @@ -5,19 +5,18 @@ from libcpp cimport bool from libcpp.functional cimport reference_wrapper from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector - -from rmm._lib.device_buffer cimport device_buffer - -from cudf._lib.pylibcudf.exception_handler cimport libcudf_exception_handler -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport ( +from pylibcudf.exception_handler cimport libcudf_exception_handler +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport ( column_view, mutable_column_view, ) -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.scalar.scalar cimport scalar +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.types cimport size_type + +from rmm._lib.device_buffer cimport device_buffer ctypedef const scalar constscalar diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/copying.pyx b/python/pylibcudf/pylibcudf/libcudf/copying.pyx similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/copying.pyx rename to python/pylibcudf/pylibcudf/libcudf/copying.pyx diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/datetime.pxd b/python/pylibcudf/pylibcudf/libcudf/datetime.pxd similarity index 92% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/datetime.pxd rename to python/pylibcudf/pylibcudf/libcudf/datetime.pxd index 7db77b9c7c5..a4465343197 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/datetime.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/datetime.pxd @@ -1,10 +1,9 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport scalar cdef extern from "cudf/datetime.hpp" namespace "cudf::datetime" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/experimental.pxd b/python/pylibcudf/pylibcudf/libcudf/experimental.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/experimental.pxd rename to python/pylibcudf/pylibcudf/libcudf/experimental.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/expressions.pxd b/python/pylibcudf/pylibcudf/libcudf/expressions.pxd similarity index 90% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/expressions.pxd rename to python/pylibcudf/pylibcudf/libcudf/expressions.pxd index 427e16d4ff8..5ba2dff6074 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/expressions.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/expressions.pxd @@ -3,15 +3,14 @@ from libc.stdint cimport int32_t from libcpp.memory cimport unique_ptr from libcpp.string cimport string - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.scalar.scalar cimport ( duration_scalar, numeric_scalar, timestamp_scalar, ) -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/ast/expressions.hpp" namespace "cudf::ast" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/expressions.pyx b/python/pylibcudf/pylibcudf/libcudf/expressions.pyx similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/expressions.pyx rename to python/pylibcudf/pylibcudf/libcudf/expressions.pyx diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/filling.pxd b/python/pylibcudf/pylibcudf/libcudf/filling.pxd similarity index 74% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/filling.pxd rename to python/pylibcudf/pylibcudf/libcudf/filling.pxd index 16ed682f930..7bed80050d2 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/filling.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/filling.pxd @@ -2,16 +2,15 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport ( column_view, mutable_column_view, ) -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.scalar.scalar cimport scalar +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/filling.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/groupby.pxd b/python/pylibcudf/pylibcudf/libcudf/groupby.pxd similarity index 83% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/groupby.pxd rename to python/pylibcudf/pylibcudf/libcudf/groupby.pxd index 16607cc3711..848462131fe 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/groupby.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/groupby.pxd @@ -5,25 +5,24 @@ from libcpp.functional cimport reference_wrapper from libcpp.memory cimport unique_ptr from libcpp.pair cimport pair from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf.aggregation cimport ( +from pylibcudf.libcudf.aggregation cimport ( groupby_aggregation, groupby_scan_aggregation, ) -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.replace cimport replace_policy -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view -from cudf._lib.pylibcudf.libcudf.types cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.replace cimport replace_policy +from pylibcudf.libcudf.scalar.scalar cimport scalar +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.types cimport ( null_order, null_policy, order, size_type, sorted, ) -from cudf._lib.pylibcudf.libcudf.utilities.host_span cimport host_span +from pylibcudf.libcudf.utilities.host_span cimport host_span # workaround for https://github.com/cython/cython/issues/3885 ctypedef const scalar constscalar diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/hash.pxd b/python/pylibcudf/pylibcudf/libcudf/hash.pxd similarity index 86% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/hash.pxd rename to python/pylibcudf/pylibcudf/libcudf/hash.pxd index 5346252df69..51678ba69d8 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/hash.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/hash.pxd @@ -3,10 +3,9 @@ from libc.stdint cimport uint32_t, uint64_t from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view cdef extern from "cudf/hashing.hpp" namespace "cudf::hashing" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/interop.pxd b/python/pylibcudf/pylibcudf/libcudf/interop.pxd similarity index 87% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/interop.pxd rename to python/pylibcudf/pylibcudf/libcudf/interop.pxd index 24d96b602dc..c7efff2340d 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/interop.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/interop.pxd @@ -3,14 +3,11 @@ from libcpp.memory cimport shared_ptr, unique_ptr from libcpp.string cimport string from libcpp.vector cimport vector - -from cudf._lib.types import cudf_to_np_types, np_to_cudf_types - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport scalar +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view cdef extern from "dlpack/dlpack.h" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/CMakeLists.txt b/python/pylibcudf/pylibcudf/libcudf/io/CMakeLists.txt similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/io/CMakeLists.txt rename to python/pylibcudf/pylibcudf/libcudf/io/CMakeLists.txt diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/__init__.pxd b/python/pylibcudf/pylibcudf/libcudf/io/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/io/__init__.pxd rename to python/pylibcudf/pylibcudf/libcudf/io/__init__.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/__init__.py b/python/pylibcudf/pylibcudf/libcudf/io/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/io/__init__.py rename to python/pylibcudf/pylibcudf/libcudf/io/__init__.py diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/arrow_io_source.pxd b/python/pylibcudf/pylibcudf/libcudf/io/arrow_io_source.pxd similarity index 86% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/io/arrow_io_source.pxd rename to python/pylibcudf/pylibcudf/libcudf/io/arrow_io_source.pxd index 1d2138f8d10..54a913a9ce3 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/arrow_io_source.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/arrow_io_source.pxd @@ -1,11 +1,10 @@ # Copyright (c) 2023-2024, NVIDIA CORPORATION. +cimport pylibcudf.libcudf.io.datasource as cudf_io_datasource from libcpp.memory cimport shared_ptr from libcpp.string cimport string from pyarrow.includes.libarrow cimport CRandomAccessFile -cimport cudf._lib.pylibcudf.libcudf.io.datasource as cudf_io_datasource - cdef extern from "cudf/io/arrow_io_source.hpp" \ namespace "cudf::io" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/avro.pxd b/python/pylibcudf/pylibcudf/libcudf/io/avro.pxd similarity index 91% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/io/avro.pxd rename to python/pylibcudf/pylibcudf/libcudf/io/avro.pxd index 530df5aa8f1..2d76e2f6c80 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/avro.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/avro.pxd @@ -1,10 +1,9 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. +cimport pylibcudf.libcudf.io.types as cudf_io_types from libcpp.string cimport string from libcpp.vector cimport vector - -cimport cudf._lib.pylibcudf.libcudf.io.types as cudf_io_types -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/io/avro.hpp" \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/csv.pxd b/python/pylibcudf/pylibcudf/libcudf/io/csv.pxd similarity index 98% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/io/csv.pxd rename to python/pylibcudf/pylibcudf/libcudf/io/csv.pxd index b5ff6558cd8..73a6d98650c 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/csv.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/csv.pxd @@ -1,15 +1,14 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. +cimport pylibcudf.libcudf.io.types as cudf_io_types +cimport pylibcudf.libcudf.table.table_view as cudf_table_view from libc.stdint cimport uint8_t from libcpp cimport bool from libcpp.map cimport map from libcpp.memory cimport shared_ptr, unique_ptr from libcpp.string cimport string from libcpp.vector cimport vector - -cimport cudf._lib.pylibcudf.libcudf.io.types as cudf_io_types -cimport cudf._lib.pylibcudf.libcudf.table.table_view as cudf_table_view -from cudf._lib.pylibcudf.libcudf.types cimport data_type, size_type +from pylibcudf.libcudf.types cimport data_type, size_type cdef extern from "cudf/io/csv.hpp" \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/data_sink.pxd b/python/pylibcudf/pylibcudf/libcudf/io/data_sink.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/io/data_sink.pxd rename to python/pylibcudf/pylibcudf/libcudf/io/data_sink.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/datasource.pxd b/python/pylibcudf/pylibcudf/libcudf/io/datasource.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/io/datasource.pxd rename to python/pylibcudf/pylibcudf/libcudf/io/datasource.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/json.pxd b/python/pylibcudf/pylibcudf/libcudf/io/json.pxd similarity index 96% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/io/json.pxd rename to python/pylibcudf/pylibcudf/libcudf/io/json.pxd index 86621ae184f..7514e6c5258 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/json.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/json.pxd @@ -1,15 +1,14 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. +cimport pylibcudf.libcudf.io.types as cudf_io_types +cimport pylibcudf.libcudf.table.table_view as cudf_table_view from libc.stdint cimport int32_t, uint8_t from libcpp cimport bool from libcpp.map cimport map from libcpp.memory cimport shared_ptr, unique_ptr from libcpp.string cimport string from libcpp.vector cimport vector - -cimport cudf._lib.pylibcudf.libcudf.io.types as cudf_io_types -cimport cudf._lib.pylibcudf.libcudf.table.table_view as cudf_table_view -from cudf._lib.pylibcudf.libcudf.types cimport data_type, size_type +from pylibcudf.libcudf.types cimport data_type, size_type cdef extern from "cudf/io/json.hpp" \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/json.pyx b/python/pylibcudf/pylibcudf/libcudf/io/json.pyx similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/io/json.pyx rename to python/pylibcudf/pylibcudf/libcudf/io/json.pyx diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/orc.pxd b/python/pylibcudf/pylibcudf/libcudf/io/orc.pxd similarity index 97% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/io/orc.pxd rename to python/pylibcudf/pylibcudf/libcudf/io/orc.pxd index 25f91849dea..e4a09b8feb2 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/orc.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/orc.pxd @@ -1,5 +1,7 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. +cimport pylibcudf.libcudf.io.types as cudf_io_types +cimport pylibcudf.libcudf.table.table_view as cudf_table_view from libc.stdint cimport int64_t, uint8_t from libcpp cimport bool from libcpp.map cimport map @@ -7,10 +9,7 @@ from libcpp.memory cimport shared_ptr, unique_ptr from libcpp.optional cimport optional from libcpp.string cimport string from libcpp.vector cimport vector - -cimport cudf._lib.pylibcudf.libcudf.io.types as cudf_io_types -cimport cudf._lib.pylibcudf.libcudf.table.table_view as cudf_table_view -from cudf._lib.pylibcudf.libcudf.types cimport data_type, size_type +from pylibcudf.libcudf.types cimport data_type, size_type cdef extern from "cudf/io/orc.hpp" \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/orc_metadata.pxd b/python/pylibcudf/pylibcudf/libcudf/io/orc_metadata.pxd similarity index 94% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/io/orc_metadata.pxd rename to python/pylibcudf/pylibcudf/libcudf/io/orc_metadata.pxd index a23655b06f8..db6cb0cdfa5 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/orc_metadata.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/orc_metadata.pxd @@ -1,13 +1,12 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. +cimport pylibcudf.libcudf.io.types as cudf_io_types from libc.stdint cimport int32_t, int64_t, uint32_t, uint64_t from libcpp cimport bool from libcpp.optional cimport optional from libcpp.string cimport string from libcpp.vector cimport vector - -cimport cudf._lib.pylibcudf.libcudf.io.types as cudf_io_types -from cudf._lib.variant cimport monostate, variant +from pylibcudf.variant cimport monostate, variant cdef extern from "cudf/io/orc_metadata.hpp" \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/parquet.pxd b/python/pylibcudf/pylibcudf/libcudf/io/parquet.pxd similarity index 80% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/io/parquet.pxd rename to python/pylibcudf/pylibcudf/libcudf/io/parquet.pxd index d86915c7da9..222d87defa0 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/parquet.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/parquet.pxd @@ -8,17 +8,25 @@ from libcpp.memory cimport shared_ptr, unique_ptr from libcpp.optional cimport optional from libcpp.string cimport string from libcpp.vector cimport vector - -cimport cudf._lib.pylibcudf.libcudf.io.types as cudf_io_types -cimport cudf._lib.pylibcudf.libcudf.table.table_view as cudf_table_view -from cudf._lib.pylibcudf.libcudf.expressions cimport expression -from cudf._lib.pylibcudf.libcudf.types cimport data_type, size_type +from pylibcudf.libcudf.expressions cimport expression +from pylibcudf.libcudf.io.types cimport ( + compression_type, + dictionary_policy, + partition_info, + sink_info, + source_info, + statistics_freq, + table_input_metadata, + table_with_metadata, +) +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.types cimport data_type, size_type cdef extern from "cudf/io/parquet.hpp" namespace "cudf::io" nogil: cdef cppclass parquet_reader_options: parquet_reader_options() except + - cudf_io_types.source_info get_source_info() except + + source_info get_source_info() except + vector[vector[size_type]] get_row_groups() except + const optional[reference_wrapper[expression]]& get_filter() except + data_type get_timestamp_type() except + @@ -38,13 +46,13 @@ cdef extern from "cudf/io/parquet.hpp" namespace "cudf::io" nogil: @staticmethod parquet_reader_options_builder builder( - cudf_io_types.source_info src + source_info src ) except + cdef cppclass parquet_reader_options_builder: parquet_reader_options_builder() except + parquet_reader_options_builder( - cudf_io_types.source_info src + source_info src ) except + parquet_reader_options_builder& columns( vector[string] col_names @@ -69,15 +77,15 @@ cdef extern from "cudf/io/parquet.hpp" namespace "cudf::io" nogil: ) except + parquet_reader_options build() except + - cdef cudf_io_types.table_with_metadata read_parquet( + cdef table_with_metadata read_parquet( parquet_reader_options args) except + cdef cppclass parquet_writer_options_base: parquet_writer_options_base() except + - cudf_io_types.sink_info get_sink_info() except + - cudf_io_types.compression_type get_compression() except + - cudf_io_types.statistics_freq get_stats_level() except + - const optional[cudf_io_types.table_input_metadata]& get_metadata( + sink_info get_sink_info() except + + compression_type get_compression() except + + statistics_freq get_stats_level() except + + const optional[table_input_metadata]& get_metadata( ) except + size_t get_row_group_size_bytes() except + size_type get_row_group_size_rows() except + @@ -87,16 +95,16 @@ cdef extern from "cudf/io/parquet.hpp" namespace "cudf::io" nogil: bool is_enabled_write_arrow_schema() except + void set_metadata( - cudf_io_types.table_input_metadata m + table_input_metadata m ) except + void set_key_value_metadata( vector[map[string, string]] kvm ) except + void set_stats_level( - cudf_io_types.statistics_freq sf + statistics_freq sf ) except + void set_compression( - cudf_io_types.compression_type compression + compression_type compression ) except + void set_int96_timestamps( bool enabled @@ -111,14 +119,14 @@ cdef extern from "cudf/io/parquet.hpp" namespace "cudf::io" nogil: void set_max_dictionary_size(size_t val) except + void enable_write_v2_headers(bool val) except + void enable_write_arrow_schema(bool val) except + - void set_dictionary_policy(cudf_io_types.dictionary_policy policy) except + + void set_dictionary_policy(dictionary_policy policy) except + cdef cppclass parquet_writer_options(parquet_writer_options_base): parquet_writer_options() except + - cudf_table_view.table_view get_table() except + + table_view get_table() except + string get_column_chunks_file_paths() except + void set_partitions( - vector[cudf_io_types.partition_info] partitions + vector[partition_info] partitions ) except + void set_column_chunks_file_paths( vector[string] column_chunks_file_paths @@ -126,24 +134,24 @@ cdef extern from "cudf/io/parquet.hpp" namespace "cudf::io" nogil: @staticmethod parquet_writer_options_builder builder( - cudf_io_types.sink_info sink_, - cudf_table_view.table_view table_ + sink_info sink_, + table_view table_ ) except + cdef cppclass parquet_writer_options_builder_base[BuilderT, OptionsT]: parquet_writer_options_builder_base() except + BuilderT& metadata( - cudf_io_types.table_input_metadata m + table_input_metadata m ) except + BuilderT& key_value_metadata( vector[map[string, string]] kvm ) except + BuilderT& stats_level( - cudf_io_types.statistics_freq sf + statistics_freq sf ) except + BuilderT& compression( - cudf_io_types.compression_type compression + compression_type compression ) except + BuilderT& int96_timestamps( bool enabled @@ -173,7 +181,7 @@ cdef extern from "cudf/io/parquet.hpp" namespace "cudf::io" nogil: bool val ) except + BuilderT& dictionary_policy( - cudf_io_types.dictionary_policy val + dictionary_policy val ) except + OptionsT build() except + @@ -182,11 +190,11 @@ cdef extern from "cudf/io/parquet.hpp" namespace "cudf::io" nogil: parquet_writer_options]): parquet_writer_options_builder() except + parquet_writer_options_builder( - cudf_io_types.sink_info sink_, - cudf_table_view.table_view table_ + sink_info sink_, + table_view table_ ) except + parquet_writer_options_builder& partitions( - vector[cudf_io_types.partition_info] partitions + vector[partition_info] partitions ) except + parquet_writer_options_builder& column_chunks_file_paths( vector[string] column_chunks_file_paths @@ -201,7 +209,7 @@ cdef extern from "cudf/io/parquet.hpp" namespace "cudf::io" nogil: @staticmethod chunked_parquet_writer_options_builder builder( - cudf_io_types.sink_info sink_, + sink_info sink_, ) except + cdef cppclass chunked_parquet_writer_options_builder( @@ -210,18 +218,18 @@ cdef extern from "cudf/io/parquet.hpp" namespace "cudf::io" nogil: ): chunked_parquet_writer_options_builder() except + chunked_parquet_writer_options_builder( - cudf_io_types.sink_info sink_, + sink_info sink_, ) except + cdef cppclass parquet_chunked_writer: parquet_chunked_writer() except + parquet_chunked_writer(chunked_parquet_writer_options args) except + parquet_chunked_writer& write( - cudf_table_view.table_view table_, + table_view table_, ) except + parquet_chunked_writer& write( - const cudf_table_view.table_view& table_, - const vector[cudf_io_types.partition_info]& partitions, + const table_view& table_, + const vector[partition_info]& partitions, ) except + unique_ptr[vector[uint8_t]] close( vector[string] column_chunks_file_paths, @@ -237,7 +245,7 @@ cdef extern from "cudf/io/parquet.hpp" namespace "cudf::io" nogil: size_t pass_read_limit, const parquet_reader_options& options) except + bool has_next() except + - cudf_io_types.table_with_metadata read_chunk() except + + table_with_metadata read_chunk() except + cdef unique_ptr[vector[uint8_t]] merge_row_group_metadata( const vector[unique_ptr[vector[uint8_t]]]& metadata_list diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/parquet_metadata.pxd b/python/pylibcudf/pylibcudf/libcudf/io/parquet_metadata.pxd similarity index 89% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/io/parquet_metadata.pxd rename to python/pylibcudf/pylibcudf/libcudf/io/parquet_metadata.pxd index 34a299b73ab..8e6da56c9a6 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/parquet_metadata.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/parquet_metadata.pxd @@ -1,12 +1,11 @@ # Copyright (c) 2024, NVIDIA CORPORATION. +cimport pylibcudf.libcudf.io.types as cudf_io_types from libc.stdint cimport int64_t from libcpp.string cimport string from libcpp.unordered_map cimport unordered_map from libcpp.vector cimport vector - -cimport cudf._lib.pylibcudf.libcudf.io.types as cudf_io_types -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/io/parquet_metadata.hpp" namespace "cudf::io" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/text.pxd b/python/pylibcudf/pylibcudf/libcudf/io/text.pxd similarity index 96% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/io/text.pxd rename to python/pylibcudf/pylibcudf/libcudf/io/text.pxd index bec223d4079..14397ef970d 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/text.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/text.pxd @@ -4,8 +4,7 @@ from libc.stdint cimport uint64_t from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.string cimport string - -from cudf._lib.pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column cimport column cdef extern from "cudf/io/text/byte_range_info.hpp" \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/timezone.pxd b/python/pylibcudf/pylibcudf/libcudf/io/timezone.pxd similarity index 86% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/io/timezone.pxd rename to python/pylibcudf/pylibcudf/libcudf/io/timezone.pxd index 88cb5544dc1..676901efcec 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/timezone.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/timezone.pxd @@ -4,8 +4,7 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.optional cimport optional from libcpp.string cimport string - -from cudf._lib.pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table cimport table cdef extern from "cudf/timezone.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/types.pxd b/python/pylibcudf/pylibcudf/libcudf/io/types.pxd similarity index 92% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/io/types.pxd rename to python/pylibcudf/pylibcudf/libcudf/io/types.pxd index 0a6bddcd907..a3d99807876 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/types.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/io/types.pxd @@ -1,5 +1,8 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. +cimport pylibcudf.libcudf.io.data_sink as cudf_io_data_sink +cimport pylibcudf.libcudf.io.datasource as cudf_io_datasource +cimport pylibcudf.libcudf.table.table_view as cudf_table_view from libc.stdint cimport int32_t, uint8_t from libcpp cimport bool from libcpp.map cimport map @@ -9,12 +12,8 @@ from libcpp.string cimport string from libcpp.unordered_map cimport unordered_map from libcpp.vector cimport vector from pyarrow.includes.libarrow cimport CRandomAccessFile - -cimport cudf._lib.pylibcudf.libcudf.io.data_sink as cudf_io_data_sink -cimport cudf._lib.pylibcudf.libcudf.io.datasource as cudf_io_datasource -cimport cudf._lib.pylibcudf.libcudf.table.table_view as cudf_table_view -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/io/types.hpp" \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/io/types.pyx b/python/pylibcudf/pylibcudf/libcudf/io/types.pyx similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/io/types.pyx rename to python/pylibcudf/pylibcudf/libcudf/io/types.pyx diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/join.pxd b/python/pylibcudf/pylibcudf/libcudf/join.pxd similarity index 88% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/join.pxd rename to python/pylibcudf/pylibcudf/libcudf/join.pxd index 32cd17f7c11..6f6c145b23c 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/join.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/join.pxd @@ -4,14 +4,13 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.pair cimport pair from libcpp.vector cimport vector +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.types cimport null_equality, size_type from rmm._lib.device_uvector cimport device_uvector -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view -from cudf._lib.pylibcudf.libcudf.types cimport null_equality, size_type - ctypedef unique_ptr[device_uvector[size_type]] gather_map_type ctypedef pair[gather_map_type, gather_map_type] gather_map_pair_type diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/labeling.pxd b/python/pylibcudf/pylibcudf/libcudf/labeling.pxd similarity index 78% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/labeling.pxd rename to python/pylibcudf/pylibcudf/libcudf/labeling.pxd index 54731bf29af..ec6ef6b2a41 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/labeling.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/labeling.pxd @@ -1,9 +1,8 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cudf/labeling/label_bins.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/__init__.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/lists/__init__.pxd rename to python/pylibcudf/pylibcudf/libcudf/lists/__init__.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/__init__.py b/python/pylibcudf/pylibcudf/libcudf/lists/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/lists/__init__.py rename to python/pylibcudf/pylibcudf/libcudf/lists/__init__.py diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/combine.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/combine.pxd similarity index 78% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/lists/combine.pxd rename to python/pylibcudf/pylibcudf/libcudf/lists/combine.pxd index 728bd840f71..d077958ce03 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/combine.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/combine.pxd @@ -1,10 +1,9 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table_view cimport table_view cdef extern from "cudf/lists/combine.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/contains.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/contains.pxd similarity index 75% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/lists/contains.pxd rename to python/pylibcudf/pylibcudf/libcudf/lists/contains.pxd index 40bb2e78970..81a5ad46389 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/contains.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/contains.pxd @@ -2,14 +2,11 @@ from libc.stdint cimport int32_t from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.exception_handler cimport libcudf_exception_handler -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.lists.lists_column_view cimport ( - lists_column_view, -) -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar +from pylibcudf.exception_handler cimport libcudf_exception_handler +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.lists.lists_column_view cimport lists_column_view +from pylibcudf.libcudf.scalar.scalar cimport scalar cdef extern from "cudf/lists/contains.hpp" namespace "cudf::lists" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/count_elements.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/count_elements.pxd similarity index 61% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/lists/count_elements.pxd rename to python/pylibcudf/pylibcudf/libcudf/lists/count_elements.pxd index ba57a839fbc..e283551ed0c 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/count_elements.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/count_elements.pxd @@ -1,11 +1,8 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.lists.lists_column_view cimport ( - lists_column_view, -) +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.lists.lists_column_view cimport lists_column_view cdef extern from "cudf/lists/count_elements.hpp" namespace "cudf::lists" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/explode.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/explode.pxd similarity index 59% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/lists/explode.pxd rename to python/pylibcudf/pylibcudf/libcudf/lists/explode.pxd index 622a866f593..c64b2715cca 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/explode.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/explode.pxd @@ -1,10 +1,9 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/lists/explode.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/extract.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/extract.pxd similarity index 64% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/lists/extract.pxd rename to python/pylibcudf/pylibcudf/libcudf/lists/extract.pxd index 53609ba8830..2ea060d87de 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/extract.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/extract.pxd @@ -1,12 +1,9 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column, column_view -from cudf._lib.pylibcudf.libcudf.lists.lists_column_view cimport ( - lists_column_view, -) -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.column.column cimport column, column_view +from pylibcudf.libcudf.lists.lists_column_view cimport lists_column_view +from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/lists/extract.hpp" namespace "cudf::lists" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/filling.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/filling.pxd similarity index 76% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/lists/filling.pxd rename to python/pylibcudf/pylibcudf/libcudf/lists/filling.pxd index 8403fd179f7..54f5a8409b6 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/filling.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/filling.pxd @@ -1,9 +1,8 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cudf/lists/filling.hpp" namespace "cudf::lists" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/gather.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/gather.pxd similarity index 67% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/lists/gather.pxd rename to python/pylibcudf/pylibcudf/libcudf/lists/gather.pxd index ab7ed141365..a762c6aa333 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/gather.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/gather.pxd @@ -1,11 +1,8 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.lists.lists_column_view cimport ( - lists_column_view, -) +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.lists.lists_column_view cimport lists_column_view cdef extern from "cudf/lists/gather.hpp" namespace "cudf::lists" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/lists_column_view.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/lists_column_view.pxd similarity index 86% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/lists/lists_column_view.pxd rename to python/pylibcudf/pylibcudf/libcudf/lists/lists_column_view.pxd index 8917a6ac899..f43340a78b0 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/lists_column_view.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/lists_column_view.pxd @@ -1,10 +1,10 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. -from cudf._lib.pylibcudf.libcudf.column.column_view cimport ( +from pylibcudf.libcudf.column.column_view cimport ( column_view, mutable_column_view, ) -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/lists/lists_column_view.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/reverse.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/reverse.pxd similarity index 62% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/lists/reverse.pxd rename to python/pylibcudf/pylibcudf/libcudf/lists/reverse.pxd index 0382a5d42c3..43b671ebfa0 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/reverse.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/reverse.pxd @@ -1,11 +1,8 @@ # Copyright (c) 2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.lists.lists_column_view cimport ( - lists_column_view, -) +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.lists.lists_column_view cimport lists_column_view cdef extern from "cudf/lists/reverse.hpp" namespace "cudf::lists" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/set_operations.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/set_operations.pxd similarity index 81% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/lists/set_operations.pxd rename to python/pylibcudf/pylibcudf/libcudf/lists/set_operations.pxd index eb796897f87..266f04ef6b3 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/set_operations.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/set_operations.pxd @@ -1,12 +1,9 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.lists.lists_column_view cimport ( - lists_column_view, -) -from cudf._lib.pylibcudf.libcudf.types cimport nan_equality, null_equality +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.lists.lists_column_view cimport lists_column_view +from pylibcudf.libcudf.types cimport nan_equality, null_equality cdef extern from "cudf/lists/set_operations.hpp" namespace "cudf::lists" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/sorting.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/sorting.pxd similarity index 69% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/lists/sorting.pxd rename to python/pylibcudf/pylibcudf/libcudf/lists/sorting.pxd index 337ac73908b..ea45f999c47 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/sorting.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/sorting.pxd @@ -1,12 +1,9 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.lists.lists_column_view cimport ( - lists_column_view, -) -from cudf._lib.pylibcudf.libcudf.types cimport null_order, order +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.lists.lists_column_view cimport lists_column_view +from pylibcudf.libcudf.types cimport null_order, order cdef extern from "cudf/lists/sorting.hpp" namespace "cudf::lists" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/stream_compaction.pxd b/python/pylibcudf/pylibcudf/libcudf/lists/stream_compaction.pxd similarity index 68% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/lists/stream_compaction.pxd rename to python/pylibcudf/pylibcudf/libcudf/lists/stream_compaction.pxd index b1fcf7800b0..d9df7c3ca2e 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/lists/stream_compaction.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/lists/stream_compaction.pxd @@ -1,12 +1,9 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.lists.lists_column_view cimport ( - lists_column_view, -) -from cudf._lib.pylibcudf.libcudf.types cimport nan_equality, null_equality +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.lists.lists_column_view cimport lists_column_view +from pylibcudf.libcudf.types cimport nan_equality, null_equality cdef extern from "cudf/lists/stream_compaction.hpp" \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/merge.pxd b/python/pylibcudf/pylibcudf/libcudf/merge.pxd similarity index 69% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/merge.pxd rename to python/pylibcudf/pylibcudf/libcudf/merge.pxd index dacb3dc2d74..6930b7a0d06 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/merge.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/merge.pxd @@ -1,11 +1,10 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. +cimport pylibcudf.libcudf.types as libcudf_types from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector - -cimport cudf._lib.pylibcudf.libcudf.types as libcudf_types -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view cdef extern from "cudf/merge.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/null_mask.pxd b/python/pylibcudf/pylibcudf/libcudf/null_mask.pxd similarity index 80% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/null_mask.pxd rename to python/pylibcudf/pylibcudf/libcudf/null_mask.pxd index 0cab404c05f..3fc2c7e8f1e 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/null_mask.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/null_mask.pxd @@ -2,17 +2,12 @@ from libc.stdint cimport int32_t from libcpp.pair cimport pair +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.types cimport bitmask_type, mask_state, size_type from rmm._lib.device_buffer cimport device_buffer -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view -from cudf._lib.pylibcudf.libcudf.types cimport ( - bitmask_type, - mask_state, - size_type, -) - ctypedef int32_t underlying_type_t_mask_state diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/__init__.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/__init__.pxd rename to python/pylibcudf/pylibcudf/libcudf/nvtext/__init__.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/__init__.py b/python/pylibcudf/pylibcudf/libcudf/nvtext/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/__init__.py rename to python/pylibcudf/pylibcudf/libcudf/nvtext/__init__.py diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/byte_pair_encode.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/byte_pair_encode.pxd similarity index 73% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/byte_pair_encode.pxd rename to python/pylibcudf/pylibcudf/libcudf/nvtext/byte_pair_encode.pxd index 033a820d2ef..fd768d22704 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/byte_pair_encode.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/nvtext/byte_pair_encode.pxd @@ -2,10 +2,9 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar cdef extern from "nvtext/byte_pair_encoding.hpp" namespace "nvtext" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/edit_distance.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/edit_distance.pxd similarity index 75% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/edit_distance.pxd rename to python/pylibcudf/pylibcudf/libcudf/nvtext/edit_distance.pxd index ca1f6650a5a..d459372fb8f 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/edit_distance.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/nvtext/edit_distance.pxd @@ -2,9 +2,8 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "nvtext/edit_distance.hpp" namespace "nvtext" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/generate_ngrams.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/generate_ngrams.pxd similarity index 69% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/generate_ngrams.pxd rename to python/pylibcudf/pylibcudf/libcudf/nvtext/generate_ngrams.pxd index 2034b1c1ee5..eefae746662 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/generate_ngrams.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/nvtext/generate_ngrams.pxd @@ -1,11 +1,10 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.types cimport size_type cdef extern from "nvtext/generate_ngrams.hpp" namespace "nvtext" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/jaccard.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/jaccard.pxd similarity index 61% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/jaccard.pxd rename to python/pylibcudf/pylibcudf/libcudf/nvtext/jaccard.pxd index 789a1a2c35a..16c5f7f575e 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/jaccard.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/nvtext/jaccard.pxd @@ -1,10 +1,9 @@ # Copyright (c) 2023-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.types cimport size_type cdef extern from "nvtext/jaccard.hpp" namespace "nvtext" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/minhash.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/minhash.pxd similarity index 70% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/minhash.pxd rename to python/pylibcudf/pylibcudf/libcudf/nvtext/minhash.pxd index fc5577bf3f9..0c352a5068b 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/minhash.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/nvtext/minhash.pxd @@ -1,10 +1,9 @@ # Copyright (c) 2023-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.types cimport size_type cdef extern from "nvtext/minhash.hpp" namespace "nvtext" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/ngrams_tokenize.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/ngrams_tokenize.pxd similarity index 58% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/ngrams_tokenize.pxd rename to python/pylibcudf/pylibcudf/libcudf/nvtext/ngrams_tokenize.pxd index 229f4d8f5a3..89f6e5edfc4 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/ngrams_tokenize.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/nvtext/ngrams_tokenize.pxd @@ -1,11 +1,10 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.types cimport size_type cdef extern from "nvtext/ngrams_tokenize.hpp" namespace "nvtext" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/normalize.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/normalize.pxd similarity index 75% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/normalize.pxd rename to python/pylibcudf/pylibcudf/libcudf/nvtext/normalize.pxd index 65c63b089df..cbf121920e1 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/normalize.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/nvtext/normalize.pxd @@ -2,9 +2,8 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "nvtext/normalize.hpp" namespace "nvtext" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/replace.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/replace.pxd similarity index 69% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/replace.pxd rename to python/pylibcudf/pylibcudf/libcudf/nvtext/replace.pxd index aaad28d2684..6bcfa1d9380 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/replace.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/nvtext/replace.pxd @@ -1,11 +1,10 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.types cimport size_type cdef extern from "nvtext/replace.hpp" namespace "nvtext" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/stemmer.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/stemmer.pxd similarity index 79% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/stemmer.pxd rename to python/pylibcudf/pylibcudf/libcudf/nvtext/stemmer.pxd index 040d4c9de63..673bffa28ae 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/stemmer.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/nvtext/stemmer.pxd @@ -2,10 +2,9 @@ from libc.stdint cimport int32_t from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.types cimport size_type cdef extern from "nvtext/stemmer.hpp" namespace "nvtext" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/subword_tokenize.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/subword_tokenize.pxd similarity index 92% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/subword_tokenize.pxd rename to python/pylibcudf/pylibcudf/libcudf/nvtext/subword_tokenize.pxd index cce40bcd3f6..aabac0a617b 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/subword_tokenize.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/nvtext/subword_tokenize.pxd @@ -4,9 +4,8 @@ from libc.stdint cimport uint16_t, uint32_t from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.string cimport string - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "nvtext/subword_tokenize.hpp" namespace "nvtext" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/tokenize.pxd b/python/pylibcudf/pylibcudf/libcudf/nvtext/tokenize.pxd similarity index 84% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/tokenize.pxd rename to python/pylibcudf/pylibcudf/libcudf/nvtext/tokenize.pxd index 721a6cabd01..34c054cf36f 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/nvtext/tokenize.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/nvtext/tokenize.pxd @@ -1,11 +1,10 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.types cimport size_type cdef extern from "nvtext/tokenize.hpp" namespace "nvtext" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/partitioning.pxd b/python/pylibcudf/pylibcudf/libcudf/partitioning.pxd similarity index 69% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/partitioning.pxd rename to python/pylibcudf/pylibcudf/libcudf/partitioning.pxd index babb167d2a0..1ea10e8a194 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/partitioning.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/partitioning.pxd @@ -1,15 +1,14 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. +cimport pylibcudf.libcudf.types as libcudf_types from libc.stdint cimport uint32_t from libcpp.memory cimport unique_ptr from libcpp.pair cimport pair from libcpp.vector cimport vector - -cimport cudf._lib.pylibcudf.libcudf.types as libcudf_types -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view cdef extern from "cudf/partitioning.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/quantiles.pxd b/python/pylibcudf/pylibcudf/libcudf/quantiles.pxd similarity index 70% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/quantiles.pxd rename to python/pylibcudf/pylibcudf/libcudf/quantiles.pxd index 32cfec2d4fc..cf2350fc36c 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/quantiles.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/quantiles.pxd @@ -3,12 +3,11 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view -from cudf._lib.pylibcudf.libcudf.types cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.types cimport ( interpolation, null_order, order, diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/reduce.pxd b/python/pylibcudf/pylibcudf/libcudf/reduce.pxd similarity index 69% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/reduce.pxd rename to python/pylibcudf/pylibcudf/libcudf/reduce.pxd index 3ae1f1a2906..6d2f4bd23d1 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/reduce.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/reduce.pxd @@ -3,15 +3,11 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.utility cimport pair - -from cudf._lib.pylibcudf.libcudf.aggregation cimport ( - reduce_aggregation, - scan_aggregation, -) -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar -from cudf._lib.pylibcudf.libcudf.types cimport data_type +from pylibcudf.libcudf.aggregation cimport reduce_aggregation, scan_aggregation +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport scalar +from pylibcudf.libcudf.types cimport data_type cdef extern from "cudf/reduction.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/reduce.pyx b/python/pylibcudf/pylibcudf/libcudf/reduce.pyx similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/reduce.pyx rename to python/pylibcudf/pylibcudf/libcudf/reduce.pyx diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/replace.pxd b/python/pylibcudf/pylibcudf/libcudf/replace.pxd similarity index 83% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/replace.pxd rename to python/pylibcudf/pylibcudf/libcudf/replace.pxd index e67efbdaba0..4ac44fc946e 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/replace.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/replace.pxd @@ -2,15 +2,12 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr - -from cudf._lib.types import cudf_to_np_types, np_to_cudf_types - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport ( column_view, mutable_column_view, ) -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar +from pylibcudf.libcudf.scalar.scalar cimport scalar cdef extern from "cudf/replace.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/replace.pyx b/python/pylibcudf/pylibcudf/libcudf/replace.pyx similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/replace.pyx rename to python/pylibcudf/pylibcudf/libcudf/replace.pyx diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/reshape.pxd b/python/pylibcudf/pylibcudf/libcudf/reshape.pxd similarity index 57% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/reshape.pxd rename to python/pylibcudf/pylibcudf/libcudf/reshape.pxd index dfd9a71c3d3..446a082ab1b 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/reshape.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/reshape.pxd @@ -1,11 +1,10 @@ # Copyright (c) 2019-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/reshape.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/rolling.pxd b/python/pylibcudf/pylibcudf/libcudf/rolling.pxd similarity index 64% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/rolling.pxd rename to python/pylibcudf/pylibcudf/libcudf/rolling.pxd index d7844f99a73..9e76faa0eba 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/rolling.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/rolling.pxd @@ -1,13 +1,10 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.types import cudf_to_np_types, np_to_cudf_types - -from cudf._lib.pylibcudf.libcudf.aggregation cimport rolling_aggregation -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.aggregation cimport rolling_aggregation +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/rolling.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/round.pxd b/python/pylibcudf/pylibcudf/libcudf/round.pxd similarity index 75% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/round.pxd rename to python/pylibcudf/pylibcudf/libcudf/round.pxd index 027c4634c9f..1b65133f275 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/round.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/round.pxd @@ -2,9 +2,8 @@ from libc.stdint cimport int32_t from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cudf/round.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/round.pyx b/python/pylibcudf/pylibcudf/libcudf/round.pyx similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/round.pyx rename to python/pylibcudf/pylibcudf/libcudf/round.pyx diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/scalar/__init__.pxd b/python/pylibcudf/pylibcudf/libcudf/scalar/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/scalar/__init__.pxd rename to python/pylibcudf/pylibcudf/libcudf/scalar/__init__.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/scalar/__init__.py b/python/pylibcudf/pylibcudf/libcudf/scalar/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/scalar/__init__.py rename to python/pylibcudf/pylibcudf/libcudf/scalar/__init__.py diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/scalar/scalar.pxd b/python/pylibcudf/pylibcudf/libcudf/scalar/scalar.pxd similarity index 91% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/scalar/scalar.pxd rename to python/pylibcudf/pylibcudf/libcudf/scalar/scalar.pxd index 662eb90096e..4b40a8a26f6 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/scalar/scalar.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/scalar/scalar.pxd @@ -3,11 +3,10 @@ from libc.stdint cimport int32_t, int64_t from libcpp cimport bool from libcpp.string cimport string - -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view -from cudf._lib.pylibcudf.libcudf.types cimport data_type -from cudf._lib.pylibcudf.libcudf.wrappers.decimals cimport scale_type +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.types cimport data_type +from pylibcudf.libcudf.wrappers.decimals cimport scale_type cdef extern from "cudf/scalar/scalar.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/scalar/scalar_factories.pxd b/python/pylibcudf/pylibcudf/libcudf/scalar/scalar_factories.pxd similarity index 76% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/scalar/scalar_factories.pxd rename to python/pylibcudf/pylibcudf/libcudf/scalar/scalar_factories.pxd index 8092c3d637d..ee4b47935b2 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/scalar/scalar_factories.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/scalar/scalar_factories.pxd @@ -2,9 +2,8 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string - -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport scalar cdef extern from "cudf/scalar/scalar_factories.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/search.pxd b/python/pylibcudf/pylibcudf/libcudf/search.pxd similarity index 73% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/search.pxd rename to python/pylibcudf/pylibcudf/libcudf/search.pxd index e2247a1366f..5a6ad5384c9 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/search.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/search.pxd @@ -1,12 +1,11 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. +cimport pylibcudf.libcudf.types as libcudf_types from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector - -cimport cudf._lib.pylibcudf.libcudf.types as libcudf_types -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table_view cimport table_view cdef extern from "cudf/search.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/sorting.pxd b/python/pylibcudf/pylibcudf/libcudf/sorting.pxd similarity index 84% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/sorting.pxd rename to python/pylibcudf/pylibcudf/libcudf/sorting.pxd index 3d7d3aa2790..9e899855486 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/sorting.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/sorting.pxd @@ -1,17 +1,14 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. +cimport pylibcudf.libcudf.types as libcudf_types from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector - -from cudf._lib.types import cudf_to_np_types, np_to_cudf_types - -cimport cudf._lib.pylibcudf.libcudf.types as libcudf_types -from cudf._lib.pylibcudf.libcudf.aggregation cimport rank_method -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.aggregation cimport rank_method +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view cdef extern from "cudf/sorting.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/stream_compaction.pxd b/python/pylibcudf/pylibcudf/libcudf/stream_compaction.pxd similarity index 85% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/stream_compaction.pxd rename to python/pylibcudf/pylibcudf/libcudf/stream_compaction.pxd index 11d803e5b76..7830c9478c2 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/stream_compaction.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/stream_compaction.pxd @@ -3,14 +3,11 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector - -from cudf._lib.types import cudf_to_np_types, np_to_cudf_types - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view -from cudf._lib.pylibcudf.libcudf.types cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.types cimport ( nan_equality, nan_policy, null_equality, diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/stream_compaction.pyx b/python/pylibcudf/pylibcudf/libcudf/stream_compaction.pyx similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/stream_compaction.pyx rename to python/pylibcudf/pylibcudf/libcudf/stream_compaction.pyx diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/CMakeLists.txt b/python/pylibcudf/pylibcudf/libcudf/strings/CMakeLists.txt similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/CMakeLists.txt rename to python/pylibcudf/pylibcudf/libcudf/strings/CMakeLists.txt diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/__init__.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/__init__.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/__init__.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/__init__.py b/python/pylibcudf/pylibcudf/libcudf/strings/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/__init__.py rename to python/pylibcudf/pylibcudf/libcudf/strings/__init__.py diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/attributes.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/attributes.pxd similarity index 76% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/attributes.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/attributes.pxd index c4d52c83663..5e510339834 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/attributes.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/attributes.pxd @@ -1,9 +1,8 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cudf/strings/attributes.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/capitalize.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/capitalize.pxd similarity index 63% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/capitalize.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/capitalize.pxd index b0771e16680..77e3f46d7ee 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/capitalize.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/capitalize.pxd @@ -1,12 +1,9 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.strings.char_types cimport ( - string_character_types, -) +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.strings.char_types cimport string_character_types cdef extern from "cudf/strings/capitalize.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/case.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/case.pxd similarity index 81% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/case.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/case.pxd index 82c146b0023..7869e90f387 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/case.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/case.pxd @@ -1,8 +1,7 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cudf/strings/case.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/char_types.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/char_types.pxd similarity index 82% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/char_types.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/char_types.pxd index f63e1a93f91..5d54c1c3593 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/char_types.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/char_types.pxd @@ -2,10 +2,9 @@ from libc.stdint cimport uint32_t from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar cdef extern from "cudf/strings/char_types/char_types.hpp" \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/char_types.pyx b/python/pylibcudf/pylibcudf/libcudf/strings/char_types.pyx similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/char_types.pyx rename to python/pylibcudf/pylibcudf/libcudf/strings/char_types.pyx diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/combine.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/combine.pxd similarity index 83% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/combine.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/combine.pxd index b05e46af0d6..e4c9fa5817a 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/combine.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/combine.pxd @@ -1,11 +1,10 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.table.table_view cimport table_view cdef extern from "cudf/strings/combine.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/contains.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/contains.pxd similarity index 69% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/contains.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/contains.pxd index f8ed253ff3c..c2fb5f0dce4 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/contains.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/contains.pxd @@ -1,11 +1,10 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.strings.regex_program cimport regex_program +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.strings.regex_program cimport regex_program cdef extern from "cudf/strings/contains.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/__init__.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/convert/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/__init__.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/convert/__init__.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/__init__.py b/python/pylibcudf/pylibcudf/libcudf/strings/convert/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/__init__.py rename to python/pylibcudf/pylibcudf/libcudf/strings/convert/__init__.py diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_booleans.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_booleans.pxd similarity index 69% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_booleans.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_booleans.pxd index daac2b5be28..83a9573baad 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_booleans.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_booleans.pxd @@ -1,9 +1,8 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar cdef extern from "cudf/strings/convert/convert_booleans.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_datetime.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_datetime.pxd similarity index 76% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_datetime.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_datetime.pxd index 263cee4fe1e..fa8975c4df9 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_datetime.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_datetime.pxd @@ -2,10 +2,9 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.types cimport data_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.types cimport data_type cdef extern from "cudf/strings/convert/convert_datetime.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_durations.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_durations.pxd similarity index 72% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_durations.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_durations.pxd index af357b9bde4..ebe10574353 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_durations.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_durations.pxd @@ -2,10 +2,9 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.types cimport data_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.types cimport data_type cdef extern from "cudf/strings/convert/convert_durations.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_fixed_point.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_fixed_point.pxd similarity index 73% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_fixed_point.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_fixed_point.pxd index 91c1abdb5e4..6f820f3c9a4 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_fixed_point.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_fixed_point.pxd @@ -1,10 +1,9 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.types cimport data_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.types cimport data_type cdef extern from "cudf/strings/convert/convert_fixed_point.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_floats.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_floats.pxd similarity index 71% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_floats.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_floats.pxd index 5fbf2be0244..f4fc4674506 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_floats.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_floats.pxd @@ -1,10 +1,9 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.types cimport data_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.types cimport data_type cdef extern from "cudf/strings/convert/convert_floats.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_integers.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_integers.pxd similarity index 80% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_integers.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_integers.pxd index 3d6c59cbfcf..f12aab0a2e4 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_integers.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_integers.pxd @@ -1,10 +1,9 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.types cimport data_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.types cimport data_type cdef extern from "cudf/strings/convert/convert_integers.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_ipv4.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_ipv4.pxd similarity index 76% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_ipv4.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_ipv4.pxd index 86de956b6b6..fe571cfced6 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_ipv4.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_ipv4.pxd @@ -1,9 +1,8 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cudf/strings/convert/convert_ipv4.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_lists.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_lists.pxd similarity index 62% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_lists.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_lists.pxd index aba2dbcca64..109111568d8 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_lists.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_lists.pxd @@ -1,9 +1,8 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar cdef extern from "cudf/strings/convert/convert_lists.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_urls.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_urls.pxd similarity index 72% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_urls.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_urls.pxd index fb7e0cae6de..5c07b698454 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/convert/convert_urls.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/convert/convert_urls.pxd @@ -1,9 +1,8 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cudf/strings/convert/convert_urls.hpp" namespace \ diff --git a/python/pylibcudf/pylibcudf/libcudf/strings/extract.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/extract.pxd new file mode 100644 index 00000000000..12cd628fc1f --- /dev/null +++ b/python/pylibcudf/pylibcudf/libcudf/strings/extract.pxd @@ -0,0 +1,14 @@ +# Copyright (c) 2020-2024, NVIDIA CORPORATION. + +from libcpp.memory cimport unique_ptr +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.strings.regex_program cimport regex_program +from pylibcudf.libcudf.table.table cimport table + + +cdef extern from "cudf/strings/extract.hpp" namespace "cudf::strings" nogil: + + cdef unique_ptr[table] extract( + column_view source_strings, + regex_program) except + diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/find.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/find.pxd similarity index 83% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/find.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/find.pxd index 04e2ed554ee..1d1df1b8b8e 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/find.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/find.pxd @@ -2,11 +2,10 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/strings/find.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/find_multiple.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/find_multiple.pxd similarity index 68% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/find_multiple.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/find_multiple.pxd index 1f1adc8e99f..0491644a10a 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/find_multiple.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/find_multiple.pxd @@ -1,9 +1,8 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view cdef extern from "cudf/strings/find_multiple.hpp" namespace "cudf::strings" \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/findall.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/findall.pxd similarity index 56% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/findall.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/findall.pxd index 4bc450b8911..b25724586e1 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/findall.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/findall.pxd @@ -1,10 +1,9 @@ # Copyright (c) 2019-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.strings.regex_program cimport regex_program +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.strings.regex_program cimport regex_program cdef extern from "cudf/strings/findall.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/json.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/json.pxd similarity index 79% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/json.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/json.pxd index 5926fa1d29f..571ba7be7af 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/json.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/json.pxd @@ -3,10 +3,9 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.string cimport string - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar, string_scalar +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport scalar, string_scalar cdef extern from "cudf/json/json.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/padding.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/padding.pxd similarity index 59% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/padding.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/padding.pxd index 26681a1aa00..657fe61eb14 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/padding.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/padding.pxd @@ -2,12 +2,11 @@ from libc.stdint cimport int32_t from libcpp.memory cimport unique_ptr from libcpp.string cimport string - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.strings.side_type cimport side_type -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.strings.side_type cimport side_type +from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/strings/padding.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/regex_flags.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/regex_flags.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/regex_flags.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/regex_flags.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/regex_flags.pyx b/python/pylibcudf/pylibcudf/libcudf/strings/regex_flags.pyx similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/regex_flags.pyx rename to python/pylibcudf/pylibcudf/libcudf/strings/regex_flags.pyx diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/regex_program.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/regex_program.pxd similarity index 84% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/regex_program.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/regex_program.pxd index e92c8bd7737..5d1d9e583d5 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/regex_program.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/regex_program.pxd @@ -2,8 +2,7 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string - -from cudf._lib.pylibcudf.libcudf.strings.regex_flags cimport regex_flags +from pylibcudf.libcudf.strings.regex_flags cimport regex_flags cdef extern from "cudf/strings/regex/regex_program.hpp" \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/repeat.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/repeat.pxd similarity index 67% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/repeat.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/repeat.pxd index 9e128529406..410ff58f299 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/repeat.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/repeat.pxd @@ -1,10 +1,9 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/strings/repeat_strings.hpp" namespace "cudf::strings" \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/replace.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/replace.pxd similarity index 73% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/replace.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/replace.pxd index 34e03eec638..fd5f4fc4751 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/replace.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/replace.pxd @@ -3,11 +3,10 @@ from libc.stdint cimport int32_t from libcpp.memory cimport unique_ptr from libcpp.string cimport string - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/strings/replace.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/replace_re.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/replace_re.pxd similarity index 63% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/replace_re.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/replace_re.pxd index 739505cd51d..40f0e2fa50c 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/replace_re.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/replace_re.pxd @@ -3,13 +3,12 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.strings.regex_program cimport regex_program -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.strings.regex_program cimport regex_program +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/strings/replace_re.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/side_type.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/side_type.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/side_type.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/side_type.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/split/__init__.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/split/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/split/__init__.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/split/__init__.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/split/__init__.py b/python/pylibcudf/pylibcudf/libcudf/strings/split/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/split/__init__.py rename to python/pylibcudf/pylibcudf/libcudf/strings/split/__init__.py diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/split/partition.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/split/partition.pxd similarity index 63% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/split/partition.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/split/partition.pxd index 5119124b3e3..4162e886a7d 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/split/partition.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/split/partition.pxd @@ -2,11 +2,10 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.table.table cimport table cdef extern from "cudf/strings/split/partition.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/split/split.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/split/split.pxd similarity index 78% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/split/split.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/split/split.pxd index 4f75664e47a..3046149aebb 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/split/split.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/split/split.pxd @@ -2,13 +2,12 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.strings.regex_program cimport regex_program -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.strings.regex_program cimport regex_program +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/strings/split/split.hpp" namespace \ diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/strip.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/strip.pxd similarity index 52% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/strip.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/strip.pxd index 2d6fd6a9e89..b0ca771762d 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/strip.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/strip.pxd @@ -1,11 +1,10 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.strings.side_type cimport side_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.strings.side_type cimport side_type cdef extern from "cudf/strings/strip.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/substring.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/substring.pxd similarity index 66% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/substring.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/substring.pxd index 02123cc0807..576dae9387f 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/substring.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/substring.pxd @@ -1,11 +1,10 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport numeric_scalar -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport numeric_scalar +from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/strings/slice.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/translate.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/translate.pxd similarity index 73% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/translate.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/translate.pxd index b23ac277216..85fa719128a 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/translate.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/translate.pxd @@ -4,11 +4,10 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.pair cimport pair from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.types cimport char_utf8 +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.types cimport char_utf8 cdef extern from "cudf/strings/translate.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/wrap.pxd b/python/pylibcudf/pylibcudf/libcudf/strings/wrap.pxd similarity index 58% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings/wrap.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings/wrap.pxd index 1d92d445634..c0053391328 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings/wrap.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings/wrap.pxd @@ -1,10 +1,9 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/strings/wrap.hpp" namespace "cudf::strings" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings_udf.pxd b/python/pylibcudf/pylibcudf/libcudf/strings_udf.pxd similarity index 85% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/strings_udf.pxd rename to python/pylibcudf/pylibcudf/libcudf/strings_udf.pxd index 804ad30dfb1..0c8fe1060ac 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/strings_udf.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/strings_udf.pxd @@ -4,13 +4,12 @@ from libc.stdint cimport uint8_t, uint16_t from libcpp.memory cimport unique_ptr from libcpp.string cimport string from libcpp.vector cimport vector +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.types cimport size_type from rmm._lib.device_buffer cimport DeviceBuffer, device_buffer -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.types cimport size_type - cdef extern from "cudf/strings/udf/udf_string.hpp" namespace \ "cudf::strings::udf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/table/__init__.pxd b/python/pylibcudf/pylibcudf/libcudf/table/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/table/__init__.pxd rename to python/pylibcudf/pylibcudf/libcudf/table/__init__.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/table/__init__.py b/python/pylibcudf/pylibcudf/libcudf/table/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/table/__init__.py rename to python/pylibcudf/pylibcudf/libcudf/table/__init__.py diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/table/table.pxd b/python/pylibcudf/pylibcudf/libcudf/table/table.pxd similarity index 69% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/table/table.pxd rename to python/pylibcudf/pylibcudf/libcudf/table/table.pxd index 737a1327d45..654c29b083a 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/table/table.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/table/table.pxd @@ -2,13 +2,9 @@ from libcpp.memory cimport unique_ptr from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.table.table_view cimport ( - mutable_table_view, - table_view, -) -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.table.table_view cimport mutable_table_view, table_view +from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/table/table.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/table/table_view.pxd b/python/pylibcudf/pylibcudf/libcudf/table/table_view.pxd similarity index 87% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/table/table_view.pxd rename to python/pylibcudf/pylibcudf/libcudf/table/table_view.pxd index 00e1a89c025..3af2f6a6c2c 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/table/table_view.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/table/table_view.pxd @@ -1,12 +1,11 @@ # Copyright (c) 2020-2024, NVIDIA CORPORATION. from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf.column.column_view cimport ( +from pylibcudf.libcudf.column.column_view cimport ( column_view, mutable_column_view, ) -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.types cimport size_type cdef extern from "cudf/table/table_view.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/transform.pxd b/python/pylibcudf/pylibcudf/libcudf/transform.pxd similarity index 73% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/transform.pxd rename to python/pylibcudf/pylibcudf/libcudf/transform.pxd index b0a978fe5c5..38298a7c1f1 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/transform.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/transform.pxd @@ -4,20 +4,15 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.pair cimport pair from libcpp.string cimport string +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.expressions cimport expression +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.types cimport bitmask_type, data_type, size_type from rmm._lib.device_buffer cimport device_buffer -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.expressions cimport expression -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view -from cudf._lib.pylibcudf.libcudf.types cimport ( - bitmask_type, - data_type, - size_type, -) - cdef extern from "cudf/transform.hpp" namespace "cudf" nogil: cdef pair[unique_ptr[device_buffer], size_type] bools_to_mask ( diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/transpose.pxd b/python/pylibcudf/pylibcudf/libcudf/transpose.pxd similarity index 69% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/transpose.pxd rename to python/pylibcudf/pylibcudf/libcudf/transpose.pxd index 5dcb9c165ad..9c0e3c073b0 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/transpose.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/transpose.pxd @@ -2,9 +2,8 @@ from libcpp.memory cimport unique_ptr from libcpp.pair cimport pair - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.table.table_view cimport table_view cdef extern from "cudf/transpose.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/types.pxd b/python/pylibcudf/pylibcudf/libcudf/types.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/types.pxd rename to python/pylibcudf/pylibcudf/libcudf/types.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/types.pyx b/python/pylibcudf/pylibcudf/libcudf/types.pyx similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/types.pyx rename to python/pylibcudf/pylibcudf/libcudf/types.pyx diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/unary.pxd b/python/pylibcudf/pylibcudf/libcudf/unary.pxd similarity index 85% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/unary.pxd rename to python/pylibcudf/pylibcudf/libcudf/unary.pxd index 2a1b189af51..887f8c7fca4 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/unary.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/unary.pxd @@ -3,10 +3,9 @@ from libc.stdint cimport int32_t from libcpp cimport bool from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.types cimport data_type +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.types cimport data_type cdef extern from "cudf/unary.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/unary.pyx b/python/pylibcudf/pylibcudf/libcudf/unary.pyx similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/unary.pyx rename to python/pylibcudf/pylibcudf/libcudf/unary.pyx diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/utilities/__init__.pxd b/python/pylibcudf/pylibcudf/libcudf/utilities/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/utilities/__init__.pxd rename to python/pylibcudf/pylibcudf/libcudf/utilities/__init__.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/utilities/__init__.py b/python/pylibcudf/pylibcudf/libcudf/utilities/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/utilities/__init__.py rename to python/pylibcudf/pylibcudf/libcudf/utilities/__init__.py diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/utilities/host_span.pxd b/python/pylibcudf/pylibcudf/libcudf/utilities/host_span.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/utilities/host_span.pxd rename to python/pylibcudf/pylibcudf/libcudf/utilities/host_span.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/utilities/traits.pxd b/python/pylibcudf/pylibcudf/libcudf/utilities/traits.pxd similarity index 93% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/utilities/traits.pxd rename to python/pylibcudf/pylibcudf/libcudf/utilities/traits.pxd index 0cc58af735b..69765e44274 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/utilities/traits.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/utilities/traits.pxd @@ -2,8 +2,7 @@ from libcpp cimport bool from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf.types cimport data_type +from pylibcudf.libcudf.types cimport data_type cdef extern from "cudf/utilities/traits.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/utilities/type_dispatcher.pxd b/python/pylibcudf/pylibcudf/libcudf/utilities/type_dispatcher.pxd similarity index 73% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/utilities/type_dispatcher.pxd rename to python/pylibcudf/pylibcudf/libcudf/utilities/type_dispatcher.pxd index 890fca3a662..fbeb6e9db90 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/utilities/type_dispatcher.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/utilities/type_dispatcher.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.pylibcudf.libcudf.types cimport type_id +from pylibcudf.libcudf.types cimport type_id cdef extern from "cudf/utilities/type_dispatcher.hpp" namespace "cudf" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/wrappers/__init__.pxd b/python/pylibcudf/pylibcudf/libcudf/wrappers/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/wrappers/__init__.pxd rename to python/pylibcudf/pylibcudf/libcudf/wrappers/__init__.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/wrappers/__init__.py b/python/pylibcudf/pylibcudf/libcudf/wrappers/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/wrappers/__init__.py rename to python/pylibcudf/pylibcudf/libcudf/wrappers/__init__.py diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/wrappers/decimals.pxd b/python/pylibcudf/pylibcudf/libcudf/wrappers/decimals.pxd similarity index 90% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/wrappers/decimals.pxd rename to python/pylibcudf/pylibcudf/libcudf/wrappers/decimals.pxd index 09b0c87e4b8..558299501d6 100644 --- a/python/cudf/cudf/_lib/pylibcudf/libcudf/wrappers/decimals.pxd +++ b/python/pylibcudf/pylibcudf/libcudf/wrappers/decimals.pxd @@ -1,8 +1,7 @@ # Copyright (c) 2021-2024, NVIDIA CORPORATION. from libc.stdint cimport int32_t, int64_t - -from cudf._lib.pylibcudf.libcudf.types cimport int128 +from pylibcudf.libcudf.types cimport int128 cdef extern from "cudf/fixed_point/fixed_point.hpp" namespace "numeric" nogil: diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/wrappers/durations.pxd b/python/pylibcudf/pylibcudf/libcudf/wrappers/durations.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/wrappers/durations.pxd rename to python/pylibcudf/pylibcudf/libcudf/wrappers/durations.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/libcudf/wrappers/timestamps.pxd b/python/pylibcudf/pylibcudf/libcudf/wrappers/timestamps.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/libcudf/wrappers/timestamps.pxd rename to python/pylibcudf/pylibcudf/libcudf/wrappers/timestamps.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/lists.pxd b/python/pylibcudf/pylibcudf/lists.pxd similarity index 94% rename from python/cudf/cudf/_lib/pylibcudf/lists.pxd rename to python/pylibcudf/pylibcudf/lists.pxd index 17619b489d2..e7d006e6e2e 100644 --- a/python/cudf/cudf/_lib/pylibcudf/lists.pxd +++ b/python/pylibcudf/pylibcudf/lists.pxd @@ -1,8 +1,7 @@ # Copyright (c) 2024, NVIDIA CORPORATION. from libcpp cimport bool - -from cudf._lib.pylibcudf.libcudf.types cimport null_order, size_type +from pylibcudf.libcudf.types cimport null_order, size_type from .column cimport Column from .scalar cimport Scalar diff --git a/python/cudf/cudf/_lib/pylibcudf/lists.pyx b/python/pylibcudf/pylibcudf/lists.pyx similarity index 95% rename from python/cudf/cudf/_lib/pylibcudf/lists.pyx rename to python/pylibcudf/pylibcudf/lists.pyx index c944fc35800..947caddc485 100644 --- a/python/cudf/cudf/_lib/pylibcudf/lists.pyx +++ b/python/pylibcudf/pylibcudf/lists.pyx @@ -4,9 +4,8 @@ from cython.operator cimport dereference from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.utility cimport move - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.lists cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.lists cimport ( contains as cpp_contains, explode as cpp_explode, filling as cpp_filling, @@ -14,34 +13,34 @@ from cudf._lib.pylibcudf.libcudf.lists cimport ( reverse as cpp_reverse, set_operations as cpp_set_operations, ) -from cudf._lib.pylibcudf.libcudf.lists.combine cimport ( +from pylibcudf.libcudf.lists.combine cimport ( concatenate_list_elements as cpp_concatenate_list_elements, concatenate_null_policy, concatenate_rows as cpp_concatenate_rows, ) -from cudf._lib.pylibcudf.libcudf.lists.count_elements cimport ( +from pylibcudf.libcudf.lists.count_elements cimport ( count_elements as cpp_count_elements, ) -from cudf._lib.pylibcudf.libcudf.lists.extract cimport ( +from pylibcudf.libcudf.lists.extract cimport ( extract_list_element as cpp_extract_list_element, ) -from cudf._lib.pylibcudf.libcudf.lists.sorting cimport ( +from pylibcudf.libcudf.lists.sorting cimport ( sort_lists as cpp_sort_lists, stable_sort_lists as cpp_stable_sort_lists, ) -from cudf._lib.pylibcudf.libcudf.lists.stream_compaction cimport ( +from pylibcudf.libcudf.lists.stream_compaction cimport ( apply_boolean_mask as cpp_apply_boolean_mask, distinct as cpp_distinct, ) -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.types cimport ( +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.types cimport ( nan_equality, null_equality, null_order, order, size_type, ) -from cudf._lib.pylibcudf.lists cimport ColumnOrScalar, ColumnOrSizeType +from pylibcudf.lists cimport ColumnOrScalar, ColumnOrSizeType from .column cimport Column, ListColumnView from .scalar cimport Scalar @@ -131,8 +130,8 @@ cpdef Column contains(Column input, ColumnOrScalar search_key): the search_key is contained in the input. ``search_key`` may be a - :py:class:`~cudf._lib.pylibcudf.column.Column` or a - :py:class:`~cudf._lib.pylibcudf.scalar.Scalar`. + :py:class:`~pylibcudf.column.Column` or a + :py:class:`~pylibcudf.scalar.Scalar`. For details, see :cpp:func:`contains`. @@ -192,8 +191,8 @@ cpdef Column index_of(Column input, ColumnOrScalar search_key, bool find_first_o key row within the corresponding list row in the lists column. ``search_key`` may be a - :py:class:`~cudf._lib.pylibcudf.column.Column` or a - :py:class:`~cudf._lib.pylibcudf.scalar.Scalar`. + :py:class:`~pylibcudf.column.Column` or a + :py:class:`~pylibcudf.scalar.Scalar`. For details, see :cpp:func:`index_of`. diff --git a/python/cudf/cudf/_lib/pylibcudf/merge.pxd b/python/pylibcudf/pylibcudf/merge.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/merge.pxd rename to python/pylibcudf/pylibcudf/merge.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/merge.pyx b/python/pylibcudf/pylibcudf/merge.pyx similarity index 83% rename from python/cudf/cudf/_lib/pylibcudf/merge.pyx rename to python/pylibcudf/pylibcudf/merge.pyx index 5aa46c142f6..a7d43c9d158 100644 --- a/python/cudf/cudf/_lib/pylibcudf/merge.pyx +++ b/python/pylibcudf/pylibcudf/merge.pyx @@ -3,11 +3,10 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf cimport merge as cpp_merge -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view -from cudf._lib.pylibcudf.libcudf.types cimport null_order, order, size_type +from pylibcudf.libcudf cimport merge as cpp_merge +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.types cimport null_order, order, size_type from .table cimport Table diff --git a/python/cudf/cudf/_lib/pylibcudf/quantiles.pxd b/python/pylibcudf/pylibcudf/quantiles.pxd similarity index 86% rename from python/cudf/cudf/_lib/pylibcudf/quantiles.pxd rename to python/pylibcudf/pylibcudf/quantiles.pxd index 70ff135ca77..fbc1dfb30a6 100644 --- a/python/cudf/cudf/_lib/pylibcudf/quantiles.pxd +++ b/python/pylibcudf/pylibcudf/quantiles.pxd @@ -1,7 +1,6 @@ # Copyright (c) 2024, NVIDIA CORPORATION. from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf.types cimport interpolation, sorted +from pylibcudf.libcudf.types cimport interpolation, sorted from .column cimport Column from .table cimport Table diff --git a/python/cudf/cudf/_lib/pylibcudf/quantiles.pyx b/python/pylibcudf/pylibcudf/quantiles.pyx similarity index 93% rename from python/cudf/cudf/_lib/pylibcudf/quantiles.pyx rename to python/pylibcudf/pylibcudf/quantiles.pyx index c1f0e30ccd3..b847ade774d 100644 --- a/python/cudf/cudf/_lib/pylibcudf/quantiles.pyx +++ b/python/pylibcudf/pylibcudf/quantiles.pyx @@ -4,15 +4,14 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.quantiles cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.quantiles cimport ( quantile as cpp_quantile, quantiles as cpp_quantiles, ) -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.types cimport null_order, order, sorted +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.types cimport null_order, order, sorted from .column cimport Column from .table cimport Table diff --git a/python/cudf/cudf/_lib/pylibcudf/reduce.pxd b/python/pylibcudf/pylibcudf/reduce.pxd similarity index 85% rename from python/cudf/cudf/_lib/pylibcudf/reduce.pxd rename to python/pylibcudf/pylibcudf/reduce.pxd index 935efd4acf2..047f08297e4 100644 --- a/python/cudf/cudf/_lib/pylibcudf/reduce.pxd +++ b/python/pylibcudf/pylibcudf/reduce.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.pylibcudf.libcudf.reduce cimport scan_type +from pylibcudf.libcudf.reduce cimport scan_type from .aggregation cimport Aggregation from .column cimport Column diff --git a/python/cudf/cudf/_lib/pylibcudf/reduce.pyx b/python/pylibcudf/pylibcudf/reduce.pyx similarity index 85% rename from python/cudf/cudf/_lib/pylibcudf/reduce.pyx rename to python/pylibcudf/pylibcudf/reduce.pyx index c272f183007..b0212a5b9c1 100644 --- a/python/cudf/cudf/_lib/pylibcudf/reduce.pyx +++ b/python/pylibcudf/pylibcudf/reduce.pyx @@ -3,23 +3,18 @@ from cython.operator cimport dereference from libcpp.memory cimport unique_ptr from libcpp.utility cimport move, pair - -from cudf._lib.pylibcudf.libcudf cimport reduce as cpp_reduce -from cudf._lib.pylibcudf.libcudf.aggregation cimport ( - reduce_aggregation, - scan_aggregation, -) -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.reduce cimport scan_type -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar +from pylibcudf.libcudf cimport reduce as cpp_reduce +from pylibcudf.libcudf.aggregation cimport reduce_aggregation, scan_aggregation +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.reduce cimport scan_type +from pylibcudf.libcudf.scalar.scalar cimport scalar from .aggregation cimport Aggregation from .column cimport Column from .scalar cimport Scalar from .types cimport DataType -from cudf._lib.pylibcudf.libcudf.reduce import \ - scan_type as ScanType # no-cython-lint +from pylibcudf.libcudf.reduce import scan_type as ScanType # no-cython-lint cpdef Scalar reduce(Column col, Aggregation agg, DataType data_type): diff --git a/python/cudf/cudf/_lib/pylibcudf/replace.pxd b/python/pylibcudf/pylibcudf/replace.pxd similarity index 92% rename from python/cudf/cudf/_lib/pylibcudf/replace.pxd rename to python/pylibcudf/pylibcudf/replace.pxd index 40484c728db..cb9fa8bf960 100644 --- a/python/cudf/cudf/_lib/pylibcudf/replace.pxd +++ b/python/pylibcudf/pylibcudf/replace.pxd @@ -1,8 +1,7 @@ # Copyright (c) 2023-2024, NVIDIA CORPORATION. from libcpp cimport bool - -from cudf._lib.pylibcudf.libcudf.replace cimport replace_policy +from pylibcudf.libcudf.replace cimport replace_policy from .column cimport Column from .scalar cimport Scalar diff --git a/python/cudf/cudf/_lib/pylibcudf/replace.pyx b/python/pylibcudf/pylibcudf/replace.pyx similarity index 97% rename from python/cudf/cudf/_lib/pylibcudf/replace.pyx rename to python/pylibcudf/pylibcudf/replace.pyx index 6e08e8f64a9..115dee132fd 100644 --- a/python/cudf/cudf/_lib/pylibcudf/replace.pyx +++ b/python/pylibcudf/pylibcudf/replace.pyx @@ -6,11 +6,10 @@ from cython.operator import dereference from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.utility cimport move +from pylibcudf.libcudf cimport replace as cpp_replace +from pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf cimport replace as cpp_replace -from cudf._lib.pylibcudf.libcudf.column.column cimport column - -from cudf._lib.pylibcudf.libcudf.replace import \ +from pylibcudf.libcudf.replace import \ replace_policy as ReplacePolicy # no-cython-lint from .column cimport Column diff --git a/python/cudf/cudf/_lib/pylibcudf/reshape.pxd b/python/pylibcudf/pylibcudf/reshape.pxd similarity index 80% rename from python/cudf/cudf/_lib/pylibcudf/reshape.pxd rename to python/pylibcudf/pylibcudf/reshape.pxd index a7cc45d7a08..c4d3d375f7a 100644 --- a/python/cudf/cudf/_lib/pylibcudf/reshape.pxd +++ b/python/pylibcudf/pylibcudf/reshape.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.types cimport size_type from .column cimport Column from .scalar cimport Scalar diff --git a/python/cudf/cudf/_lib/pylibcudf/reshape.pyx b/python/pylibcudf/pylibcudf/reshape.pyx similarity index 86% rename from python/cudf/cudf/_lib/pylibcudf/reshape.pyx rename to python/pylibcudf/pylibcudf/reshape.pyx index b68eba48cd6..a99145be900 100644 --- a/python/cudf/cudf/_lib/pylibcudf/reshape.pyx +++ b/python/pylibcudf/pylibcudf/reshape.pyx @@ -2,14 +2,13 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.reshape cimport ( +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.reshape cimport ( interleave_columns as cpp_interleave_columns, tile as cpp_tile, ) -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.types cimport size_type from .column cimport Column from .table cimport Table diff --git a/python/cudf/cudf/_lib/pylibcudf/rolling.pxd b/python/pylibcudf/pylibcudf/rolling.pxd similarity index 85% rename from python/cudf/cudf/_lib/pylibcudf/rolling.pxd rename to python/pylibcudf/pylibcudf/rolling.pxd index cdadee68d43..9fcda21a62f 100644 --- a/python/cudf/cudf/_lib/pylibcudf/rolling.pxd +++ b/python/pylibcudf/pylibcudf/rolling.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf.types cimport size_type from .aggregation cimport Aggregation from .column cimport Column diff --git a/python/cudf/cudf/_lib/pylibcudf/rolling.pyx b/python/pylibcudf/pylibcudf/rolling.pyx similarity index 89% rename from python/cudf/cudf/_lib/pylibcudf/rolling.pyx rename to python/pylibcudf/pylibcudf/rolling.pyx index 7aa7828a5dd..a46540d7ffa 100644 --- a/python/cudf/cudf/_lib/pylibcudf/rolling.pyx +++ b/python/pylibcudf/pylibcudf/rolling.pyx @@ -3,11 +3,10 @@ from cython.operator cimport dereference from libcpp.memory cimport unique_ptr from libcpp.utility cimport move - -from cudf._lib.pylibcudf.libcudf cimport rolling as cpp_rolling -from cudf._lib.pylibcudf.libcudf.aggregation cimport rolling_aggregation -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.types cimport size_type +from pylibcudf.libcudf cimport rolling as cpp_rolling +from pylibcudf.libcudf.aggregation cimport rolling_aggregation +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.types cimport size_type from .aggregation cimport Aggregation from .column cimport Column diff --git a/python/cudf/cudf/_lib/pylibcudf/round.pxd b/python/pylibcudf/pylibcudf/round.pxd similarity index 77% rename from python/cudf/cudf/_lib/pylibcudf/round.pxd rename to python/pylibcudf/pylibcudf/round.pxd index ccb64fc2847..c8501b03fad 100644 --- a/python/cudf/cudf/_lib/pylibcudf/round.pxd +++ b/python/pylibcudf/pylibcudf/round.pxd @@ -1,7 +1,6 @@ # Copyright (c) 2024, NVIDIA CORPORATION. from libc.stdint cimport int32_t - -from cudf._lib.pylibcudf.libcudf.round cimport rounding_method +from pylibcudf.libcudf.round cimport rounding_method from .column cimport Column diff --git a/python/cudf/cudf/_lib/pylibcudf/round.pyx b/python/pylibcudf/pylibcudf/round.pyx similarity index 85% rename from python/cudf/cudf/_lib/pylibcudf/round.pyx rename to python/pylibcudf/pylibcudf/round.pyx index cfcc2aafbb8..dc60d53b07e 100644 --- a/python/cudf/cudf/_lib/pylibcudf/round.pyx +++ b/python/pylibcudf/pylibcudf/round.pyx @@ -2,16 +2,12 @@ from libc.stdint cimport int32_t from libcpp.memory cimport unique_ptr from libcpp.utility cimport move +from pylibcudf.libcudf.round cimport round as cpp_round, rounding_method -from cudf._lib.pylibcudf.libcudf.round cimport ( - round as cpp_round, - rounding_method, -) - -from cudf._lib.pylibcudf.libcudf.round import \ +from pylibcudf.libcudf.round import \ rounding_method as RoundingMethod # no-cython-lint -from cudf._lib.pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column cimport column from .column cimport Column diff --git a/python/cudf/cudf/_lib/pylibcudf/scalar.pxd b/python/pylibcudf/pylibcudf/scalar.pxd similarity index 92% rename from python/cudf/cudf/_lib/pylibcudf/scalar.pxd rename to python/pylibcudf/pylibcudf/scalar.pxd index e6c9db2f1ac..8664dfa4b7e 100644 --- a/python/cudf/cudf/_lib/pylibcudf/scalar.pxd +++ b/python/pylibcudf/pylibcudf/scalar.pxd @@ -2,11 +2,10 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr +from pylibcudf.libcudf.scalar.scalar cimport scalar from rmm._lib.memory_resource cimport DeviceMemoryResource -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar - from .column cimport Column from .types cimport DataType diff --git a/python/cudf/cudf/_lib/pylibcudf/scalar.pyx b/python/pylibcudf/pylibcudf/scalar.pyx similarity index 94% rename from python/cudf/cudf/_lib/pylibcudf/scalar.pyx rename to python/pylibcudf/pylibcudf/scalar.pyx index 67730be07d8..3e20938af0c 100644 --- a/python/cudf/cudf/_lib/pylibcudf/scalar.pyx +++ b/python/pylibcudf/pylibcudf/scalar.pyx @@ -3,14 +3,11 @@ from cython cimport no_gc_clear from libcpp.memory cimport unique_ptr from libcpp.utility cimport move +from pylibcudf.libcudf.scalar.scalar cimport scalar +from pylibcudf.libcudf.scalar.scalar_factories cimport make_empty_scalar_like from rmm._lib.memory_resource cimport get_current_device_resource -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar -from cudf._lib.pylibcudf.libcudf.scalar.scalar_factories cimport ( - make_empty_scalar_like, -) - from .column cimport Column from .types cimport DataType diff --git a/python/cudf/cudf/_lib/pylibcudf/search.pxd b/python/pylibcudf/pylibcudf/search.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/search.pxd rename to python/pylibcudf/pylibcudf/search.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/search.pyx b/python/pylibcudf/pylibcudf/search.pyx similarity index 93% rename from python/cudf/cudf/_lib/pylibcudf/search.pyx rename to python/pylibcudf/pylibcudf/search.pyx index 151a39f204f..ff2468f3f9c 100644 --- a/python/cudf/cudf/_lib/pylibcudf/search.pyx +++ b/python/pylibcudf/pylibcudf/search.pyx @@ -3,10 +3,9 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf cimport search as cpp_search -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.types cimport null_order, order +from pylibcudf.libcudf cimport search as cpp_search +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.types cimport null_order, order from .column cimport Column from .table cimport Table diff --git a/python/cudf/cudf/_lib/pylibcudf/sorting.pxd b/python/pylibcudf/pylibcudf/sorting.pxd similarity index 87% rename from python/cudf/cudf/_lib/pylibcudf/sorting.pxd rename to python/pylibcudf/pylibcudf/sorting.pxd index a4ea541a03b..8127ab21ad1 100644 --- a/python/cudf/cudf/_lib/pylibcudf/sorting.pxd +++ b/python/pylibcudf/pylibcudf/sorting.pxd @@ -1,14 +1,8 @@ # Copyright (c) 2024, NVIDIA CORPORATION. from libcpp cimport bool - -from cudf._lib.pylibcudf.libcudf.aggregation cimport rank_method -from cudf._lib.pylibcudf.libcudf.types cimport ( - null_order, - null_policy, - order, - size_type, -) +from pylibcudf.libcudf.aggregation cimport rank_method +from pylibcudf.libcudf.types cimport null_order, null_policy, order, size_type from .column cimport Column from .table cimport Table diff --git a/python/cudf/cudf/_lib/pylibcudf/sorting.pyx b/python/pylibcudf/pylibcudf/sorting.pyx similarity index 96% rename from python/cudf/cudf/_lib/pylibcudf/sorting.pyx rename to python/pylibcudf/pylibcudf/sorting.pyx index 8c5a8e26899..bd173eebacb 100644 --- a/python/cudf/cudf/_lib/pylibcudf/sorting.pyx +++ b/python/pylibcudf/pylibcudf/sorting.pyx @@ -3,12 +3,11 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf cimport sorting as cpp_sorting -from cudf._lib.pylibcudf.libcudf.aggregation cimport rank_method -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.types cimport null_order, null_policy, order +from pylibcudf.libcudf cimport sorting as cpp_sorting +from pylibcudf.libcudf.aggregation cimport rank_method +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.types cimport null_order, null_policy, order from .column cimport Column from .table cimport Table diff --git a/python/cudf/cudf/_lib/pylibcudf/stream_compaction.pxd b/python/pylibcudf/pylibcudf/stream_compaction.pxd similarity index 89% rename from python/cudf/cudf/_lib/pylibcudf/stream_compaction.pxd rename to python/pylibcudf/pylibcudf/stream_compaction.pxd index 6f89aaf90e7..a4f39792f0c 100644 --- a/python/cudf/cudf/_lib/pylibcudf/stream_compaction.pxd +++ b/python/pylibcudf/pylibcudf/stream_compaction.pxd @@ -1,9 +1,7 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.pylibcudf.libcudf.stream_compaction cimport ( - duplicate_keep_option, -) -from cudf._lib.pylibcudf.libcudf.types cimport ( +from pylibcudf.libcudf.stream_compaction cimport duplicate_keep_option +from pylibcudf.libcudf.types cimport ( nan_equality, nan_policy, null_equality, diff --git a/python/cudf/cudf/_lib/pylibcudf/stream_compaction.pyx b/python/pylibcudf/pylibcudf/stream_compaction.pyx similarity index 95% rename from python/cudf/cudf/_lib/pylibcudf/stream_compaction.pyx rename to python/pylibcudf/pylibcudf/stream_compaction.pyx index 43449d3690a..b574bfa9fa2 100644 --- a/python/cudf/cudf/_lib/pylibcudf/stream_compaction.pyx +++ b/python/pylibcudf/pylibcudf/stream_compaction.pyx @@ -3,16 +3,11 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf cimport ( - stream_compaction as cpp_stream_compaction, -) -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.stream_compaction cimport ( - duplicate_keep_option, -) -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.types cimport ( +from pylibcudf.libcudf cimport stream_compaction as cpp_stream_compaction +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.stream_compaction cimport duplicate_keep_option +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.types cimport ( nan_equality, nan_policy, null_equality, @@ -20,7 +15,7 @@ from cudf._lib.pylibcudf.libcudf.types cimport ( size_type, ) -from cudf._lib.pylibcudf.libcudf.stream_compaction import \ +from pylibcudf.libcudf.stream_compaction import \ duplicate_keep_option as DuplicateKeepOption # no-cython-lint, isort:skip from .column cimport Column diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/CMakeLists.txt b/python/pylibcudf/pylibcudf/strings/CMakeLists.txt similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/strings/CMakeLists.txt rename to python/pylibcudf/pylibcudf/strings/CMakeLists.txt diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/__init__.pxd b/python/pylibcudf/pylibcudf/strings/__init__.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/strings/__init__.pxd rename to python/pylibcudf/pylibcudf/strings/__init__.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/__init__.py b/python/pylibcudf/pylibcudf/strings/__init__.py similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/strings/__init__.py rename to python/pylibcudf/pylibcudf/strings/__init__.py diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/capitalize.pxd b/python/pylibcudf/pylibcudf/strings/capitalize.pxd similarity index 64% rename from python/cudf/cudf/_lib/pylibcudf/strings/capitalize.pxd rename to python/pylibcudf/pylibcudf/strings/capitalize.pxd index 9acf189fc23..b45949d4eb4 100644 --- a/python/cudf/cudf/_lib/pylibcudf/strings/capitalize.pxd +++ b/python/pylibcudf/pylibcudf/strings/capitalize.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.pylibcudf.column cimport Column -from cudf._lib.pylibcudf.scalar cimport Scalar +from pylibcudf.column cimport Column +from pylibcudf.scalar cimport Scalar cpdef Column capitalize(Column input, Scalar delimiters=*) diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/capitalize.pyx b/python/pylibcudf/pylibcudf/strings/capitalize.pyx similarity index 84% rename from python/cudf/cudf/_lib/pylibcudf/strings/capitalize.pyx rename to python/pylibcudf/pylibcudf/strings/capitalize.pyx index ccf84d25572..06b991c3cf1 100644 --- a/python/cudf/cudf/_lib/pylibcudf/strings/capitalize.pyx +++ b/python/pylibcudf/pylibcudf/strings/capitalize.pyx @@ -2,16 +2,15 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move - -from cudf._lib.pylibcudf.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.scalar.scalar_factories cimport ( +from pylibcudf.column cimport Column +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.scalar.scalar_factories cimport ( make_string_scalar as cpp_make_string_scalar, ) -from cudf._lib.pylibcudf.libcudf.strings cimport capitalize as cpp_capitalize -from cudf._lib.pylibcudf.scalar cimport Scalar -from cudf._lib.pylibcudf.strings.char_types cimport string_character_types +from pylibcudf.libcudf.strings cimport capitalize as cpp_capitalize +from pylibcudf.scalar cimport Scalar +from pylibcudf.strings.char_types cimport string_character_types from cython.operator import dereference diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/case.pxd b/python/pylibcudf/pylibcudf/strings/case.pxd similarity index 76% rename from python/cudf/cudf/_lib/pylibcudf/strings/case.pxd rename to python/pylibcudf/pylibcudf/strings/case.pxd index 225d566fe06..d3c98d5e3dc 100644 --- a/python/cudf/cudf/_lib/pylibcudf/strings/case.pxd +++ b/python/pylibcudf/pylibcudf/strings/case.pxd @@ -1,6 +1,6 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.pylibcudf.column cimport Column +from pylibcudf.column cimport Column cpdef Column to_lower(Column input) diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/case.pyx b/python/pylibcudf/pylibcudf/strings/case.pyx similarity index 79% rename from python/cudf/cudf/_lib/pylibcudf/strings/case.pyx rename to python/pylibcudf/pylibcudf/strings/case.pyx index 3a360fd6b10..9e6cd7717d3 100644 --- a/python/cudf/cudf/_lib/pylibcudf/strings/case.pyx +++ b/python/pylibcudf/pylibcudf/strings/case.pyx @@ -2,10 +2,9 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move - -from cudf._lib.pylibcudf.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.strings cimport case as cpp_case +from pylibcudf.column cimport Column +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.strings cimport case as cpp_case cpdef Column to_lower(Column input): diff --git a/python/pylibcudf/pylibcudf/strings/char_types.pxd b/python/pylibcudf/pylibcudf/strings/char_types.pxd new file mode 100644 index 00000000000..ad4e4cf61d8 --- /dev/null +++ b/python/pylibcudf/pylibcudf/strings/char_types.pxd @@ -0,0 +1,3 @@ +# Copyright (c) 2024, NVIDIA CORPORATION. + +from pylibcudf.libcudf.strings.char_types cimport string_character_types diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/char_types.pyx b/python/pylibcudf/pylibcudf/strings/char_types.pyx similarity index 64% rename from python/cudf/cudf/_lib/pylibcudf/strings/char_types.pyx rename to python/pylibcudf/pylibcudf/strings/char_types.pyx index d96161951c6..e7621fb4d84 100644 --- a/python/cudf/cudf/_lib/pylibcudf/strings/char_types.pyx +++ b/python/pylibcudf/pylibcudf/strings/char_types.pyx @@ -1,4 +1,4 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.pylibcudf.libcudf.strings.char_types import \ +from pylibcudf.libcudf.strings.char_types import \ string_character_types as StringCharacterTypes # no-cython-lint diff --git a/python/pylibcudf/pylibcudf/strings/contains.pxd b/python/pylibcudf/pylibcudf/strings/contains.pxd new file mode 100644 index 00000000000..2cd4891a0ea --- /dev/null +++ b/python/pylibcudf/pylibcudf/strings/contains.pxd @@ -0,0 +1,7 @@ +# Copyright (c) 2024, NVIDIA CORPORATION. + +from pylibcudf.column cimport Column +from pylibcudf.strings.regex_program cimport RegexProgram + + +cpdef Column contains_re(Column input, RegexProgram prog) diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/contains.pyx b/python/pylibcudf/pylibcudf/strings/contains.pyx similarity index 75% rename from python/cudf/cudf/_lib/pylibcudf/strings/contains.pyx rename to python/pylibcudf/pylibcudf/strings/contains.pyx index 8c598b7c953..1a2446f6e2c 100644 --- a/python/cudf/cudf/_lib/pylibcudf/strings/contains.pyx +++ b/python/pylibcudf/pylibcudf/strings/contains.pyx @@ -1,11 +1,10 @@ # Copyright (c) 2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.utility cimport move - -from cudf._lib.pylibcudf.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.strings cimport contains as cpp_contains -from cudf._lib.pylibcudf.strings.regex_program cimport RegexProgram +from pylibcudf.column cimport Column +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.strings cimport contains as cpp_contains +from pylibcudf.strings.regex_program cimport RegexProgram cpdef Column contains_re( diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/find.pxd b/python/pylibcudf/pylibcudf/strings/find.pxd similarity index 77% rename from python/cudf/cudf/_lib/pylibcudf/strings/find.pxd rename to python/pylibcudf/pylibcudf/strings/find.pxd index bb43069f190..e7524a9360b 100644 --- a/python/cudf/cudf/_lib/pylibcudf/strings/find.pxd +++ b/python/pylibcudf/pylibcudf/strings/find.pxd @@ -1,8 +1,8 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.pylibcudf.column cimport Column -from cudf._lib.pylibcudf.libcudf.types cimport size_type -from cudf._lib.pylibcudf.scalar cimport Scalar +from pylibcudf.column cimport Column +from pylibcudf.libcudf.types cimport size_type +from pylibcudf.scalar cimport Scalar ctypedef fused ColumnOrScalar: Column diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/find.pyx b/python/pylibcudf/pylibcudf/strings/find.pyx similarity index 90% rename from python/cudf/cudf/_lib/pylibcudf/strings/find.pyx rename to python/pylibcudf/pylibcudf/strings/find.pyx index a0214efd0a1..22d370bf7e8 100644 --- a/python/cudf/cudf/_lib/pylibcudf/strings/find.pyx +++ b/python/pylibcudf/pylibcudf/strings/find.pyx @@ -1,15 +1,14 @@ # Copyright (c) 2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr from libcpp.utility cimport move - -from cudf._lib.pylibcudf.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.strings cimport find as cpp_find -from cudf._lib.pylibcudf.scalar cimport Scalar +from pylibcudf.column cimport Column +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.strings cimport find as cpp_find +from pylibcudf.scalar cimport Scalar from cython.operator import dereference -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.scalar.scalar cimport string_scalar cpdef Column find( @@ -22,8 +21,8 @@ cpdef Column find( first found in each string of the provided column. ``target`` may be a - :py:class:`~cudf._lib.pylibcudf.column.Column` or a - :py:class:`~cudf._lib.pylibcudf.scalar.Scalar`. + :py:class:`~pylibcudf.column.Column` or a + :py:class:`~pylibcudf.scalar.Scalar`. If ``target`` is a scalar, the scalar will be searched for in each string. If ``target`` is a column, the corresponding string in the column will be @@ -126,8 +125,8 @@ cpdef Column contains( column. ``target`` may be a - :py:class:`~cudf._lib.pylibcudf.column.Column` or a - :py:class:`~cudf._lib.pylibcudf.scalar.Scalar`. + :py:class:`~pylibcudf.column.Column` or a + :py:class:`~pylibcudf.scalar.Scalar`. If ``target`` is a scalar, the scalar will be searched for in each string. If ``target`` is a column, the corresponding string in the column will be @@ -180,8 +179,8 @@ cpdef Column starts_with( column. ``target`` may be a - :py:class:`~cudf._lib.pylibcudf.column.Column` or a - :py:class:`~cudf._lib.pylibcudf.scalar.Scalar`. + :py:class:`~pylibcudf.column.Column` or a + :py:class:`~pylibcudf.scalar.Scalar`. If ``target`` is a scalar, the scalar will be searched for in each string. If ``target`` is a column, the corresponding string in the column will be @@ -233,8 +232,8 @@ cpdef Column ends_with( target string was found at the end of the string in the provided column. ``target`` may be a - :py:class:`~cudf._lib.pylibcudf.column.Column` or a - :py:class:`~cudf._lib.pylibcudf.scalar.Scalar`. + :py:class:`~pylibcudf.column.Column` or a + :py:class:`~pylibcudf.scalar.Scalar`. If ``target`` is a scalar, the scalar will be searched for in each string. If ``target`` is a column, the corresponding string in the column will be diff --git a/python/pylibcudf/pylibcudf/strings/regex_flags.pxd b/python/pylibcudf/pylibcudf/strings/regex_flags.pxd new file mode 100644 index 00000000000..1ce3cd07df8 --- /dev/null +++ b/python/pylibcudf/pylibcudf/strings/regex_flags.pxd @@ -0,0 +1,2 @@ +# Copyright (c) 2020-2024, NVIDIA CORPORATION. +from pylibcudf.libcudf.strings.regex_flags cimport regex_flags diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/regex_flags.pyx b/python/pylibcudf/pylibcudf/strings/regex_flags.pyx similarity index 59% rename from python/cudf/cudf/_lib/pylibcudf/strings/regex_flags.pyx rename to python/pylibcudf/pylibcudf/strings/regex_flags.pyx index 903c2ddd503..ce3b6b10a42 100644 --- a/python/cudf/cudf/_lib/pylibcudf/strings/regex_flags.pyx +++ b/python/pylibcudf/pylibcudf/strings/regex_flags.pyx @@ -1,4 +1,4 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.pylibcudf.libcudf.strings.regex_flags import \ +from pylibcudf.libcudf.strings.regex_flags import \ regex_flags as RegexFlags # no-cython-lint diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/regex_program.pxd b/python/pylibcudf/pylibcudf/strings/regex_program.pxd similarity index 70% rename from python/cudf/cudf/_lib/pylibcudf/strings/regex_program.pxd rename to python/pylibcudf/pylibcudf/strings/regex_program.pxd index 61ed268fb2d..045cc1e1c6b 100644 --- a/python/cudf/cudf/_lib/pylibcudf/strings/regex_program.pxd +++ b/python/pylibcudf/pylibcudf/strings/regex_program.pxd @@ -2,8 +2,7 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string - -from cudf._lib.pylibcudf.libcudf.strings.regex_program cimport regex_program +from pylibcudf.libcudf.strings.regex_program cimport regex_program cdef class RegexProgram: diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/regex_program.pyx b/python/pylibcudf/pylibcudf/strings/regex_program.pyx similarity index 84% rename from python/cudf/cudf/_lib/pylibcudf/strings/regex_program.pyx rename to python/pylibcudf/pylibcudf/strings/regex_program.pyx index 5f0b8868452..f426b6888ae 100644 --- a/python/cudf/cudf/_lib/pylibcudf/strings/regex_program.pyx +++ b/python/pylibcudf/pylibcudf/strings/regex_program.pyx @@ -4,12 +4,12 @@ from libcpp.memory cimport unique_ptr from libcpp.string cimport string from libcpp.utility cimport move +from pylibcudf.libcudf.strings.regex_flags cimport regex_flags +from pylibcudf.libcudf.strings.regex_program cimport regex_program -from cudf._lib.pylibcudf.libcudf.strings.regex_flags cimport regex_flags -from cudf._lib.pylibcudf.libcudf.strings.regex_program cimport regex_program +from pylibcudf.strings.regex_flags import RegexFlags -from cudf._lib.pylibcudf.strings.regex_flags import RegexFlags -from cudf._lib.pylibcudf.strings.regex_flags cimport regex_flags +from pylibcudf.strings.regex_flags cimport regex_flags cdef class RegexProgram: diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/replace.pxd b/python/pylibcudf/pylibcudf/strings/replace.pxd similarity index 71% rename from python/cudf/cudf/_lib/pylibcudf/strings/replace.pxd rename to python/pylibcudf/pylibcudf/strings/replace.pxd index 52e2dc3c738..26273b96c57 100644 --- a/python/cudf/cudf/_lib/pylibcudf/strings/replace.pxd +++ b/python/pylibcudf/pylibcudf/strings/replace.pxd @@ -1,8 +1,8 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.pylibcudf.column cimport Column -from cudf._lib.pylibcudf.libcudf.types cimport size_type -from cudf._lib.pylibcudf.scalar cimport Scalar +from pylibcudf.column cimport Column +from pylibcudf.libcudf.types cimport size_type +from pylibcudf.scalar cimport Scalar cpdef Column replace( diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/replace.pyx b/python/pylibcudf/pylibcudf/strings/replace.pyx similarity index 90% rename from python/cudf/cudf/_lib/pylibcudf/strings/replace.pyx rename to python/pylibcudf/pylibcudf/strings/replace.pyx index c757150a600..9d0ebf4a814 100644 --- a/python/cudf/cudf/_lib/pylibcudf/strings/replace.pyx +++ b/python/pylibcudf/pylibcudf/strings/replace.pyx @@ -2,20 +2,19 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move - -from cudf._lib.pylibcudf.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport string_scalar -from cudf._lib.pylibcudf.libcudf.scalar.scalar_factories cimport ( +from pylibcudf.column cimport Column +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.scalar.scalar cimport string_scalar +from pylibcudf.libcudf.scalar.scalar_factories cimport ( make_string_scalar as cpp_make_string_scalar, ) -from cudf._lib.pylibcudf.libcudf.strings.replace cimport ( +from pylibcudf.libcudf.strings.replace cimport ( replace as cpp_replace, replace_multiple as cpp_replace_multiple, replace_slice as cpp_replace_slice, ) -from cudf._lib.pylibcudf.libcudf.types cimport size_type -from cudf._lib.pylibcudf.scalar cimport Scalar +from pylibcudf.libcudf.types cimport size_type +from pylibcudf.scalar cimport Scalar cpdef Column replace( diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/slice.pxd b/python/pylibcudf/pylibcudf/strings/slice.pxd similarity index 69% rename from python/cudf/cudf/_lib/pylibcudf/strings/slice.pxd rename to python/pylibcudf/pylibcudf/strings/slice.pxd index 7d8d0006ef4..01e9f2b3c88 100644 --- a/python/cudf/cudf/_lib/pylibcudf/strings/slice.pxd +++ b/python/pylibcudf/pylibcudf/strings/slice.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib.pylibcudf.column cimport Column -from cudf._lib.pylibcudf.scalar cimport Scalar +from pylibcudf.column cimport Column +from pylibcudf.scalar cimport Scalar ctypedef fused ColumnOrScalar: Column diff --git a/python/cudf/cudf/_lib/pylibcudf/strings/slice.pyx b/python/pylibcudf/pylibcudf/strings/slice.pyx similarity index 81% rename from python/cudf/cudf/_lib/pylibcudf/strings/slice.pyx rename to python/pylibcudf/pylibcudf/strings/slice.pyx index df75134fb71..70d10cab36c 100644 --- a/python/cudf/cudf/_lib/pylibcudf/strings/slice.pyx +++ b/python/pylibcudf/pylibcudf/strings/slice.pyx @@ -2,16 +2,15 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move - -from cudf._lib.pylibcudf.column cimport Column -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport numeric_scalar -from cudf._lib.pylibcudf.libcudf.scalar.scalar_factories cimport ( +from pylibcudf.column cimport Column +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.scalar.scalar cimport numeric_scalar +from pylibcudf.libcudf.scalar.scalar_factories cimport ( make_fixed_width_scalar as cpp_make_fixed_width_scalar, ) -from cudf._lib.pylibcudf.libcudf.strings cimport substring as cpp_slice -from cudf._lib.pylibcudf.libcudf.types cimport size_type -from cudf._lib.pylibcudf.scalar cimport Scalar +from pylibcudf.libcudf.strings cimport substring as cpp_slice +from pylibcudf.libcudf.types cimport size_type +from pylibcudf.scalar cimport Scalar from cython.operator import dereference @@ -25,9 +24,9 @@ cpdef Column slice_strings( """Perform a slice operation on a strings column. ``start`` and ``stop`` may be a - :py:class:`~cudf._lib.pylibcudf.column.Column` or a - :py:class:`~cudf._lib.pylibcudf.scalar.Scalar`. But ``step`` must be a - :py:class:`~cudf._lib.pylibcudf.scalar.Scalar`. + :py:class:`~pylibcudf.column.Column` or a + :py:class:`~pylibcudf.scalar.Scalar`. But ``step`` must be a + :py:class:`~pylibcudf.scalar.Scalar`. For details, see :cpp:func:`cudf::strings::slice_strings`. diff --git a/python/cudf/cudf/_lib/pylibcudf/table.pxd b/python/pylibcudf/pylibcudf/table.pxd similarity index 78% rename from python/cudf/cudf/_lib/pylibcudf/table.pxd rename to python/pylibcudf/pylibcudf/table.pxd index e476fc770e3..cf5c0aa80f2 100644 --- a/python/cudf/cudf/_lib/pylibcudf/table.pxd +++ b/python/pylibcudf/pylibcudf/table.pxd @@ -1,9 +1,8 @@ # Copyright (c) 2023-2024, NVIDIA CORPORATION. from libcpp.memory cimport unique_ptr - -from cudf._lib.pylibcudf.libcudf.table.table cimport table -from cudf._lib.pylibcudf.libcudf.table.table_view cimport table_view +from pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.table.table_view cimport table_view cdef class Table: diff --git a/python/cudf/cudf/_lib/pylibcudf/table.pyx b/python/pylibcudf/pylibcudf/table.pyx similarity index 93% rename from python/cudf/cudf/_lib/pylibcudf/table.pyx rename to python/pylibcudf/pylibcudf/table.pyx index d91fa0474b0..5f77b89a605 100644 --- a/python/cudf/cudf/_lib/pylibcudf/table.pyx +++ b/python/pylibcudf/pylibcudf/table.pyx @@ -4,10 +4,9 @@ from cython.operator cimport dereference from libcpp.memory cimport unique_ptr from libcpp.utility cimport move from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.column.column_view cimport column_view -from cudf._lib.pylibcudf.libcudf.table.table cimport table +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.column.column_view cimport column_view +from pylibcudf.libcudf.table.table cimport table from .column cimport Column diff --git a/python/cudf/cudf/pylibcudf_tests/common/utils.py b/python/pylibcudf/pylibcudf/tests/common/utils.py similarity index 97% rename from python/cudf/cudf/pylibcudf_tests/common/utils.py rename to python/pylibcudf/pylibcudf/tests/common/utils.py index acb2b5be85c..babe6634318 100644 --- a/python/cudf/cudf/pylibcudf_tests/common/utils.py +++ b/python/pylibcudf/pylibcudf/tests/common/utils.py @@ -6,11 +6,11 @@ import numpy as np import pyarrow as pa +import pyarrow.compute as pc +import pylibcudf as plc import pytest from pyarrow.parquet import write_table as pq_write_table - -from cudf._lib import pylibcudf as plc -from cudf._lib.pylibcudf.io.types import CompressionType +from pylibcudf.io.types import CompressionType def metadata_from_arrow_type( @@ -157,13 +157,13 @@ def _flatten_arrays(arr): for lh_arr, rh_arr in zip(lhs, rhs): # Check NaNs positions match # and then filter out nans - lhs_nans = pa.compute.is_nan(lh_arr) - rhs_nans = pa.compute.is_nan(rh_arr) + lhs_nans = pc.is_nan(lh_arr) + rhs_nans = pc.is_nan(rh_arr) assert lhs_nans.equals(rhs_nans) - if pa.compute.any(lhs_nans) or pa.compute.any(rhs_nans): + if pc.any(lhs_nans) or pc.any(rhs_nans): # masks must be equal at this point - mask = pa.compute.fill_null(pa.compute.invert(lhs_nans), True) + mask = pc.fill_null(pc.invert(lhs_nans), True) lh_arr = lh_arr.filter(mask) rh_arr = rh_arr.filter(mask) diff --git a/python/cudf/cudf/pylibcudf_tests/conftest.py b/python/pylibcudf/pylibcudf/tests/conftest.py similarity index 98% rename from python/cudf/cudf/pylibcudf_tests/conftest.py rename to python/pylibcudf/pylibcudf/tests/conftest.py index 945e1689229..fdce6f353ca 100644 --- a/python/cudf/cudf/pylibcudf_tests/conftest.py +++ b/python/pylibcudf/pylibcudf/tests/conftest.py @@ -8,10 +8,9 @@ import numpy as np import pyarrow as pa +import pylibcudf as plc import pytest - -import cudf._lib.pylibcudf as plc -from cudf._lib.pylibcudf.io.types import CompressionType +from pylibcudf.io.types import CompressionType sys.path.insert(0, os.path.join(os.path.dirname(__file__), "common")) diff --git a/python/cudf/cudf/pylibcudf_tests/io/test_avro.py b/python/pylibcudf/pylibcudf/tests/io/test_avro.py similarity index 98% rename from python/cudf/cudf/pylibcudf_tests/io/test_avro.py rename to python/pylibcudf/pylibcudf/tests/io/test_avro.py index 061d6792ce3..0cd5064a697 100644 --- a/python/cudf/cudf/pylibcudf_tests/io/test_avro.py +++ b/python/pylibcudf/pylibcudf/tests/io/test_avro.py @@ -5,11 +5,10 @@ import fastavro import pyarrow as pa +import pylibcudf as plc import pytest from utils import assert_table_and_meta_eq -import cudf._lib.pylibcudf as plc - avro_dtype_pairs = [ ("boolean", pa.bool_()), ("int", pa.int32()), diff --git a/python/cudf/cudf/pylibcudf_tests/io/test_csv.py b/python/pylibcudf/pylibcudf/tests/io/test_csv.py similarity index 98% rename from python/cudf/cudf/pylibcudf_tests/io/test_csv.py rename to python/pylibcudf/pylibcudf/tests/io/test_csv.py index 95326a8b681..ccd7eef54f3 100644 --- a/python/cudf/cudf/pylibcudf_tests/io/test_csv.py +++ b/python/pylibcudf/pylibcudf/tests/io/test_csv.py @@ -5,7 +5,9 @@ import pandas as pd import pyarrow as pa +import pylibcudf as plc import pytest +from pylibcudf.io.types import CompressionType from utils import ( _convert_numeric_types_to_floating, assert_table_and_meta_eq, @@ -13,9 +15,6 @@ write_source_str, ) -import cudf._lib.pylibcudf as plc -from cudf._lib.pylibcudf.io.types import CompressionType - # Shared kwargs to pass to make_source _COMMON_CSV_SOURCE_KWARGS = { "format": "csv", diff --git a/python/cudf/cudf/pylibcudf_tests/io/test_json.py b/python/pylibcudf/pylibcudf/tests/io/test_json.py similarity index 99% rename from python/cudf/cudf/pylibcudf_tests/io/test_json.py rename to python/pylibcudf/pylibcudf/tests/io/test_json.py index 4239f2438bb..9d976fedf00 100644 --- a/python/cudf/cudf/pylibcudf_tests/io/test_json.py +++ b/python/pylibcudf/pylibcudf/tests/io/test_json.py @@ -3,7 +3,9 @@ import pandas as pd import pyarrow as pa +import pylibcudf as plc import pytest +from pylibcudf.io.types import CompressionType from utils import ( assert_table_and_meta_eq, make_source, @@ -11,9 +13,6 @@ write_source_str, ) -import cudf._lib.pylibcudf as plc -from cudf._lib.pylibcudf.io.types import CompressionType - # Shared kwargs to pass to make_source _COMMON_JSON_SOURCE_KWARGS = {"format": "json", "orient": "records"} diff --git a/python/cudf/cudf/pylibcudf_tests/io/test_parquet.py b/python/pylibcudf/pylibcudf/tests/io/test_parquet.py similarity index 97% rename from python/cudf/cudf/pylibcudf_tests/io/test_parquet.py rename to python/pylibcudf/pylibcudf/tests/io/test_parquet.py index dbd20cd473e..f6e843ccf66 100644 --- a/python/cudf/cudf/pylibcudf_tests/io/test_parquet.py +++ b/python/pylibcudf/pylibcudf/tests/io/test_parquet.py @@ -1,18 +1,17 @@ # Copyright (c) 2024, NVIDIA CORPORATION. import pyarrow as pa import pyarrow.compute as pc +import pylibcudf as plc import pytest from pyarrow.parquet import read_table -from utils import assert_table_and_meta_eq, make_source - -import cudf._lib.pylibcudf as plc -from cudf._lib.pylibcudf.expressions import ( +from pylibcudf.expressions import ( ASTOperator, ColumnNameReference, ColumnReference, Literal, Operation, ) +from utils import assert_table_and_meta_eq, make_source # Shared kwargs to pass to make_source _COMMON_PARQUET_SOURCE_KWARGS = {"format": "parquet"} diff --git a/python/cudf/cudf/pylibcudf_tests/io/test_source_sink_info.py b/python/pylibcudf/pylibcudf/tests/io/test_source_sink_info.py similarity index 98% rename from python/cudf/cudf/pylibcudf_tests/io/test_source_sink_info.py rename to python/pylibcudf/pylibcudf/tests/io/test_source_sink_info.py index 438c482b77a..747f58ec8cf 100644 --- a/python/cudf/cudf/pylibcudf_tests/io/test_source_sink_info.py +++ b/python/pylibcudf/pylibcudf/tests/io/test_source_sink_info.py @@ -2,10 +2,9 @@ import io +import pylibcudf as plc import pytest -import cudf._lib.pylibcudf as plc - @pytest.fixture(params=[plc.io.SourceInfo, plc.io.SinkInfo]) def io_class(request): diff --git a/python/cudf/cudf/pylibcudf_tests/pytest.ini b/python/pylibcudf/pylibcudf/tests/pytest.ini similarity index 100% rename from python/cudf/cudf/pylibcudf_tests/pytest.ini rename to python/pylibcudf/pylibcudf/tests/pytest.ini diff --git a/python/cudf/cudf/pylibcudf_tests/test_binaryops.py b/python/pylibcudf/pylibcudf/tests/test_binaryops.py similarity index 99% rename from python/cudf/cudf/pylibcudf_tests/test_binaryops.py rename to python/pylibcudf/pylibcudf/tests/test_binaryops.py index a83caf39ead..f784cb3c191 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_binaryops.py +++ b/python/pylibcudf/pylibcudf/tests/test_binaryops.py @@ -4,11 +4,10 @@ import numpy as np import pyarrow as pa +import pylibcudf as plc import pytest from utils import assert_column_eq -from cudf._lib import pylibcudf as plc - def idfn(param): ltype, rtype, outtype, plc_op, _ = param diff --git a/python/cudf/cudf/pylibcudf_tests/test_column_factories.py b/python/pylibcudf/pylibcudf/tests/test_column_factories.py similarity index 99% rename from python/cudf/cudf/pylibcudf_tests/test_column_factories.py rename to python/pylibcudf/pylibcudf/tests/test_column_factories.py index 4c05770a41f..8cedbc6d42f 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_column_factories.py +++ b/python/pylibcudf/pylibcudf/tests/test_column_factories.py @@ -1,11 +1,10 @@ # Copyright (c) 2024, NVIDIA CORPORATION. import pyarrow as pa +import pylibcudf as plc import pytest from utils import DEFAULT_STRUCT_TESTING_TYPE, assert_column_eq -from cudf._lib import pylibcudf as plc - EMPTY_COL_SIZE = 3 NUMERIC_TYPES = [ diff --git a/python/cudf/cudf/pylibcudf_tests/test_column_from_device.py b/python/pylibcudf/pylibcudf/tests/test_column_from_device.py similarity index 97% rename from python/cudf/cudf/pylibcudf_tests/test_column_from_device.py rename to python/pylibcudf/pylibcudf/tests/test_column_from_device.py index 78ee2cb100e..0e129fdf0ef 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_column_from_device.py +++ b/python/pylibcudf/pylibcudf/tests/test_column_from_device.py @@ -1,13 +1,12 @@ # Copyright (c) 2024, NVIDIA CORPORATION. import pyarrow as pa +import pylibcudf as plc import pytest from utils import assert_column_eq import rmm -from cudf._lib import pylibcudf as plc - VALID_TYPES = [ pa.int8(), pa.int16(), diff --git a/python/cudf/cudf/pylibcudf_tests/test_copying.py b/python/pylibcudf/pylibcudf/tests/test_copying.py similarity index 99% rename from python/cudf/cudf/pylibcudf_tests/test_copying.py rename to python/pylibcudf/pylibcudf/tests/test_copying.py index f27fe4e942e..628682d0a66 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_copying.py +++ b/python/pylibcudf/pylibcudf/tests/test_copying.py @@ -2,6 +2,7 @@ import pyarrow as pa import pyarrow.compute as pc +import pylibcudf as plc import pytest from utils import ( DEFAULT_STRUCT_TESTING_TYPE, @@ -15,8 +16,6 @@ metadata_from_arrow_type, ) -from cudf._lib import pylibcudf as plc - # TODO: consider moving this to conftest and "pairing" # it with pa_type, so that they don't get out of sync diff --git a/python/cudf/cudf/pylibcudf_tests/test_datetime.py b/python/pylibcudf/pylibcudf/tests/test_datetime.py similarity index 83% rename from python/cudf/cudf/pylibcudf_tests/test_datetime.py rename to python/pylibcudf/pylibcudf/tests/test_datetime.py index 75af0fa6ca1..d3aa6101e2d 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_datetime.py +++ b/python/pylibcudf/pylibcudf/tests/test_datetime.py @@ -3,11 +3,11 @@ import datetime import pyarrow as pa +import pyarrow.compute as pc +import pylibcudf as plc import pytest from utils import assert_column_eq -import cudf._lib.pylibcudf as plc - @pytest.fixture def column(has_nulls): @@ -25,6 +25,6 @@ def column(has_nulls): def test_extract_year(column): got = plc.datetime.extract_year(column) # libcudf produces an int16, arrow produces an int64 - expect = pa.compute.year(plc.interop.to_arrow(column)).cast(pa.int16()) + expect = pc.year(plc.interop.to_arrow(column)).cast(pa.int16()) assert_column_eq(expect, got) diff --git a/python/cudf/cudf/pylibcudf_tests/test_expressions.py b/python/pylibcudf/pylibcudf/tests/test_expressions.py similarity index 97% rename from python/cudf/cudf/pylibcudf_tests/test_expressions.py rename to python/pylibcudf/pylibcudf/tests/test_expressions.py index f661512caad..5894ef4624c 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_expressions.py +++ b/python/pylibcudf/pylibcudf/tests/test_expressions.py @@ -1,9 +1,8 @@ # Copyright (c) 2024, NVIDIA CORPORATION. import pyarrow as pa +import pylibcudf as plc import pytest -import cudf._lib.pylibcudf as plc - # We can't really evaluate these expressions, so just make sure # construction works properly diff --git a/python/cudf/cudf/pylibcudf_tests/test_interop.py b/python/pylibcudf/pylibcudf/tests/test_interop.py similarity index 98% rename from python/cudf/cudf/pylibcudf_tests/test_interop.py rename to python/pylibcudf/pylibcudf/tests/test_interop.py index 5c05f460e28..01c998f16d4 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_interop.py +++ b/python/pylibcudf/pylibcudf/tests/test_interop.py @@ -1,10 +1,9 @@ # Copyright (c) 2024, NVIDIA CORPORATION. import pyarrow as pa +import pylibcudf as plc import pytest -import cudf._lib.pylibcudf as plc - def test_list_dtype_roundtrip(): list_type = pa.list_(pa.int32()) diff --git a/python/cudf/cudf/pylibcudf_tests/test_join.py b/python/pylibcudf/pylibcudf/tests/test_join.py similarity index 94% rename from python/cudf/cudf/pylibcudf_tests/test_join.py rename to python/pylibcudf/pylibcudf/tests/test_join.py index eb25ed915b1..61e02f4d28d 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_join.py +++ b/python/pylibcudf/pylibcudf/tests/test_join.py @@ -2,10 +2,9 @@ import numpy as np import pyarrow as pa +import pylibcudf as plc from utils import assert_table_eq -from cudf._lib import pylibcudf as plc - def test_cross_join(): left = pa.Table.from_arrays([[0, 1, 2], [3, 4, 5]], names=["a", "b"]) diff --git a/python/cudf/cudf/pylibcudf_tests/test_lists.py b/python/pylibcudf/pylibcudf/tests/test_lists.py similarity index 99% rename from python/cudf/cudf/pylibcudf_tests/test_lists.py rename to python/pylibcudf/pylibcudf/tests/test_lists.py index 33f95a7d364..2353a6ff8f9 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_lists.py +++ b/python/pylibcudf/pylibcudf/tests/test_lists.py @@ -2,11 +2,11 @@ import numpy as np import pyarrow as pa +import pyarrow.compute as pc +import pylibcudf as plc import pytest from utils import assert_column_eq -from cudf._lib import pylibcudf as plc - @pytest.fixture def test_data(): @@ -184,7 +184,7 @@ def test_extract_list_element_scalar(list_column): plc_column = plc.interop.from_arrow(pa.array(list_column)) res = plc.lists.extract_list_element(plc_column, 0) - expect = pa.compute.list_element(list_column, 0) + expect = pc.list_element(list_column, 0) assert_column_eq(expect, res) diff --git a/python/cudf/cudf/pylibcudf_tests/test_quantiles.py b/python/pylibcudf/pylibcudf/tests/test_quantiles.py similarity index 99% rename from python/cudf/cudf/pylibcudf_tests/test_quantiles.py rename to python/pylibcudf/pylibcudf/tests/test_quantiles.py index 13f3b037606..bac56691306 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_quantiles.py +++ b/python/pylibcudf/pylibcudf/tests/test_quantiles.py @@ -3,11 +3,10 @@ import numpy as np import pyarrow as pa import pyarrow.compute as pc +import pylibcudf as plc import pytest from utils import assert_column_eq, assert_table_eq -import cudf._lib.pylibcudf as plc - # Map pylibcudf interpolation options to pyarrow options interp_mapping = { plc.types.Interpolation.LINEAR: "linear", diff --git a/python/cudf/cudf/pylibcudf_tests/test_regex_program.py b/python/pylibcudf/pylibcudf/tests/test_regex_program.py similarity index 89% rename from python/cudf/cudf/pylibcudf_tests/test_regex_program.py rename to python/pylibcudf/pylibcudf/tests/test_regex_program.py index 3a9bcec3616..777315df538 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_regex_program.py +++ b/python/pylibcudf/pylibcudf/tests/test_regex_program.py @@ -1,9 +1,8 @@ # Copyright (c) 2024, NVIDIA CORPORATION. +import pylibcudf as plc import pytest -import cudf._lib.pylibcudf as plc - @pytest.mark.parametrize("pat", ["(", "*", "\\"]) def test_regex_program_invalid(pat): diff --git a/python/cudf/cudf/pylibcudf_tests/test_reshape.py b/python/pylibcudf/pylibcudf/tests/test_reshape.py similarity index 96% rename from python/cudf/cudf/pylibcudf_tests/test_reshape.py rename to python/pylibcudf/pylibcudf/tests/test_reshape.py index da1157e5832..01115bc363a 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_reshape.py +++ b/python/pylibcudf/pylibcudf/tests/test_reshape.py @@ -1,11 +1,10 @@ # Copyright (c) 2024, NVIDIA CORPORATION. import pyarrow as pa +import pylibcudf as plc import pytest from utils import assert_column_eq, assert_table_eq -from cudf._lib import pylibcudf as plc - @pytest.fixture(scope="module") def reshape_data(): diff --git a/python/cudf/cudf/pylibcudf_tests/test_round.py b/python/pylibcudf/pylibcudf/tests/test_round.py similarity index 86% rename from python/cudf/cudf/pylibcudf_tests/test_round.py rename to python/pylibcudf/pylibcudf/tests/test_round.py index 991e6ed310d..0b30316b9a0 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_round.py +++ b/python/pylibcudf/pylibcudf/tests/test_round.py @@ -1,11 +1,11 @@ # Copyright (c) 2024, NVIDIA CORPORATION. import pyarrow as pa +import pyarrow.compute as pc +import pylibcudf as plc import pytest from utils import assert_column_eq -import cudf._lib.pylibcudf as plc - @pytest.fixture(params=["float32", "float64"]) def column(request, has_nulls): @@ -26,8 +26,6 @@ def test_round(column, round_mode, decimals): "half_to_even": plc.round.RoundingMethod.HALF_EVEN, }[round_mode] got = plc.round.round(column, decimals, method) - expect = pa.compute.round( - plc.interop.to_arrow(column), decimals, round_mode - ) + expect = pc.round(plc.interop.to_arrow(column), decimals, round_mode) assert_column_eq(expect, got) diff --git a/python/cudf/cudf/pylibcudf_tests/test_string_capitalize.py b/python/pylibcudf/pylibcudf/tests/test_string_capitalize.py similarity index 86% rename from python/cudf/cudf/pylibcudf_tests/test_string_capitalize.py rename to python/pylibcudf/pylibcudf/tests/test_string_capitalize.py index c4e437fe5d9..176ccc55b96 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_string_capitalize.py +++ b/python/pylibcudf/pylibcudf/tests/test_string_capitalize.py @@ -1,11 +1,11 @@ # Copyright (c) 2024, NVIDIA CORPORATION. import pyarrow as pa +import pyarrow.compute as pc +import pylibcudf as plc import pytest from utils import assert_column_eq -import cudf._lib.pylibcudf as plc - @pytest.fixture(scope="module") def str_data(): @@ -34,7 +34,7 @@ def str_data(): def test_capitalize(str_data): pa_data, plc_data = str_data got = plc.strings.capitalize.capitalize(plc_data) - expected = pa.compute.utf8_capitalize(pa_data) + expected = pc.utf8_capitalize(pa_data) assert_column_eq(expected, got) @@ -43,12 +43,12 @@ def test_title(str_data): got = plc.strings.capitalize.title( plc_data, plc.strings.char_types.StringCharacterTypes.CASE_TYPES ) - expected = pa.compute.utf8_title(pa_data) + expected = pc.utf8_title(pa_data) assert_column_eq(expected, got) def test_is_title(str_data): pa_data, plc_data = str_data got = plc.strings.capitalize.is_title(plc_data) - expected = pa.compute.utf8_is_title(pa_data) + expected = pc.utf8_is_title(pa_data) assert_column_eq(expected, got) diff --git a/python/cudf/cudf/pylibcudf_tests/test_string_case.py b/python/pylibcudf/pylibcudf/tests/test_string_case.py similarity index 80% rename from python/cudf/cudf/pylibcudf_tests/test_string_case.py rename to python/pylibcudf/pylibcudf/tests/test_string_case.py index 1039859b2cf..233cc253b14 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_string_case.py +++ b/python/pylibcudf/pylibcudf/tests/test_string_case.py @@ -1,11 +1,11 @@ # Copyright (c) 2024, NVIDIA CORPORATION. import pyarrow as pa +import pyarrow.compute as pc +import pylibcudf as plc import pytest from utils import assert_column_eq -import cudf._lib.pylibcudf as plc - @pytest.fixture(scope="module") def string_col(): @@ -17,19 +17,19 @@ def string_col(): def test_to_upper(string_col): plc_col = plc.interop.from_arrow(string_col) got = plc.strings.case.to_upper(plc_col) - expected = pa.compute.utf8_upper(string_col) + expected = pc.utf8_upper(string_col) assert_column_eq(expected, got) def test_to_lower(string_col): plc_col = plc.interop.from_arrow(string_col) got = plc.strings.case.to_lower(plc_col) - expected = pa.compute.utf8_lower(string_col) + expected = pc.utf8_lower(string_col) assert_column_eq(expected, got) def test_swapcase(string_col): plc_col = plc.interop.from_arrow(string_col) got = plc.strings.case.swapcase(plc_col) - expected = pa.compute.utf8_swapcase(string_col) + expected = pc.utf8_swapcase(string_col) assert_column_eq(expected, got) diff --git a/python/cudf/cudf/pylibcudf_tests/test_string_contains.py b/python/pylibcudf/pylibcudf/tests/test_string_contains.py similarity index 92% rename from python/cudf/cudf/pylibcudf_tests/test_string_contains.py rename to python/pylibcudf/pylibcudf/tests/test_string_contains.py index fc8c6656b5d..4f88e09183f 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_string_contains.py +++ b/python/pylibcudf/pylibcudf/tests/test_string_contains.py @@ -1,11 +1,11 @@ # Copyright (c) 2024, NVIDIA CORPORATION. import pyarrow as pa +import pyarrow.compute as pc +import pylibcudf as plc import pytest from utils import assert_column_eq -import cudf._lib.pylibcudf as plc - @pytest.fixture(scope="module") def target_col(): @@ -44,7 +44,7 @@ def plc_target_pat(pa_target_scalar): def test_contains_re(target_col, pa_target_scalar, plc_target_pat): pa_target_col, plc_target_col = target_col got = plc.strings.contains.contains_re(plc_target_col, plc_target_pat) - expected = pa.compute.match_substring_regex( + expected = pc.match_substring_regex( pa_target_col, pa_target_scalar.as_py() ) assert_column_eq(got, expected) diff --git a/python/cudf/cudf/pylibcudf_tests/test_string_find.py b/python/pylibcudf/pylibcudf/tests/test_string_find.py similarity index 97% rename from python/cudf/cudf/pylibcudf_tests/test_string_find.py rename to python/pylibcudf/pylibcudf/tests/test_string_find.py index 95a1a3cf731..db3b13a5aae 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_string_find.py +++ b/python/pylibcudf/pylibcudf/tests/test_string_find.py @@ -1,11 +1,11 @@ # Copyright (c) 2024, NVIDIA CORPORATION. import pyarrow as pa +import pyarrow.compute as pc +import pylibcudf as plc import pytest from utils import assert_column_eq -import cudf._lib.pylibcudf as plc - @pytest.fixture(scope="module") def data_col(): @@ -223,7 +223,7 @@ def test_starts_with(data_col, target_scalar): pa_target_scalar, plc_target_scalar = target_scalar py_target = pa_target_scalar.as_py() got = plc.strings.find.starts_with(plc_data_col, plc_target_scalar) - expected = pa.compute.starts_with(pa_data_col, py_target) + expected = pc.starts_with(pa_data_col, py_target) assert_column_eq(expected, got) @@ -242,7 +242,7 @@ def test_ends_with(data_col, target_scalar): pa_target_scalar, plc_target_scalar = target_scalar py_target = pa_target_scalar.as_py() got = plc.strings.find.ends_with(plc_data_col, plc_target_scalar) - expected = pa.compute.ends_with(pa_data_col, py_target) + expected = pc.ends_with(pa_data_col, py_target) assert_column_eq(expected, got) diff --git a/python/cudf/cudf/pylibcudf_tests/test_string_replace.py b/python/pylibcudf/pylibcudf/tests/test_string_replace.py similarity index 95% rename from python/cudf/cudf/pylibcudf_tests/test_string_replace.py rename to python/pylibcudf/pylibcudf/tests/test_string_replace.py index f20edf6a506..5a9c2007b73 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_string_replace.py +++ b/python/pylibcudf/pylibcudf/tests/test_string_replace.py @@ -1,11 +1,11 @@ # Copyright (c) 2024, NVIDIA CORPORATION. import pyarrow as pa +import pyarrow.compute as pc +import pylibcudf as plc import pytest from utils import assert_column_eq -import cudf._lib.pylibcudf as plc - @pytest.fixture(scope="module") def data_col(): @@ -64,7 +64,7 @@ def test_replace(data_col, scalar_repl_target, scalar_repl, maxrepl): plc_data_col, plc_target, plc_repl, maxrepl ) - expected = pa.compute.replace_substring( + expected = pc.replace_substring( pa_data_col, pattern=pa_target, replacement=pa_repl, @@ -90,7 +90,7 @@ def test_replace_slice(data_col, scalar_repl, startstop): # count_characters on the input, take the max and set stop to that stop = 1000 - expected = pa.compute.utf8_replace_slice(pa_data_col, start, stop, pa_repl) + expected = pc.utf8_replace_slice(pa_data_col, start, stop, pa_repl) assert_column_eq(expected, got) diff --git a/python/cudf/cudf/pylibcudf_tests/test_string_slice.py b/python/pylibcudf/pylibcudf/tests/test_string_slice.py similarity index 98% rename from python/cudf/cudf/pylibcudf_tests/test_string_slice.py rename to python/pylibcudf/pylibcudf/tests/test_string_slice.py index bd63987b30f..d9ce5591b98 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_string_slice.py +++ b/python/pylibcudf/pylibcudf/tests/test_string_slice.py @@ -1,11 +1,10 @@ # Copyright (c) 2024, NVIDIA CORPORATION. import pyarrow as pa +import pylibcudf as plc import pytest from utils import assert_column_eq -import cudf._lib.pylibcudf as plc - @pytest.fixture(scope="module") def pa_col(): diff --git a/python/cudf/cudf/pylibcudf_tests/test_table.py b/python/pylibcudf/pylibcudf/tests/test_table.py similarity index 93% rename from python/cudf/cudf/pylibcudf_tests/test_table.py rename to python/pylibcudf/pylibcudf/tests/test_table.py index cf1d51f6491..e822d6a97a8 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_table.py +++ b/python/pylibcudf/pylibcudf/tests/test_table.py @@ -1,10 +1,9 @@ # Copyright (c) 2024, NVIDIA CORPORATION. import pyarrow as pa +import pylibcudf as plc import pytest -import cudf._lib.pylibcudf as plc - @pytest.mark.parametrize( "arrow_tbl", diff --git a/python/cudf/cudf/pylibcudf_tests/test_traits.py b/python/pylibcudf/pylibcudf/tests/test_traits.py similarity index 98% rename from python/cudf/cudf/pylibcudf_tests/test_traits.py rename to python/pylibcudf/pylibcudf/tests/test_traits.py index 6c22cb02f21..2570e8abd51 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_traits.py +++ b/python/pylibcudf/pylibcudf/tests/test_traits.py @@ -1,6 +1,6 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib import pylibcudf as plc +import pylibcudf as plc def test_is_relationally_comparable(): diff --git a/python/cudf/cudf/pylibcudf_tests/test_transform.py b/python/pylibcudf/pylibcudf/tests/test_transform.py similarity index 95% rename from python/cudf/cudf/pylibcudf_tests/test_transform.py rename to python/pylibcudf/pylibcudf/tests/test_transform.py index 312939888dd..06fc35d8835 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_transform.py +++ b/python/pylibcudf/pylibcudf/tests/test_transform.py @@ -3,10 +3,9 @@ import math import pyarrow as pa +import pylibcudf as plc from utils import assert_column_eq -from cudf._lib import pylibcudf as plc - def test_nans_to_nulls(has_nans): if has_nans: diff --git a/python/cudf/cudf/pylibcudf_tests/test_unary.py b/python/pylibcudf/pylibcudf/tests/test_unary.py similarity index 93% rename from python/cudf/cudf/pylibcudf_tests/test_unary.py rename to python/pylibcudf/pylibcudf/tests/test_unary.py index b5e4f0cb0e8..9b8085d5c52 100644 --- a/python/cudf/cudf/pylibcudf_tests/test_unary.py +++ b/python/pylibcudf/pylibcudf/tests/test_unary.py @@ -1,6 +1,6 @@ # Copyright (c) 2024, NVIDIA CORPORATION. -from cudf._lib import pylibcudf as plc +import pylibcudf as plc def test_is_supported_cast(): diff --git a/python/cudf/cudf/_lib/pylibcudf/traits.pxd b/python/pylibcudf/pylibcudf/traits.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/traits.pxd rename to python/pylibcudf/pylibcudf/traits.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/traits.pyx b/python/pylibcudf/pylibcudf/traits.pyx similarity index 98% rename from python/cudf/cudf/_lib/pylibcudf/traits.pyx rename to python/pylibcudf/pylibcudf/traits.pyx index d2370f8d641..5a1c67e1f6c 100644 --- a/python/cudf/cudf/_lib/pylibcudf/traits.pyx +++ b/python/pylibcudf/pylibcudf/traits.pyx @@ -1,8 +1,7 @@ # Copyright (c) 2024, NVIDIA CORPORATION. from libcpp cimport bool - -from cudf._lib.pylibcudf.libcudf.utilities cimport traits +from pylibcudf.libcudf.utilities cimport traits from .types cimport DataType diff --git a/python/cudf/cudf/_lib/pylibcudf/transform.pxd b/python/pylibcudf/pylibcudf/transform.pxd similarity index 100% rename from python/cudf/cudf/_lib/pylibcudf/transform.pxd rename to python/pylibcudf/pylibcudf/transform.pxd diff --git a/python/cudf/cudf/_lib/pylibcudf/transform.pyx b/python/pylibcudf/pylibcudf/transform.pyx similarity index 87% rename from python/cudf/cudf/_lib/pylibcudf/transform.pyx rename to python/pylibcudf/pylibcudf/transform.pyx index a734e71b820..100ccb580ce 100644 --- a/python/cudf/cudf/_lib/pylibcudf/transform.pyx +++ b/python/pylibcudf/pylibcudf/transform.pyx @@ -2,12 +2,11 @@ from libcpp.memory cimport unique_ptr from libcpp.utility cimport move, pair +from pylibcudf.libcudf cimport transform as cpp_transform +from pylibcudf.libcudf.types cimport size_type from rmm._lib.device_buffer cimport DeviceBuffer, device_buffer -from cudf._lib.pylibcudf.libcudf cimport transform as cpp_transform -from cudf._lib.pylibcudf.libcudf.types cimport size_type - from .column cimport Column from .gpumemoryview cimport gpumemoryview diff --git a/python/cudf/cudf/_lib/pylibcudf/types.pxd b/python/pylibcudf/pylibcudf/types.pxd similarity index 91% rename from python/cudf/cudf/_lib/pylibcudf/types.pxd rename to python/pylibcudf/pylibcudf/types.pxd index 1f3e1aa2fbb..aa48979d961 100644 --- a/python/cudf/cudf/_lib/pylibcudf/types.pxd +++ b/python/pylibcudf/pylibcudf/types.pxd @@ -2,8 +2,7 @@ from libc.stdint cimport int32_t from libcpp cimport bool as cbool - -from cudf._lib.pylibcudf.libcudf.types cimport ( +from pylibcudf.libcudf.types cimport ( data_type, interpolation, mask_state, diff --git a/python/cudf/cudf/_lib/pylibcudf/types.pyx b/python/pylibcudf/pylibcudf/types.pyx similarity index 66% rename from python/cudf/cudf/_lib/pylibcudf/types.pyx rename to python/pylibcudf/pylibcudf/types.pyx index 311f9ce4046..58c7d97e9bc 100644 --- a/python/cudf/cudf/_lib/pylibcudf/types.pyx +++ b/python/pylibcudf/pylibcudf/types.pyx @@ -1,25 +1,24 @@ # Copyright (c) 2023-2024, NVIDIA CORPORATION. from libc.stdint cimport int32_t - -from cudf._lib.pylibcudf.libcudf.types cimport ( +from pylibcudf.libcudf.types cimport ( data_type, size_of as cpp_size_of, size_type, type_id, ) -from cudf._lib.pylibcudf.libcudf.utilities.type_dispatcher cimport type_to_id - -from cudf._lib.pylibcudf.libcudf.types import type_id as TypeId # no-cython-lint, isort:skip -from cudf._lib.pylibcudf.libcudf.types import nan_policy as NanPolicy # no-cython-lint, isort:skip -from cudf._lib.pylibcudf.libcudf.types import null_policy as NullPolicy # no-cython-lint, isort:skip -from cudf._lib.pylibcudf.libcudf.types import interpolation as Interpolation # no-cython-lint, isort:skip -from cudf._lib.pylibcudf.libcudf.types import mask_state as MaskState # no-cython-lint, isort:skip -from cudf._lib.pylibcudf.libcudf.types import nan_equality as NanEquality # no-cython-lint, isort:skip -from cudf._lib.pylibcudf.libcudf.types import null_equality as NullEquality # no-cython-lint, isort:skip -from cudf._lib.pylibcudf.libcudf.types import null_order as NullOrder # no-cython-lint, isort:skip -from cudf._lib.pylibcudf.libcudf.types import order as Order # no-cython-lint, isort:skip -from cudf._lib.pylibcudf.libcudf.types import sorted as Sorted # no-cython-lint, isort:skip +from pylibcudf.libcudf.utilities.type_dispatcher cimport type_to_id + +from pylibcudf.libcudf.types import type_id as TypeId # no-cython-lint, isort:skip +from pylibcudf.libcudf.types import nan_policy as NanPolicy # no-cython-lint, isort:skip +from pylibcudf.libcudf.types import null_policy as NullPolicy # no-cython-lint, isort:skip +from pylibcudf.libcudf.types import interpolation as Interpolation # no-cython-lint, isort:skip +from pylibcudf.libcudf.types import mask_state as MaskState # no-cython-lint, isort:skip +from pylibcudf.libcudf.types import nan_equality as NanEquality # no-cython-lint, isort:skip +from pylibcudf.libcudf.types import null_equality as NullEquality # no-cython-lint, isort:skip +from pylibcudf.libcudf.types import null_order as NullOrder # no-cython-lint, isort:skip +from pylibcudf.libcudf.types import order as Order # no-cython-lint, isort:skip +from pylibcudf.libcudf.types import sorted as Sorted # no-cython-lint, isort:skip cdef class DataType: diff --git a/python/cudf/cudf/_lib/pylibcudf/unary.pxd b/python/pylibcudf/pylibcudf/unary.pxd similarity index 87% rename from python/cudf/cudf/_lib/pylibcudf/unary.pxd rename to python/pylibcudf/pylibcudf/unary.pxd index d07df838172..9ee08653599 100644 --- a/python/cudf/cudf/_lib/pylibcudf/unary.pxd +++ b/python/pylibcudf/pylibcudf/unary.pxd @@ -1,8 +1,7 @@ # Copyright (c) 2024, NVIDIA CORPORATION. from libcpp cimport bool - -from cudf._lib.pylibcudf.libcudf.unary cimport unary_operator +from pylibcudf.libcudf.unary cimport unary_operator from .column cimport Column from .types cimport DataType diff --git a/python/cudf/cudf/_lib/pylibcudf/unary.pyx b/python/pylibcudf/pylibcudf/unary.pyx similarity index 94% rename from python/cudf/cudf/_lib/pylibcudf/unary.pyx rename to python/pylibcudf/pylibcudf/unary.pyx index 8da46f0a832..839360ef406 100644 --- a/python/cudf/cudf/_lib/pylibcudf/unary.pyx +++ b/python/pylibcudf/pylibcudf/unary.pyx @@ -3,12 +3,11 @@ from libcpp cimport bool from libcpp.memory cimport unique_ptr from libcpp.utility cimport move +from pylibcudf.libcudf cimport unary as cpp_unary +from pylibcudf.libcudf.column.column cimport column +from pylibcudf.libcudf.unary cimport unary_operator -from cudf._lib.pylibcudf.libcudf cimport unary as cpp_unary -from cudf._lib.pylibcudf.libcudf.column.column cimport column -from cudf._lib.pylibcudf.libcudf.unary cimport unary_operator - -from cudf._lib.pylibcudf.libcudf.unary import \ +from pylibcudf.libcudf.unary import \ unary_operator as UnaryOperator # no-cython-lint from .column cimport Column diff --git a/python/cudf/cudf/_lib/pylibcudf/utils.pxd b/python/pylibcudf/pylibcudf/utils.pxd similarity index 71% rename from python/cudf/cudf/_lib/pylibcudf/utils.pxd rename to python/pylibcudf/pylibcudf/utils.pxd index 77c05086397..6b994f20b61 100644 --- a/python/cudf/cudf/_lib/pylibcudf/utils.pxd +++ b/python/pylibcudf/pylibcudf/utils.pxd @@ -2,9 +2,8 @@ from libcpp.functional cimport reference_wrapper from libcpp.vector cimport vector - -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar -from cudf._lib.pylibcudf.libcudf.types cimport bitmask_type +from pylibcudf.libcudf.scalar.scalar cimport scalar +from pylibcudf.libcudf.types cimport bitmask_type cdef void * int_to_void_ptr(Py_ssize_t ptr) nogil diff --git a/python/cudf/cudf/_lib/pylibcudf/utils.pyx b/python/pylibcudf/pylibcudf/utils.pyx similarity index 93% rename from python/cudf/cudf/_lib/pylibcudf/utils.pyx rename to python/pylibcudf/pylibcudf/utils.pyx index 42e3575ed44..ee4421ddeaf 100644 --- a/python/cudf/cudf/_lib/pylibcudf/utils.pyx +++ b/python/pylibcudf/pylibcudf/utils.pyx @@ -5,11 +5,10 @@ from cython.operator import dereference from libc.stdint cimport uintptr_t from libcpp.functional cimport reference_wrapper from libcpp.vector cimport vector - from cuda import cudart -from cudf._lib.pylibcudf.libcudf.scalar.scalar cimport scalar -from cudf._lib.pylibcudf.libcudf.types cimport bitmask_type +from pylibcudf.libcudf.scalar.scalar cimport scalar +from pylibcudf.libcudf.types cimport bitmask_type from .scalar cimport Scalar diff --git a/python/cudf/cudf/_lib/variant.pxd b/python/pylibcudf/pylibcudf/variant.pxd similarity index 100% rename from python/cudf/cudf/_lib/variant.pxd rename to python/pylibcudf/pylibcudf/variant.pxd diff --git a/python/pylibcudf/pyproject.toml b/python/pylibcudf/pyproject.toml new file mode 100644 index 00000000000..b037508d03f --- /dev/null +++ b/python/pylibcudf/pyproject.toml @@ -0,0 +1,123 @@ +# Copyright (c) 2021-2024, NVIDIA CORPORATION. + +[build-system] +build-backend = "rapids_build_backend.build" +requires = [ + "rapids-build-backend>=0.3.0,<0.4.0.dev0", + "scikit-build-core[pyproject]>=0.10.0", +] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../dependencies.yaml and run `rapids-dependency-file-generator`. + +[project] +name = "pylibcudf" +dynamic = ["version"] +description = "pylibcudf - Python bindings for libcudf" +readme = { file = "README.md", content-type = "text/markdown" } +authors = [ + { name = "NVIDIA Corporation" }, +] +license = { text = "Apache 2.0" } +requires-python = ">=3.9" +dependencies = [ + "cuda-python>=11.7.1,<12.0a0", + "nvtx>=0.2.1", + "packaging", + "pyarrow>=16.1.0,<16.2.0a0", + "rmm==24.10.*,>=0.0.0a0", + "typing_extensions>=4.0.0", +] # 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", + "Topic :: Scientific/Engineering", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", +] + +[project.optional-dependencies] +test = [ + "fastavro>=0.22.9", + "hypothesis", + "numpy", + "pandas", + "pytest-cov", + "pytest-xdist", + "pytest<8", +] # 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/cudf" +Documentation = "https://docs.rapids.ai/api/cudf/stable/" + +[tool.isort] +line_length = 79 +multi_line_output = 3 +include_trailing_comma = true +force_grid_wrap = 0 +combine_as_imports = true +order_by_type = true +known_dask = [ + "dask", + "distributed", + "dask_cuda", +] +known_rapids = [ + "rmm", +] +known_first_party = [ + "cudf", +] +default_section = "THIRDPARTY" +sections = [ + "FUTURE", + "STDLIB", + "THIRDPARTY", + "DASK", + "RAPIDS", + "FIRSTPARTY", + "LOCALFOLDER", +] +skip = [ + "thirdparty", + ".eggs", + ".git", + ".hg", + ".mypy_cache", + ".tox", + ".venv", + "_build", + "buck-out", + "build", + "dist", + "__init__.py", +] + +[tool.rapids-build-backend] +build-backend = "scikit_build_core.build" +dependencies-file = "../../dependencies.yaml" +matrix-entry = "cuda_suffixed=true" +requires = [ + "cmake>=3.26.4,!=3.30.0", + "cython>=3.0.3", + "ninja", + "numpy==1.23.*", + "pyarrow==16.1.0.*", + "rmm==24.10.*,>=0.0.0a0", +] # 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}" +cmake.build-type = "Release" +cmake.version = "CMakeLists.txt" +minimum-version = "build-system.requires" +ninja.make-fallback = true +sdist.exclude = ["*tests*"] +sdist.reproducible = true +wheel.packages = ["pylibcudf"] + +[tool.scikit-build.metadata.version] +provider = "scikit_build_core.metadata.regex" +input = "pylibcudf/VERSION" +regex = "(?P.*)"