arcae 0.2.8__tar.gz → 0.2.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. {arcae-0.2.8 → arcae-0.2.9}/.github/workflows/ci.yml +6 -16
  2. {arcae-0.2.8 → arcae-0.2.9}/CMakeLists.txt +2 -2
  3. {arcae-0.2.8 → arcae-0.2.9}/HISTORY.rst +10 -0
  4. {arcae-0.2.8 → arcae-0.2.9}/PKG-INFO +3 -3
  5. {arcae-0.2.8 → arcae-0.2.9}/README.rst +2 -2
  6. {arcae-0.2.8/cmake_modules → arcae-0.2.9/cmake}/SetupVCPKG.cmake +1 -1
  7. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/read_impl.cc +7 -5
  8. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/result_shape.cc +31 -17
  9. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/write_impl.cc +6 -5
  10. {arcae-0.2.8 → arcae-0.2.9}/pyproject.toml +1 -1
  11. {arcae-0.2.8 → arcae-0.2.9}/scripts/run_cibuildwheel.sh +1 -1
  12. {arcae-0.2.8 → arcae-0.2.9}/src/arcae/__init__.py +1 -1
  13. {arcae-0.2.8 → arcae-0.2.9}/tbump.toml +1 -1
  14. {arcae-0.2.8 → arcae-0.2.9}/vcpkg/overlay-ports/casacore/portfile.cmake +1 -1
  15. {arcae-0.2.8 → arcae-0.2.9}/vcpkg/overlay-ports/cfitsio/portfile.cmake +2 -0
  16. arcae-0.2.8/vcpkg/overlay-triplets/arm64-linux-dynamic-cxx17-abi1-dbg.cmake → arcae-0.2.9/vcpkg/overlay-triplets/arm64-linux-dynamic-cxx20-abi1-dbg.cmake +1 -1
  17. arcae-0.2.8/vcpkg/overlay-triplets/arm64-linux-dynamic-cxx17-abi1-rel.cmake → arcae-0.2.9/vcpkg/overlay-triplets/arm64-linux-dynamic-cxx20-abi1-rel.cmake +1 -1
  18. arcae-0.2.8/vcpkg/overlay-triplets/arm64-osx-dynamic-cxx17-abi1-dbg.cmake → arcae-0.2.9/vcpkg/overlay-triplets/arm64-osx-dynamic-cxx20-abi1-dbg.cmake +1 -1
  19. arcae-0.2.8/vcpkg/overlay-triplets/arm64-osx-dynamic-cxx17-abi1-rel.cmake → arcae-0.2.9/vcpkg/overlay-triplets/arm64-osx-dynamic-cxx20-abi1-rel.cmake +1 -1
  20. arcae-0.2.8/vcpkg/overlay-triplets/universal2-osx-dynamic-cxx17-abi1-rel.cmake → arcae-0.2.9/vcpkg/overlay-triplets/universal2-osx-dynamic-cxx20-abi1-rel.cmake +1 -1
  21. arcae-0.2.8/vcpkg/overlay-triplets/x64-linux-dynamic-cxx17-abi1-dbg.cmake → arcae-0.2.9/vcpkg/overlay-triplets/x64-linux-dynamic-cxx20-abi1-dbg.cmake +1 -1
  22. arcae-0.2.8/vcpkg/overlay-triplets/x64-linux-dynamic-cxx17-abi1-rel.cmake → arcae-0.2.9/vcpkg/overlay-triplets/x64-linux-dynamic-cxx20-abi1-rel.cmake +1 -1
  23. arcae-0.2.8/vcpkg/overlay-triplets/x64-osx-dynamic-cxx17-abi1-dbg.cmake → arcae-0.2.9/vcpkg/overlay-triplets/x64-osx-dynamic-cxx20-abi1-dbg.cmake +1 -1
  24. arcae-0.2.8/vcpkg/overlay-triplets/x64-osx-dynamic-cxx17-abi1-rel.cmake → arcae-0.2.9/vcpkg/overlay-triplets/x64-osx-dynamic-cxx20-abi1-rel.cmake +1 -1
  25. {arcae-0.2.8 → arcae-0.2.9}/.clang-format +0 -0
  26. {arcae-0.2.8 → arcae-0.2.9}/.dockerignore +0 -0
  27. {arcae-0.2.8 → arcae-0.2.9}/.github/dependabot.yml +0 -0
  28. {arcae-0.2.8 → arcae-0.2.9}/.github/workflows/pre-commit.yml +0 -0
  29. {arcae-0.2.8 → arcae-0.2.9}/.gitignore +0 -0
  30. {arcae-0.2.8 → arcae-0.2.9}/.pre-commit-config.yaml +0 -0
  31. {arcae-0.2.8 → arcae-0.2.9}/LICENSE +0 -0
  32. {arcae-0.2.8 → arcae-0.2.9}/MANIFEST.in +0 -0
  33. {arcae-0.2.8 → arcae-0.2.9}/ci/scripts/run_tests.sh +0 -0
  34. {arcae-0.2.8/cmake_modules → arcae-0.2.9/cmake}/FindPyArrow.cmake +0 -0
  35. {arcae-0.2.8 → arcae-0.2.9}/cpp/CMakeLists.txt +0 -0
  36. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/configuration.cc +0 -0
  37. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/configuration.h +0 -0
  38. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/data_partition.cc +0 -0
  39. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/data_partition.h +0 -0
  40. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/descriptor.cc +0 -0
  41. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/descriptor.h +0 -0
  42. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/isolated_table_proxy.cc +0 -0
  43. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/isolated_table_proxy.h +0 -0
  44. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/new_table_proxy.cc +0 -0
  45. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/new_table_proxy.h +0 -0
  46. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/read_impl.h +0 -0
  47. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/result_shape.h +0 -0
  48. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/selection.h +0 -0
  49. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/service_locator.cc +0 -0
  50. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/service_locator.h +0 -0
  51. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/table_factory.cc +0 -0
  52. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/table_factory.h +0 -0
  53. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/table_utils.cc +0 -0
  54. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/table_utils.h +0 -0
  55. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/type_traits.cc +0 -0
  56. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/type_traits.h +0 -0
  57. {arcae-0.2.8 → arcae-0.2.9}/cpp/arcae/write_impl.h +0 -0
  58. {arcae-0.2.8 → arcae-0.2.9}/cpp/tests/CMakeLists.txt +0 -0
  59. {arcae-0.2.8 → arcae-0.2.9}/cpp/tests/data_partition_test.cc +0 -0
  60. {arcae-0.2.8 → arcae-0.2.9}/cpp/tests/dev_transpose_test.cc +0 -0
  61. {arcae-0.2.8 → arcae-0.2.9}/cpp/tests/isolated_table_proxy_test.cc +0 -0
  62. {arcae-0.2.8 → arcae-0.2.9}/cpp/tests/new_table_proxy_test.cc +0 -0
  63. {arcae-0.2.8 → arcae-0.2.9}/cpp/tests/parallel_write_test.cc +0 -0
  64. {arcae-0.2.8 → arcae-0.2.9}/cpp/tests/result_shape_test.cc +0 -0
  65. {arcae-0.2.8 → arcae-0.2.9}/cpp/tests/selection_test.cc +0 -0
  66. {arcae-0.2.8 → arcae-0.2.9}/cpp/tests/test_utils.cc +0 -0
  67. {arcae-0.2.8 → arcae-0.2.9}/cpp/tests/test_utils.h +0 -0
  68. {arcae-0.2.8 → arcae-0.2.9}/src/arcae/applications/__init__.py +0 -0
  69. {arcae-0.2.8 → arcae-0.2.9}/src/arcae/applications/entrypoint.py +0 -0
  70. {arcae-0.2.8 → arcae-0.2.9}/src/arcae/applications/ms_export.py +0 -0
  71. {arcae-0.2.8 → arcae-0.2.9}/src/arcae/config.py +0 -0
  72. {arcae-0.2.8 → arcae-0.2.9}/src/arcae/testing.py +0 -0
  73. {arcae-0.2.8 → arcae-0.2.9}/src/arcae/tests/__init__.py +0 -0
  74. {arcae-0.2.8 → arcae-0.2.9}/src/arcae/tests/conftest.py +0 -0
  75. {arcae-0.2.8 → arcae-0.2.9}/src/arcae/tests/test_casting.py +0 -0
  76. {arcae-0.2.8 → arcae-0.2.9}/src/arcae/tests/test_descriptor.py +0 -0
  77. {arcae-0.2.8 → arcae-0.2.9}/src/arcae/tests/test_multithreaded_read.py +0 -0
  78. {arcae-0.2.8 → arcae-0.2.9}/src/arcae/tests/test_partition_sort.py +0 -0
  79. {arcae-0.2.8 → arcae-0.2.9}/src/arcae/tests/test_pytable.py +0 -0
  80. {arcae-0.2.8 → arcae-0.2.9}/vcpkg/manifest/vcpkg.json +0 -0
  81. {arcae-0.2.8 → arcae-0.2.9}/vcpkg/overlay-ports/casacore/001-casacore-cmake.patch +0 -0
  82. {arcae-0.2.8 → arcae-0.2.9}/vcpkg/overlay-ports/casacore/vcpkg.json +0 -0
  83. {arcae-0.2.8 → arcae-0.2.9}/vcpkg/overlay-ports/cfitsio/0001-fix-dependencies-and-export-cmake-targets.patch +0 -0
  84. {arcae-0.2.8 → arcae-0.2.9}/vcpkg/overlay-ports/cfitsio/0002-add-Wno-error-implicit-function-declaration-to-cmake.patch +0 -0
  85. {arcae-0.2.8 → arcae-0.2.9}/vcpkg/overlay-ports/cfitsio/0004-pkg-config.patch +0 -0
  86. {arcae-0.2.8 → arcae-0.2.9}/vcpkg/overlay-ports/cfitsio/vcpkg.json +0 -0
  87. {arcae-0.2.8 → arcae-0.2.9}/vcpkg/overlay-ports/wcslib/001-modern-configs.patch +0 -0
  88. {arcae-0.2.8 → arcae-0.2.9}/vcpkg/overlay-ports/wcslib/portfile.cmake +0 -0
  89. {arcae-0.2.8 → arcae-0.2.9}/vcpkg/overlay-ports/wcslib/usage +0 -0
  90. {arcae-0.2.8 → arcae-0.2.9}/vcpkg/overlay-ports/wcslib/vcpkg.json +0 -0
