From 1acc9f00a679dee29278f8ba9e248edfe1bcebcf Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Mon, 6 Jul 2026 12:28:11 -0500 Subject: [PATCH 01/15] build has been overhauled --- .github/enable_sigma.cmake | 1 - CMakeLists.txt | 136 +++++++----------- cmake/get_nwx_cmake.cmake | 72 ++++++++-- .../include}/integrals/integrals.hpp | 0 .../include}/integrals/integrals_mm.hpp | 0 .../include}/integrals/property_types.hpp | 0 .../integrals/ao_integrals/ao_integrals.hpp | 0 .../ao_integrals/ao_integrals_driver.cpp | 0 .../integrals/ao_integrals/coulomb_metric.cpp | 0 .../integrals/ao_integrals/df_integral.cpp | 0 .../ao_integrals/j_density_fitted.cpp | 0 .../integrals/ao_integrals/j_four_center.cpp | 0 .../ao_integrals/k_density_fitted.cpp | 0 .../integrals/ao_integrals/k_four_center.cpp | 0 .../uq_atom_symm_blocked_driver.cpp | 0 .../src}/integrals/ao_integrals/uq_driver.cpp | 0 .../src/integrals}/export_integrals.cpp | 2 +- cxx/src/integrals/export_integrals.hpp | 30 ++++ .../src/integrals}/export_property_types.hpp | 4 +- {src => cxx/src}/integrals/integrals_mm.cpp | 0 .../src}/integrals/libint/analytic_error.cpp | 0 .../libint/black_box_primitive_estimator.cpp | 0 .../cauchy_schwarz_primitive_estimator.cpp | 0 .../integrals/libint/detail_/fill_tensor.hpp | 0 .../libint/detail_/get_basis_sets.hpp | 0 .../integrals/libint/detail_/libint_op.hpp | 0 .../integrals/libint/detail_/make_engine.hpp | 0 .../libint/detail_/make_libint_basis_set.hpp | 0 .../detail_/primitive_pair_estimators.hpp | 0 .../integrals/libint/detail_/shells2ord.hpp | 0 {src => cxx/src}/integrals/libint/libint.cpp | 0 {src => cxx/src}/integrals/libint/libint.hpp | 0 .../src}/integrals/libint/libint_visitor.hpp | 0 .../integrals/libint/primitive_contractor.cpp | 0 .../libint/primitive_error_model.cpp | 0 .../libint/primitive_normalization.cpp | 0 .../integrals/libint/raw_primitive_eris.cpp | 0 .../src}/integrals/uncertain_types.hpp | 0 .../integrals/utils/decontract_basis_set.cpp | 0 .../src}/integrals/utils/get_permutations.hpp | 0 .../utils/primitive_index_helpers.hpp | 0 .../src}/integrals/utils/rank2_shell_norm.hpp | 0 .../utils/screen_primitive_pairs.cpp | 0 .../utils/uncertainty_reductions.hpp | 0 {src => cxx/src}/integrals/utils/utils.hpp | 0 pyproject.toml | 51 +++++++ version.txt | 1 - 47 files changed, 194 insertions(+), 103 deletions(-) delete mode 100644 .github/enable_sigma.cmake rename {include => cxx/include}/integrals/integrals.hpp (100%) rename {include => cxx/include}/integrals/integrals_mm.hpp (100%) rename {include => cxx/include}/integrals/property_types.hpp (100%) rename {src => cxx/src}/integrals/ao_integrals/ao_integrals.hpp (100%) rename {src => cxx/src}/integrals/ao_integrals/ao_integrals_driver.cpp (100%) rename {src => cxx/src}/integrals/ao_integrals/coulomb_metric.cpp (100%) rename {src => cxx/src}/integrals/ao_integrals/df_integral.cpp (100%) rename {src => cxx/src}/integrals/ao_integrals/j_density_fitted.cpp (100%) rename {src => cxx/src}/integrals/ao_integrals/j_four_center.cpp (100%) rename {src => cxx/src}/integrals/ao_integrals/k_density_fitted.cpp (100%) rename {src => cxx/src}/integrals/ao_integrals/k_four_center.cpp (100%) rename {src => cxx/src}/integrals/ao_integrals/uq_atom_symm_blocked_driver.cpp (100%) rename {src => cxx/src}/integrals/ao_integrals/uq_driver.cpp (100%) rename {src/python => cxx/src/integrals}/export_integrals.cpp (96%) create mode 100644 cxx/src/integrals/export_integrals.hpp rename {src/python => cxx/src/integrals}/export_property_types.hpp (88%) rename {src => cxx/src}/integrals/integrals_mm.cpp (100%) rename {src => cxx/src}/integrals/libint/analytic_error.cpp (100%) rename {src => cxx/src}/integrals/libint/black_box_primitive_estimator.cpp (100%) rename {src => cxx/src}/integrals/libint/cauchy_schwarz_primitive_estimator.cpp (100%) rename {src => cxx/src}/integrals/libint/detail_/fill_tensor.hpp (100%) rename {src => cxx/src}/integrals/libint/detail_/get_basis_sets.hpp (100%) rename {src => cxx/src}/integrals/libint/detail_/libint_op.hpp (100%) rename {src => cxx/src}/integrals/libint/detail_/make_engine.hpp (100%) rename {src => cxx/src}/integrals/libint/detail_/make_libint_basis_set.hpp (100%) rename {src => cxx/src}/integrals/libint/detail_/primitive_pair_estimators.hpp (100%) rename {src => cxx/src}/integrals/libint/detail_/shells2ord.hpp (100%) rename {src => cxx/src}/integrals/libint/libint.cpp (100%) rename {src => cxx/src}/integrals/libint/libint.hpp (100%) rename {src => cxx/src}/integrals/libint/libint_visitor.hpp (100%) rename {src => cxx/src}/integrals/libint/primitive_contractor.cpp (100%) rename {src => cxx/src}/integrals/libint/primitive_error_model.cpp (100%) rename {src => cxx/src}/integrals/libint/primitive_normalization.cpp (100%) rename {src => cxx/src}/integrals/libint/raw_primitive_eris.cpp (100%) rename {src => cxx/src}/integrals/uncertain_types.hpp (100%) rename {src => cxx/src}/integrals/utils/decontract_basis_set.cpp (100%) rename {src => cxx/src}/integrals/utils/get_permutations.hpp (100%) rename {src => cxx/src}/integrals/utils/primitive_index_helpers.hpp (100%) rename {src => cxx/src}/integrals/utils/rank2_shell_norm.hpp (100%) rename {src => cxx/src}/integrals/utils/screen_primitive_pairs.cpp (100%) rename {src => cxx/src}/integrals/utils/uncertainty_reductions.hpp (100%) rename {src => cxx/src}/integrals/utils/utils.hpp (100%) create mode 100644 pyproject.toml delete mode 100644 version.txt diff --git a/.github/enable_sigma.cmake b/.github/enable_sigma.cmake deleted file mode 100644 index d6120ba5..00000000 --- a/.github/enable_sigma.cmake +++ /dev/null @@ -1 +0,0 @@ -set(ENABLE_SIGMA ON) diff --git a/CMakeLists.txt b/CMakeLists.txt index db4b4c8b..038988e3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2022 NWChemEx-Project +# Copyright 2026 NWChemEx-Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,105 +14,67 @@ cmake_minimum_required(VERSION 3.14) -# Downloads common CMake modules used throughout NWChemEx +# Downloads common CMake modules used throughout NWChemEx. Included before +# project() so nwx_set_version() is available to compute the version. include(cmake/get_nwx_cmake.cmake) - -#Sets the version to whatever git thinks it is -include(get_version_from_git) -get_version_from_git(integrals_version "${CMAKE_CURRENT_LIST_DIR}") +# Version from scikit-build-core (wheels/sdists) or the latest git tag. +include(nwx_set_version) +nwx_set_version(integrals_version "${CMAKE_CURRENT_LIST_DIR}") project(integrals VERSION "${integrals_version}" LANGUAGES CXX) -set(CMAKE_CXX_STANDARD 20) - -include(get_cmaize) -include(nwx_cxx_api_docs) - -### Paths ### -set(INTEGRALS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src") -set(INTEGRALS_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include") -set(INTEGRALS_TESTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tests") - -nwx_cxx_api_docs("${INTEGRALS_SOURCE_DIR}" "${INTEGRALS_INCLUDE_DIR}") - -### Options ### -cmaize_option_list( - BUILD_TESTING OFF "Should we build the tests?" - BUILD_PYBIND11_PYBINDINGS ON "Build pybind11 python3 bindings?" - ENABLE_SIGMA OFF "Should we enable Sigma for uncertainty tracking?" - INTEGRALS_ENABLE_OPENMP OFF "Should we enable OpenMP for threading?" -) +include(disable_in_source_builds) +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_SCAN_FOR_MODULES OFF) -cmaize_find_or_build_dependency( - simde - URL github.com/NWChemEx/SimDE - BUILD_TARGET simde - FIND_TARGET nwx::simde - CMAKE_ARGS BUILD_TESTING=OFF - BUILD_PYBIND11_PYBINDINGS=${BUILD_PYBIND11_PYBINDINGS} - ENABLE_SIGMA=${ENABLE_SIGMA} -) +option(BUILD_TESTING "Whether to build the unit tests" OFF) +option(BUILD_PYBIND11_BINDINGS "Build Python bindings via pybind11" ON) +option(INTEGRALS_ENABLE_OPENMP "Enable OpenMP for threading?" OFF) -cmaize_find_or_build_dependency( - Libint2 - URL https://github.com/evaleev/libint/releases/download/v2.11.0/libint-2.11.0.tgz - BUILD_TARGET libint2 - FIND_TARGET Libint2::int2 - CMAKE_ARGS ENABLE_FORTRAN=OFF - ENABLE_MPFR=OFF - LIBINT2_PYTHON=OFF -) +# Documentation target (no-op unless BUILD_DOCS is on) +include(nwx_cxx_api_docs) +nwx_cxx_api_docs("cxx/include" "cxx/src") -set(project_depends Libint2 simde) +### Dependencies ### +include(get_dependencies) +get_dependencies(simde libint2) -if("${INTEGRALS_ENABLE_OPENMP}") -find_package(OpenMP REQUIRED) -list(APPEND project_depends OpenMP::OpenMP_CXX) +set(integrals_private_depends libint2) +if(INTEGRALS_ENABLE_OPENMP) + find_package(OpenMP REQUIRED COMPONENTS CXX) + list(APPEND integrals_private_depends OpenMP::OpenMP_CXX) endif() -cmaize_add_library( - ${PROJECT_NAME} - SOURCE_DIR "${INTEGRALS_SOURCE_DIR}/${PROJECT_NAME}" - INCLUDE_DIRS "${INTEGRALS_INCLUDE_DIR}/${PROJECT_NAME}" - DEPENDS "${project_depends}" -) - -cmaize_add_executable( - primitive_error_models - SOURCE_DIR "examples/primitive_error_models" - DEPENDS "${PROJECT_NAME}" -) - -include(nwx_pybind11) -nwx_add_pybind11_module( - ${PROJECT_NAME} - SOURCE_DIR "${INTEGRALS_SOURCE_DIR}/python" - DEPENDS "${PROJECT_NAME}" -) - -if("${BUILD_TESTING}") - set(CXX_TEST_DIR ${INTEGRALS_TESTS_DIR}/cxx/) - set(PYTHON_TEST_DIR ${INTEGRALS_TESTS_DIR}/python) - - cmaize_find_or_build_dependency( - Catch2 - URL github.com/catchorg/Catch2 - BUILD_TARGET Catch2 - FIND_TARGET Catch2::Catch2 - VERSION v3.6.0 +### Library ### +# simde is a PUBLIC dep (appears in integrals' public headers); libint2 and +# OpenMP are implementation details (PRIVATE). +include(nwx_library) +nwx_library(${PROJECT_NAME} "cxx/include" "cxx/src" + simde PRIVATE ${integrals_private_depends}) + +### Python bindings (no-op unless BUILD_PYBIND11_BINDINGS is on) ### +include(nwx_python_module) +nwx_python_module(${PROJECT_NAME} "cxx/src") + +### Tests ### +if(BUILD_TESTING) + include(catch2_tests_from_dir) + catch2_tests_from_dir( + "test_unit_${PROJECT_NAME}" + "tests/cxx/unit/${PROJECT_NAME}" + ${PROJECT_NAME} ${NWX_DEP_TARGET_libint2} + PRIVATE_INCLUDES "cxx/src" ) - cmaize_add_tests( - test_unit_integrals - SOURCE_DIR "${CXX_TEST_DIR}/unit/${PROJECT_NAME}" - INCLUDE_DIRS "${INTEGRALS_SOURCE_DIR}/${PROJECT_NAME}" - DEPENDS Catch2 ${PROJECT_NAME} + # Demonstration executable exercised alongside the tests. + add_executable(primitive_error_models + examples/primitive_error_models/main.cpp ) + target_link_libraries(primitive_error_models PRIVATE ${PROJECT_NAME}) - nwx_pybind11_tests( - py_integrals "${PYTHON_TEST_DIR}/unit_tests/test_integrals.py" - SUBMODULES pluginplay chemist tensorwrapper parallelzone simde + include(nwx_python_test) + nwx_python_test( + py_unit_test_${PROJECT_NAME} + "${CMAKE_CURRENT_LIST_DIR}/tests/python/unit_tests/test_integrals.py" ) endif() - -cmaize_add_package(${PROJECT_NAME} NAMESPACE nwx::) diff --git a/cmake/get_nwx_cmake.cmake b/cmake/get_nwx_cmake.cmake index c99674d9..9188ad48 100644 --- a/cmake/get_nwx_cmake.cmake +++ b/cmake/get_nwx_cmake.cmake @@ -1,4 +1,4 @@ -# Copyright 2024 NWChemEx-Project +# Copyright 2024 NWChemEx Community # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,18 +14,66 @@ include_guard() +# Puts the shared NWXCMake modules on CMAKE_MODULE_PATH. This runs *before* +# project() so factored helpers (e.g. nwx_set_version) are available to feed +# project(VERSION ...). +# +# Resolution order: +# 1. A pip-installed `nwxcmake` package (query it for its cmake/ dir). An +# editable install (`pip install -e /path/to/NWXCMake`) points at a local +# working copy, so NWXCMake edits are picked up with no git push. +# 2. Fallback: FetchContent from github.com/NWChemEx/NWXCMake. macro(get_nwx_cmake) - include(FetchContent) - FetchContent_Declare( - nwx_cmake - GIT_REPOSITORY https://github.com/NWChemEx/NWXCMake - ) - FetchContent_MakeAvailable(nwx_cmake) - set( - CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${nwx_cmake_SOURCE_DIR}/cmake" - CACHE STRING "" - FORCE - ) + if(NOT _NWX_CMAKE_MODULE_DIR) + # find_package(Python) needs no enabled language, so it is safe here, + # before project(). Request only the interpreter to avoid a dev/compiler + # probe this early. + find_package(Python QUIET COMPONENTS Interpreter) + + set(_gnc_local_dir "") + if(Python_Interpreter_FOUND) + execute_process( + COMMAND "${Python_EXECUTABLE}" -c + "import nwxcmake,sys;sys.stdout.write(nwxcmake.cmake_dir())" + OUTPUT_VARIABLE _gnc_local_dir + OUTPUT_STRIP_TRAILING_WHITESPACE + RESULT_VARIABLE _gnc_rc + ERROR_QUIET + ) + if(NOT _gnc_rc EQUAL 0) + set(_gnc_local_dir "") + endif() + endif() + + if(_gnc_local_dir AND IS_DIRECTORY "${_gnc_local_dir}") + message(STATUS + "NWXCMake: using local pip package at ${_gnc_local_dir}" + ) + set(_gnc_resolved "${_gnc_local_dir}") + else() + message(STATUS + "NWXCMake: pip package not found; fetching from git" + ) + include(FetchContent) + FetchContent_Declare( + nwx_cmake + GIT_REPOSITORY https://github.com/NWChemEx/NWXCMake + ) + FetchContent_MakeAvailable(nwx_cmake) + set(_gnc_resolved "${nwx_cmake_SOURCE_DIR}/cmake") + endif() + + # Cache the resolved directory (not CMAKE_MODULE_PATH itself) so + # reconfigures are stable. Clear this var (or the build dir) to + # re-resolve after switching between the pip and git sources. + set(_NWX_CMAKE_MODULE_DIR "${_gnc_resolved}" + CACHE INTERNAL "Resolved NWXCMake module directory" + ) + endif() + + # Prepend so NWXCMake modules win; set in the caller's scope (macro), do not + # FORCE-cache CMAKE_MODULE_PATH (avoids accumulating stale entries). + list(PREPEND CMAKE_MODULE_PATH "${_NWX_CMAKE_MODULE_DIR}") endmacro() get_nwx_cmake() diff --git a/include/integrals/integrals.hpp b/cxx/include/integrals/integrals.hpp similarity index 100% rename from include/integrals/integrals.hpp rename to cxx/include/integrals/integrals.hpp diff --git a/include/integrals/integrals_mm.hpp b/cxx/include/integrals/integrals_mm.hpp similarity index 100% rename from include/integrals/integrals_mm.hpp rename to cxx/include/integrals/integrals_mm.hpp diff --git a/include/integrals/property_types.hpp b/cxx/include/integrals/property_types.hpp similarity index 100% rename from include/integrals/property_types.hpp rename to cxx/include/integrals/property_types.hpp diff --git a/src/integrals/ao_integrals/ao_integrals.hpp b/cxx/src/integrals/ao_integrals/ao_integrals.hpp similarity index 100% rename from src/integrals/ao_integrals/ao_integrals.hpp rename to cxx/src/integrals/ao_integrals/ao_integrals.hpp diff --git a/src/integrals/ao_integrals/ao_integrals_driver.cpp b/cxx/src/integrals/ao_integrals/ao_integrals_driver.cpp similarity index 100% rename from src/integrals/ao_integrals/ao_integrals_driver.cpp rename to cxx/src/integrals/ao_integrals/ao_integrals_driver.cpp diff --git a/src/integrals/ao_integrals/coulomb_metric.cpp b/cxx/src/integrals/ao_integrals/coulomb_metric.cpp similarity index 100% rename from src/integrals/ao_integrals/coulomb_metric.cpp rename to cxx/src/integrals/ao_integrals/coulomb_metric.cpp diff --git a/src/integrals/ao_integrals/df_integral.cpp b/cxx/src/integrals/ao_integrals/df_integral.cpp similarity index 100% rename from src/integrals/ao_integrals/df_integral.cpp rename to cxx/src/integrals/ao_integrals/df_integral.cpp diff --git a/src/integrals/ao_integrals/j_density_fitted.cpp b/cxx/src/integrals/ao_integrals/j_density_fitted.cpp similarity index 100% rename from src/integrals/ao_integrals/j_density_fitted.cpp rename to cxx/src/integrals/ao_integrals/j_density_fitted.cpp diff --git a/src/integrals/ao_integrals/j_four_center.cpp b/cxx/src/integrals/ao_integrals/j_four_center.cpp similarity index 100% rename from src/integrals/ao_integrals/j_four_center.cpp rename to cxx/src/integrals/ao_integrals/j_four_center.cpp diff --git a/src/integrals/ao_integrals/k_density_fitted.cpp b/cxx/src/integrals/ao_integrals/k_density_fitted.cpp similarity index 100% rename from src/integrals/ao_integrals/k_density_fitted.cpp rename to cxx/src/integrals/ao_integrals/k_density_fitted.cpp diff --git a/src/integrals/ao_integrals/k_four_center.cpp b/cxx/src/integrals/ao_integrals/k_four_center.cpp similarity index 100% rename from src/integrals/ao_integrals/k_four_center.cpp rename to cxx/src/integrals/ao_integrals/k_four_center.cpp diff --git a/src/integrals/ao_integrals/uq_atom_symm_blocked_driver.cpp b/cxx/src/integrals/ao_integrals/uq_atom_symm_blocked_driver.cpp similarity index 100% rename from src/integrals/ao_integrals/uq_atom_symm_blocked_driver.cpp rename to cxx/src/integrals/ao_integrals/uq_atom_symm_blocked_driver.cpp diff --git a/src/integrals/ao_integrals/uq_driver.cpp b/cxx/src/integrals/ao_integrals/uq_driver.cpp similarity index 100% rename from src/integrals/ao_integrals/uq_driver.cpp rename to cxx/src/integrals/ao_integrals/uq_driver.cpp diff --git a/src/python/export_integrals.cpp b/cxx/src/integrals/export_integrals.cpp similarity index 96% rename from src/python/export_integrals.cpp rename to cxx/src/integrals/export_integrals.cpp index ce3139c4..2907b5f8 100644 --- a/src/python/export_integrals.cpp +++ b/cxx/src/integrals/export_integrals.cpp @@ -14,10 +14,10 @@ * limitations under the License. */ +#include "export_integrals.hpp" #include "export_property_types.hpp" #include #include -#include namespace integrals { diff --git a/cxx/src/integrals/export_integrals.hpp b/cxx/src/integrals/export_integrals.hpp new file mode 100644 index 00000000..e4ab543e --- /dev/null +++ b/cxx/src/integrals/export_integrals.hpp @@ -0,0 +1,30 @@ +/* + * Copyright 2026 NWChemEx-Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once +#include +#include + +namespace integrals { + +using python_module_type = pybind11::module_; + +using python_module_reference = python_module_type&; + +template +using python_class_type = pybind11::class_; + +} // namespace integrals diff --git a/src/python/export_property_types.hpp b/cxx/src/integrals/export_property_types.hpp similarity index 88% rename from src/python/export_property_types.hpp rename to cxx/src/integrals/export_property_types.hpp index f7033a62..08a429b5 100644 --- a/src/python/export_property_types.hpp +++ b/cxx/src/integrals/export_property_types.hpp @@ -14,12 +14,14 @@ * limitations under the License. */ +#pragma once +#include "export_integrals.hpp" #include #include namespace integrals { -inline void export_property_types(auto& m) { +inline void export_property_types(python_module_reference m) { using namespace integrals::property_types; EXPORT_PROPERTY_TYPE(DecontractBasisSet, m); diff --git a/src/integrals/integrals_mm.cpp b/cxx/src/integrals/integrals_mm.cpp similarity index 100% rename from src/integrals/integrals_mm.cpp rename to cxx/src/integrals/integrals_mm.cpp diff --git a/src/integrals/libint/analytic_error.cpp b/cxx/src/integrals/libint/analytic_error.cpp similarity index 100% rename from src/integrals/libint/analytic_error.cpp rename to cxx/src/integrals/libint/analytic_error.cpp diff --git a/src/integrals/libint/black_box_primitive_estimator.cpp b/cxx/src/integrals/libint/black_box_primitive_estimator.cpp similarity index 100% rename from src/integrals/libint/black_box_primitive_estimator.cpp rename to cxx/src/integrals/libint/black_box_primitive_estimator.cpp diff --git a/src/integrals/libint/cauchy_schwarz_primitive_estimator.cpp b/cxx/src/integrals/libint/cauchy_schwarz_primitive_estimator.cpp similarity index 100% rename from src/integrals/libint/cauchy_schwarz_primitive_estimator.cpp rename to cxx/src/integrals/libint/cauchy_schwarz_primitive_estimator.cpp diff --git a/src/integrals/libint/detail_/fill_tensor.hpp b/cxx/src/integrals/libint/detail_/fill_tensor.hpp similarity index 100% rename from src/integrals/libint/detail_/fill_tensor.hpp rename to cxx/src/integrals/libint/detail_/fill_tensor.hpp diff --git a/src/integrals/libint/detail_/get_basis_sets.hpp b/cxx/src/integrals/libint/detail_/get_basis_sets.hpp similarity index 100% rename from src/integrals/libint/detail_/get_basis_sets.hpp rename to cxx/src/integrals/libint/detail_/get_basis_sets.hpp diff --git a/src/integrals/libint/detail_/libint_op.hpp b/cxx/src/integrals/libint/detail_/libint_op.hpp similarity index 100% rename from src/integrals/libint/detail_/libint_op.hpp rename to cxx/src/integrals/libint/detail_/libint_op.hpp diff --git a/src/integrals/libint/detail_/make_engine.hpp b/cxx/src/integrals/libint/detail_/make_engine.hpp similarity index 100% rename from src/integrals/libint/detail_/make_engine.hpp rename to cxx/src/integrals/libint/detail_/make_engine.hpp diff --git a/src/integrals/libint/detail_/make_libint_basis_set.hpp b/cxx/src/integrals/libint/detail_/make_libint_basis_set.hpp similarity index 100% rename from src/integrals/libint/detail_/make_libint_basis_set.hpp rename to cxx/src/integrals/libint/detail_/make_libint_basis_set.hpp diff --git a/src/integrals/libint/detail_/primitive_pair_estimators.hpp b/cxx/src/integrals/libint/detail_/primitive_pair_estimators.hpp similarity index 100% rename from src/integrals/libint/detail_/primitive_pair_estimators.hpp rename to cxx/src/integrals/libint/detail_/primitive_pair_estimators.hpp diff --git a/src/integrals/libint/detail_/shells2ord.hpp b/cxx/src/integrals/libint/detail_/shells2ord.hpp similarity index 100% rename from src/integrals/libint/detail_/shells2ord.hpp rename to cxx/src/integrals/libint/detail_/shells2ord.hpp diff --git a/src/integrals/libint/libint.cpp b/cxx/src/integrals/libint/libint.cpp similarity index 100% rename from src/integrals/libint/libint.cpp rename to cxx/src/integrals/libint/libint.cpp diff --git a/src/integrals/libint/libint.hpp b/cxx/src/integrals/libint/libint.hpp similarity index 100% rename from src/integrals/libint/libint.hpp rename to cxx/src/integrals/libint/libint.hpp diff --git a/src/integrals/libint/libint_visitor.hpp b/cxx/src/integrals/libint/libint_visitor.hpp similarity index 100% rename from src/integrals/libint/libint_visitor.hpp rename to cxx/src/integrals/libint/libint_visitor.hpp diff --git a/src/integrals/libint/primitive_contractor.cpp b/cxx/src/integrals/libint/primitive_contractor.cpp similarity index 100% rename from src/integrals/libint/primitive_contractor.cpp rename to cxx/src/integrals/libint/primitive_contractor.cpp diff --git a/src/integrals/libint/primitive_error_model.cpp b/cxx/src/integrals/libint/primitive_error_model.cpp similarity index 100% rename from src/integrals/libint/primitive_error_model.cpp rename to cxx/src/integrals/libint/primitive_error_model.cpp diff --git a/src/integrals/libint/primitive_normalization.cpp b/cxx/src/integrals/libint/primitive_normalization.cpp similarity index 100% rename from src/integrals/libint/primitive_normalization.cpp rename to cxx/src/integrals/libint/primitive_normalization.cpp diff --git a/src/integrals/libint/raw_primitive_eris.cpp b/cxx/src/integrals/libint/raw_primitive_eris.cpp similarity index 100% rename from src/integrals/libint/raw_primitive_eris.cpp rename to cxx/src/integrals/libint/raw_primitive_eris.cpp diff --git a/src/integrals/uncertain_types.hpp b/cxx/src/integrals/uncertain_types.hpp similarity index 100% rename from src/integrals/uncertain_types.hpp rename to cxx/src/integrals/uncertain_types.hpp diff --git a/src/integrals/utils/decontract_basis_set.cpp b/cxx/src/integrals/utils/decontract_basis_set.cpp similarity index 100% rename from src/integrals/utils/decontract_basis_set.cpp rename to cxx/src/integrals/utils/decontract_basis_set.cpp diff --git a/src/integrals/utils/get_permutations.hpp b/cxx/src/integrals/utils/get_permutations.hpp similarity index 100% rename from src/integrals/utils/get_permutations.hpp rename to cxx/src/integrals/utils/get_permutations.hpp diff --git a/src/integrals/utils/primitive_index_helpers.hpp b/cxx/src/integrals/utils/primitive_index_helpers.hpp similarity index 100% rename from src/integrals/utils/primitive_index_helpers.hpp rename to cxx/src/integrals/utils/primitive_index_helpers.hpp diff --git a/src/integrals/utils/rank2_shell_norm.hpp b/cxx/src/integrals/utils/rank2_shell_norm.hpp similarity index 100% rename from src/integrals/utils/rank2_shell_norm.hpp rename to cxx/src/integrals/utils/rank2_shell_norm.hpp diff --git a/src/integrals/utils/screen_primitive_pairs.cpp b/cxx/src/integrals/utils/screen_primitive_pairs.cpp similarity index 100% rename from src/integrals/utils/screen_primitive_pairs.cpp rename to cxx/src/integrals/utils/screen_primitive_pairs.cpp diff --git a/src/integrals/utils/uncertainty_reductions.hpp b/cxx/src/integrals/utils/uncertainty_reductions.hpp similarity index 100% rename from src/integrals/utils/uncertainty_reductions.hpp rename to cxx/src/integrals/utils/uncertainty_reductions.hpp diff --git a/src/integrals/utils/utils.hpp b/cxx/src/integrals/utils/utils.hpp similarity index 100% rename from src/integrals/utils/utils.hpp rename to cxx/src/integrals/utils/utils.hpp diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..b04d291d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,51 @@ +# Copyright 2026 NWChemEx-Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[build-system] +requires = [ + "scikit-build-core>=0.10", + "pybind11", + "setuptools-scm>=8", + "nwchemex-nwxcmake @ git+https://github.com/NWChemEx/NWXCMake", +] +build-backend = "scikit_build_core.build" + +[project] +name = "nwchemex-integrals" +dynamic = ["version"] +description = "Integral evaluation modules for the NWChemEx ecosystem" +license = { text = "Apache-2.0" } +requires-python = ">=3.8" +dependencies = [ + "nwchemex-simde", +] + +[project.optional-dependencies] +dev = ["pytest"] + +[tool.scikit-build] +metadata.version.provider = "scikit_build_core.metadata.setuptools_scm" +cmake.build-type = "Release" +cmake.args = ["-DBUILD_PYBIND11_BINDINGS=ON", "-DBUILD_TESTING=OFF"] +# All installed content comes from the CMake install; no pure-Python packages. +wheel.packages = [] +build-dir = "build" + +[tool.setuptools_scm] +fallback_version = "0.0.0" + +# For editable (developer) installs, also build the tests. +[[tool.scikit-build.overrides]] +if.state = "editable" +cmake.args = ["-DBUILD_PYBIND11_BINDINGS=ON", "-DBUILD_TESTING=ON"] diff --git a/version.txt b/version.txt deleted file mode 100644 index 3eefcb9d..00000000 --- a/version.txt +++ /dev/null @@ -1 +0,0 @@ -1.0.0 From 44caae8629829b23ef732ddf424f132773a66c61 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Mon, 6 Jul 2026 22:18:38 -0500 Subject: [PATCH 02/15] code factorization --- CMakeLists.txt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 038988e3..130dff0a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,11 +24,7 @@ nwx_set_version(integrals_version "${CMAKE_CURRENT_LIST_DIR}") project(integrals VERSION "${integrals_version}" LANGUAGES CXX) include(disable_in_source_builds) -set(CMAKE_CXX_STANDARD 20) -set(CMAKE_CXX_SCAN_FOR_MODULES OFF) - -option(BUILD_TESTING "Whether to build the unit tests" OFF) -option(BUILD_PYBIND11_BINDINGS "Build Python bindings via pybind11" ON) +include(set_default_nwx_options) option(INTEGRALS_ENABLE_OPENMP "Enable OpenMP for threading?" OFF) # Documentation target (no-op unless BUILD_DOCS is on) From 0715056cb4e630232093711100e298065b345cb6 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Tue, 7 Jul 2026 14:33:19 -0500 Subject: [PATCH 03/15] ignore macos files --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index b57d034a..c9931024 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,6 @@ Release/ # Users commonly store their specific CMake settings in a toolchain file toolchain.cmake + +# MacOS files +.DS_Store \ No newline at end of file From 2710614f2cb4a710556d93efb6da391195b647ba Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Fri, 10 Jul 2026 12:43:52 -0500 Subject: [PATCH 04/15] Migrate to fork-tested CI/CD + TestPyPI publish infrastructure Retarget cmake/get_nwx_cmake.cmake and pyproject.toml's build-system dependency to ryanmrichard/NWXCMake@build_overhaul. Switch pull_request and merge workflows from NWChemEx/.github + test_nwx_library.yaml to ryanmrichard/.github + test_nwx_cmake_build.yaml, trigger on build_overhaul instead of master, and add the platform_matrix -> build_pypi_dist -> deploy_to_pypi job chain (TestPyPI), matching the pattern already validated on simde/chemist/tensorwrapper. Convert the Sigma and OpenMP test jobs from the old repo_toolchain CMake-toolchain-file mechanism (test_nwx_library.yaml only) to plain cmake_opts, since test_nwx_cmake_build.yaml has no toolchain-file input and both options are just CMake bools. The referenced enable_sigma.cmake toolchain file never existed in this repo, so that job was silently broken before this change. Add tests/python/conftest.py with the session-scoped RuntimeView fixture needed for MPI init/finalize across pytest modules. --- .github/workflows/merge.yaml | 55 +++++++++++++++++++++++++++-- .github/workflows/pull_request.yaml | 24 ++++++------- cmake/get_nwx_cmake.cmake | 4 +-- pyproject.toml | 6 ++-- tests/python/conftest.py | 35 ++++++++++++++++++ 5 files changed, 103 insertions(+), 21 deletions(-) create mode 100644 tests/python/conftest.py diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index 90a1118c..de840de0 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -18,16 +18,65 @@ name: Merge Workflow on: push: branches: - - master + - build_overhaul jobs: tag-commit: - uses: NWChemEx/.github/.github/workflows/tag.yaml@master + uses: ryanmrichard/.github/.github/workflows/tag.yaml@master secrets: inherit deploy_nwx_docs: - uses: NWChemEx/.github/.github/workflows/deploy_nwx_docs.yaml@master + uses: ryanmrichard/.github/.github/workflows/deploy_nwx_docs.yaml@master with: doc_target: "integrals_cxx_api" generate_module_docs: true secrets: inherit + + platform_matrix: + uses: ryanmrichard/.github/.github/workflows/platform_matrix.yaml@master + + build_pypi_dist: + needs: [tag-commit, platform_matrix] + strategy: + fail-fast: false + matrix: + include: ${{ fromJSON(needs.platform_matrix.outputs.release_matrix) }} + runs-on: ${{ matrix.os }} + steps: + - name: Build PyPI Distribution + uses: ryanmrichard/.github/.github/actions/build_pypi_dist@master + with: + cibw_build: ${{ matrix.cibw_build }} + build_sdist: ${{ matrix.os == 'ubuntu-latest' && 'true' || 'false' }} + extra_index_url: https://test.pypi.org/simple/ + needs_mpi: "true" + needs_boost: "true" + + - name: Upload Distribution Artifact + uses: actions/upload-artifact@v4 + with: + name: dist-${{ matrix.os }} + path: dist/ + + # A separate, ubuntu-only publish job (rather than a publish step per + # build_pypi_dist leg) because pypa/gh-action-pypi-publish only runs on + # Linux, and because PyPI trusted publishing does not support reusable + # workflows (this job must be defined directly here, not delegated). + deploy_to_pypi: + needs: build_pypi_dist + runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - name: Download All Distributions + uses: actions/download-artifact@v4 + with: + pattern: dist-* + path: dist + merge-multiple: true + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: dist/ + repository-url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 4d84db28..4a54baaf 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -18,30 +18,30 @@ name: Pull Request Workflow on: pull_request: branches: - - master + - build_overhaul jobs: check_formatting: - uses: NWChemEx/.github/.github/workflows/check_formatting.yaml@master + uses: ryanmrichard/.github/.github/workflows/check_formatting.yaml@master test_nwx_docs: - uses: NWChemEx/.github/.github/workflows/test_nwx_docs.yaml@master + uses: ryanmrichard/.github/.github/workflows/test_nwx_docs.yaml@master with: doc_target: "integrals_cxx_api" - test_library: - uses: NWChemEx/.github/.github/workflows/test_nwx_library.yaml@master + test_cmake_build: + uses: ryanmrichard/.github/.github/workflows/test_nwx_cmake_build.yaml@master with: - compilers: '["gcc-14", "clang-18"]' + run_python_tests: "true" test_enable_sigma: - uses: NWChemEx/.github/.github/workflows/test_nwx_library.yaml@master + uses: ryanmrichard/.github/.github/workflows/test_nwx_cmake_build.yaml@master with: - compilers: '["gcc-14", "clang-18"]' - repo_toolchain: ".github/enable_sigma.cmake" + run_python_tests: "true" + cmake_opts: "-DENABLE_SIGMA=ON" test_enable_openmp: - uses: NWChemEx/.github/.github/workflows/test_nwx_library.yaml@master + uses: ryanmrichard/.github/.github/workflows/test_nwx_cmake_build.yaml@master with: - compilers: '["gcc-14", "clang-18"]' - repo_toolchain: ".github/enable_openmp.cmake" + run_python_tests: "true" + cmake_opts: "-DINTEGRALS_ENABLE_OPENMP=ON" diff --git a/cmake/get_nwx_cmake.cmake b/cmake/get_nwx_cmake.cmake index 9188ad48..b65a4538 100644 --- a/cmake/get_nwx_cmake.cmake +++ b/cmake/get_nwx_cmake.cmake @@ -22,7 +22,7 @@ include_guard() # 1. A pip-installed `nwxcmake` package (query it for its cmake/ dir). An # editable install (`pip install -e /path/to/NWXCMake`) points at a local # working copy, so NWXCMake edits are picked up with no git push. -# 2. Fallback: FetchContent from github.com/NWChemEx/NWXCMake. +# 2. Fallback: FetchContent from github.com/ryanmrichard/NWXCMake. macro(get_nwx_cmake) if(NOT _NWX_CMAKE_MODULE_DIR) # find_package(Python) needs no enabled language, so it is safe here, @@ -57,7 +57,7 @@ macro(get_nwx_cmake) include(FetchContent) FetchContent_Declare( nwx_cmake - GIT_REPOSITORY https://github.com/NWChemEx/NWXCMake + GIT_REPOSITORY https://github.com/ryanmrichard/NWXCMake ) FetchContent_MakeAvailable(nwx_cmake) set(_gnc_resolved "${nwx_cmake_SOURCE_DIR}/cmake") diff --git a/pyproject.toml b/pyproject.toml index b04d291d..e1cfa74b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ requires = [ "scikit-build-core>=0.10", "pybind11", "setuptools-scm>=8", - "nwchemex-nwxcmake @ git+https://github.com/NWChemEx/NWXCMake", + "nwchemex-nwxcmake @ git+https://github.com/ryanmrichard/NWXCMake", ] build-backend = "scikit_build_core.build" @@ -36,8 +36,6 @@ dev = ["pytest"] [tool.scikit-build] metadata.version.provider = "scikit_build_core.metadata.setuptools_scm" -cmake.build-type = "Release" -cmake.args = ["-DBUILD_PYBIND11_BINDINGS=ON", "-DBUILD_TESTING=OFF"] # All installed content comes from the CMake install; no pure-Python packages. wheel.packages = [] build-dir = "build" @@ -48,4 +46,4 @@ fallback_version = "0.0.0" # For editable (developer) installs, also build the tests. [[tool.scikit-build.overrides]] if.state = "editable" -cmake.args = ["-DBUILD_PYBIND11_BINDINGS=ON", "-DBUILD_TESTING=ON"] +cmake.args = ["-DBUILD_TESTING=ON"] diff --git a/tests/python/conftest.py b/tests/python/conftest.py new file mode 100644 index 00000000..d9c5a96e --- /dev/null +++ b/tests/python/conftest.py @@ -0,0 +1,35 @@ +# +# Copyright 2026 NWChemEx-Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import parallelzone as pz +import pytest + + +@pytest.fixture(scope="session", autouse=True) +def _session_runtime_view(): + """ + Holds a single RuntimeView for the whole pytest session. + + MPI may only be initialized/finalized once per process. The first + RuntimeView constructed owns that responsibility; individual test + modules construct their own RuntimeView per test (e.g. in setUp), + which is safe only as long as this session-scoped instance is still + alive to keep MPI initialized in between. Without this, pytest would + run each test module independently and MPI would be finalized after + the first module's tests finished, breaking every module after it. + """ + rv = pz.runtime.RuntimeView() + yield rv From 44f66420179f6e1a7968557e42e498fc493043d8 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Fri, 10 Jul 2026 13:02:34 -0500 Subject: [PATCH 05/15] Trigger CI now that Actions is enabled on the fork From 70ffb0505c0e7898a4d3b144c833436b025240f7 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Fri, 10 Jul 2026 13:23:57 -0500 Subject: [PATCH 06/15] Request Eigen3 provisioning for the cibuildwheel build libint2's own CMakeLists does its own find_package(Eigen3), unsatisfied by nwxcmake's FetchContent'd Eigen target; the manylinux/macOS cibuildwheel containers don't have an installed Eigen3 CMake config. --- .github/workflows/merge.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index de840de0..80df54c2 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -51,6 +51,7 @@ jobs: extra_index_url: https://test.pypi.org/simple/ needs_mpi: "true" needs_boost: "true" + needs_eigen: "true" - name: Upload Distribution Artifact uses: actions/upload-artifact@v4 From d1aec19c9dd4d28bbac9cbb08de89f28148d9096 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Sun, 12 Jul 2026 23:23:02 -0500 Subject: [PATCH 07/15] Republish: pick up build_pypi_dist fix (stop vendoring MPI, require system MPI on Linux, exact-soname auditwheel exclude) From 868060036de81e93bc5c0c10882222758d4d3d89 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Wed, 15 Jul 2026 10:13:41 -0500 Subject: [PATCH 08/15] use fork --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e1cfa74b..3fc689f6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ description = "Integral evaluation modules for the NWChemEx ecosystem" license = { text = "Apache-2.0" } requires-python = ">=3.8" dependencies = [ - "nwchemex-simde", + "nwchemex-simde @ git+https://github.com/ryanmrichard/SimDE", ] [project.optional-dependencies] From 49d1ee4d78f29deedb359b6b33938adec744f426 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Mon, 3 Aug 2026 12:16:50 -0500 Subject: [PATCH 09/15] add pre-commit to gitignore --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c9931024..38f70f07 100644 --- a/.gitignore +++ b/.gitignore @@ -47,4 +47,6 @@ Release/ toolchain.cmake # MacOS files -.DS_Store \ No newline at end of file +.DS_Store +# Automatically installed in dev mode +.pre-commit-config.yaml From 2d7b12eda3c4f295bf374a298cc70ed31e5d0d8e Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Mon, 3 Aug 2026 12:27:40 -0500 Subject: [PATCH 10/15] update pyproject.toml --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3fc689f6..e56dbd03 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ dependencies = [ ] [project.optional-dependencies] -dev = ["pytest"] +dev = ["pytest", "pre-commit"] [tool.scikit-build] metadata.version.provider = "scikit_build_core.metadata.setuptools_scm" @@ -46,4 +46,4 @@ fallback_version = "0.0.0" # For editable (developer) installs, also build the tests. [[tool.scikit-build.overrides]] if.state = "editable" -cmake.args = ["-DBUILD_TESTING=ON"] +cmake.args = ["-DDEVELOPER_SETUP=ON"] From 472a8c715580864a1f46f2b19b998bc2089c8f26 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Tue, 4 Aug 2026 11:53:03 -0500 Subject: [PATCH 11/15] adds python build --- .github/workflows/pull_request.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 4a54baaf..ed429346 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -45,3 +45,6 @@ jobs: with: run_python_tests: "true" cmake_opts: "-DINTEGRALS_ENABLE_OPENMP=ON" + + test_pip_build: + uses: ryanmrichard/.github/.github/workflows/test_nwx_pip_build.yaml@master From 6be65dac66b77f51246d4d72887f66fa8f510d52 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Tue, 4 Aug 2026 21:46:24 -0500 Subject: [PATCH 12/15] move nwxcmake/pybind11 to project --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e56dbd03..9d4709c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,9 +15,7 @@ [build-system] requires = [ "scikit-build-core>=0.10", - "pybind11", "setuptools-scm>=8", - "nwchemex-nwxcmake @ git+https://github.com/ryanmrichard/NWXCMake", ] build-backend = "scikit_build_core.build" @@ -28,6 +26,8 @@ description = "Integral evaluation modules for the NWChemEx ecosystem" license = { text = "Apache-2.0" } requires-python = ">=3.8" dependencies = [ + "pybind11", + "nwchemex-nwxcmake @ git+https://github.com/ryanmrichard/NWXCMake", "nwchemex-simde @ git+https://github.com/ryanmrichard/SimDE", ] From 9f975d579e39fb04fc5bba88bfa057fec678bd75 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Wed, 5 Aug 2026 10:33:01 -0500 Subject: [PATCH 13/15] update nightly --- .github/workflows/nightly.yaml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 58401a9f..b89cec77 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -14,25 +14,32 @@ # name: Nightly Workflow +# Re-runs the same build/test jobs pull_request.yaml runs, on a schedule, to +# catch breakage that originates outside the repo (upstream dependency +# releases, refreshed GitHub runner images) rather than from a code change. +# Keep the job list below in sync with pull_request.yaml. on: schedule: - cron: "0 6 * * *" # Every day at 06:00 UTC (00:00 CST) jobs: - test_library: - uses: NWChemEx/.github/.github/workflows/test_nwx_library.yaml@master + test_cmake_build: + uses: ryanmrichard/.github/.github/workflows/test_nwx_cmake_build.yaml@master with: - compilers: '["gcc-14", "clang-18"]' + run_python_tests: "true" test_enable_sigma: - uses: NWChemEx/.github/.github/workflows/test_nwx_library.yaml@master + uses: ryanmrichard/.github/.github/workflows/test_nwx_cmake_build.yaml@master with: - compilers: '["gcc-14", "clang-18"]' - repo_toolchain: ".github/enable_sigma.cmake" + run_python_tests: "true" + cmake_opts: "-DENABLE_SIGMA=ON" test_enable_openmp: - uses: NWChemEx/.github/.github/workflows/test_nwx_library.yaml@master + uses: ryanmrichard/.github/.github/workflows/test_nwx_cmake_build.yaml@master with: - compilers: '["gcc-14", "clang-18"]' - repo_toolchain: ".github/enable_openmp.cmake" + run_python_tests: "true" + cmake_opts: "-DINTEGRALS_ENABLE_OPENMP=ON" + + test_pip_build: + uses: ryanmrichard/.github/.github/workflows/test_nwx_pip_build.yaml@master From 807d4d8151bfae39373ee8cdc2ef23c234286e48 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Fri, 7 Aug 2026 09:14:26 -0500 Subject: [PATCH 14/15] Migrate CI/CD to NWChemEx org, master branch, real PyPI - Repoint all ryanmrichard/.github references to NWChemEx/.github - Flip merge.yaml/pull_request.yaml triggers from build_overhaul to master - Drop TestPyPI repository-url/extra_index_url, publish to real PyPI - Repoint get_nwx_cmake.cmake at NWChemEx/NWXCMake - Pin sibling deps to published PyPI floors instead of git URLs --- .github/workflows/merge.yaml | 12 +++++------- .github/workflows/nightly.yaml | 8 ++++---- .github/workflows/pull_request.yaml | 14 +++++++------- cmake/get_nwx_cmake.cmake | 4 ++-- pyproject.toml | 4 ++-- 5 files changed, 20 insertions(+), 22 deletions(-) diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index 80df54c2..9dd43acb 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -18,22 +18,22 @@ name: Merge Workflow on: push: branches: - - build_overhaul + - master jobs: tag-commit: - uses: ryanmrichard/.github/.github/workflows/tag.yaml@master + uses: NWChemEx/.github/.github/workflows/tag.yaml@master secrets: inherit deploy_nwx_docs: - uses: ryanmrichard/.github/.github/workflows/deploy_nwx_docs.yaml@master + uses: NWChemEx/.github/.github/workflows/deploy_nwx_docs.yaml@master with: doc_target: "integrals_cxx_api" generate_module_docs: true secrets: inherit platform_matrix: - uses: ryanmrichard/.github/.github/workflows/platform_matrix.yaml@master + uses: NWChemEx/.github/.github/workflows/platform_matrix.yaml@master build_pypi_dist: needs: [tag-commit, platform_matrix] @@ -44,11 +44,10 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Build PyPI Distribution - uses: ryanmrichard/.github/.github/actions/build_pypi_dist@master + uses: NWChemEx/.github/.github/actions/build_pypi_dist@master with: cibw_build: ${{ matrix.cibw_build }} build_sdist: ${{ matrix.os == 'ubuntu-latest' && 'true' || 'false' }} - extra_index_url: https://test.pypi.org/simple/ needs_mpi: "true" needs_boost: "true" needs_eigen: "true" @@ -80,4 +79,3 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: packages-dir: dist/ - repository-url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index b89cec77..4aa678a0 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -25,21 +25,21 @@ on: jobs: test_cmake_build: - uses: ryanmrichard/.github/.github/workflows/test_nwx_cmake_build.yaml@master + uses: NWChemEx/.github/.github/workflows/test_nwx_cmake_build.yaml@master with: run_python_tests: "true" test_enable_sigma: - uses: ryanmrichard/.github/.github/workflows/test_nwx_cmake_build.yaml@master + uses: NWChemEx/.github/.github/workflows/test_nwx_cmake_build.yaml@master with: run_python_tests: "true" cmake_opts: "-DENABLE_SIGMA=ON" test_enable_openmp: - uses: ryanmrichard/.github/.github/workflows/test_nwx_cmake_build.yaml@master + uses: NWChemEx/.github/.github/workflows/test_nwx_cmake_build.yaml@master with: run_python_tests: "true" cmake_opts: "-DINTEGRALS_ENABLE_OPENMP=ON" test_pip_build: - uses: ryanmrichard/.github/.github/workflows/test_nwx_pip_build.yaml@master + uses: NWChemEx/.github/.github/workflows/test_nwx_pip_build.yaml@master diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index ed429346..269a12a5 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -18,33 +18,33 @@ name: Pull Request Workflow on: pull_request: branches: - - build_overhaul + - master jobs: check_formatting: - uses: ryanmrichard/.github/.github/workflows/check_formatting.yaml@master + uses: NWChemEx/.github/.github/workflows/check_formatting.yaml@master test_nwx_docs: - uses: ryanmrichard/.github/.github/workflows/test_nwx_docs.yaml@master + uses: NWChemEx/.github/.github/workflows/test_nwx_docs.yaml@master with: doc_target: "integrals_cxx_api" test_cmake_build: - uses: ryanmrichard/.github/.github/workflows/test_nwx_cmake_build.yaml@master + uses: NWChemEx/.github/.github/workflows/test_nwx_cmake_build.yaml@master with: run_python_tests: "true" test_enable_sigma: - uses: ryanmrichard/.github/.github/workflows/test_nwx_cmake_build.yaml@master + uses: NWChemEx/.github/.github/workflows/test_nwx_cmake_build.yaml@master with: run_python_tests: "true" cmake_opts: "-DENABLE_SIGMA=ON" test_enable_openmp: - uses: ryanmrichard/.github/.github/workflows/test_nwx_cmake_build.yaml@master + uses: NWChemEx/.github/.github/workflows/test_nwx_cmake_build.yaml@master with: run_python_tests: "true" cmake_opts: "-DINTEGRALS_ENABLE_OPENMP=ON" test_pip_build: - uses: ryanmrichard/.github/.github/workflows/test_nwx_pip_build.yaml@master + uses: NWChemEx/.github/.github/workflows/test_nwx_pip_build.yaml@master diff --git a/cmake/get_nwx_cmake.cmake b/cmake/get_nwx_cmake.cmake index b65a4538..9188ad48 100644 --- a/cmake/get_nwx_cmake.cmake +++ b/cmake/get_nwx_cmake.cmake @@ -22,7 +22,7 @@ include_guard() # 1. A pip-installed `nwxcmake` package (query it for its cmake/ dir). An # editable install (`pip install -e /path/to/NWXCMake`) points at a local # working copy, so NWXCMake edits are picked up with no git push. -# 2. Fallback: FetchContent from github.com/ryanmrichard/NWXCMake. +# 2. Fallback: FetchContent from github.com/NWChemEx/NWXCMake. macro(get_nwx_cmake) if(NOT _NWX_CMAKE_MODULE_DIR) # find_package(Python) needs no enabled language, so it is safe here, @@ -57,7 +57,7 @@ macro(get_nwx_cmake) include(FetchContent) FetchContent_Declare( nwx_cmake - GIT_REPOSITORY https://github.com/ryanmrichard/NWXCMake + GIT_REPOSITORY https://github.com/NWChemEx/NWXCMake ) FetchContent_MakeAvailable(nwx_cmake) set(_gnc_resolved "${nwx_cmake_SOURCE_DIR}/cmake") diff --git a/pyproject.toml b/pyproject.toml index 9d4709c3..d7413948 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,8 +27,8 @@ license = { text = "Apache-2.0" } requires-python = ">=3.8" dependencies = [ "pybind11", - "nwchemex-nwxcmake @ git+https://github.com/ryanmrichard/NWXCMake", - "nwchemex-simde @ git+https://github.com/ryanmrichard/SimDE", + "nwchemex-nwxcmake>=0.1.0", + "nwchemex-simde>=0.0.77", ] [project.optional-dependencies] From 48f3ddeccd7fc70ef892e614c26b17bcf6aec1ba Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Fri, 7 Aug 2026 10:23:01 -0500 Subject: [PATCH 15/15] Fix isort import ordering flagged by check_formatting CI Pre-existing issue, unrelated to the migration -- first time check_formatting has ever actually run clean against this repo. --- tests/python/unit_tests/utils/test_decontract_basis_set.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/python/unit_tests/utils/test_decontract_basis_set.py b/tests/python/unit_tests/utils/test_decontract_basis_set.py index fcb2a599..b4e5982a 100644 --- a/tests/python/unit_tests/utils/test_decontract_basis_set.py +++ b/tests/python/unit_tests/utils/test_decontract_basis_set.py @@ -16,13 +16,12 @@ import unittest +import integrals import parallelzone as pz import pluginplay as pp from chemist import PointD, ShellType from chemist.basis_set import AOBasisSetD, AtomicBasisSetD, ContractedGaussianD -import integrals - class TestDecontractBasisSet(unittest.TestCase): def test_temp(self):