arraymorph 0.2.0b1__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.
- arraymorph-0.2.0b1/.actrc +5 -0
- arraymorph-0.2.0b1/.github/ISSUE_TEMPLATE/bug_report.yaml +46 -0
- arraymorph-0.2.0b1/.github/ISSUE_TEMPLATE/config.yaml +5 -0
- arraymorph-0.2.0b1/.github/workflows/build-lib_array_morph-and-pypi-package.yaml +378 -0
- arraymorph-0.2.0b1/.github/workflows/build.yml +62 -0
- arraymorph-0.2.0b1/.gitignore +74 -0
- arraymorph-0.2.0b1/.python-version +1 -0
- arraymorph-0.2.0b1/CONAN-INTEGRATION.md +312 -0
- arraymorph-0.2.0b1/LICENSE +21 -0
- arraymorph-0.2.0b1/PKG-INFO +142 -0
- arraymorph-0.2.0b1/README.md +129 -0
- arraymorph-0.2.0b1/env-example.txt +11 -0
- arraymorph-0.2.0b1/examples/python/read.py +8 -0
- arraymorph-0.2.0b1/examples/python/write.py +12 -0
- arraymorph-0.2.0b1/justfile +63 -0
- arraymorph-0.2.0b1/lib/.clangd +22 -0
- arraymorph-0.2.0b1/lib/CMakeLists.txt +102 -0
- arraymorph-0.2.0b1/lib/README.md +17 -0
- arraymorph-0.2.0b1/lib/conanfile.py +41 -0
- arraymorph-0.2.0b1/lib/include/arraymorph/core/constants.h +35 -0
- arraymorph-0.2.0b1/lib/include/arraymorph/core/logger.h +16 -0
- arraymorph-0.2.0b1/lib/include/arraymorph/core/operators.h +153 -0
- arraymorph-0.2.0b1/lib/include/arraymorph/core/utils.h +56 -0
- arraymorph-0.2.0b1/lib/include/arraymorph/s3vl/chunk_obj.h +58 -0
- arraymorph-0.2.0b1/lib/include/arraymorph/s3vl/dataset_callbacks.h +42 -0
- arraymorph-0.2.0b1/lib/include/arraymorph/s3vl/dataset_obj.h +59 -0
- arraymorph-0.2.0b1/lib/include/arraymorph/s3vl/file_callbacks.h +20 -0
- arraymorph-0.2.0b1/lib/include/arraymorph/s3vl/group_callbacks.h +27 -0
- arraymorph-0.2.0b1/lib/include/arraymorph/s3vl/initialize.h +72 -0
- arraymorph-0.2.0b1/lib/include/arraymorph/s3vl/vol_connector.h +25 -0
- arraymorph-0.2.0b1/lib/justfile +40 -0
- arraymorph-0.2.0b1/lib/meta.yaml +70 -0
- arraymorph-0.2.0b1/lib/scripts/extract_perspective.py +62 -0
- arraymorph-0.2.0b1/lib/src/CMakeLists.txt +54 -0
- arraymorph-0.2.0b1/lib/src/core/constants.cc +5 -0
- arraymorph-0.2.0b1/lib/src/core/operators.cc +303 -0
- arraymorph-0.2.0b1/lib/src/core/utils.cc +145 -0
- arraymorph-0.2.0b1/lib/src/s3vl/chunk_obj.cc +51 -0
- arraymorph-0.2.0b1/lib/src/s3vl/dataset_callbacks.cc +209 -0
- arraymorph-0.2.0b1/lib/src/s3vl/dataset_obj.cc +541 -0
- arraymorph-0.2.0b1/lib/src/s3vl/file_callbacks.cc +141 -0
- arraymorph-0.2.0b1/lib/src/s3vl/group_callbacks.cc +115 -0
- arraymorph-0.2.0b1/lib/src/s3vl/vol_connector.cc +164 -0
- arraymorph-0.2.0b1/main.py +6 -0
- arraymorph-0.2.0b1/pyproject.toml +36 -0
- arraymorph-0.2.0b1/release.yaml +14 -0
- arraymorph-0.2.0b1/src/arraymorph/__init__.py +161 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: Bug Report
|
|
2
|
+
description: File a bug/issue.
|
|
3
|
+
title: "bug: "
|
|
4
|
+
labels: [bug]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Bug/Issue intro message.
|
|
10
|
+
- type: checkboxes
|
|
11
|
+
attributes:
|
|
12
|
+
label: Did you check docs and existing issues?
|
|
13
|
+
description: Make sure you checked all ofhe below before submitting an issue.
|
|
14
|
+
options:
|
|
15
|
+
- label: I have read all the [ArrayMorph docs](https://icicle-ai.github.io/training-catalog/docs/category/arraymorph-2).
|
|
16
|
+
required: true
|
|
17
|
+
- label: I have searched the existing issues.
|
|
18
|
+
required: true
|
|
19
|
+
- type: input
|
|
20
|
+
attributes:
|
|
21
|
+
label: "ArrayMorph version"
|
|
22
|
+
placeholder: "v0.1.1"
|
|
23
|
+
validations:
|
|
24
|
+
required: true
|
|
25
|
+
- type: textarea
|
|
26
|
+
attributes:
|
|
27
|
+
label: Describe the bug/issue.
|
|
28
|
+
description: A clear and concise description of the bug/issue. Please provide any logs.
|
|
29
|
+
validations:
|
|
30
|
+
required: true
|
|
31
|
+
- type: textarea
|
|
32
|
+
attributes:
|
|
33
|
+
label: Step To Reproduce
|
|
34
|
+
description: Please provide the steps to reproduce this bug.
|
|
35
|
+
placeholder: |
|
|
36
|
+
1.
|
|
37
|
+
2.
|
|
38
|
+
3.
|
|
39
|
+
validations:
|
|
40
|
+
required: true
|
|
41
|
+
- type: textarea
|
|
42
|
+
attributes:
|
|
43
|
+
label: Expected Behavior
|
|
44
|
+
description: A clear and concise description of the expected behavior.
|
|
45
|
+
validations:
|
|
46
|
+
required: true
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
name: Build, Test, and Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [main]
|
|
6
|
+
release:
|
|
7
|
+
types: [published]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build_wheels:
|
|
12
|
+
name: Build (${{ matrix.os }} / ${{ matrix.arch }} / py${{ matrix.python }})
|
|
13
|
+
runs-on: ${{ matrix.runner }}
|
|
14
|
+
strategy:
|
|
15
|
+
fail-fast: false
|
|
16
|
+
matrix:
|
|
17
|
+
include:
|
|
18
|
+
# Linux x86_64
|
|
19
|
+
- { os: linux, arch: x86_64, runner: ubuntu-latest, python: "3.9" }
|
|
20
|
+
- { os: linux, arch: x86_64, runner: ubuntu-latest, python: "3.10" }
|
|
21
|
+
- { os: linux, arch: x86_64, runner: ubuntu-latest, python: "3.11" }
|
|
22
|
+
- { os: linux, arch: x86_64, runner: ubuntu-latest, python: "3.12" }
|
|
23
|
+
- { os: linux, arch: x86_64, runner: ubuntu-latest, python: "3.13" }
|
|
24
|
+
- { os: linux, arch: x86_64, runner: ubuntu-latest, python: "3.14" }
|
|
25
|
+
# Linux aarch64
|
|
26
|
+
- {
|
|
27
|
+
os: linux,
|
|
28
|
+
arch: aarch64,
|
|
29
|
+
runner: ubuntu-24.04-arm,
|
|
30
|
+
python: "3.9",
|
|
31
|
+
}
|
|
32
|
+
- {
|
|
33
|
+
os: linux,
|
|
34
|
+
arch: aarch64,
|
|
35
|
+
runner: ubuntu-24.04-arm,
|
|
36
|
+
python: "3.10",
|
|
37
|
+
}
|
|
38
|
+
- {
|
|
39
|
+
os: linux,
|
|
40
|
+
arch: aarch64,
|
|
41
|
+
runner: ubuntu-24.04-arm,
|
|
42
|
+
python: "3.11",
|
|
43
|
+
}
|
|
44
|
+
- {
|
|
45
|
+
os: linux,
|
|
46
|
+
arch: aarch64,
|
|
47
|
+
runner: ubuntu-24.04-arm,
|
|
48
|
+
python: "3.12",
|
|
49
|
+
}
|
|
50
|
+
- {
|
|
51
|
+
os: linux,
|
|
52
|
+
arch: aarch64,
|
|
53
|
+
runner: ubuntu-24.04-arm,
|
|
54
|
+
python: "3.13",
|
|
55
|
+
}
|
|
56
|
+
- {
|
|
57
|
+
os: linux,
|
|
58
|
+
arch: aarch64,
|
|
59
|
+
runner: ubuntu-24.04-arm,
|
|
60
|
+
python: "3.14",
|
|
61
|
+
}
|
|
62
|
+
# macOS arm64
|
|
63
|
+
- { os: macos, arch: arm64, runner: macos-latest, python: "3.9" }
|
|
64
|
+
- { os: macos, arch: arm64, runner: macos-latest, python: "3.10" }
|
|
65
|
+
- { os: macos, arch: arm64, runner: macos-latest, python: "3.11" }
|
|
66
|
+
- { os: macos, arch: arm64, runner: macos-latest, python: "3.12" }
|
|
67
|
+
- { os: macos, arch: arm64, runner: macos-latest, python: "3.13" }
|
|
68
|
+
- { os: macos, arch: arm64, runner: macos-latest, python: "3.14" }
|
|
69
|
+
|
|
70
|
+
steps:
|
|
71
|
+
- name: Checkout
|
|
72
|
+
uses: actions/checkout@v4
|
|
73
|
+
with:
|
|
74
|
+
fetch-depth: 0 # setuptools-scm needs full history
|
|
75
|
+
|
|
76
|
+
- name: Install uv
|
|
77
|
+
uses: astral-sh/setup-uv@v7
|
|
78
|
+
with:
|
|
79
|
+
version: "0.10.6"
|
|
80
|
+
|
|
81
|
+
- name: Set up Python
|
|
82
|
+
run: uv python install ${{ matrix.python }}
|
|
83
|
+
|
|
84
|
+
# ──────────────────────────────────────────────
|
|
85
|
+
# 1. System deps
|
|
86
|
+
# ──────────────────────────────────────────────
|
|
87
|
+
|
|
88
|
+
- name: Install system deps (Linux)
|
|
89
|
+
if: runner.os == 'Linux'
|
|
90
|
+
run: |
|
|
91
|
+
sudo apt-get update
|
|
92
|
+
sudo apt-get install -y \
|
|
93
|
+
cmake ninja-build \
|
|
94
|
+
pkg-config patchelf \
|
|
95
|
+
libx11-dev libx11-xcb-dev libfontenc-dev \
|
|
96
|
+
libice-dev libsm-dev libxau-dev libxaw7-dev \
|
|
97
|
+
libxcomposite-dev libxcursor-dev libxdamage-dev \
|
|
98
|
+
libxdmcp-dev libxext-dev libxfixes-dev libxi-dev \
|
|
99
|
+
libxinerama-dev libxkbfile-dev libxmu-dev \
|
|
100
|
+
libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev \
|
|
101
|
+
libxres-dev libxss-dev libxt-dev libxtst-dev \
|
|
102
|
+
libxv-dev libxxf86vm-dev libxcb-glx0-dev \
|
|
103
|
+
libxcb-render0-dev libxcb-render-util0-dev \
|
|
104
|
+
libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev \
|
|
105
|
+
libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev \
|
|
106
|
+
libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev \
|
|
107
|
+
libxcb-dri3-dev uuid-dev libxcb-cursor-dev \
|
|
108
|
+
libxcb-dri2-0-dev libxcb-present-dev \
|
|
109
|
+
libxcb-composite0-dev libxcb-ewmh-dev libxcb-res0-dev \
|
|
110
|
+
libasound2-dev
|
|
111
|
+
|
|
112
|
+
- name: Install system deps (macOS)
|
|
113
|
+
if: runner.os == 'macOS'
|
|
114
|
+
run: brew install ninja cmake
|
|
115
|
+
|
|
116
|
+
- name: Install Python tools
|
|
117
|
+
run: |
|
|
118
|
+
uv venv --python ${{ matrix.python }}
|
|
119
|
+
echo "${{ github.workspace }}/.venv/bin" >> $GITHUB_PATH
|
|
120
|
+
uv pip install \
|
|
121
|
+
scikit-build-core setuptools-scm h5py \
|
|
122
|
+
build auditwheel delocate
|
|
123
|
+
|
|
124
|
+
# ──────────────────────────────────────────────
|
|
125
|
+
# 2. Conan: install C++ deps (cached per platform)
|
|
126
|
+
# ──────────────────────────────────────────────
|
|
127
|
+
|
|
128
|
+
- name: Cache Conan packages
|
|
129
|
+
uses: actions/cache@v4
|
|
130
|
+
with:
|
|
131
|
+
path: ~/.conan2
|
|
132
|
+
key: conan-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles('lib/conanfile.py') }}
|
|
133
|
+
restore-keys: conan-${{ matrix.os }}-${{ matrix.arch }}-
|
|
134
|
+
|
|
135
|
+
- name: Conan install
|
|
136
|
+
working-directory: lib
|
|
137
|
+
run: |
|
|
138
|
+
uv tool install conan
|
|
139
|
+
conan profile detect --force
|
|
140
|
+
conan install . --build=missing -of build \
|
|
141
|
+
-c tools.system.package_manager:mode=install \
|
|
142
|
+
-c tools.system.package_manager:sudo=True
|
|
143
|
+
|
|
144
|
+
- name: Find Conan toolchain
|
|
145
|
+
run: |
|
|
146
|
+
TOOLCHAIN=$(find ${{ github.workspace }}/lib/build -name "conan_toolchain.cmake" | head -1)
|
|
147
|
+
if [ -z "$TOOLCHAIN" ]; then
|
|
148
|
+
echo "ERROR: conan_toolchain.cmake not found"
|
|
149
|
+
find ${{ github.workspace }}/lib/build -type f -name "*.cmake" || true
|
|
150
|
+
exit 1
|
|
151
|
+
fi
|
|
152
|
+
echo "CMAKE_TOOLCHAIN_FILE=$TOOLCHAIN" >> $GITHUB_ENV
|
|
153
|
+
echo "Found toolchain at: $TOOLCHAIN"
|
|
154
|
+
|
|
155
|
+
# ──────────────────────────────────────────────
|
|
156
|
+
# 3. Discover h5py HDF5 + build wheel
|
|
157
|
+
# ──────────────────────────────────────────────
|
|
158
|
+
|
|
159
|
+
- name: Discover h5py HDF5 location
|
|
160
|
+
run: |
|
|
161
|
+
H5PY_HDF5_DIR=$(python3 -c "
|
|
162
|
+
import h5py, os
|
|
163
|
+
d = os.path.dirname(h5py.__file__)
|
|
164
|
+
dylibs = os.path.join(d, '.dylibs')
|
|
165
|
+
libs = os.path.join(os.path.dirname(d), 'h5py.libs')
|
|
166
|
+
print(dylibs if os.path.exists(dylibs) else libs)
|
|
167
|
+
")
|
|
168
|
+
echo "H5PY_HDF5_DIR=$H5PY_HDF5_DIR" >> $GITHUB_ENV
|
|
169
|
+
echo "Discovered h5py HDF5 at: $H5PY_HDF5_DIR"
|
|
170
|
+
ls -la "$H5PY_HDF5_DIR"
|
|
171
|
+
|
|
172
|
+
- name: Build wheel
|
|
173
|
+
run: |
|
|
174
|
+
uv build --wheel --no-build-isolation --python ${{ github.workspace }}/.venv/bin/python
|
|
175
|
+
# ──────────────────────────────────────────────
|
|
176
|
+
# 4. Repair wheel for PyPI
|
|
177
|
+
# ──────────────────────────────────────────────
|
|
178
|
+
|
|
179
|
+
- name: Repair wheel (Linux)
|
|
180
|
+
if: runner.os == 'Linux'
|
|
181
|
+
run: |
|
|
182
|
+
export LD_LIBRARY_PATH="${H5PY_HDF5_DIR}:${LD_LIBRARY_PATH}"
|
|
183
|
+
auditwheel show dist/*.whl
|
|
184
|
+
auditwheel repair dist/*.whl -w wheelhouse/ \
|
|
185
|
+
--exclude libhdf5.so \
|
|
186
|
+
--exclude libhdf5.so.310 \
|
|
187
|
+
--exclude libhdf5_hl.so \
|
|
188
|
+
--exclude libhdf5_hl.so.310
|
|
189
|
+
|
|
190
|
+
- name: Repair wheel (macOS)
|
|
191
|
+
if: runner.os == 'macOS'
|
|
192
|
+
run: |
|
|
193
|
+
export DYLD_LIBRARY_PATH="${H5PY_HDF5_DIR}:${DYLD_LIBRARY_PATH}"
|
|
194
|
+
delocate-listdeps dist/*.whl
|
|
195
|
+
delocate-wheel -w wheelhouse/ dist/*.whl \
|
|
196
|
+
--exclude libhdf5 \
|
|
197
|
+
--exclude libhdf5_hl
|
|
198
|
+
|
|
199
|
+
# ──────────────────────────────────────────────
|
|
200
|
+
# 5. Test + upload
|
|
201
|
+
# ──────────────────────────────────────────────
|
|
202
|
+
|
|
203
|
+
- name: Smoke test
|
|
204
|
+
run: |
|
|
205
|
+
uv pip install wheelhouse/*.whl --force-reinstall
|
|
206
|
+
python3 -c "import arraymorph; print('arraymorph imported successfully')"
|
|
207
|
+
|
|
208
|
+
- name: Upload wheel artifact
|
|
209
|
+
uses: actions/upload-artifact@v4
|
|
210
|
+
with:
|
|
211
|
+
name: wheels-${{ matrix.os }}-${{ matrix.arch }}-py${{ matrix.python }}
|
|
212
|
+
path: wheelhouse/*.whl
|
|
213
|
+
retention-days: 7
|
|
214
|
+
|
|
215
|
+
- name: Extract native library from wheel
|
|
216
|
+
if: github.event_name == 'release' && matrix.python == '3.12'
|
|
217
|
+
shell: bash
|
|
218
|
+
run: |
|
|
219
|
+
wheel_file=$(ls wheelhouse/*.whl | head -1)
|
|
220
|
+
mkdir -p extracted_lib
|
|
221
|
+
unzip -j "$wheel_file" "arraymorph/lib/lib_arraymorph*" -d extracted_lib/
|
|
222
|
+
lib_file=$(ls extracted_lib/lib_arraymorph*)
|
|
223
|
+
ext="${lib_file##*.}"
|
|
224
|
+
cp "$lib_file" "lib_arraymorph-${{ matrix.os }}-${{ matrix.arch }}.$ext"
|
|
225
|
+
echo "LIB_ARTIFACT=lib_arraymorph-${{ matrix.os }}-${{ matrix.arch }}.$ext" >> $GITHUB_ENV
|
|
226
|
+
|
|
227
|
+
- name: Fix HDF5 paths in standalone binary (macOS)
|
|
228
|
+
if: runner.os == 'macOS' && github.event_name == 'release' && matrix.python == '3.12'
|
|
229
|
+
run: |
|
|
230
|
+
LIB="lib_arraymorph-${{ matrix.os }}-${{ matrix.arch }}.dylib"
|
|
231
|
+
HDF5_REF=$(otool -L "$LIB" | grep libhdf5 | awk '{print $1}')
|
|
232
|
+
HDF5_FILENAME=$(basename "$HDF5_REF")
|
|
233
|
+
install_name_tool -change "$HDF5_REF" "@rpath/$HDF5_FILENAME" "$LIB"
|
|
234
|
+
echo "Fixed: $HDF5_REF → @rpath/$HDF5_FILENAME"
|
|
235
|
+
otool -L "$LIB" | grep hdf5
|
|
236
|
+
|
|
237
|
+
- name: Fix HDF5 paths in standalone binary (Linux)
|
|
238
|
+
if: runner.os == 'Linux' && github.event_name == 'release' && matrix.python == '3.12'
|
|
239
|
+
run: |
|
|
240
|
+
LIB="lib_arraymorph-${{ matrix.os }}-${{ matrix.arch }}.so"
|
|
241
|
+
patchelf --replace-needed \
|
|
242
|
+
"$(patchelf --print-needed "$LIB" | grep libhdf5)" \
|
|
243
|
+
"libhdf5.so" \
|
|
244
|
+
"$LIB"
|
|
245
|
+
echo "Fixed HDF5 dependency"
|
|
246
|
+
ldd "$LIB" | grep hdf5 || patchelf --print-needed "$LIB" | grep hdf5
|
|
247
|
+
|
|
248
|
+
- name: Attach native library to GitHub release
|
|
249
|
+
if: github.event_name == 'release' && matrix.python == '3.12'
|
|
250
|
+
uses: softprops/action-gh-release@v2
|
|
251
|
+
with:
|
|
252
|
+
files: ${{ env.LIB_ARTIFACT }}
|
|
253
|
+
|
|
254
|
+
build_sdist:
|
|
255
|
+
name: Build sdist
|
|
256
|
+
runs-on: ubuntu-latest
|
|
257
|
+
steps:
|
|
258
|
+
- name: Checkout
|
|
259
|
+
uses: actions/checkout@v4
|
|
260
|
+
with:
|
|
261
|
+
fetch-depth: 0
|
|
262
|
+
|
|
263
|
+
- name: Install uv
|
|
264
|
+
uses: astral-sh/setup-uv@v7
|
|
265
|
+
with:
|
|
266
|
+
version: "0.10.6"
|
|
267
|
+
|
|
268
|
+
- name: Set up Python
|
|
269
|
+
run: uv python install 3.12
|
|
270
|
+
|
|
271
|
+
- name: Build sdist
|
|
272
|
+
run: uv build --sdist
|
|
273
|
+
|
|
274
|
+
- name: Upload sdist artifact
|
|
275
|
+
uses: actions/upload-artifact@v4
|
|
276
|
+
with:
|
|
277
|
+
name: sdist
|
|
278
|
+
path: dist/*.tar.gz
|
|
279
|
+
retention-days: 7
|
|
280
|
+
|
|
281
|
+
publish_test:
|
|
282
|
+
name: Publish to TestPyPI
|
|
283
|
+
needs: [build_wheels, build_sdist]
|
|
284
|
+
runs-on: ubuntu-latest
|
|
285
|
+
if: github.event_name == 'release'
|
|
286
|
+
permissions:
|
|
287
|
+
id-token: write
|
|
288
|
+
environment:
|
|
289
|
+
name: testpypi
|
|
290
|
+
url: https://test.pypi.org/p/arraymorph
|
|
291
|
+
|
|
292
|
+
steps:
|
|
293
|
+
- name: Install uv
|
|
294
|
+
uses: astral-sh/setup-uv@v7
|
|
295
|
+
with:
|
|
296
|
+
version: "0.10.6"
|
|
297
|
+
|
|
298
|
+
- name: Download all wheels
|
|
299
|
+
uses: actions/download-artifact@v4
|
|
300
|
+
with:
|
|
301
|
+
pattern: wheels-*
|
|
302
|
+
merge-multiple: true
|
|
303
|
+
path: dist/
|
|
304
|
+
|
|
305
|
+
- name: Download sdist
|
|
306
|
+
uses: actions/download-artifact@v4
|
|
307
|
+
with:
|
|
308
|
+
name: sdist
|
|
309
|
+
path: dist/
|
|
310
|
+
|
|
311
|
+
- name: Publish to TestPyPI
|
|
312
|
+
run: uv publish dist/* --publish-url https://test.pypi.org/legacy/
|
|
313
|
+
|
|
314
|
+
test_testpypi:
|
|
315
|
+
name: Test TestPyPI (${{ matrix.os }})
|
|
316
|
+
needs: [publish_test]
|
|
317
|
+
runs-on: ${{ matrix.runner }}
|
|
318
|
+
strategy:
|
|
319
|
+
matrix:
|
|
320
|
+
include:
|
|
321
|
+
- { os: linux, runner: ubuntu-latest }
|
|
322
|
+
- { os: macos, runner: macos-latest }
|
|
323
|
+
|
|
324
|
+
steps:
|
|
325
|
+
- name: Install uv
|
|
326
|
+
uses: astral-sh/setup-uv@v7
|
|
327
|
+
with:
|
|
328
|
+
version: "0.10.6"
|
|
329
|
+
|
|
330
|
+
- name: Set up Python
|
|
331
|
+
run: uv python install 3.12
|
|
332
|
+
|
|
333
|
+
- name: Install from TestPyPI
|
|
334
|
+
run: |
|
|
335
|
+
uv venv --python 3.12
|
|
336
|
+
source .venv/bin/activate
|
|
337
|
+
uv pip install \
|
|
338
|
+
--index-url https://test.pypi.org/simple/ \
|
|
339
|
+
--extra-index-url https://pypi.org/simple/ \
|
|
340
|
+
arraymorph
|
|
341
|
+
|
|
342
|
+
- name: Test
|
|
343
|
+
run: |
|
|
344
|
+
source .venv/bin/activate
|
|
345
|
+
python -c "import arraymorph; print('arraymorph imported successfully')"
|
|
346
|
+
|
|
347
|
+
publish:
|
|
348
|
+
name: Publish to PyPI
|
|
349
|
+
needs: [test_testpypi] # ← now waits for TestPyPI to pass
|
|
350
|
+
runs-on: ubuntu-latest
|
|
351
|
+
if: github.event_name == 'release'
|
|
352
|
+
environment:
|
|
353
|
+
name: pypi
|
|
354
|
+
url: https://pypi.org/p/arraymorph
|
|
355
|
+
permissions:
|
|
356
|
+
id-token: write
|
|
357
|
+
|
|
358
|
+
steps:
|
|
359
|
+
- name: Install uv
|
|
360
|
+
uses: astral-sh/setup-uv@v7
|
|
361
|
+
with:
|
|
362
|
+
version: "0.10.6"
|
|
363
|
+
|
|
364
|
+
- name: Download all wheels
|
|
365
|
+
uses: actions/download-artifact@v4
|
|
366
|
+
with:
|
|
367
|
+
pattern: wheels-*
|
|
368
|
+
merge-multiple: true
|
|
369
|
+
path: dist/
|
|
370
|
+
|
|
371
|
+
- name: Download sdist
|
|
372
|
+
uses: actions/download-artifact@v4
|
|
373
|
+
with:
|
|
374
|
+
name: sdist
|
|
375
|
+
path: dist/
|
|
376
|
+
|
|
377
|
+
- name: Publish to PyPI
|
|
378
|
+
run: uv publish dist/*
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
name: Build ArrayMorph
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths:
|
|
8
|
+
- arraymorph/**
|
|
9
|
+
- .github/workflows/**
|
|
10
|
+
pull_request:
|
|
11
|
+
branches:
|
|
12
|
+
- main
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
build:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
|
|
18
|
+
env:
|
|
19
|
+
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
|
|
20
|
+
HDF5_INSTALL: ${{ github.workspace }}/HDF5
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- name: Checkout source
|
|
24
|
+
uses: actions/checkout@v3
|
|
25
|
+
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: |
|
|
28
|
+
sudo apt-get update
|
|
29
|
+
sudo apt-get install -y build-essential pkg-config python3 python3-pip libssl-dev cmake
|
|
30
|
+
|
|
31
|
+
- name: Install vcpkg
|
|
32
|
+
run: |
|
|
33
|
+
git clone https://github.com/microsoft/vcpkg.git $VCPKG_ROOT
|
|
34
|
+
cd $VCPKG_ROOT
|
|
35
|
+
./bootstrap-vcpkg.sh
|
|
36
|
+
./vcpkg install aws-sdk-cpp[s3]:x64-linux
|
|
37
|
+
rm -rf vcpkg/buildtrees vcpkg/downloads vcpkg/packages
|
|
38
|
+
./vcpkg install azure-storage-blobs-cpp:x64-linux
|
|
39
|
+
rm -rf vcpkg/buildtrees vcpkg/downloads vcpkg/packages
|
|
40
|
+
|
|
41
|
+
- name: Install HDF5
|
|
42
|
+
run: |
|
|
43
|
+
git clone https://github.com/HDFGroup/hdf5.git
|
|
44
|
+
cd hdf5
|
|
45
|
+
git checkout hdf5-1_14_2
|
|
46
|
+
./configure --prefix=$HDF5_INSTALL --enable-cxx
|
|
47
|
+
make -j$(nproc)
|
|
48
|
+
make install
|
|
49
|
+
rm -rf hdf5
|
|
50
|
+
|
|
51
|
+
- name: Install h5py
|
|
52
|
+
run: |
|
|
53
|
+
python3 -m pip install --upgrade pip
|
|
54
|
+
HDF5_DIR=$HDF5_INSTALL pip3 install --no-binary=h5py h5py
|
|
55
|
+
|
|
56
|
+
- name: Build ArrayMorph
|
|
57
|
+
run: |
|
|
58
|
+
cd arraymorph
|
|
59
|
+
cmake -B ./build -S . \
|
|
60
|
+
-DCMAKE_PREFIX_PATH=$HDF5_INSTALL \
|
|
61
|
+
-DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake
|
|
62
|
+
cmake --build ./build --parallel
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*.egg-info/
|
|
4
|
+
*.egg
|
|
5
|
+
.venv/
|
|
6
|
+
.test-venv/
|
|
7
|
+
__pycache__/
|
|
8
|
+
dist/
|
|
9
|
+
wheelhouse/
|
|
10
|
+
*.whl
|
|
11
|
+
|
|
12
|
+
# C++ / Build
|
|
13
|
+
build/
|
|
14
|
+
lib/build/
|
|
15
|
+
*.so
|
|
16
|
+
*.dylib
|
|
17
|
+
*.dll
|
|
18
|
+
*.a
|
|
19
|
+
*.o
|
|
20
|
+
CMakeCache.txt
|
|
21
|
+
CMakeFiles/
|
|
22
|
+
cmake_install.cmake
|
|
23
|
+
compile_commands.json
|
|
24
|
+
CMakeUserPresets.json
|
|
25
|
+
|
|
26
|
+
# Conan generated
|
|
27
|
+
lib/activate.sh
|
|
28
|
+
lib/deactivate.sh
|
|
29
|
+
|
|
30
|
+
# Distribution / packaging
|
|
31
|
+
dist/
|
|
32
|
+
arraymorph_channel/
|
|
33
|
+
|
|
34
|
+
# HDF5
|
|
35
|
+
*.h5
|
|
36
|
+
*.hdf5
|
|
37
|
+
.h5py_hdf5_info
|
|
38
|
+
|
|
39
|
+
# Environment / secrets
|
|
40
|
+
.env
|
|
41
|
+
.env.*
|
|
42
|
+
*.pem
|
|
43
|
+
*.key
|
|
44
|
+
*.cert
|
|
45
|
+
*.crt
|
|
46
|
+
.netrc
|
|
47
|
+
.secrets
|
|
48
|
+
.aws/
|
|
49
|
+
credentials
|
|
50
|
+
.conan2/
|
|
51
|
+
conan.conf
|
|
52
|
+
|
|
53
|
+
# Lock files (library, not app)
|
|
54
|
+
uv.lock
|
|
55
|
+
|
|
56
|
+
# macOS
|
|
57
|
+
.DS_Store
|
|
58
|
+
|
|
59
|
+
# JetBrains
|
|
60
|
+
.idea/
|
|
61
|
+
|
|
62
|
+
# VSCode
|
|
63
|
+
.vscode/
|
|
64
|
+
|
|
65
|
+
# Logs
|
|
66
|
+
*.log
|
|
67
|
+
|
|
68
|
+
# Large media
|
|
69
|
+
*.mp4
|
|
70
|
+
*.tiff
|
|
71
|
+
*.avi
|
|
72
|
+
*.flv
|
|
73
|
+
*.mov
|
|
74
|
+
*.wmv
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.9
|