@@ -46,7 +46,7 @@ jobs:
46
46
  runs-on: ubuntu-latest
47
47
 
48
48
  env:
49
- VCPKG_TARGET_TRIPLET: "x64-linux-dynamic-cxx17-abi1-rel"
49
+ VCPKG_TARGET_TRIPLET: "x64-linux-dynamic-cxx20-abi1-rel"
50
50
 
51
51
  steps:
52
52
  - name: Checkout source
@@ -57,9 +57,6 @@ jobs:
57
57
  with:
58
58
  python-version: ${{ env.HOST_PYTHON_VERSION }}
59
59
 
60
- - name: Expose GitHub Runtime
61
- uses: crazy-max/ghaction-github-runtime@v3
62
-
63
60
  - name: List directory structure
64
61
  run: tree
65
62
 
@@ -72,7 +69,6 @@ jobs:
72
69
 
73
70
  - name: Build C++ libraries and tests
74
71
  env:
75
- VCPKG_BINARY_SOURCES: clear;x-gha,readwrite
76
72
  VCPKG_TARGET_TRIPLET: ${{ env.VCPKG_TARGET_TRIPLET }}
77
73
  run: |
78
74
  cmake -S . -B build
@@ -110,24 +106,24 @@ jobs:
110
106
  - os: ubuntu-22.04
