bgen-limix 4.2.1__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.
- bgen_limix-4.2.1/.clang-format +110 -0
- bgen_limix-4.2.1/.github/workflows/ci.yml +156 -0
- bgen_limix-4.2.1/.github/workflows/wheels.yml +92 -0
- bgen_limix-4.2.1/.gitignore +55 -0
- bgen_limix-4.2.1/.pre-commit-config.yaml +30 -0
- bgen_limix-4.2.1/.vscode/launch.json +12 -0
- bgen_limix-4.2.1/.vscode/settings.json +3 -0
- bgen_limix-4.2.1/AGENTS.md +9 -0
- bgen_limix-4.2.1/CMakeLists.txt +322 -0
- bgen_limix-4.2.1/CMakePresets.json +11 -0
- bgen_limix-4.2.1/LICENSE.md +21 -0
- bgen_limix-4.2.1/PKG-INFO +116 -0
- bgen_limix-4.2.1/README.md +93 -0
- bgen_limix-4.2.1/bgen-config.cmake.in +17 -0
- bgen_limix-4.2.1/bgen-file-format.pdf +0 -0
- bgen_limix-4.2.1/doc/.gitignore +3 -0
- bgen_limix-4.2.1/doc/Doxyfile +2523 -0
- bgen_limix-4.2.1/doc/Makefile +23 -0
- bgen_limix-4.2.1/doc/conf.py +62 -0
- bgen_limix-4.2.1/doc/index.rst +31 -0
- bgen_limix-4.2.1/doc/install.rst +20 -0
- bgen_limix-4.2.1/doc/interface.rst +109 -0
- bgen_limix-4.2.1/doc/make.bat +36 -0
- bgen_limix-4.2.1/doc/requirements.txt +2 -0
- bgen_limix-4.2.1/include/bgen/bgen.h +57 -0
- bgen_limix-4.2.1/include/bgen/bstring.h +92 -0
- bgen_limix-4.2.1/include/bgen/file.h +114 -0
- bgen_limix-4.2.1/include/bgen/genotype.h +121 -0
- bgen_limix-4.2.1/include/bgen/metafile.h +79 -0
- bgen_limix-4.2.1/include/bgen/partition.h +36 -0
- bgen_limix-4.2.1/include/bgen/samples.h +28 -0
- bgen_limix-4.2.1/include/bgen/variant.h +20 -0
- bgen_limix-4.2.1/pixi.toml +93 -0
- bgen_limix-4.2.1/pyproject.toml +46 -0
- bgen_limix-4.2.1/python/CMakeLists.txt +52 -0
- bgen_limix-4.2.1/python/bindings.cpp +479 -0
- bgen_limix-4.2.1/python/cbgen/__init__.py +155 -0
- bgen_limix-4.2.1/python/cbgen/_compat.py +281 -0
- bgen_limix-4.2.1/python/cbgen/_s3_utils.py +69 -0
- bgen_limix-4.2.1/python/cbgen/example.py +44 -0
- bgen_limix-4.2.1/python/cbgen/typing.py +170 -0
- bgen_limix-4.2.1/python/tests/test_bgen.py +89 -0
- bgen_limix-4.2.1/python/tests/test_s3_upath.py +125 -0
- bgen_limix-4.2.1/src/bmath.h +46 -0
- bgen_limix-4.2.1/src/bstring.c +57 -0
- bgen_limix-4.2.1/src/bstring.h +13 -0
- bgen_limix-4.2.1/src/file.c +556 -0
- bgen_limix-4.2.1/src/file.h +33 -0
- bgen_limix-4.2.1/src/free.h +8 -0
- bgen_limix-4.2.1/src/genotype.c +76 -0
- bgen_limix-4.2.1/src/genotype.h +66 -0
- bgen_limix-4.2.1/src/io.c +52 -0
- bgen_limix-4.2.1/src/io.h +10 -0
- bgen_limix-4.2.1/src/layout1.c +113 -0
- bgen_limix-4.2.1/src/layout1.h +11 -0
- bgen_limix-4.2.1/src/layout2.c +272 -0
- bgen_limix-4.2.1/src/layout2.h +11 -0
- bgen_limix-4.2.1/src/mem.h +18 -0
- bgen_limix-4.2.1/src/metafile.c +257 -0
- bgen_limix-4.2.1/src/metafile.h +57 -0
- bgen_limix-4.2.1/src/metafile_write.h +174 -0
- bgen_limix-4.2.1/src/partition.c +50 -0
- bgen_limix-4.2.1/src/partition.h +10 -0
- bgen_limix-4.2.1/src/platform.h +41 -0
- bgen_limix-4.2.1/src/report.c +59 -0
- bgen_limix-4.2.1/src/report.h +21 -0
- bgen_limix-4.2.1/src/samples.c +41 -0
- bgen_limix-4.2.1/src/samples.h +11 -0
- bgen_limix-4.2.1/src/strdup.c +12 -0
- bgen_limix-4.2.1/src/strdup.h +6 -0
- bgen_limix-4.2.1/src/stream.cpp +748 -0
- bgen_limix-4.2.1/src/stream.h +40 -0
- bgen_limix-4.2.1/src/unzlib.c +177 -0
- bgen_limix-4.2.1/src/unzlib.h +18 -0
- bgen_limix-4.2.1/src/unzstd.c +54 -0
- bgen_limix-4.2.1/src/unzstd.h +17 -0
- bgen_limix-4.2.1/src/variant.c +148 -0
- bgen_limix-4.2.1/src/variant.h +16 -0
- bgen_limix-4.2.1/test/.gitignore +0 -0
- bgen_limix-4.2.1/test/CMakeLists.txt +90 -0
- bgen_limix-4.2.1/test/data/complex.23bits.bgen +0 -0
- bgen_limix-4.2.1/test/data/example.14bits.bgen +0 -0
- bgen_limix-4.2.1/test/data/example.14bits.bgen.index +0 -0
- bgen_limix-4.2.1/test/data/example.14bits.bgen.metafile +0 -0
- bgen_limix-4.2.1/test/data/example.14bits.bgen.metafile.truncated +0 -0
- bgen_limix-4.2.1/test/data/example.14bits.bgen.truncated +0 -0
- bgen_limix-4.2.1/test/data/example.1bits.bgen +0 -0
- bgen_limix-4.2.1/test/data/example.1bits.bgen.index +0 -0
- bgen_limix-4.2.1/test/data/example.1bits.bgen.metafile +0 -0
- bgen_limix-4.2.1/test/data/example.32bits.bgen +0 -0
- bgen_limix-4.2.1/test/data/example.32bits.bgen.index +0 -0
- bgen_limix-4.2.1/test/data/example.32bits.bgen.metafile +0 -0
- bgen_limix-4.2.1/test/data/example.matrix +1 -0
- bgen_limix-4.2.1/test/data/example.v11.bgen +0 -0
- bgen_limix-4.2.1/test/data/example.v11.bgen.index +0 -0
- bgen_limix-4.2.1/test/data/haplotypes.bgen +0 -0
- bgen_limix-4.2.1/test/data/pbgen_example.pgen +0 -0
- bgen_limix-4.2.1/test/data/random.bgen +0 -0
- bgen_limix-4.2.1/test/data/random.bgen.metafile +0 -0
- bgen_limix-4.2.1/test/data/roundtrip1.bgen +0 -0
- bgen_limix-4.2.1/test/data/wrong.metafile +0 -0
- bgen_limix-4.2.1/test/data/zero_len_chrom_id.bgen +0 -0
- bgen_limix-4.2.1/test/run_s3_test.sh +142 -0
- bgen_limix-4.2.1/test/src/assert_interface_2.c +86 -0
- bgen_limix-4.2.1/test/src/assert_interface_3.c +232 -0
- bgen_limix-4.2.1/test/src/assert_interface_3_complex.c +180 -0
- bgen_limix-4.2.1/test/src/cass.h +146 -0
- bgen_limix-4.2.1/test/src/complex.c +271 -0
- bgen_limix-4.2.1/test/src/create_metafile.c +101 -0
- bgen_limix-4.2.1/test/src/credentials_file.c +156 -0
- bgen_limix-4.2.1/test/src/haplotype.c +172 -0
- bgen_limix-4.2.1/test/src/index.c +86 -0
- bgen_limix-4.2.1/test/src/metadata_example.c +15 -0
- bgen_limix-4.2.1/test/src/one_million.c +101 -0
- bgen_limix-4.2.1/test/src/open_genotype.c +221 -0
- bgen_limix-4.2.1/test/src/pbgen_example.c +16 -0
- bgen_limix-4.2.1/test/src/s3_open.c +95 -0
- bgen_limix-4.2.1/test/src/v12_zlib_layout2.c +242 -0
- bgen_limix-4.2.1/test/src/variant_position_overflow.c +26 -0
- bgen_limix-4.2.1/test/src/wrong_bgen_files.c +11 -0
- bgen_limix-4.2.1/test/src/wrong_metadata_files.c +12 -0
- bgen_limix-4.2.1/test/src/zero_len_chrom_id.c +40 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
Language: Cpp
|
|
3
|
+
# BasedOnStyle: LLVM
|
|
4
|
+
AccessModifierOffset: -2
|
|
5
|
+
AlignAfterOpenBracket: Align
|
|
6
|
+
AlignConsecutiveAssignments: false
|
|
7
|
+
AlignConsecutiveDeclarations: true
|
|
8
|
+
AlignEscapedNewlines: Right
|
|
9
|
+
AlignOperands: true
|
|
10
|
+
AlignTrailingComments: true
|
|
11
|
+
AllowAllParametersOfDeclarationOnNextLine: true
|
|
12
|
+
AllowShortBlocksOnASingleLine: false
|
|
13
|
+
AllowShortCaseLabelsOnASingleLine: false
|
|
14
|
+
AllowShortFunctionsOnASingleLine: All
|
|
15
|
+
AllowShortIfStatementsOnASingleLine: false
|
|
16
|
+
AllowShortLoopsOnASingleLine: false
|
|
17
|
+
AlwaysBreakAfterReturnType: None
|
|
18
|
+
AlwaysBreakBeforeMultilineStrings: false
|
|
19
|
+
AlwaysBreakTemplateDeclarations: false
|
|
20
|
+
BinPackArguments: true
|
|
21
|
+
BinPackParameters: true
|
|
22
|
+
BraceWrapping:
|
|
23
|
+
AfterClass: false
|
|
24
|
+
AfterControlStatement: false
|
|
25
|
+
AfterEnum: false
|
|
26
|
+
AfterFunction: false
|
|
27
|
+
AfterNamespace: false
|
|
28
|
+
AfterObjCDeclaration: false
|
|
29
|
+
AfterStruct: false
|
|
30
|
+
AfterUnion: false
|
|
31
|
+
AfterExternBlock: false
|
|
32
|
+
BeforeCatch: false
|
|
33
|
+
BeforeElse: false
|
|
34
|
+
IndentBraces: false
|
|
35
|
+
SplitEmptyFunction: true
|
|
36
|
+
SplitEmptyRecord: true
|
|
37
|
+
SplitEmptyNamespace: true
|
|
38
|
+
BreakBeforeBinaryOperators: None
|
|
39
|
+
BreakBeforeBraces: Mozilla
|
|
40
|
+
BreakBeforeInheritanceComma: false
|
|
41
|
+
BreakBeforeTernaryOperators: true
|
|
42
|
+
BreakConstructorInitializersBeforeComma: false
|
|
43
|
+
BreakConstructorInitializers: BeforeColon
|
|
44
|
+
BreakAfterJavaFieldAnnotations: false
|
|
45
|
+
BreakStringLiterals: true
|
|
46
|
+
ColumnLimit: 95
|
|
47
|
+
CommentPragmas: "^ IWYU pragma:"
|
|
48
|
+
CompactNamespaces: false
|
|
49
|
+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
|
50
|
+
ConstructorInitializerIndentWidth: 4
|
|
51
|
+
ContinuationIndentWidth: 4
|
|
52
|
+
Cpp11BracedListStyle: true
|
|
53
|
+
DerivePointerAlignment: false
|
|
54
|
+
DisableFormat: false
|
|
55
|
+
ExperimentalAutoDetectBinPacking: false
|
|
56
|
+
FixNamespaceComments: true
|
|
57
|
+
ForEachMacros:
|
|
58
|
+
- foreach
|
|
59
|
+
IncludeCategories:
|
|
60
|
+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
|
|
61
|
+
Priority: 2
|
|
62
|
+
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
|
|
63
|
+
Priority: 3
|
|
64
|
+
- Regex: ".*"
|
|
65
|
+
Priority: 1
|
|
66
|
+
IncludeIsMainRegex: "(Test)?$"
|
|
67
|
+
IndentCaseLabels: false
|
|
68
|
+
IndentPPDirectives: None
|
|
69
|
+
IndentWidth: 4
|
|
70
|
+
IndentWrappedFunctionNames: false
|
|
71
|
+
JavaScriptQuotes: Leave
|
|
72
|
+
JavaScriptWrapImports: true
|
|
73
|
+
KeepEmptyLinesAtTheStartOfBlocks: true
|
|
74
|
+
MacroBlockBegin: ""
|
|
75
|
+
MacroBlockEnd: ""
|
|
76
|
+
MaxEmptyLinesToKeep: 1
|
|
77
|
+
NamespaceIndentation: None
|
|
78
|
+
ObjCBlockIndentWidth: 4
|
|
79
|
+
ObjCSpaceAfterProperty: false
|
|
80
|
+
ObjCSpaceBeforeProtocolList: true
|
|
81
|
+
PenaltyBreakAssignment: 2
|
|
82
|
+
PenaltyBreakBeforeFirstCallParameter: 19
|
|
83
|
+
PenaltyBreakComment: 300
|
|
84
|
+
PenaltyBreakFirstLessLess: 120
|
|
85
|
+
PenaltyBreakString: 1000
|
|
86
|
+
PenaltyExcessCharacter: 1000000
|
|
87
|
+
PenaltyReturnTypeOnItsOwnLine: 200
|
|
88
|
+
PointerAlignment: Left
|
|
89
|
+
RawStringFormats:
|
|
90
|
+
- Language: TextProto
|
|
91
|
+
Delimiters:
|
|
92
|
+
- "pb"
|
|
93
|
+
BasedOnStyle: google
|
|
94
|
+
ReflowComments: true
|
|
95
|
+
SortIncludes: true
|
|
96
|
+
SortUsingDeclarations: true
|
|
97
|
+
SpaceAfterCStyleCast: false
|
|
98
|
+
SpaceAfterTemplateKeyword: true
|
|
99
|
+
SpaceBeforeAssignmentOperators: true
|
|
100
|
+
SpaceBeforeParens: ControlStatements
|
|
101
|
+
SpaceInEmptyParentheses: false
|
|
102
|
+
SpacesBeforeTrailingComments: 1
|
|
103
|
+
SpacesInAngles: false
|
|
104
|
+
SpacesInContainerLiterals: true
|
|
105
|
+
SpacesInCStyleCastParentheses: false
|
|
106
|
+
SpacesInParentheses: false
|
|
107
|
+
SpacesInSquareBrackets: false
|
|
108
|
+
Standard: Cpp11
|
|
109
|
+
TabWidth: 4
|
|
110
|
+
UseTab: Never
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test-c:
|
|
11
|
+
name: "C library (${{ matrix.os }}, ${{ matrix.build_type }})"
|
|
12
|
+
runs-on: ${{ matrix.os }}
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
os: [ubuntu-24.04, macos-15, windows-2025]
|
|
17
|
+
build_type: [Release, Debug]
|
|
18
|
+
include:
|
|
19
|
+
- os: ubuntu-24.04
|
|
20
|
+
sanitizers: ON
|
|
21
|
+
- os: macos-15
|
|
22
|
+
sanitizers: OFF
|
|
23
|
+
- os: windows-2025
|
|
24
|
+
sanitizers: OFF
|
|
25
|
+
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v6.0.2
|
|
28
|
+
|
|
29
|
+
- uses: prefix-dev/setup-pixi@v0.9.6
|
|
30
|
+
|
|
31
|
+
- name: Configure CMake
|
|
32
|
+
run: >
|
|
33
|
+
pixi run cmake --preset pixi
|
|
34
|
+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
|
35
|
+
-DBGEN_BUILD_TESTS=ON
|
|
36
|
+
-DBGEN_BUILD_PYTHON=OFF
|
|
37
|
+
-DBGEN_ENABLE_SANITIZERS=${{ matrix.sanitizers }}
|
|
38
|
+
|
|
39
|
+
- name: Build
|
|
40
|
+
run: pixi run cmake --build build --config ${{ matrix.build_type }}
|
|
41
|
+
|
|
42
|
+
- name: Test (Linux / macOS)
|
|
43
|
+
if: runner.os != 'Windows'
|
|
44
|
+
run: pixi run ctest --test-dir build -C ${{ matrix.build_type }} --output-on-failure
|
|
45
|
+
|
|
46
|
+
- name: Test (Windows)
|
|
47
|
+
if: runner.os == 'Windows'
|
|
48
|
+
shell: pwsh
|
|
49
|
+
run: |
|
|
50
|
+
# pixi run resets PATH; prepend Library\bin for the conda DLLs
|
|
51
|
+
# (zlib-ng, zstd, libcurl …). libstdc++ / libgcc are now statically
|
|
52
|
+
# linked via the MINGW target_link_options in CMakeLists.txt, so
|
|
53
|
+
# there is no MinGW DLL version conflict any more.
|
|
54
|
+
$pixi_bin = "${{ github.workspace }}\.pixi\envs\default\Library\bin"
|
|
55
|
+
$env:PATH = "$pixi_bin;C:\mingw64\bin;$env:PATH"
|
|
56
|
+
& "$pixi_bin\ctest.exe" --test-dir "${{ github.workspace }}\build" `
|
|
57
|
+
-C ${{ matrix.build_type }} --output-on-failure
|
|
58
|
+
test-python:
|
|
59
|
+
name: "Python (${{ matrix.os }})"
|
|
60
|
+
runs-on: ${{ matrix.os }}
|
|
61
|
+
strategy:
|
|
62
|
+
fail-fast: false
|
|
63
|
+
matrix:
|
|
64
|
+
os: [ubuntu-24.04, macos-14, windows-2022]
|
|
65
|
+
|
|
66
|
+
steps:
|
|
67
|
+
- uses: actions/checkout@v6.0.2
|
|
68
|
+
|
|
69
|
+
- uses: prefix-dev/setup-pixi@v0.9.6
|
|
70
|
+
with:
|
|
71
|
+
environments: test
|
|
72
|
+
|
|
73
|
+
- name: Build and test Python
|
|
74
|
+
run: pixi run -e test test-python
|
|
75
|
+
|
|
76
|
+
test-s3:
|
|
77
|
+
name: "S3 integration (MinIO)"
|
|
78
|
+
runs-on: ubuntu-24.04
|
|
79
|
+
|
|
80
|
+
steps:
|
|
81
|
+
- uses: actions/checkout@v6.0.2
|
|
82
|
+
|
|
83
|
+
- uses: prefix-dev/setup-pixi@v0.9.6
|
|
84
|
+
with:
|
|
85
|
+
environments: test
|
|
86
|
+
|
|
87
|
+
- name: Start MinIO server
|
|
88
|
+
run: |
|
|
89
|
+
docker run -d --name minio-ci \
|
|
90
|
+
-p 19000:9000 \
|
|
91
|
+
-e MINIO_ROOT_USER=minio_access \
|
|
92
|
+
-e MINIO_ROOT_PASSWORD=minio_secret \
|
|
93
|
+
minio/minio server /data
|
|
94
|
+
# Wait for MinIO
|
|
95
|
+
for i in $(seq 1 30); do
|
|
96
|
+
curl -sf http://127.0.0.1:19000/minio/health/live && break
|
|
97
|
+
sleep 1
|
|
98
|
+
done
|
|
99
|
+
|
|
100
|
+
- name: Upload test data to MinIO
|
|
101
|
+
env:
|
|
102
|
+
AWS_ACCESS_KEY_ID: minio_access
|
|
103
|
+
AWS_SECRET_ACCESS_KEY: minio_secret
|
|
104
|
+
AWS_DEFAULT_REGION: us-east-1
|
|
105
|
+
AWS_ENDPOINT_URL: http://127.0.0.1:19000
|
|
106
|
+
run: |
|
|
107
|
+
pip install awscli --quiet
|
|
108
|
+
aws s3 mb s3://bgen-test --endpoint-url "$AWS_ENDPOINT_URL"
|
|
109
|
+
aws s3 cp test/data/example.14bits.bgen s3://bgen-test/example.14bits.bgen \
|
|
110
|
+
--endpoint-url "$AWS_ENDPOINT_URL"
|
|
111
|
+
# Public bucket for no-sign test
|
|
112
|
+
aws s3 mb s3://bgen-public --endpoint-url "$AWS_ENDPOINT_URL"
|
|
113
|
+
aws s3api put-bucket-policy --bucket bgen-public \
|
|
114
|
+
--policy '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":"*","Action":"s3:GetObject","Resource":"arn:aws:s3:::bgen-public/*"}]}' \
|
|
115
|
+
--endpoint-url "$AWS_ENDPOINT_URL"
|
|
116
|
+
aws s3 cp test/data/example.14bits.bgen s3://bgen-public/example.14bits.bgen \
|
|
117
|
+
--endpoint-url "$AWS_ENDPOINT_URL"
|
|
118
|
+
|
|
119
|
+
- name: Configure & build (S3 enabled)
|
|
120
|
+
run: |
|
|
121
|
+
pixi run cmake --preset pixi \
|
|
122
|
+
-DCMAKE_BUILD_TYPE=Debug \
|
|
123
|
+
-DBGEN_BUILD_TESTS=ON \
|
|
124
|
+
-DBGEN_ENABLE_S3=ON
|
|
125
|
+
pixi run cmake --build build
|
|
126
|
+
|
|
127
|
+
- name: Run C S3 tests
|
|
128
|
+
env:
|
|
129
|
+
AWS_ACCESS_KEY_ID: minio_access
|
|
130
|
+
AWS_SECRET_ACCESS_KEY: minio_secret
|
|
131
|
+
AWS_DEFAULT_REGION: us-east-1
|
|
132
|
+
AWS_ENDPOINT_URL: http://127.0.0.1:19000
|
|
133
|
+
BGEN_TEST_S3_URI: s3://bgen-test/example.14bits.bgen
|
|
134
|
+
BGEN_TEST_S3_METAFILE: ${{ github.workspace }}/test/data/example.14bits.bgen.metafile
|
|
135
|
+
run: pixi run ./build/test/test_s3_open
|
|
136
|
+
|
|
137
|
+
- name: Run C S3 test (no-sign / public bucket)
|
|
138
|
+
env:
|
|
139
|
+
AWS_NO_SIGN_REQUEST: "1"
|
|
140
|
+
AWS_ENDPOINT_URL: http://127.0.0.1:19000
|
|
141
|
+
BGEN_TEST_S3_URI: s3://bgen-public/example.14bits.bgen
|
|
142
|
+
BGEN_TEST_S3_METAFILE: ${{ github.workspace }}/test/data/example.14bits.bgen.metafile
|
|
143
|
+
run: pixi run ./build/test/test_s3_open
|
|
144
|
+
|
|
145
|
+
- name: Install Python package with S3
|
|
146
|
+
run: |
|
|
147
|
+
pixi run -e test pip install --quiet "universal_pathlib>=0.2" "s3fs>=2024.1"
|
|
148
|
+
CMAKE_ARGS="-DBGEN_ENABLE_S3=ON" pixi run -e test pip install --no-build-isolation -e .
|
|
149
|
+
|
|
150
|
+
- name: Run Python S3/UPath tests
|
|
151
|
+
env:
|
|
152
|
+
BGEN_TEST_MINIO_ENDPOINT: http://127.0.0.1:19000
|
|
153
|
+
BGEN_TEST_MINIO_ACCESS: minio_access
|
|
154
|
+
BGEN_TEST_MINIO_SECRET: minio_secret
|
|
155
|
+
BGEN_TEST_S3_METAFILE: ${{ github.workspace }}/test/data/example.14bits.bgen.metafile
|
|
156
|
+
run: pixi run -e test pytest python/tests/test_s3_upath.py -v
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
name: Build wheels
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
tags: ["v*"]
|
|
7
|
+
pull_request:
|
|
8
|
+
branches: [main]
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
13
|
+
# Only cancel-in-progress if it's NOT a tag push (so automated/manual release pushes don't get canceled by subsequent commits)
|
|
14
|
+
cancel-in-progress: ${{ github.ref_type != 'tag' }}
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
build_sdist:
|
|
18
|
+
name: Build sdist
|
|
19
|
+
runs-on: ubuntu-24.04
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v6.0.2
|
|
22
|
+
|
|
23
|
+
- name: Build sdist
|
|
24
|
+
run: pipx run build --sdist
|
|
25
|
+
|
|
26
|
+
- uses: actions/upload-artifact@v7.0.1
|
|
27
|
+
with:
|
|
28
|
+
name: cibw-sdist
|
|
29
|
+
path: dist/*.tar.gz
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
build_wheels:
|
|
33
|
+
name: Wheels on ${{ matrix.label }}
|
|
34
|
+
runs-on: ${{ matrix.os }}
|
|
35
|
+
permissions:
|
|
36
|
+
contents: read
|
|
37
|
+
strategy:
|
|
38
|
+
fail-fast: false
|
|
39
|
+
matrix:
|
|
40
|
+
include:
|
|
41
|
+
- os: ubuntu-24.04
|
|
42
|
+
label: ubuntu-24.04-x86_64
|
|
43
|
+
- os: ubuntu-24.04-arm
|
|
44
|
+
label: ubuntu-24.04-aarch64
|
|
45
|
+
- os: macos-15
|
|
46
|
+
label: macos-15
|
|
47
|
+
- os: windows-2025
|
|
48
|
+
label: windows-2025
|
|
49
|
+
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/checkout@v6.0.2
|
|
52
|
+
|
|
53
|
+
- name: Build wheels
|
|
54
|
+
uses: pypa/cibuildwheel@v3.4.1
|
|
55
|
+
env:
|
|
56
|
+
# Build for CPython 3.11 only — stable ABI (abi3) wheel works for all 3.11+
|
|
57
|
+
CIBW_BUILD: "cp311-*"
|
|
58
|
+
# nanobind-backend (split mode) ships no musllinux wheels, so those builds can't install it
|
|
59
|
+
CIBW_SKIP: "*-musllinux*"
|
|
60
|
+
# Test the built wheels
|
|
61
|
+
CIBW_TEST_REQUIRES: pytest
|
|
62
|
+
CIBW_TEST_COMMAND: pytest {project}/python/tests -v
|
|
63
|
+
# macOS: build universal2 wheels on the ARM runner
|
|
64
|
+
CIBW_ARCHS_MACOS: "native"
|
|
65
|
+
# Windows: build AMD64 only
|
|
66
|
+
CIBW_ARCHS_WINDOWS: "AMD64"
|
|
67
|
+
# Install OpenSSL headers needed by fetched curl on Linux
|
|
68
|
+
CIBW_BEFORE_BUILD_LINUX: >
|
|
69
|
+
(command -v yum && yum install -y openssl-devel) ||
|
|
70
|
+
(command -v apk && apk add openssl-dev) || true
|
|
71
|
+
|
|
72
|
+
- uses: actions/upload-artifact@v7.0.1
|
|
73
|
+
with:
|
|
74
|
+
name: cibw-wheels-${{ matrix.label }}
|
|
75
|
+
path: ./wheelhouse/*.whl
|
|
76
|
+
|
|
77
|
+
publish:
|
|
78
|
+
name: Publish to PyPI
|
|
79
|
+
needs: [build_sdist, build_wheels]
|
|
80
|
+
runs-on: ubuntu-24.04
|
|
81
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
|
82
|
+
permissions:
|
|
83
|
+
id-token: write
|
|
84
|
+
|
|
85
|
+
steps:
|
|
86
|
+
- uses: actions/download-artifact@v8.0.1
|
|
87
|
+
with:
|
|
88
|
+
pattern: cibw-*
|
|
89
|
+
path: dist
|
|
90
|
+
merge-multiple: true
|
|
91
|
+
|
|
92
|
+
- uses: pypa/gh-action-pypi-publish@v1.14.0
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
.cache/
|
|
2
|
+
.ccls-cache/
|
|
3
|
+
|
|
4
|
+
compile_commands.json
|
|
5
|
+
|
|
6
|
+
.tags*
|
|
7
|
+
|
|
8
|
+
build*/
|
|
9
|
+
|
|
10
|
+
# pixi
|
|
11
|
+
.pixi/
|
|
12
|
+
pixi.lock
|
|
13
|
+
|
|
14
|
+
# Python
|
|
15
|
+
__pycache__/
|
|
16
|
+
*.py[cod]
|
|
17
|
+
*.egg-info/
|
|
18
|
+
dist/
|
|
19
|
+
*.so
|
|
20
|
+
*.pyd
|
|
21
|
+
.pytest_cache/
|
|
22
|
+
|
|
23
|
+
# Object files
|
|
24
|
+
*.o
|
|
25
|
+
*.ko
|
|
26
|
+
*.obj
|
|
27
|
+
*.elf
|
|
28
|
+
|
|
29
|
+
# Precompiled Headers
|
|
30
|
+
*.gch
|
|
31
|
+
*.pch
|
|
32
|
+
|
|
33
|
+
# Libraries
|
|
34
|
+
*.lib
|
|
35
|
+
*.a
|
|
36
|
+
*.la
|
|
37
|
+
*.lo
|
|
38
|
+
|
|
39
|
+
# Shared objects (inc. Windows DLLs)
|
|
40
|
+
*.dll
|
|
41
|
+
*.so
|
|
42
|
+
*.so.*
|
|
43
|
+
*.dylib
|
|
44
|
+
|
|
45
|
+
# Executables
|
|
46
|
+
*.exe
|
|
47
|
+
*.out
|
|
48
|
+
*.app
|
|
49
|
+
*.i*86
|
|
50
|
+
*.x86_64
|
|
51
|
+
*.hex
|
|
52
|
+
|
|
53
|
+
# Debug files
|
|
54
|
+
*.dSYM/
|
|
55
|
+
*.su
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
repos:
|
|
3
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
4
|
+
rev: v6.0.0
|
|
5
|
+
hooks:
|
|
6
|
+
- id: trailing-whitespace
|
|
7
|
+
- id: end-of-file-fixer
|
|
8
|
+
- id: check-yaml
|
|
9
|
+
- id: check-toml
|
|
10
|
+
- id: check-merge-conflict
|
|
11
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
12
|
+
rev: v0.15.15
|
|
13
|
+
hooks:
|
|
14
|
+
- id: ruff
|
|
15
|
+
args: [--fix]
|
|
16
|
+
- id: ruff-format
|
|
17
|
+
- repo: https://github.com/pre-commit/mirrors-clang-format
|
|
18
|
+
rev: v22.1.5
|
|
19
|
+
hooks:
|
|
20
|
+
- id: clang-format
|
|
21
|
+
types_or: [c, c++]
|
|
22
|
+
- repo: https://github.com/cheshirekow/cmake-format-precommit
|
|
23
|
+
rev: v0.6.13
|
|
24
|
+
hooks:
|
|
25
|
+
- id: cmake-format
|
|
26
|
+
- repo: https://github.com/rbubley/mirrors-prettier
|
|
27
|
+
rev: v3.8.3
|
|
28
|
+
hooks:
|
|
29
|
+
- id: prettier
|
|
30
|
+
types_or: [yaml, markdown]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
C library + Python bindings for BGEN format (specs 1.2 & 1.3). C11/C++17, CMake + Ninja, pixi for env management.
|
|
2
|
+
|
|
3
|
+
Build & test: `pixi run test` (runs both C and Python test suites).
|
|
4
|
+
C only: `cmake --preset pixi -DCMAKE_BUILD_TYPE=Release && cmake --build build && ctest --test-dir build`.
|
|
5
|
+
Python: `pixi run build-python && pixi run test-python`. The Python build (`python/CMakeLists.txt`, driven by scikit-build via `cmake.source-dir = "python"`) reuses a pre-installed bgen via `find_package(bgen)` when available. The bgen C library is built as a pixi package (`[package]` in `pixi.toml`) using `pixi-build-cmake`, which selects the correct platform toolchain (MSVC on Windows, clang on macOS, gcc on Linux). Running `pixi install` (done automatically by `pixi run`) builds and installs bgen into the environment before the Python build step. If no pre-built bgen is found (e.g. cibuildwheel / PyPI sdist), the Python build falls back to building the C library from source.
|
|
6
|
+
|
|
7
|
+
Key CMake options: `BGEN_ENABLE_S3` (needs libcurl + OpenSSL), `BGEN_BUILD_TESTS`.
|
|
8
|
+
System deps resolved via conda-forge (pixi): zlib-ng, zstd, almosthere, nanobind.
|
|
9
|
+
Pre-built build dirs: `build` (pixi preset), `build-s3` (S3 enabled), `build-no-s3`.
|