Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
c905a54
python/ Remove requirements_dev.txt
MLopez-Ibanez Oct 16, 2025
31dc582
python/pyproject.toml (tool.cibuildwheel): Replace test-groups by tes…
MLopez-Ibanez Oct 16, 2025
6f81cdf
* update.bib.sh: Simplify code. Remove ids field.
MLopez-Ibanez Oct 16, 2025
7c77c19
.pre-commit-config.yaml: Fix roxygenize hook.
MLopez-Ibanez Oct 16, 2025
281fd3c
.pre-commit-config.yaml: Fix roxygenize hook.
MLopez-Ibanez Oct 16, 2025
c070f6d
Improve documentation of `generate_ndset()` in R and Python
MLopez-Ibanez Oct 16, 2025
e651367
* python/pyproject.toml: Build universal2 for macos, native wheels f…
MLopez-Ibanez Oct 17, 2025
9767862
* python/benchmarks/bench_ndom.py: Make sure that numba is available.
MLopez-Ibanez Oct 17, 2025
3f3dee9
* .github/workflows/python.yml: Build wheels for windows_arm64.
MLopez-Ibanez Oct 17, 2025
b9170b6
.github/workflows/python.yml: Use Python 3.11 for Windows ARM64.
MLopez-Ibanez Oct 17, 2025
a7507ed
.github/workflows/python.yml: Simplify.
MLopez-Ibanez Oct 17, 2025
1664f36
python/doc/source/whatsnew/index.rst: Document new wheels.
MLopez-Ibanez Oct 17, 2025
6ec7c6e
* python/src/moocore/_ffi_build.py: Build C code with /arch:AVX on W…
MLopez-Ibanez Oct 17, 2025
29936d3
python/src/moocore/_ffi_build.py: Add /DMOOCORE_SHARED_LIB to MSVC_CF…
MLopez-Ibanez Oct 17, 2025
7c3602e
pyproject.toml: Run abi3audit on wheels.
MLopez-Ibanez Oct 17, 2025
10b2405
enabled abi3audit
MLopez-Ibanez Oct 17, 2025
f725313
Bump cibuildwheel to v3.2.1
MLopez-Ibanez Oct 17, 2025
7da3108
Initial plan
Copilot Oct 17, 2025
c69566e
Fix limited-API (abi3) wheels configuration
Copilot Oct 17, 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
22 changes: 22 additions & 0 deletions .github/windows_arm64_steps/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build Dependencies(Win-ARM64)
description: "Setup LLVM for Win-ARM64 builds"
# https://github.com/numpy/numpy-release/blob/295d6a70a867972774ff05ae98d7a560a659e2b4/.github/windows_arm64_steps/action.yml

runs:
using: "composite"
steps:
- name: Install LLVM with checksum verification
shell: pwsh
run: |
Invoke-WebRequest https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.6/LLVM-20.1.6-woa64.exe -UseBasicParsing -OutFile LLVM-woa64.exe
$expectedHash = "92f69a1134e32e54b07d51c6e24d9594852f6476f32c3d70471ae00fffc2d462"
$fileHash = (Get-FileHash -Path "LLVM-woa64.exe" -Algorithm SHA256).Hash
if ($fileHash -ne $expectedHash) {
Write-Error "Checksum verification failed. The downloaded file may be corrupted or tampered with."
exit 1
}
Start-Process -FilePath ".\LLVM-woa64.exe" -ArgumentList "/S" -Wait
echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "CC=clang-cl" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "CXX=clang-cl" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "FC=flang-new" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
39 changes: 17 additions & 22 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,11 @@ jobs:
run: python3 -m build
working-directory: python

# This is needed for publishing to PyPI
- name: Publish artifacts
uses: actions/upload-artifact@v4
with:
name: moocore-wheels-${{ matrix.os }}-${{ matrix.python-version }}
name: moocore-wheels-sdist-${{ matrix.os }}-${{ matrix.python-version }}
path: python/dist/*.tar.gz

build-doc:
Expand All @@ -120,7 +121,6 @@ jobs:
with:
python-version: '3.10'
cache: 'pip'
cache-dependency-path: '**/requirements_dev.txt'

- name: Ensure Pip and Build
run: |
Expand All @@ -131,13 +131,8 @@ jobs:
run: python3 -m build
working-directory: python

- name: install the package
run: python3 -m pip install .
working-directory: python

- name: install the doc build requirements
run: |
python3 -m pip install -r requirements_dev.txt
- name: Install the package and the doc build requirements
run: python3 -m pip install .[docs]
working-directory: python