111
107
  os_short: linux
112
108
  arch: "x86_64"
113
- triplet: "x64-linux-dynamic-cxx17-abi1-rel"
109
+ triplet: "x64-linux-dynamic-cxx20-abi1-rel"
114
110
  extra_build: "manylinux_x86_64"
115
111
  - os: ubuntu-22.04-arm
116
112
  os_short: linux
117
113
  arch: "aarch64"
118
- triplet: "arm64-linux-dynamic-cxx17-abi1-rel"
114
+ triplet: "arm64-linux-dynamic-cxx20-abi1-rel"
119
115
  extra_build: "manylinux_aarch64"
120
116
  - os: macos-13
121
117
  os_short: macos
122
118
  arch: "x86_64"
123
119
  deployment_target: "13.0"
124
- triplet: "x64-osx-dynamic-cxx17-abi1-rel"
120
+ triplet: "x64-osx-dynamic-cxx20-abi1-rel"
125
121
  extra_build: "macosx_x86_64"
126
122
  - os: macos-14
127
123
  os_short: macos
128
124
  arch: "arm64"
129
125
  deployment_target: "14.0"
130
- triplet: "arm64-osx-dynamic-cxx17-abi1-rel"
126
+ triplet: "arm64-osx-dynamic-cxx20-abi1-rel"
131
127
  extra_build: "macosx_arm64"
