Skip to content
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b64ea51
Rename test yml.
alicjapolanska Nov 14, 2025
db38287
Remove tests for debugging
alicjapolanska Nov 14, 2025
159bb05
First draft of new build for automatic release
alicjapolanska Nov 14, 2025
fa31370
Update Python version and add more contributors
alicjapolanska Nov 14, 2025
d3514ea
Specify python version
alicjapolanska Nov 14, 2025
4c680d6
Correct typo
alicjapolanska Nov 14, 2025
d7080b6
Change version control to dynamic controlled by release tags
alicjapolanska Nov 14, 2025
9b70079
Add publishing to test pypi check
alicjapolanska Nov 21, 2025
3aba255
Add verbose option
alicjapolanska Nov 21, 2025
f373f3c
Add automatic version tracking
alicjapolanska Nov 21, 2025
7169f39
Add detuptools_scm config
alicjapolanska Nov 21, 2025
10c8754
Correct typo and add to requirements
alicjapolanska Nov 21, 2025
861c27c
Add options to setuptools_scm to remove local version
alicjapolanska Nov 21, 2025
69da8e4
Remove ubuntu for testing purposes
alicjapolanska Nov 21, 2025
dc35f86
Test test pypi project name
alicjapolanska Nov 21, 2025
35c21be
Go back to standard name
alicjapolanska Nov 24, 2025
5496eab
Add back tests
alicjapolanska Nov 24, 2025
70cd6c7
Add back ubuntu wheels
alicjapolanska Nov 24, 2025
3074caf
Add back pypi
alicjapolanska Nov 24, 2025
5ba5955
Remove test branch
alicjapolanska Nov 24, 2025
33df149
Update .github/workflows/build.yml
alicjapolanska Nov 24, 2025
85c3e92
Update .github/workflows/build.yml
alicjapolanska Nov 25, 2025
9486e61
Remove tests for debugging
alicjapolanska Nov 25, 2025
140a17b
Add source dist
alicjapolanska Nov 25, 2025
fed52eb
Merge branch 'automatic_release' of github.com:astro-informatics/harm…
alicjapolanska Nov 25, 2025
177f372
Add back branch for testing
alicjapolanska Nov 25, 2025
d58d609
Add back tests
alicjapolanska Nov 25, 2025
2018b61
Remove test branch
alicjapolanska Nov 25, 2025
acfef2f
Update .github/workflows/build.yml
alicjapolanska Nov 26, 2025
e90cd33
Require sdist for pypi upload
alicjapolanska Nov 26, 2025
c79f9b8
Add version file to gitignore
alicjapolanska Nov 26, 2025
8ef1d9d
Add GW and SDDR papers
alicjapolanska Nov 26, 2025
5b6adc1
Switch to new spelling
alicjapolanska Nov 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Adapted from example at
# https://github.com/pypa/cibuildwheel/blob/0319c431dedc020eb/examples/github-deploy.yml
#
# Original license:
#
# This project is licensed under the 'BSD 2-clause license'.
#
# Copyright (c) 2017-2023, Joe Rickerby and contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

name: Build (and upload to PyPI for published releases)

on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- automatic_release
release:
types:
- published

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v5.0.0
with:
fetch-depth: 0
fetch-tags: true
- name: Build wheels
uses: pypa/cibuildwheel@v3.1.4
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

upload_test_pypi:
needs: [build_wheels]
runs-on: ubuntu-latest
environment: test-pypi
permissions:
id-token: write
if: |
(github.event_name == 'release' && github.event.action == 'published') ||
(github.event_name == 'push' && github.ref == 'refs/heads/main')
steps:
- uses: actions/download-artifact@v5
with:
# Unpack all CIBW artifacts (wheels + sdist) into dist/
# pypa/gh-action-pypi-publish action uploads contents of dist/ unconditionally
pattern: cibw-*
path: dist
merge-multiple: true
# Try publishing to Test PyPI first - if there are issues this should
# cause job to fail before attempting to publish on PyPI itself
- name: Publish package distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
verbose: true

upload_pypi:
needs: [build_wheels, upload_test_pypi]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v5
with:
pattern: cibw-*
path: dist
merge-multiple: true
- name: Publish package distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
File renamed without changes.
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[build-system]
requires = ["setuptools", "wheel", "numpy", "Cython"]
build-backend = "setuptools.build_meta"
requires = ["setuptools", "setuptools-scm", "wheel", "numpy", "Cython"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
local_scheme = "no-local-version"
write_to = "harmonic/_version.py"
Copy link

Copilot AI Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pyproject.toml should include a [tool.cibuildwheel] section to configure which Python versions to build wheels for. Without explicit configuration, cibuildwheel will use its defaults which may not match your supported versions (3.11-3.13). Add:

[tool.cibuildwheel]
build = "cp311-* cp312-* cp313-*"
skip = "*-musllinux_*"  # Optional: skip musl builds if not needed
Suggested change
write_to = "harmonic/_version.py"
write_to = "harmonic/_version.py"
[tool.cibuildwheel]
build = "cp311-* cp312-* cp313-*"
skip = "*-musllinux_*" # Optional: skip musl builds if not needed

Copilot uses AI. Check for mistakes.
1 change: 1 addition & 0 deletions requirements/requirements-core.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
numpy
setuptools==68.0.0
setuptools-scm
wheel==0.41.0
cython>=0.29.30
ipython>=8.4.0
Expand Down
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ def read_file(file):

setup(
classifiers=[
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
],
python_requires='>=3.11, <3.14',
name="harmonic",
version="1.3.0",
prefix=".",
url="https://github.com/astro-informatics/harmonic",
author="Jason D. McEwen, Alicja Polanska, Christopher G. R. Wallis, Matthew A. Price, Matthew M. Docherty & Contributors",
author="Jason D. McEwen, Alicja Polanska, Christopher G. R. Wallis, Matthew A. Price, Matthew M. Docherty, Kiyam Lin, Zixiao Hu & Contributors",
author_email="jason.mcewen@ucl.ac.uk",
license="GNU General Public License v3 (GPLv3)",
install_requires=required,
Expand All @@ -60,6 +60,7 @@ def read_file(file):
include_package_data=True,
package_data={"harmonic": ["default-logging-config.yaml"]},
cmdclass={"build_ext": build_ext},
dynamic = ["version",],
ext_modules=cythonize(
[
Extension(
Expand Down
Loading