- name: Build the docs 🔧
Expand All @@ -161,7 +156,6 @@ jobs:
name: Coverage ${{ matrix.os }} (${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
# When set to true, GitHub cancels all in-progress jobs if any matrix job fails.
matrix:
os: [ubuntu-latest]
python-version: ['3.10']
Expand Down Expand Up @@ -203,10 +197,15 @@ jobs:
matrix:
# FIXME: add windows-11-arm and ubuntu-24.04-arm
# https://github.com/scipy/scipy/blob/6b79a4dec1f9ca2db4e49c328d04d293880991c6/.github/workflows/wheels.yml#L78
# macos-14 is apple silicon
os: [ubuntu-22.04, windows-2025, macos-14]
# https://github.com/numpy/numpy-release/blob/main/.github/workflows/wheels.yml
# macos-14 is Apple Silicon (arm64), but we build an universal2 wheel.
# The configuration of cibuildwheel can be found in pyproject.toml
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2025, macos-14]
python-version: ['3.10']
CIBW_ARCHS_MACOS: ['universal2']
include:
# 3.11 is the earliest version on windows-arm
- os: windows-11-arm
python-version: "3.11"

steps:
- uses: actions/checkout@v5
Expand All @@ -215,18 +214,14 @@ jobs:
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Setup LLVM for Windows ARM64 (NOT WORKING/FIXME)
if: ${{ matrix.os == 'windows-11-arm' }}
uses: ./.github/windows_arm64_steps

- name: Build wheels
uses: pypa/cibuildwheel@v2.23.3
env:
CIBW_ARCHS_MACOS: ${{ matrix.CIBW_ARCHS_MACOS }}
CIBW_TEST_SKIP: ${{ matrix.CIBW_TEST_SKIP }}
uses: pypa/cibuildwheel@v3.2.1
with:
package-dir: python
output-dir: wheelhouse
Expand Down
7 changes: 5 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ repos:
- id: no-print-statement
- id: no-debug-statement
- id: deps-in-desc
args: [--root=r/]
args: [--root=./r/]
exclude: '(do\.R|vignettes/articles/.+\.Rmd)'
- id: roxygenize
args: [--root=<R package root>]
args: [--root=./r/]
additional_dependencies:
- doctest
- Rdpack

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
Expand Down
2 changes: 1 addition & 1 deletion python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pre-commit:
pre-commit run -a

docdeps:
python3 -m pip install -r requirements_dev.txt --disable-pip-version-check --quiet
python3 -m pip install .[docs] --disable-pip-version-check --quiet

show:
$(MAKE) -C doc show
Expand Down
4 changes: 2 additions & 2 deletions python/benchmarks/bench_ndom.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def get_dataset(name):
z, maximise=True, keep_weakly=False
),
"botorch": lambda z: botorch_is_nondominated(z, deduplicate=True),
"paretoset": lambda z: paretoset(
"paretoset (numba)": lambda z: paretoset(
z, sense=z.shape[1] * ["max"], distinct=True, use_numba=True
),
},
Expand Down Expand Up @@ -116,7 +116,7 @@ def get_dataset(name):
"botorch": lambda z: bool2pos(
botorch_is_nondominated(z, deduplicate=False)
),
"paretoset": lambda z: bool2pos(
"paretoset (numba)": lambda z: bool2pos(
paretoset(
z,
sense=z.shape[1] * ["max"],
Expand Down
13 changes: 7 additions & 6 deletions python/benchmarks/python-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
botorch
cpuinfo
desdeo
jmetal
matplotlib
nevergrad
numba
numpy
pandas
matplotlib
botorch
pymoo
jmetal
desdeo
paretoset
nevergrad
pymoo
16 changes: 10 additions & 6 deletions python/doc/source/REFERENCES.bib
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,7 @@ @article{DiaLop2020ejor

@article{DubLopStu2011amai,
author = { J{\'e}r{\'e}mie Dubois-Lacoste and Manuel L{\'o}pez-Ib{\'a}{\~n}ez and Thomas St{\"u}tzle },
title = {Improving the Anytime Behavior of Two-Phase Local
Search},
title = {Improving the Anytime Behavior of Two-Phase Local Search},
journal = {Annals of Mathematics and Artificial Intelligence},
year = 2011,
volume = 61,
Expand Down Expand Up @@ -233,7 +232,8 @@ @article{GueFonPaq2021hv
year = 2021,
volume = 54,
number = 6,
pages = {1--42}
pages = {1--42},
doi = {10.1145/3453474}
}

@article{HerWer1987tabucol,
Expand Down Expand Up @@ -296,6 +296,9 @@ @article{LopVerDreDoe2025
Single-objective Black-box Optimization Algorithms},
journal = {IEEE Transactions on Evolutionary Computation},
year = 2025,
volume = 29,
number = 5,
pages = {1774--1782},
annote = {Pre-print: \url{https://doi.org/10.48550/arXiv.2404.02031}},
doi = {10.1109/TEVC.2024.3462758},
abstract = {A widely accepted way to assess the performance of iterative
Expand Down Expand Up @@ -366,10 +369,11 @@ @article{ZitThiLauFon2003:tec
year = 2003,
volume = 7,
number = 2,
amonth = apr,
pages = {117--132},
doi = {10.1109/TEVC.2003.810758},
annote = {Proposed the combination of quality indicators; proposed epsilon-indicator}
annote = {Proposed the combination of quality indicators; proposed
epsilon-indicator},
amonth = apr,
doi = {10.1109/TEVC.2003.810758}
}

@incollection{AugBadBroZit2009gecco,
Expand Down
9 changes: 7 additions & 2 deletions python/doc/source/whatsnew/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,20 @@ What's new
Version 0.1.9 (dev)
-------------------

- :func:`~moocore.hv_contributions` ignores dominated points by default. Set ``ignore_dominated=False`` to restore the previous behavior. The 3D case uses the HVC3D algorithm.
- :func:`~moocore.hv_contributions` ignores dominated points by default.
Set ``ignore_dominated=False`` to restore the previous behavior.
The 3D case uses the HVC3D algorithm.
- New function :func:`~moocore.any_dominated` to quickly detect if a set is
nondominated.
- New function :func:`~moocore.generate_ndset` to generate random nondominated
sets with different shapes.
- New example :ref:`sphx_glr_auto_examples_plot_generate.py`.
- :func:`~moocore.is_nondominated`, :func:`~moocore.any_dominated`, :func:`~moocore.pareto_rank` now handle single-objective inputs correctly (:issue:`27`, :issue:`29`).
- :func:`~moocore.is_nondominated`, :func:`~moocore.any_dominated`,
:func:`~moocore.pareto_rank` now handle single-objective inputs correctly (:issue:`27`, :issue:`29`).
- Ranks returned by :func:`~moocore.pareto_rank` are 0-based.
- :func:`~moocore.is_nondominated` and :func:`~moocore.filter_dominated` are faster for dimensions larger than 3.
- ``moocore`` wheels are now built for ``aarch64`` (ARM64) in Linux and Windows.
See the `installation instructions <https://github.com/multi-objective/moocore/tree/main/python#install>`_.

Version 0.1.8 (15/07/2025)
--------------------------
Expand Down
34 changes: 17 additions & 17 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,45 +86,45 @@ skip = [
"*_ppc64le",
"*_s390x",
"*_i686", # Skip 32-bit builds
"cp313t-*",
"cp314t-*", # Skip free-threaded builds
]
build-verbosity = 2
# Will cause the wheel to be installed with these groups of dependencies
test-groups = [ "test" ]
# Will cause the wheel to be installed with these optional-dependencies
test-extras = [ "test" ]
test-command = [
"pytest --doctest-modules --doctest-continue-on-failure {package}/tests {package}/src/moocore/_moocore.py",
]
test-skip = "*-*linux_{aarch64,ppc64le,s390x}"
#test-skip = "*-*linux_{aarch64,ppc64le,s390x}"

[tool.cibuildwheel.linux]
archs = [
"x86_64",
# "aarch64", FAILS doctests
]
archs = [ "native" ]
manylinux-x86_64-image = "manylinux_2_28"
manylinux-aarch64-image = "manylinux_2_28"
musllinux-x86_64-image = "musllinux_1_2"
musllinux-aarch64-image = "musllinux_1_2"
# Use abi3audit to catch issues with Limited API wheels
before-build = "pip install abi3audit"
repair-wheel-command = [
"auditwheel repair -w {dest_dir} {wheel}",
# "pipx run abi3audit --verbose --strict --report {wheel}",
"abi3audit --verbose --strict --report {wheel}",
]

[tool.cibuildwheel.windows]
archs = [
"AMD64",
]
archs = [ "native" ]
# Use delvewheel on windows
before-build = "pip install delvewheel"
before-build = "pip install delvewheel abi3audit"
repair-wheel-command = [
"delvewheel repair -w {dest_dir} {wheel}",
# "pipx run abi3audit --verbose --strict --report {wheel}",
"abi3audit --verbose --strict --report {wheel}",
]

[tool.cibuildwheel.macos]
archs = [
"universal2",
]
archs = [ "universal2" ]
before-build = "pip install abi3audit"
repair-wheel-command = [
"delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}",
# "pipx run abi3audit --verbose --strict --report {wheel}",
"abi3audit --verbose --strict --report {wheel}",
]

[tool.ruff]
Expand Down
32 changes: 0 additions & 32 deletions python/requirements_dev.txt

This file was deleted.

16 changes: 9 additions & 7 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel


class bdist_wheel_abi_none(_bdist_wheel):
class bdist_wheel_abi3(_bdist_wheel):
def finalize_options(self):
_bdist_wheel.finalize_options(self)
self.root_is_pure = False

def get_tag(self):
_python, _abi, plat = _bdist_wheel.get_tag(self)
return "py3", "none", plat
# Automatically detect py_limited_api from extension modules
if not self.py_limited_api:
for ext in self.distribution.ext_modules or []:
if getattr(ext, "py_limited_api", False):
# Use cp310 as the minimum Python version for abi3
self.py_limited_api = "cp310"
break


setup(
cffi_modules=["src/moocore/_ffi_build.py:ffibuilder"],
cmdclass={"bdist_wheel": bdist_wheel_abi_none},
cmdclass={"bdist_wheel": bdist_wheel_abi3},
)
Loading
Loading