132
128
  steps:
133
129
  - name: Set up Python ${{ env.HOST_PYTHON_VERSION }}
@@ -141,16 +137,10 @@ jobs:
141
137
  - name: Checkout source
142
138
  uses: actions/checkout@v4
143
139
 
144
- - name: Expose GitHub Runtime
145
- uses: crazy-max/ghaction-github-runtime@v3
146
-
147
140
  - name: Set Common Build Environment Variable
148
141
  env:
149
142
  COMMON_ENV: >
150
143
  CMAKE_ARGS=-DBUILD_TESTING=OFF
151
- ACTIONS_CACHE_URL=${{ env.ACTIONS_CACHE_URL }}
152
- ACTIONS_RUNTIME_TOKEN=${{ env.ACTIONS_RUNTIME_TOKEN }}
153
- VCPKG_BINARY_SOURCES="clear;x-gha,readwrite"
154
144
  VCPKG_FORCE_SYSTEM_BINARIES=1
155
145
  VCPKG_TARGET_TRIPLET=${{ matrix.triplet }}
156
146
  VCPKG_INSTALLED_DIR=${{ env.VCPKG_INSTALLED_DIR }}
@@ -192,7 +182,7 @@ jobs:
192
182
  --exclude libarrow_python.dylib \
193
183
  --exclude libarrow.1601.dylib \
194
184
  --ignore-missing-dependencies
195
- uses: pypa/cibuildwheel@v2.23.0
185
+ uses: pypa/cibuildwheel@v2.23.3
196
186
 
197
187
  - name: Upload wheel artifacts
198
188
  uses: actions/upload-artifact@v4
@@ -10,10 +10,10 @@ cmake_policy(SET CMP0042 NEW)
10
10
  cmake_host_system_information(RESULT ncores QUERY NUMBER_OF_PHYSICAL_CORES)
11
11
  enable_testing()
12
12
 
13
- set(CMAKE_CXX_STANDARD 17)
13
+ set(CMAKE_CXX_STANDARD 20)
14
14
  set(CMAKE_CXX_STANDARD_REQUIRED On)
15
15
  set(CMAKE_CXX_EXTENSIONS Off)
16
- list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake_modules)
16
+ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
17
17
 
18
18
  if(UNIX)
19
19
  set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
@@ -2,6 +2,16 @@
2
2
  History
3
3
  =======
4
4
 
5
+ 0.2.9 (10-06-2025)
6
+ ------------------
7
+ * Avoid clipping selections against the result array shape for ignored rows for read operations (:pr:`154`)
8
+ * Add cfitsio mirrors (:pr:`153`)
9
+ * Disable use of github actions cache by vcpkg (:pr:`152`)
10
+ * Upgrade to C++20 (:pr:`150`)
11
+ * Upgrade to cibuildwheel 2.23.3 (:pr:`149`)
12
+ * Slight loop optimisation (:pr:`147`, :pr:`148`)
13
+ * Upgrade to vcpkg 2025.04.09 (:pr:`146`)
14
+
5
15
  0.2.8 (24-03-2025)
6
16
  ------------------
7
17
  * Upgrade to casacore 3.7.1 (:pr:`144`)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: arcae
3
- Version: 0.2.8
3
+ Version: 0.2.9
4
4
  Summary: Arrow bindings for casacore
5
5
  Author-Email: Simon Perkins <simon.perkins@gmail.com>
6
6
  License: BSD 3-Clause License
@@ -145,9 +145,9 @@ with added support for some `NumPy Advanced Indexing <numpy_advanced_indexing_>`
145
145
 
146
146
  casa_table = arcae.table("/path/to/measurementset.ms", readonly=False)
147
147
  # Get rows 10 and 2, and channels 16 to 32, and all correlations
