steclust 1.0.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.
- steclust-1.0.1/.github/workflows/build-wheels.yml +98 -0
- steclust-1.0.1/.gitignore +220 -0
- steclust-1.0.1/CMakeLists.txt +26 -0
- steclust-1.0.1/LICENSE +674 -0
- steclust-1.0.1/MANIFEST.in +20 -0
- steclust-1.0.1/PKG-INFO +81 -0
- steclust-1.0.1/README.md +58 -0
- steclust-1.0.1/pyproject.toml +48 -0
- steclust-1.0.1/steclust/__init__.py +5 -0
- steclust-1.0.1/steclust/core.py +80 -0
- steclust-1.0.1/steclust/src/space_time_energy.c +139 -0
- steclust-1.0.1/steclust/src/space_time_energy_cpu.h +5 -0
- steclust-1.0.1/steclust/steclust.py +57 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
name: Build and publish wheels
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*' # Build on version tags like v1.0.3
|
|
7
|
+
workflow_dispatch: # Allow manual builds from GitHub UI
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build_wheels:
|
|
11
|
+
name: Build wheels on ${{ matrix.os }}
|
|
12
|
+
runs-on: ${{ matrix.os }}
|
|
13
|
+
strategy:
|
|
14
|
+
matrix:
|
|
15
|
+
os: [ubuntu-latest, macos-latest]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
# 1. Setup QEMU to handle broader architecture checks if needed
|
|
21
|
+
- name: Set up QEMU
|
|
22
|
+
if: runner.os == 'Linux'
|
|
23
|
+
uses: docker/setup-qemu-action@v3
|
|
24
|
+
|
|
25
|
+
# 2. Build the exact platform wheels safely using cibuildwheel
|
|
26
|
+
- name: Build wheels
|
|
27
|
+
uses: pypa/cibuildwheel@v2.22.0
|
|
28
|
+
env:
|
|
29
|
+
# Skip alternative targets like musl linux
|
|
30
|
+
CIBW_SKIP: "cp38-* cp39-* *musllinux*"
|
|
31
|
+
|
|
32
|
+
# Target older macOS for broader user compatibility
|
|
33
|
+
MACOSX_DEPLOYMENT_TARGET: "26.0"
|
|
34
|
+
|
|
35
|
+
# Linux configurations: Install OpenMP
|
|
36
|
+
CIBW_BEFORE_ALL_LINUX: "yum install -y libgomp"
|
|
37
|
+
|
|
38
|
+
# macOS configurations: Install and link libomp natively
|
|
39
|
+
CIBW_BEFORE_ALL_MACOS: "brew install libomp"
|
|
40
|
+
CIBW_CONFIG_SETTINGS_MACOS: >-
|
|
41
|
+
cmake.args="-DOpenMP_C_FLAGS=-Xpreprocessor -fopenmp;-DOpenMP_C_LIB_NAMES=omp;-DOpenMP_omp_LIBRARY=/opt/homebrew/opt/libomp/lib/libomp.dylib;-DOpenMP_C_INCLUDE_DIR=/opt/homebrew/opt/libomp/include;-DOpenMP_CXX_FLAGS=-Xpreprocessor -fopenmp;-DOpenMP_CXX_LIB_NAMES=omp;-DOpenMP_CXX_INCLUDE_DIR=/opt/homebrew/opt/libomp/include"
|
|
42
|
+
|
|
43
|
+
- name: Upload wheel artifacts
|
|
44
|
+
uses: actions/upload-artifact@v4
|
|
45
|
+
with:
|
|
46
|
+
name: cibw-wheels-${{ matrix.os }}
|
|
47
|
+
path: ./wheelhouse/*.whl
|
|
48
|
+
|
|
49
|
+
build_source_dist:
|
|
50
|
+
name: Build source distribution
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v4
|
|
55
|
+
|
|
56
|
+
- name: Set up Python
|
|
57
|
+
uses: actions/setup-python@v5
|
|
58
|
+
with:
|
|
59
|
+
python-version: '3.12'
|
|
60
|
+
|
|
61
|
+
- name: Install dependencies
|
|
62
|
+
run: |
|
|
63
|
+
python -m pip install --upgrade pip build
|
|
64
|
+
|
|
65
|
+
- name: Build source distribution
|
|
66
|
+
run: python -m build --sdist
|
|
67
|
+
|
|
68
|
+
- name: Upload source distribution
|
|
69
|
+
uses: actions/upload-artifact@v4
|
|
70
|
+
with:
|
|
71
|
+
name: source-dist
|
|
72
|
+
path: ./dist/*.tar.gz
|
|
73
|
+
|
|
74
|
+
publish_to_pypi:
|
|
75
|
+
name: Publish verified artifacts to PyPI
|
|
76
|
+
needs: [build_wheels, build_source_dist]
|
|
77
|
+
runs-on: ubuntu-latest
|
|
78
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
79
|
+
|
|
80
|
+
steps:
|
|
81
|
+
- name: Download all build artifacts
|
|
82
|
+
uses: actions/download-artifact@v4
|
|
83
|
+
with:
|
|
84
|
+
path: pypi_dist/
|
|
85
|
+
merge-multiple: true
|
|
86
|
+
|
|
87
|
+
- name: Set up Python
|
|
88
|
+
uses: actions/setup-python@v5
|
|
89
|
+
with:
|
|
90
|
+
python-version: '3.12'
|
|
91
|
+
|
|
92
|
+
- name: Publish package distribution to PyPI
|
|
93
|
+
env:
|
|
94
|
+
TWINE_USERNAME: __token__
|
|
95
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
|
96
|
+
run: |
|
|
97
|
+
python -m pip install --upgrade pip twine
|
|
98
|
+
twine upload pypi_dist/* --skip-existing
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
*.lcov
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
# Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# uv
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# uv.lock
|
|
103
|
+
|
|
104
|
+
# poetry
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
107
|
+
# commonly ignored for libraries.
|
|
108
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
109
|
+
# poetry.lock
|
|
110
|
+
# poetry.toml
|
|
111
|
+
|
|
112
|
+
# pdm
|
|
113
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
114
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
115
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
116
|
+
# pdm.lock
|
|
117
|
+
# pdm.toml
|
|
118
|
+
.pdm-python
|
|
119
|
+
.pdm-build/
|
|
120
|
+
|
|
121
|
+
# pixi
|
|
122
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
123
|
+
# pixi.lock
|
|
124
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
125
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
126
|
+
.pixi/*
|
|
127
|
+
!.pixi/config.toml
|
|
128
|
+
|
|
129
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
130
|
+
__pypackages__/
|
|
131
|
+
|
|
132
|
+
# Celery stuff
|
|
133
|
+
celerybeat-schedule*
|
|
134
|
+
celerybeat.pid
|
|
135
|
+
|
|
136
|
+
# Redis
|
|
137
|
+
*.rdb
|
|
138
|
+
*.aof
|
|
139
|
+
*.pid
|
|
140
|
+
|
|
141
|
+
# RabbitMQ
|
|
142
|
+
mnesia/
|
|
143
|
+
rabbitmq/
|
|
144
|
+
rabbitmq-data/
|
|
145
|
+
|
|
146
|
+
# ActiveMQ
|
|
147
|
+
activemq-data/
|
|
148
|
+
|
|
149
|
+
# SageMath parsed files
|
|
150
|
+
*.sage.py
|
|
151
|
+
|
|
152
|
+
# Environments
|
|
153
|
+
.env
|
|
154
|
+
.envrc
|
|
155
|
+
.venv
|
|
156
|
+
env/
|
|
157
|
+
venv/
|
|
158
|
+
ENV/
|
|
159
|
+
env.bak/
|
|
160
|
+
venv.bak/
|
|
161
|
+
|
|
162
|
+
# Spyder project settings
|
|
163
|
+
.spyderproject
|
|
164
|
+
.spyproject
|
|
165
|
+
|
|
166
|
+
# Rope project settings
|
|
167
|
+
.ropeproject
|
|
168
|
+
|
|
169
|
+
# mkdocs/Zensical documentation
|
|
170
|
+
/site
|
|
171
|
+
|
|
172
|
+
# mypy
|
|
173
|
+
.mypy_cache/
|
|
174
|
+
.dmypy.json
|
|
175
|
+
dmypy.json
|
|
176
|
+
|
|
177
|
+
# Pyre type checker
|
|
178
|
+
.pyre/
|
|
179
|
+
|
|
180
|
+
# pytype static type analyzer
|
|
181
|
+
.pytype/
|
|
182
|
+
|
|
183
|
+
# Cython debug symbols
|
|
184
|
+
cython_debug/
|
|
185
|
+
|
|
186
|
+
# PyCharm
|
|
187
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
188
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
189
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
190
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
191
|
+
# .idea/
|
|
192
|
+
|
|
193
|
+
# Abstra
|
|
194
|
+
# Abstra is an AI-powered process automation framework.
|
|
195
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
196
|
+
# Learn more at https://abstra.io/docs
|
|
197
|
+
.abstra/
|
|
198
|
+
|
|
199
|
+
# Visual Studio Code
|
|
200
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore that
|
|
201
|
+
# can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
202
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer, you
|
|
203
|
+
# could uncomment the following to ignore the entire vscode folder
|
|
204
|
+
# .vscode/
|
|
205
|
+
# Temporary file for partial code execution
|
|
206
|
+
tempCodeRunnerFile.py
|
|
207
|
+
|
|
208
|
+
# Ruff stuff:
|
|
209
|
+
.ruff_cache/
|
|
210
|
+
|
|
211
|
+
# PyPI configuration file
|
|
212
|
+
.pypirc
|
|
213
|
+
|
|
214
|
+
# Marimo
|
|
215
|
+
marimo/_static/
|
|
216
|
+
marimo/_lsp/
|
|
217
|
+
__marimo__/
|
|
218
|
+
|
|
219
|
+
# Streamlit
|
|
220
|
+
.streamlit/secrets.toml
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.24)
|
|
2
|
+
project(steclust LANGUAGES C CXX)
|
|
3
|
+
|
|
4
|
+
# 1. Initialize Python Extension Build Support
|
|
5
|
+
find_package(Python REQUIRED COMPONENTS Development.Module)
|
|
6
|
+
|
|
7
|
+
# 2. Handle OpenMP Configuration Natively across Linux and macOS
|
|
8
|
+
find_package(OpenMP REQUIRED)
|
|
9
|
+
|
|
10
|
+
# -----------------------------------------------
|
|
11
|
+
# CPU Beamforming Engine
|
|
12
|
+
# -----------------------------------------------
|
|
13
|
+
python_add_library(space_time_energy_cpu MODULE steclust/src/space_time_energy.c)
|
|
14
|
+
|
|
15
|
+
target_compile_options(space_time_energy_cpu PRIVATE
|
|
16
|
+
-O3
|
|
17
|
+
-fPIC
|
|
18
|
+
-ftree-vectorize
|
|
19
|
+
-march=native
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
# Connect OpenMP variables natively found by CMake (handles Homebrew/venvs/Linux automatically)
|
|
23
|
+
target_link_libraries(space_time_energy_cpu PRIVATE OpenMP::OpenMP_C)
|
|
24
|
+
|
|
25
|
+
# Install into the output layout inside the destination module's lib directory
|
|
26
|
+
install(TARGETS space_time_energy_cpu DESTINATION steclust/lib)
|