Skip to content

Commit

Permalink
[gh-52] Update build requirement numpy>=2.0.0
Browse files Browse the repository at this point in the history
Update Python minimum version requirement to 3.10 for NumPy 2 build compatibility.
See [Astropy change log](https://docs.astropy.org/en/stable/changelog.html\#id25).

Update various version requirements and update change logs
  • Loading branch information
MikeSWang committed Jun 20, 2024
1 parent 548e167 commit 8e3e561
Show file tree
Hide file tree
Showing 15 changed files with 88 additions and 78 deletions.
28 changes: 14 additions & 14 deletions .devcontainer/conda-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@ channels:
- conda-forge
dependencies:
# Build dependencies
- python >=3.8
- pip >=19.1
- setuptools >=61.0.0
- setuptools_scm >=6.4.0
- cython >=0.25
- extension-helpers
- pkg-config
- python >=3.10
- pip >=22.0
- setuptools >=61.0
- setuptools_scm >=6.4
- cython >=3.0
- extension-helpers >=1.1
- gsl >=2.7
- fftw >=3
- fftw >=3.3
- libgomp
- llvm-openmp
- pkg-config
# Runtime dependencies
- numpy >=1.17
- scipy >=1.6
- sympy
- numpy >=1.23
- scipy >=1.13
- sympy >=1.12.1
- astropy >=4.2
- pyyaml >4
- pyyaml >=5.1
- tqdm
# Test dependencies
- flake8
- pytest
- flake8 >=4.0
- pytest >=7.0
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ to help explain your problem.

- Package version (e.g. 1.0.0)
- OS (e.g. Linux, macOS)
- Python version (e.g. 3.8) and environment (e.g. Conda)
- Python version (e.g. 3.9) and environment (e.g. Conda)
- C++ compiler version (e.g. GCC ``g++``, LLVM Clang++) and dependency
libraries (e.g. ``libgomp``, ``libomp``)

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/installation-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ from the installation process.

- Package version (e.g. 1.0.0)
- OS (e.g. Linux, macOS)
- Python version (e.g. 3.8) and environment (e.g. Conda)
- Python version (e.g. 3.9) and environment (e.g. Conda)
- C++ compiler version (e.g. GCC g++, LLVM clang++) and dependency
libraries (e.g. ``libgomp``, ``libomp``)

Expand Down
1 change: 1 addition & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ receiving security updates.

| Version | Supported |
| ------- | ------------------ |
| 0.4.x | :white_check_mark: |
| 0.3.x | :white_check_mark: |
| < 0.3 | :x: |

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ jobs:
env:
recipe_dir: deploy/pkg/conda_recipe
output_dir: dist/
variants: "{'python': ['3.8', '3.9', '3.10', '3.11', '3.12']}"
variants: "{'python': ['3.9', '3.10', '3.11', '3.12']}"
run: |
# Create output directory if non-existent.
if [[ ! -d ${output_dir} ]]; then mkdir -p ${output_dir}; fi
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd_xp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ jobs:
env:
recipe_dir: deploy/pkg/conda_recipe_xp
output_dir: dist_arm64/
variants: "{'python': ['3.8', '3.9', '3.10', '3.11', '3.12']}"
variants: "{'python': ['3.9', '3.10', '3.11', '3.12']}"
run: |
# Create output directory if non-existent.
if [[ ! -d ${output_dir} ]]; then mkdir -p ${output_dir}; fi
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

- Fix FFTW-related memory leaks.

- Fix asymmetric 2-dimensional three-point clustering statistics.

### Features

- Add public API for Hankel-like transforms using the FFTLog algorithm
Expand Down Expand Up @@ -42,6 +44,8 @@
### Maintenance

- Require C++17 standard.
- Upgrade build against NumPy 2 and require Python 3.10+
([gh-52](https://github.com/MikeSWang/Triumvirate/issues/52)).
- Refactor logger message emission.
- Enhance build recipes.
- Update syntax and fix typos.
Expand Down Expand Up @@ -71,7 +75,7 @@ in [``threept.cpp``](src/triumvirate/src/threept.cpp).

- Add more forms of three-point statistics including the off-diagonal and
full form (the original 'full' form is renamed to 'row')
([#22](https://github.com/MikeSWang/Triumvirate/issues/22)).
([gh-22](https://github.com/MikeSWang/Triumvirate/issues/22)).

### Improvements

Expand Down
2 changes: 1 addition & 1 deletion deploy/pkg/autorel_anaconda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if [[ ! -d ${DIST_DIR} ]]; then mkdir -p ${DIST_DIR}; fi
conda build purge
conda build --strict-verify --no-anaconda-upload ${RECIPE_DIR} \
--output-folder ${DIST_DIR} \
--variants "{'python': ['3.8', '3.9', '3.10', '3.11', '3.12']}"
--variants "{'python': ['3.9', '3.10', '3.11', '3.12']}"

# Transmute compression formats.
find ${DIST_DIR} -name "*.tar.bz2" \
Expand Down
30 changes: 15 additions & 15 deletions deploy/pkg/conda_recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{% set name = 'Triumvirate' %}
{% set version = environ.get('GIT_DESCRIBE_TAG', 'v0.3.0') %}
{% set version = environ.get('GIT_DESCRIBE_TAG', 'v0.4.0') %}

package:
name: "{{ name|lower }}"
version: {{ version|trim('v') }}

source:
git_url: ../../../
# git_rev: v0.3.0
# git_rev: v0.4.0
# path: ../../../

build:
Expand All @@ -29,30 +29,30 @@ requirements:
build:
- {{ compiler('cxx') }}
host:
- python
- pip >=19.1
- python >=3.10
- pip >=22.0
# Use Conda-provided libraries.
- gsl >=2.7
- fftw >=3
- fftw >=3.3
- libgomp # [linux]
- llvm-openmp # [osx]
- setuptools >=61.0.0
- setuptools_scm >=6.4.0
- cython >=0.25
- extension-helpers
- numpy >=1.17,<2
- setuptools >=61.0
- setuptools_scm >=6.4
- cython >=3.0
- extension-helpers >=1.1
- numpy >=2.0
run:
- python >=3.8
- python >=3.10
- {{ pin_compatible("numpy") }}
- scipy >=1.6
- sympy
- scipy >=1.13
- sympy >=1.12.1
- astropy >=4.2
- pyyaml >4
- pyyaml >=5.1
- tqdm

test:
requires:
- pytest
- pytest >=7.0
source_files:
- tests/
commands:
Expand Down
36 changes: 18 additions & 18 deletions deploy/pkg/conda_recipe_xp/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{% set name = 'Triumvirate' %}
{% set version = environ.get('GIT_DESCRIBE_TAG', 'v0.3.0') %}
{% set version = environ.get('GIT_DESCRIBE_TAG', 'v0.4.0') %}

package:
name: "{{ name|lower }}"
version: {{ version|trim('v') }}

source:
git_url: ../../../
# git_rev: v0.3.0
# git_rev: v0.4.0
# path: ../../../

build:
Expand All @@ -27,35 +27,35 @@ build:

requirements:
build:
- python # [build_platform != target_platform]
- cross-python_{{ target_platform }} # [build_platform != target_platform]
- numpy >=1.17,<2 # [build_platform != target_platform]
- {{ compiler('cxx') }}
- python >=3.10 # [build_platform != target_platform]
- cross-python_{{ target_platform }} # [build_platform != target_platform]
- numpy >=2.0 # [build_platform != target_platform]
host:
- python
- pip >=19.1
- python >=3.10
- pip >=22.0
# Use Conda-provided libraries.
- gsl >=2.7
- fftw >=3
- fftw >=3.3
- libgomp # [linux]
- llvm-openmp # [osx]
- setuptools >=61.0.0
- setuptools_scm >=6.4.0
- cython >=0.25
- extension-helpers
- numpy >=1.17,<2
- setuptools >=61.0
- setuptools_scm >=6.4
- cython >=3.0
- extension-helpers >=1.1
- numpy >=2.0
run:
- python >=3.8
- python >=3.10
- {{ pin_compatible("numpy") }}
- scipy >=1.6
- sympy
- scipy >=1.13
- sympy >=1.12.1
- astropy >=4.2
- pyyaml >4
- pyyaml >=5.1
- tqdm

test:
requires:
- pytest # [build_platform == target_platform]
- pytest >=7.0 # [build_platform == target_platform]
source_files:
- tests/
commands:
Expand Down
6 changes: 5 additions & 1 deletion docs/source/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Bug fixes

- Fix FFTW-related memory leaks.

- Fix asymmetric 2-dimensional three-point clustering statistics.

Features
--------

Expand Down Expand Up @@ -49,6 +51,8 @@ Maintenance
-----------

- Require C++17 standard.
- Upgrade build against NumPy 2 and require Python 3.10+
(`gh-52 <https://github.com/MikeSWang/Triumvirate/issues/52>`_).
- Refactor logger message emission.
- Enhance build recipes.
- Update syntax and fix typos.
Expand Down Expand Up @@ -83,7 +87,7 @@ Features

- Add more forms of three-point statistics including the off-diagonal and
full form (the original 'full' form is renamed to 'row')
(`#22 <https://github.com/MikeSWang/Triumvirate/issues/22>`_).
(`gh-22 <https://github.com/MikeSWang/Triumvirate/issues/22>`_).

Improvements
------------
Expand Down
24 changes: 12 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[build-system]
requires = [
'setuptools>=61.0.0',
'setuptools_scm>=6.4.0',
'Cython>=0.25',
'extension-helpers',
'oldest-supported-numpy',
'setuptools>=61.0',
'setuptools_scm>=6.4',
'Cython>=3.0',
'extension-helpers>=1.1',
'numpy>=2.0',
]
build-backend = 'setuptools.build_meta'

Expand All @@ -13,13 +13,13 @@ name = 'Triumvirate'
authors = [{name = 'Mike S Wang'}, {name = 'Naonori S Sugiyama'}]
maintainers = [{name = 'Mike S Wang', email = "mikeshengbo.wang@ed.ac.uk"}]
license = {file = "LICENCE"}
requires-python = '>=3.8'
requires-python = '>=3.10'
dependencies = [
'numpy>=1.17,<2',
'scipy>=1.6',
'sympy',
'numpy>=1.23',
'scipy>=1.13',
'sympy>=1.12.1',
'astropy>=4.2',
'pyyaml>4',
'pyyaml>=5.1',
'tqdm',
]
description = "Three-point clustering measurements in large-scale structure analyses."
Expand Down Expand Up @@ -73,7 +73,7 @@ exclude = [
[tool.setuptools_scm]

[tool.pytest.ini_options]
minversion = '6.0'
minversion = '7.0'
addopts = "--full-trace --verbose --capture=no --runslow"
testpaths = [
"tests",
Expand All @@ -90,7 +90,7 @@ skip = [
'*_s390x',
]
environment = { PY_BUILD_PARALLEL='-j', SYSTEM_VERSION_COMPAT='0' }
test-requires = "pytest"
test-requires = "pytest>=7.0"
test-command = "pytest {project}/tests"

manylinux-x86_64-image = 'manylinux_2_28'
Expand Down
21 changes: 11 additions & 10 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,19 @@ package_dir=
=src
packages = find:
include_package_data = True
python_requires = >=3.8
python_requires = >=3.10
setup_requires =
setuptools>=61.0.0
setuptools_scm>=6.4.0
Cython>=0.25
oldest-supported-numpy
setuptools>=61.0
setuptools_scm>=6.4
Cython>=3.0
extension-helpers>=1.1
numpy>=2.0
install_requires =
numpy>=1.17,<2
scipy>=1.6
sympy
numpy>=1.23
scipy>=1.13
sympy>=1.12.1
astropy>=4.2
pyyaml>4
pyyaml>=5.1
tqdm

[options.extras_require]
Expand Down Expand Up @@ -70,7 +71,7 @@ triumvirate.resources =
*.yml

[tool:pytest]
minversion = 6.0
minversion = 7.0
addopts = --full-trace --verbose --capture=no --runslow
testpaths =
tests
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ def cleanup_options(*args):
# ========================================================================

CYTHON_DIRECTIVES = {
'language_level': '3',
# 'language_level': '3', # DEPRECATED: not required for cython>=3.0
'c_string_encoding': 'utf-8',
'embedsignature': True,
}
Expand Down
2 changes: 1 addition & 1 deletion src/triumvirate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@
try:
__version__ = version('triumvirate')
except PackageNotFoundError:
__version__ = '0.3.0' # UPDATE: fallback version number
__version__ = '0.4.0' # UPDATE: fallback version number

0 comments on commit 8e3e561

Please sign in to comment.