148
- data = casa_table.getcol("DATA", index=([10, 2], slice(16, 32), None)
148
+ data = casa_table.getcol("DATA", index=([10, 2], slice(16, 32), None))
149
149
  # Write some modified data back
150
- casa_table.putcol("DATA", data + 1*1j, index=([10, 2], slice(16, 32), None)
150
+ casa_table.putcol("DATA", data + 1*1j, index=([10, 2], slice(16, 32), None))
151
151
 
152
152
  See the test cases for further use cases.
153
153
 
@@ -91,9 +91,9 @@ with added support for some `NumPy Advanced Indexing <numpy_advanced_indexing_>`
91
91
 
92
92
  casa_table = arcae.table("/path/to/measurementset.ms", readonly=False)
93
93
  # Get rows 10 and 2, and channels 16 to 32, and all correlations
94
- data = casa_table.getcol("DATA", index=([10, 2], slice(16, 32), None)
94
+ data = casa_table.getcol("DATA", index=([10, 2], slice(16, 32), None))
95
95
  # Write some modified data back
96
- casa_table.putcol("DATA", data + 1*1j, index=([10, 2], slice(16, 32), None)
96
+ casa_table.putcol("DATA", data + 1*1j, index=([10, 2], slice(16, 32), None))
97
97
 
98
98
  See the test cases for further use cases.
99
99
 
@@ -56,7 +56,7 @@ if(DEFINED ENV{VCPKG_TARGET_TRIPLET})
56
56
  set(VCPKG_TARGET_TRIPLET $ENV{VCPKG_TARGET_TRIPLET})
57
57
  else()
58
58
  if(UNIX)
59
- set(VCPKG_TARGET_TRIPLET "x64-linux-dynamic-cxx17-abi1-rel")
59
+ set(VCPKG_TARGET_TRIPLET "x64-linux-dynamic-cxx20-abi1-rel")
60
60
  else()
61
61
  message(FATAL_ERROR "Only unix currently supported")
62
62
  endif()
@@ -126,7 +126,6 @@ struct ReadCallback {
126
126
  return read_fut.Then(
127
127
  [chunk = chunk, buffer = buffer](const CasaArray<CT>& data) mutable -> bool {
128
128
  std::ptrdiff_t ndim = chunk.nDim();
129
- std::ptrdiff_t last_dim = ndim - 1;
130
129
  auto spans = chunk.DimensionSpans();
131
130
  auto min_mem = chunk.MinMemIndex();
132
131
  auto chunk_strides = chunk.ChunkStrides();
@@ -136,7 +135,8 @@ struct ReadCallback {
136
135
  auto pos = chunk.ScratchPositions();
137
136
  for (std::size_t i = 0; i < pos.size(); ++i) pos[i] = 0;
138
137
 
139
- while (true) { // Iterate over the spans in memory, copying data
138
+ // Iterate over the spans in memory, copying data
139
+ for (auto done = false; !done;) {
140
140
  std::size_t i = 0, o = 0;
141
141
  for (std::ptrdiff_t d = 0; d < ndim; ++d) {
142
142
  i += pos[d] * chunk_strides[d];
@@ -147,11 +147,13 @@ struct ReadCallback {
147
147
  out_ptr[o] = std::move(in_ptr[i]);
148
148
  for (std::ptrdiff_t d = 0; d < ndim; ++d) { // Iterate in FORTRAN order
149
149
  if (++pos[d] < spans[d].mem.size())
150
- break; // Iteration doesn't reach dim end
151
- pos[d] = 0; // OtherwBasic iteration worksise reset, next dim
152
- if (d == last_dim) return true; // The last dim is reset, we're done
150
+ break; // Iteration doesn't reach dim end
151
+ pos[d] = 0; // Otherwise reset, next dim
152
+ done = d + 1 == ndim; // We're done if the last dimension is reset
153
153
  }
154
154
  }
155
+
156
+ return true;
155
157
  },
156
158
  {}, CallbackOptions{ShouldSchedule::Always, GetCpuThreadPool()});
157
159
  }
@@ -47,18 +47,8 @@ namespace {
47
47
  // If, the supplied row is negative (-1) and a result_shape is supplied
48
48
  // the shape is derived from this source, otherwise the CASA shape is
49
49
  // used as the reference value
50
- Result<IPosition> GetRowShape(const TableColumn& column,
51
- const std::optional<IPosition>& result_shape, IndexType r) {
52
- if (r < 0) {
53
- if (!result_shape.has_value()) {
54
- return Status::IndexError(
55
- "Negative selection indices may only be present "
56
- "when a fixed shape result array is provided");
57
- }
58
- const auto& shape = result_shape.value();
59
- // Return secondary dimensions
60
- return shape.getFirst(shape.size() - 1);
61
- } else if (r >= IndexType(column.nrow())) {
50
+ Result<IPosition> GetTableRowShape(const TableColumn& column, IndexType r) {
51
+ if (r < 0 || r >= IndexType(column.nrow())) {
62
52
  return Status::IndexError("Row ", r, " in column ", column.columnDesc().name(),
63
53
  " is out of bounds");
64
54
  } else if (column.isDefined(r)) {
@@ -94,21 +84,45 @@ Result<RowShapes> MakeRowData(const TableColumn& column, const Selection& select
94
84
  RowShapes shapes;
95
85
  const auto& column_desc = column.columnDesc();
96
86
 
87
+ // Lambda that gets the shape from the column's row
88
+ // Clipping against the selection is performed
89
+ auto GetClippedColumnShape = [&](auto r) -> Result<IPosition> {
90
+ ARROW_ASSIGN_OR_RAISE(auto shape, GetTableRowShape(column, r));
91
+ ARROW_RETURN_NOT_OK(ClipShape(column_desc, shape, selection));
92
+ return shape;
93
+ };
94
+
95
+ // Lambda handling the more complex span case.
96
+ auto GetSpanShape = [&](auto r) -> Result<IPosition> {
97
+ // Standard case
98
+ if (r >= 0) return GetClippedColumnShape(r);
99
+
100
+ // Negative row indices mean that the shape should be derived
101
+ // from the result array, rather than the column row shape
102
+ // It's not necessary to clip by selection indices in this case
103
+ if (result_shape) {
104
+ const auto& shape = result_shape.value();
105
+ return shape.getFirst(shape.size() - 1);
106
+ }
107
+
108
+ return Status::IndexError(
109
+ "Negative selection indices may only be used "
110
+ "in conjunction with a fixed shape result array");
111
+ };
112
+
97
113
  // Get the row selection if provided
98
114
  if (selection.HasRowSpan()) {
99
115
  auto span = selection.GetRowSpan();
100
116
  shapes.reserve(span.size());
101
117
  for (std::size_t r = 0; r < span.size(); ++r) {
102
- ARROW_ASSIGN_OR_RAISE(auto shape, GetRowShape(column, result_shape, span[r]));
103
- ARROW_RETURN_NOT_OK(ClipShape(column_desc, shape, selection));
118
+ ARROW_ASSIGN_OR_RAISE(auto shape, GetSpanShape(span[r]));
104
119
  shapes.emplace_back(std::move(shape));
105
120
  }
106
121
  // otherwise, the entire column
107
122
  } else {
108
123
  shapes.reserve(column.nrow());
109
124
  for (std::size_t r = 0; r < column.nrow(); ++r) {
110
- ARROW_ASSIGN_OR_RAISE(auto shape, GetRowShape(column, result_shape, r));
111
- ARROW_RETURN_NOT_OK(ClipShape(column_desc, shape, selection));
125
+ ARROW_ASSIGN_OR_RAISE(auto shape, GetClippedColumnShape(r));
112
126
  shapes.emplace_back(std::move(shape));
113
127
  }
114
128
  }
@@ -495,7 +509,7 @@ Result<ResultShapeData> ResultShapeData::MakeRead(
495
509
  return Status::NotImplemented("Column ", column_name, " has varying dimensions");
496
510
  }
497
511
 
498
- // Even though the column varys
512
+ // Even though the column varies
499
513
  // the resultant shape after selection is fixed
500
514
  // There's no need to clip the shape as this
501
515
  // will have been done in MakeRowData
@@ -101,7 +101,6 @@ struct WriteCallback {
101
101
  auto transpose_fut = arrow::DeferNotOk(GetCpuThreadPool()->Submit(
102
102
  [chunk = chunk, buffer = buffer]() mutable -> CasaArray<CT> {
103
103
  std::ptrdiff_t ndim = chunk.nDim();
104
- std::ptrdiff_t last_dim = ndim - 1;
105
104
  auto spans = chunk.DimensionSpans();
106
105
  auto min_mem = chunk.MinMemIndex();
107
106
  auto chunk_strides = chunk.ChunkStrides();
@@ -116,7 +115,7 @@ struct WriteCallback {
116
115
  for (std::size_t i = 0; i < pos.size(); ++i) pos[i] = 0;
117
116
 
118
117
  // Iterate over the spans in memory, copying data
119
- while (true) {
118
+ for (auto done = false; !done;) {
120
119
  std::size_t i = 0, o = 0;
121
120
  for (std::ptrdiff_t d = 0; d < ndim; ++d) {
122
121
  i += (spans[d].mem[pos[d]] - min_mem[d]) * buffer_strides[d];
@@ -127,11 +126,13 @@ struct WriteCallback {
127
126
  out_ptr[o] = std::move(in_ptr[i]);
128
127
  for (std::ptrdiff_t d = 0; d < ndim; ++d) { // Iterate in FORTRAN order
129
128
  if (++pos[d] < spans[d].mem.size())
130
- break; // Iteration doesn't reach dim end
131
- pos[d] = 0; // OtherwBasic iteration worksise reset, next dim
132
- if (d == last_dim) return array; // The last dim is reset, we're done
129
+ break; // Iteration doesn't reach dim end
130
+ pos[d] = 0; // Otherwise reset, next dim
131
+ done = d + 1 == ndim; // We're done if the last dimension is reset
133
132
  }
134
133
  }
134
+
135
+ return array;
135
136
  }));
136
137
 
137
138
  return itp->Then(transpose_fut,
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "arcae"
3
- version = "0.2.8"
3
+ version = "0.2.9"
4
4
  authors = [
5
5
  {name = "Simon Perkins", email = "simon.perkins@gmail.com"}
6
6
  ]
@@ -46,7 +46,7 @@ export CIBW_BUILD=$CPYTHON_VERSION-$MANYLINUX_PLATFORM
46
46
  export CIBW_BUILD_FRONTEND=build
47
47
  export CIBW_BEFORE_ALL_LINUX="yum install -y zip flex bison gcc-gfortran"
48
48
  export CIBW_MANYLINUX_X86_64_IMAGE="quay.io/pypa/manylinux_2_28_x86_64"
49
- export VCPKG_TARGET_TRIPLET=x64-linux-dynamic-cxx17-abi1-rel
49
+ export VCPKG_TARGET_TRIPLET=x64-linux-dynamic-cxx20-abi1-rel
50
50
  export CIBW_ENVIRONMENT_LINUX="\
51
51
  CMAKE_ARGS=-DBUILD_TESTING=OFF \
52
52
  VCPKG_DEFAULT_BINARY_CACHE=/host$VCPKG_HOST_BINARY_CACHE \
@@ -7,7 +7,7 @@ from typing import Union, TYPE_CHECKING
7
7
  if TYPE_CHECKING:
8
8
  from arcae.lib.arrow_tables import Table
9
9
 
10
- __version__ = "0.2.8"
10
+ __version__ = "0.2.9"
11
11
 
12
12
  PYTHON_CASACORE_FOUND = "casacore" in sys.modules
13
13
  COEXIST_WITH_PYTHON_CASACORE = int(os.environ.get("ARCAE_WITH_CASACORE", 0)) != 0
@@ -1,5 +1,5 @@
1
1
  [version]
2
- current = "0.2.8"
2
+ current = "0.2.9"
3
3
  regex = '''
4
4
  (?P<major>\d+)
5
5
  \.
@@ -54,7 +54,7 @@ vcpkg_cmake_configure(
54
54
  -DBUILD_PYTHON=OFF
55
55
  -DBUILD_TESTING=OFF
56
56
  -DUSE_PCH=OFF
57
- -DCMAKE_CXX_STANDARD=17
57
+ -DCMAKE_CXX_STANDARD=20
58
58
  ${fortran_args}
59
59
  )
60
60
 
@@ -1,5 +1,7 @@
1
1
  vcpkg_download_distfile(ARCHIVE
2
2
  URLS "https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-4.1.0.tar.gz"
3
+ "https://www.mirrorservice.org/sites/distfiles.macports.org/cfitsio/cfitsio-4.1.0.tar.gz"
4
+ "https://distfiles.macports.org/cfitsio/cfitsio-4.1.0.tar.gz"
3
5
  FILENAME "cfitsio-4.1.0.tar.gz"
4
6
  SHA512 bbbe10e890e74a30a9806dd2bbf711b3b1f15502b210b222d2d57cc083495c3b66b44927e4680f989045187fb7075f7187e2805ddcb4753ce53c68c3442cc813
5
7
  )
@@ -3,7 +3,7 @@ set(VCPKG_CRT_LINKAGE dynamic)
3
3
  set(VCPKG_LIBRARY_LINKAGE dynamic)
4
4
  set(VCPKG_BUILD_TYPE release)
5
5
 
6
- set(CMAKE_CXX_STANDARD 17)
6
+ set(CMAKE_CXX_STANDARD 20)
7
7
  set(CMAKE_CXX_STANDARD_REQUIRED On)
8
8
  set(CMAKE_CXX_EXTENSIONS Off)
9
9
 
@@ -3,7 +3,7 @@ set(VCPKG_CRT_LINKAGE dynamic)
3
3
  set(VCPKG_LIBRARY_LINKAGE dynamic)
4
4
  set(VCPKG_BUILD_TYPE release)
5
5
 
6
- set(CMAKE_CXX_STANDARD 17)
6
+ set(CMAKE_CXX_STANDARD 20)
7
7
  set(CMAKE_CXX_STANDARD_REQUIRED On)
8
8
  set(CMAKE_CXX_EXTENSIONS Off)
9
9
 
@@ -3,7 +3,7 @@ set(VCPKG_CRT_LINKAGE dynamic)
3
3
  set(VCPKG_LIBRARY_LINKAGE dynamic)
4
4
  set(VCPKG_BUILD_TYPE release)
5
5
 
6
- set(CMAKE_CXX_STANDARD 17)
6
+ set(CMAKE_CXX_STANDARD 20)
7
7
  set(CMAKE_CXX_STANDARD_REQUIRED On)
8
8
  set(CMAKE_CXX_EXTENSIONS Off)
9
9
 
@@ -3,7 +3,7 @@ set(VCPKG_CRT_LINKAGE dynamic)
3
3
  set(VCPKG_LIBRARY_LINKAGE dynamic)
4
4
  set(VCPKG_BUILD_TYPE release)
5
5
 
6
- set(CMAKE_CXX_STANDARD 17)
6
+ set(CMAKE_CXX_STANDARD 20)
7
7
  set(CMAKE_CXX_STANDARD_REQUIRED On)
8
8
  set(CMAKE_CXX_EXTENSIONS Off)
9
9
 
@@ -2,7 +2,7 @@ set(VCPKG_CRT_LINKAGE dynamic)
2
2
  set(VCPKG_LIBRARY_LINKAGE dynamic)
3
3
  set(VCPKG_BUILD_TYPE release)
4
4
 
5
- set(CMAKE_CXX_STANDARD 17)
5
+ set(CMAKE_CXX_STANDARD 20)
6
6
  set(CMAKE_CXX_STANDARD_REQUIRED On)
7
7
  set(CMAKE_CXX_EXTENSIONS Off)
8
8
 
@@ -3,7 +3,7 @@ set(VCPKG_CRT_LINKAGE dynamic)
3
3
  set(VCPKG_LIBRARY_LINKAGE dynamic)
4
4
  set(VCPKG_BUILD_TYPE release)
5
5
 
6
- set(CMAKE_CXX_STANDARD 17)
6
+ set(CMAKE_CXX_STANDARD 20)
7
7
  set(CMAKE_CXX_STANDARD_REQUIRED On)
8
8
  set(CMAKE_CXX_EXTENSIONS Off)
9
9
 
@@ -3,7 +3,7 @@ set(VCPKG_CRT_LINKAGE dynamic)
3
3
  set(VCPKG_LIBRARY_LINKAGE dynamic)
4
4
  set(VCPKG_BUILD_TYPE release)
5
5
 
6
- set(CMAKE_CXX_STANDARD 17)
6
+ set(CMAKE_CXX_STANDARD 20)
7
7
  set(CMAKE_CXX_STANDARD_REQUIRED On)
8
8
  set(CMAKE_CXX_EXTENSIONS Off)
9
9
 
@@ -3,7 +3,7 @@ set(VCPKG_CRT_LINKAGE dynamic)
3
3
  set(VCPKG_LIBRARY_LINKAGE dynamic)
4
4
  set(VCPKG_BUILD_TYPE release)
5
5
 
6
- set(CMAKE_CXX_STANDARD 17)
6
+ set(CMAKE_CXX_STANDARD 20)
7
7
  set(CMAKE_CXX_STANDARD_REQUIRED On)
8
8
  set(CMAKE_CXX_EXTENSIONS Off)
9
9
 
@@ -3,7 +3,7 @@ set(VCPKG_CRT_LINKAGE dynamic)
3
3
  set(VCPKG_LIBRARY_LINKAGE dynamic)
4
4
  set(VCPKG_BUILD_TYPE release)
5
5
 
6
- set(CMAKE_CXX_STANDARD 17)
6
+ set(CMAKE_CXX_STANDARD 20)
7
7
  set(CMAKE_CXX_STANDARD_REQUIRED On)
8
8
  set(CMAKE_CXX_EXTENSIONS Off)
9
9
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes