Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate include grouping order in .clang-format #14993

Closed
Closed
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
66a1be1
Enforce include grouping order in .clang-format
harrism Feb 7, 2024
f425436
Slightly expand header groupings
harrism Feb 7, 2024
4906fba
Change internal includes to quotes, and run clang-format on all files…
harrism Feb 7, 2024
1f7665a
Somehow pre-commit missed two files...
harrism Feb 7, 2024
2100247
copyright
harrism Feb 7, 2024
cb20306
Fix include quote mismatch
harrism Feb 7, 2024
f1702b9
Add missing include of json.hpp and missing namespace qualification.
harrism Feb 7, 2024
caf7214
add missing include of cassert
harrism Feb 7, 2024
e23d1f0
copyright
harrism Feb 7, 2024
41b9e5e
Use int64 offset types for accessing code-points in nvtext::normalize…
davidwendt Feb 7, 2024
63a1c9e
Ensure that `ctest` is called with `--no-tests=error`. (#14983)
bdice Feb 7, 2024
285b836
Filter all `DeprecationWarning`'s by `ArrowTable.to_pandas()` (#14989)
galipremsagar Feb 7, 2024
0e39e4d
Additional single group for CCCL and CUDA includes
harrism Feb 7, 2024
73bac83
Fix `DataFrame.sort_index` to respect `ignore_index` on all axis (#14…
galipremsagar Feb 8, 2024
7f28f2f
Deprecate groupby fillna (#15000)
mroeschke Feb 8, 2024
03f63ec
Ensure to_* IO methods respect pandas 2.2 keyword only deprecation (#…
mroeschke Feb 8, 2024
47d28a0
Use offsetalator in cudf::strings::split functions (#14757)
davidwendt Feb 8, 2024
49c7d2c
Deprecate parameters similar to pandas 2.2 (#14984)
mroeschke Feb 8, 2024
d855d0e
Fix handling of values=None in pylibcudf GroupBy.get_groups (#14998)
shwina Feb 8, 2024
b2164c2
Implement rolling in pylibcudf (#14982)
vyasr Feb 8, 2024
8503b31
Clean up detail sequence header inclusion (#15007)
PointKernel Feb 8, 2024
306c47c
JNI JSON read with DataSource and infered schema, along with basic ja…
revans2 Feb 8, 2024
3f8cb74
POC for whitespace removal in input JSON data using FST (#14931)
shrshi Feb 8, 2024
a25f267
Raise for pyarrow array that is tz-aware (#14980)
mroeschke Feb 8, 2024
c3cf7c6
Reduce execution time of Python ORC tests (#14776)
vuule Feb 8, 2024
7294280
Implement replace in pylibcudf (#15005)
vyasr Feb 8, 2024
fbb1f89
Deprecate replace with categorical columns (#14988)
mroeschke Feb 9, 2024
6638b52
Fix CI workflows for pandas-tests and add test summary. (#14847)
bdice Feb 9, 2024
e36718b
Fix is_string_dtype test for pandas 2.2 (#15012)
mroeschke Feb 9, 2024
e596480
Use offsetalator in cudf::strings::reverse (#15001)
davidwendt Feb 9, 2024
0c0c7e6
Add `future_stack` to `DataFrame.stack` (#15015)
galipremsagar Feb 10, 2024
8edbeca
Fix `Index.difference` to handle duplicate values when one of the inp…
galipremsagar Feb 10, 2024
630c885
Support CUDA 12.2 (#14712)
jameslamb Feb 10, 2024
ea9d732
Update .clang-format
harrism Feb 11, 2024
522a4c1
Order cudf before nvtext and cudf_kafka
harrism Feb 11, 2024
261ea52
Merge branch 'fea/clang-format-include-grouping' of github.com:harris…
harrism Feb 11, 2024
c27847d
Typo in .clang-format and reformat files
harrism Feb 11, 2024
31079d7
Jitify needs cstddef included first
harrism Feb 11, 2024
303cb68
Change to quotes for src/hash include
harrism Feb 11, 2024
8508b6a
Remove stale comment.
harrism Feb 12, 2024
cc0e4a1
Remove unnecessary cuda_runtime include
harrism Feb 12, 2024
daa63d2
Use offsetalator in cudf::strings::wrap() (#15002)
davidwendt Feb 12, 2024
49c2995
Introduce `GetJsonObjectOptions` in `getJSONObject` Java API (#14956)
SurajAralihalli Feb 12, 2024
82f6a53
Update Changelog [skip ci]
raydouglass Feb 12, 2024
d848707
Merge pull request #15029 from rapidsai/branch-24.02
GPUtester Feb 12, 2024
06d5009
Revert copyright-only change
harrism Feb 12, 2024
ac438c4
Unpin numba<0.58 (#15031)
raydouglass Feb 13, 2024
d6902b0
Change copy_if_safe to call thrust instead of the overload function (…
davidwendt Feb 13, 2024
2e17a40
Merge branch-24.02 into branch-24.04
bdice Feb 13, 2024
bb6ae07
Merge pull request #15039 from bdice/branch-24.04-merge-24.02
raydouglass Feb 13, 2024
ac4debd
Deprecate delim_whitespace in read_csv for pandas 2.2 (#14986)
mroeschke Feb 13, 2024
3547d41
Use offsetalator in cudf::get_json_object() (#15009)
davidwendt Feb 14, 2024
dd131dc
Use offsetalator in cudf::interleave_columns() (#15004)
davidwendt Feb 14, 2024
ee1c768
Fix broken link for developer guide (#15025)
sanjana098 Feb 14, 2024
825d30c
Requesting a clean build directory also clears Jitify cache (#15052)
robertmaynard Feb 14, 2024
f43f7c5
Improve performance of copy_if_else for long strings (#15017)
davidwendt Feb 14, 2024
82d1772
Support for LZ4 compression in ORC and Parquet (#14906)
vuule Feb 14, 2024
7bf3b5b
Merge branch 'fea/clang-format-include-grouping' of github.com:harris…
harrism Feb 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 24 additions & 2 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,30 @@ ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeIsMainRegex: '([-_](test|unittest))?$'
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^"' # quoted includes
Priority: 1
- Regex: '^<(benchmarks|tests)/' # benchmark includes
Priority: 2
- Regex: '^<cudf_test/' # cuDF includes
Priority: 3
- Regex: '^<(nvtext|cudf_kafka)' # other libcudf includes
harrism marked this conversation as resolved.
Show resolved Hide resolved
Priority: 4
- Regex: '^<cudf/' # cuDF includes
Priority: 5
- Regex: '^<(cugraph|cuml|cuspatial|raft|kvikio)' # Other RAPIDS includes
Priority: 6
- Regex: '^<rmm/' # RMM includes
Priority: 7
- Regex: '^<(thrust|cub|cuda)/' # CCCL includes
Priority: 8
- Regex: '^<(cuda.h|cuda_runtime|device_types|math_constants|cooperative_groups)' # CUDART includes
harrism marked this conversation as resolved.
Show resolved Hide resolved
Priority: 8
- Regex: '^<.*\..*' # other system includes (e.g. with a '.')
Priority: 9
- Regex: '^<[^.]+' # STL includes (no '.')
Priority: 10
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 2
Expand Down
3 changes: 1 addition & 2 deletions cpp/benchmarks/common/generate_input.cu
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <rmm/device_uvector.hpp>
#include <rmm/mr/device/per_device_resource.hpp>

#include <cuda/functional>
#include <thrust/binary_search.h>
#include <thrust/copy.h>
#include <thrust/device_ptr.h>
Expand All @@ -53,8 +54,6 @@
#include <thrust/transform.h>
#include <thrust/tuple.h>

#include <cuda/functional>

#include <algorithm>
#include <cstdint>
#include <memory>
Expand Down
3 changes: 2 additions & 1 deletion cpp/benchmarks/fixture/benchmark_fixture.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@

#pragma once

#include <benchmark/benchmark.h>
#include <rmm/cuda_device.hpp>
#include <rmm/mr/device/cuda_memory_resource.hpp>
#include <rmm/mr/device/owning_wrapper.hpp>
#include <rmm/mr/device/per_device_resource.hpp>
#include <rmm/mr/device/pool_memory_resource.hpp>
#include <rmm/mr/device/statistics_resource_adaptor.hpp>

#include <benchmark/benchmark.h>

namespace cudf {

namespace {
Expand Down
7 changes: 4 additions & 3 deletions cpp/benchmarks/io/cuio_common.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
* Copyright (c) 2020-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.
Expand All @@ -15,16 +15,17 @@
*/

#include <benchmarks/io/cuio_common.hpp>

#include <cudf/detail/utilities/integer_utils.hpp>
#include <cudf/detail/utilities/logger.hpp>

#include <unistd.h>

#include <cstdio>
#include <fstream>
#include <numeric>
#include <string>

#include <unistd.h>

temp_directory const cuio_source_sink_pair::tmpdir{"cudf_gbench"};

std::string random_file_in_dir(std::string const& dir_path)
Expand Down
9 changes: 4 additions & 5 deletions cpp/benchmarks/io/fst.cu
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -14,11 +14,10 @@
* limitations under the License.
*/

#include <benchmarks/common/generate_input.hpp>

#include <io/fst/lookup_tables.cuh>
#include <io/utilities/hostdevice_vector.hpp> //TODO find better replacement
#include "io/fst/lookup_tables.cuh"
#include "io/utilities/hostdevice_vector.hpp" //TODO find better replacement

#include <benchmarks/common/generate_input.hpp>
#include <tests/io/fst/common.hpp>

#include <cudf/scalar/scalar_factories.hpp>
Expand Down
7 changes: 3 additions & 4 deletions cpp/benchmarks/io/json/nested_json.cpp
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -14,11 +14,10 @@
* limitations under the License.
*/

#include "io/json/nested_json.hpp"

#include <benchmarks/common/generate_input.hpp>
#include <benchmarks/fixture/benchmark_fixture.hpp>

#include <io/json/nested_json.hpp>

#include <tests/io/fst/common.hpp>

#include <cudf/scalar/scalar_factories.hpp>
Expand Down
2 changes: 1 addition & 1 deletion cpp/benchmarks/io/orc/orc_writer_chunks.cpp
harrism marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion cpp/benchmarks/io/text/multibyte_split.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-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.
Expand Down
3 changes: 1 addition & 2 deletions cpp/benchmarks/iterator/iterator.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2023, NVIDIA CORPORATION.
* Copyright (c) 2019-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.
Expand Down Expand Up @@ -27,7 +27,6 @@
#include <rmm/device_uvector.hpp>

#include <cub/device/device_reduce.cuh>

#include <thrust/execution_policy.h>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/iterator/transform_iterator.h>
Expand Down
6 changes: 3 additions & 3 deletions cpp/benchmarks/join/join_common.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
* Copyright (c) 2021-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.
Expand Down Expand Up @@ -31,14 +31,14 @@
#include <cudf/utilities/default_stream.hpp>
#include <cudf/utilities/error.hpp>

#include <nvbench/nvbench.cuh>

#include <thrust/functional.h>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/iterator/transform_iterator.h>
#include <thrust/random/linear_congruential_engine.h>
#include <thrust/random/uniform_int_distribution.h>

#include <nvbench/nvbench.cuh>

#include <vector>

struct null75_generator {
Expand Down
3 changes: 2 additions & 1 deletion cpp/benchmarks/merge/merge.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
* Copyright (c) 2020-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.
Expand All @@ -16,6 +16,7 @@

#include <benchmarks/fixture/benchmark_fixture.hpp>
#include <benchmarks/synchronization/synchronization.hpp>

#include <cudf_test/column_wrapper.hpp>

#include <cudf/column/column.hpp>
Expand Down
6 changes: 3 additions & 3 deletions cpp/benchmarks/sort/rank_lists.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, NVIDIA CORPORATION.
* Copyright (c) 2023-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.
Expand All @@ -18,10 +18,10 @@

#include <benchmarks/common/generate_nested_types.hpp>

#include <cudf/sorting.hpp>

#include <cudf_test/column_utilities.hpp>

#include <cudf/sorting.hpp>

#include <nvbench/nvbench.cuh>

template <cudf::rank_method method>
Expand Down
3 changes: 2 additions & 1 deletion cpp/benchmarks/sort/rank_structs.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023, NVIDIA CORPORATION.
* Copyright (c) 2023-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.
Expand All @@ -15,6 +15,7 @@
*/

#include "rank_types_common.hpp"

#include <benchmarks/common/generate_nested_types.hpp>

#include <cudf/sorting.hpp>
Expand Down
6 changes: 3 additions & 3 deletions cpp/benchmarks/stream_compaction/apply_boolean_mask.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2023, NVIDIA CORPORATION.
* Copyright (c) 2019-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.
Expand All @@ -15,8 +15,8 @@
*/

#include <benchmarks/common/generate_input.hpp>
#include <fixture/benchmark_fixture.hpp>
#include <synchronization/synchronization.hpp>
#include <benchmarks/fixture/benchmark_fixture.hpp>
#include <benchmarks/synchronization/synchronization.hpp>

#include <cudf/stream_compaction.hpp>

Expand Down
6 changes: 3 additions & 3 deletions cpp/benchmarks/string/string_bench_args.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
* Copyright (c) 2021-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.
Expand All @@ -15,10 +15,10 @@
*/
#pragma once

#include <benchmark/benchmark.h>

#include <cudf/types.hpp>

#include <benchmark/benchmark.h>

#include <limits>

/**
Expand Down
8 changes: 4 additions & 4 deletions cpp/benchmarks/synchronization/synchronization.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019-2022, NVIDIA CORPORATION.
* Copyright (c) 2019-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.
Expand Down Expand Up @@ -27,9 +27,10 @@
* It is built on top of the idea of Resource acquisition is initialization
* (RAII). In the following we show a minimal example of how to use this class.

#include <benchmark/benchmark.h>
#include <cudf/utilities/default_stream.hpp>

#include <benchmark/benchmark.h>

static void sample_cuda_benchmark(benchmark::State& state) {

for (auto _ : state){
Expand Down Expand Up @@ -61,13 +62,12 @@
#pragma once

// Google Benchmark library
harrism marked this conversation as resolved.
Show resolved Hide resolved
#include <benchmark/benchmark.h>

#include <cudf/types.hpp>
#include <cudf/utilities/default_stream.hpp>

#include <rmm/cuda_stream_view.hpp>

#include <benchmark/benchmark.h>
#include <driver_types.h>

class cuda_event_timer {
Expand Down
6 changes: 3 additions & 3 deletions cpp/benchmarks/text/edit_distance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

#include <benchmarks/common/generate_input.hpp>

#include <cudf/strings/strings_column_view.hpp>

#include <nvtext/edit_distance.hpp>

#include <nvbench/nvbench.cuh>
#include <cudf/strings/strings_column_view.hpp>

#include <rmm/device_buffer.hpp>

#include <nvbench/nvbench.cuh>

static void bench_edit_distance(nvbench::state& state)
{
auto const num_rows = static_cast<cudf::size_type>(state.get_int64("num_rows"));
Expand Down
6 changes: 3 additions & 3 deletions cpp/benchmarks/text/hash_ngrams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

#include <benchmarks/common/generate_input.hpp>

#include <cudf/strings/strings_column_view.hpp>

#include <nvtext/generate_ngrams.hpp>

#include <nvbench/nvbench.cuh>
#include <cudf/strings/strings_column_view.hpp>

#include <rmm/device_buffer.hpp>

#include <nvbench/nvbench.cuh>

static void bench_hash_ngrams(nvbench::state& state)
{
auto const num_rows = static_cast<cudf::size_type>(state.get_int64("num_rows"));
Expand Down
6 changes: 3 additions & 3 deletions cpp/benchmarks/text/jaccard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@

#include <benchmarks/common/generate_input.hpp>

#include <nvtext/jaccard.hpp>

#include <cudf/strings/strings_column_view.hpp>
#include <cudf/utilities/default_stream.hpp>

#include <nvtext/jaccard.hpp>
#include <rmm/device_buffer.hpp>

#include <nvbench/nvbench.cuh>

#include <rmm/device_buffer.hpp>

static void bench_jaccard(nvbench::state& state)
{
auto const num_rows = static_cast<cudf::size_type>(state.get_int64("num_rows"));
Expand Down
6 changes: 3 additions & 3 deletions cpp/benchmarks/text/minhash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

#include <benchmarks/common/generate_input.hpp>

#include <cudf/strings/strings_column_view.hpp>

#include <nvtext/minhash.hpp>

#include <nvbench/nvbench.cuh>
#include <cudf/strings/strings_column_view.hpp>

#include <rmm/device_buffer.hpp>

#include <nvbench/nvbench.cuh>

static void bench_minhash(nvbench::state& state)
{
auto const num_rows = static_cast<cudf::size_type>(state.get_int64("num_rows"));
Expand Down
4 changes: 2 additions & 2 deletions cpp/benchmarks/text/ngrams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
#include <benchmarks/string/string_bench_args.hpp>
#include <benchmarks/synchronization/synchronization.hpp>

#include <nvtext/generate_ngrams.hpp>

#include <cudf/scalar/scalar.hpp>
#include <cudf/strings/strings_column_view.hpp>

#include <nvtext/generate_ngrams.hpp>

class TextNGrams : public cudf::benchmark {};

enum class ngrams_type { tokens, characters };
Expand Down
Loading
Loading