diff --git a/.devcontainer/conda-env.yml b/.devcontainer/conda-env.yml index 952e1bdf..9218a47c 100644 --- a/.devcontainer/conda-env.yml +++ b/.devcontainer/conda-env.yml @@ -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 diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 4944c9b9..05a9cead 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -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``) diff --git a/.github/ISSUE_TEMPLATE/installation-issue.md b/.github/ISSUE_TEMPLATE/installation-issue.md index 530f777f..81bd53a4 100644 --- a/.github/ISSUE_TEMPLATE/installation-issue.md +++ b/.github/ISSUE_TEMPLATE/installation-issue.md @@ -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``) diff --git a/.github/SECURITY.md b/.github/SECURITY.md index 9223e44f..ec4728cd 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -7,6 +7,7 @@ receiving security updates. | Version | Supported | | ------- | ------------------ | +| 0.4.x | :white_check_mark: | | 0.3.x | :white_check_mark: | | < 0.3 | :x: | diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 62d2a236..e59bb9a0 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -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 diff --git a/.github/workflows/cd_xp.yml b/.github/workflows/cd_xp.yml index 6d54ed7e..715fdbd7 100644 --- a/.github/workflows/cd_xp.yml +++ b/.github/workflows/cd_xp.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 309a7212..efdd5228 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -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. @@ -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 diff --git a/deploy/pkg/autorel_anaconda.sh b/deploy/pkg/autorel_anaconda.sh index 8817a5b3..fe625471 100644 --- a/deploy/pkg/autorel_anaconda.sh +++ b/deploy/pkg/autorel_anaconda.sh @@ -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" \ diff --git a/deploy/pkg/conda_recipe/meta.yaml b/deploy/pkg/conda_recipe/meta.yaml index 7e2d70fb..69f59cc5 100644 --- a/deploy/pkg/conda_recipe/meta.yaml +++ b/deploy/pkg/conda_recipe/meta.yaml @@ -1,5 +1,5 @@ {% 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 }}" @@ -7,7 +7,7 @@ package: source: git_url: ../../../ - # git_rev: v0.3.0 + # git_rev: v0.4.0 # path: ../../../ build: @@ -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: diff --git a/deploy/pkg/conda_recipe_xp/meta.yaml b/deploy/pkg/conda_recipe_xp/meta.yaml index 7aff8d67..201a60d1 100644 --- a/deploy/pkg/conda_recipe_xp/meta.yaml +++ b/deploy/pkg/conda_recipe_xp/meta.yaml @@ -1,5 +1,5 @@ {% 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 }}" @@ -7,7 +7,7 @@ package: source: git_url: ../../../ - # git_rev: v0.3.0 + # git_rev: v0.4.0 # path: ../../../ build: @@ -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: diff --git a/docs/source/releases.rst b/docs/source/releases.rst index 265bfde9..30a53e4b 100644 --- a/docs/source/releases.rst +++ b/docs/source/releases.rst @@ -13,6 +13,8 @@ Bug fixes - Fix FFTW-related memory leaks. +- Fix asymmetric 2-dimensional three-point clustering statistics. + Features -------- @@ -49,6 +51,8 @@ Maintenance ----------- - Require C++17 standard. +- Upgrade build against NumPy 2 and require Python 3.10+ + (`gh-52 `_). - Refactor logger message emission. - Enhance build recipes. - Update syntax and fix typos. @@ -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 `_). + (`gh-22 `_). Improvements ------------ diff --git a/pyproject.toml b/pyproject.toml index 8f541d9e..0fc1bd81 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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' @@ -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." @@ -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", @@ -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' diff --git a/setup.cfg b/setup.cfg index 3f9e6b70..dc1c464d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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] @@ -70,7 +71,7 @@ triumvirate.resources = *.yml [tool:pytest] -minversion = 6.0 +minversion = 7.0 addopts = --full-trace --verbose --capture=no --runslow testpaths = tests diff --git a/setup.py b/setup.py index 6f050972..e66c1f3e 100755 --- a/setup.py +++ b/setup.py @@ -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, } diff --git a/src/triumvirate/__init__.py b/src/triumvirate/__init__.py index 4d3becfb..11ea8b6b 100644 --- a/src/triumvirate/__init__.py +++ b/src/triumvirate/__init__.py @@ -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