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

feat: replace v1 with v2 (preserve-history) #1721

Merged
merged 7 commits into from
Sep 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ jobs:

- name: Test
run: >-
python -m pytest -vv -rs tests --cov=awkward._v2 --cov-report=term
python -m pytest -vv -rs tests --cov=awkward --cov-report=term
--cov-report=xml

- name: Codecov
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ docs/demos/test-program.cpp
include/awkward/kernels.h
src/awkward/_kernel_signatures.py
src/awkward/_kernel_signatures_cuda.py
src/awkward/_v2/_connect/cuda/_kernel_signatures.py
src/awkward/_connect/cuda/_kernel_signatures.py

# Kernel tests
tests-cpu-kernels
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@
[submodule "rapidjson"]
path = rapidjson
url = https://github.com/Tencent/rapidjson.git
[submodule "dlpack"]
path = dlpack
url = https://github.com/dmlc/dlpack.git
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ target_compile_definitions(awkward-parent INTERFACE VERSION_INFO="${VERSION_INFO
target_include_directories(awkward-parent INTERFACE include)
target_compile_features(awkward-parent INTERFACE cxx_std_11)

# C++ dependencies (header-only): RapidJSON and dlpack
target_include_directories(awkward-parent INTERFACE rapidjson/include dlpack/include)
# C++ dependencies (header-only): RapidJSON
target_include_directories(awkward-parent INTERFACE rapidjson/include)

# C++ dependencies (header-only): GrowableBuffer
target_include_directories(awkward-parent INTERFACE src/awkward/_v2/cpp-headers/)
target_include_directories(awkward-parent INTERFACE src/awkward/cpp-headers/)

# First tier: cpu-kernels (object files, static library, and dynamic library).
add_library(awkward-cpu-kernels-objects OBJECT ${CPU_KERNEL_SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ include dev/generate-kernel-signatures.py
include kernel-specification.yml
recursive-include include *.h
recursive-include src *.cpp *.py *.cu
recursive-include src/awkward/_v2/cpp-headers *.h
recursive-include src/awkward/cpp-headers *.h
recursive-include tests *.cpp *.py samples/*
recursive-include tests-cpu-kernels *.py
recursive-include tests-cuda-kernels *.py
Expand Down
2 changes: 1 addition & 1 deletion dev/flake8_awkward.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Flake8ASTErrorInfo(NamedTuple):


class Visitor(ast.NodeVisitor):
msg = "AK101 exception must be wrapped in ak._v2._util.*error"
msg = "AK101 exception must be wrapped in ak._util.*error"

def __init__(self):
self.errors: list[Flake8ASTErrorInfo] = []
Expand Down
7 changes: 2 additions & 5 deletions dev/generate-kernel-signatures.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ def kernel_signatures_cuda_py(specification):
os.path.dirname(CURRENT_DIR),
"src",
"awkward",
"_v2",
"_connect",
"cuda",
"_kernel_signatures.py",
Expand Down Expand Up @@ -347,8 +346,8 @@ def kernel_signatures_cuda_py(specification):
float64,
)

from awkward._v2._connect.cuda import fetch_specialization
from awkward._v2._connect.cuda import import_cupy
from awkward._connect.cuda import fetch_specialization
from awkward._connect.cuda import import_cupy

cupy = import_cupy("Awkward Arrays with CUDA")
"""
Expand All @@ -365,7 +364,6 @@ def by_signature(cuda_kernel_templates):
os.path.dirname(CURRENT_DIR),
"src",
"awkward",
"_v2",
"_connect",
"cuda",
"cuda_kernels",
Expand All @@ -391,7 +389,6 @@ def by_signature(cuda_kernel_templates):
os.path.dirname(CURRENT_DIR),
"src",
"awkward",
"_v2",
"_connect",
"cuda",
"cuda_kernels",
Expand Down
3 changes: 1 addition & 2 deletions dev/generate-tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ def getcudakernelslist():
os.path.dirname(CURRENT_DIR),
"src",
"awkward",
"_v2",
"_connect",
"cuda",
"cuda_kernels",
Expand Down Expand Up @@ -675,7 +674,7 @@ def gencudakerneltests(specdict):
)

f.write(
"import cupy\nimport pytest\n\nimport awkward as ak\nimport awkward._v2._connect.cuda as ak_cu\n\ncupy_nplike = ak.nplike.Cupy.instance()\n\n"
"import cupy\nimport pytest\n\nimport awkward as ak\nimport awkward._connect.cuda as ak_cu\n\ncupy_nplike = ak.nplike.Cupy.instance()\n\n"
)
num = 1
if spec.tests == []:
Expand Down
1 change: 0 additions & 1 deletion dlpack
Submodule dlpack deleted from e1e11e
2 changes: 1 addition & 1 deletion docs-doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ WARN_LOGFILE =

INPUT = include \
docs-doxygen/index.md \
src/awkward/_v2/cpp-headers/
src/awkward/cpp-headers/

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down
2 changes: 1 addition & 1 deletion docs-doxygen/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ This is the type of a [ak::Content](classawkward_1_1Content.html) array expresse

### ArrayBuilder structure

The [ak.ArrayBuilder](../_auto/ak.ArrayBuilder.html) is an append-only array for generating data backed by [ak.layout.ArrayBuilder](../_auto/ak.layout.ArrayBuilder.html) (layout-level ArrayBuilder) and [ak::ArrayBuilder](classawkward_1_1ArrayBuilder.html) (C++ implementation).
The [ak.ArrayBuilder](../_auto/ak.ArrayBuilder.html) is an append-only array for generating data backed by `ak._ext.ArrayBuilder` (layout-level ArrayBuilder) and [ak::ArrayBuilder](classawkward_1_1ArrayBuilder.html) (C++ implementation).

[ak::ArrayBuilder](classawkward_1_1ArrayBuilder.html) is the front-end for a tree of [ak::Builder](classawkward_1_1Builder.html) instances. The structure of this tree indicates the current state of knowledge about the type of the data it's being filled with, and this tree can grow from any node. Types always grow in the direction of more generality, so the tree only gets bigger.

Expand Down
4 changes: 2 additions & 2 deletions docs-sphinx/ak.behavior.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ and it may be accessed as the ``"__record__"`` property, through the
{'__record__': 'point'}

We have to dig into the layout's content because the ``"__record__"`` parameter
is set on the :doc:`ak.layout.RecordArray`, which is buried inside of a
:doc:`ak.layout.ListOffsetArray`.
is set on the :class:`ak.contents.RecordArray`, which is buried inside of a
:class:`ak.contents.ListOffsetArray`.

Alternatively, we can navigate to a single :doc:`_auto/ak.Record` first:

Expand Down
42 changes: 0 additions & 42 deletions docs-sphinx/ak.forms.BitMaskedForm.rst

This file was deleted.

37 changes: 0 additions & 37 deletions docs-sphinx/ak.forms.ByteMaskedForm.rst

This file was deleted.

22 changes: 0 additions & 22 deletions docs-sphinx/ak.forms.EmptyForm.rst

This file was deleted.

95 changes: 0 additions & 95 deletions docs-sphinx/ak.forms.Form.rst

This file was deleted.

32 changes: 0 additions & 32 deletions docs-sphinx/ak.forms.IndexedForm.rst

This file was deleted.

Loading