From 833c7e0746f6ebd648cf7f6d3756a4dbe60dcace Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Wed, 1 Jul 2026 15:54:35 -0500 Subject: [PATCH 01/20] uses updated build system --- CMakeLists.txt | 97 +++++++------------ cmake/get_nwx_cmake.cmake | 72 +++++++++++--- .../simde/basis_set/atomic_basis_set.hpp | 0 .../include}/simde/basis_set/basis_set.hpp | 0 .../simde/basis_set/molecular_basis_set.hpp | 0 .../simde/chemical_system/Z_from_symbol.hpp | 0 .../include}/simde/chemical_system/atom.hpp | 0 .../chemical_system/atomic_density_matrix.hpp | 0 .../simde/chemical_system/chemical_system.hpp | 0 .../chemical_system/molecule_from_string.hpp | 0 .../simde/chemical_system/symbol_from_Z.hpp | 0 .../include}/simde/density/density.hpp | 0 .../simde/density/initial_density.hpp | 0 .../include}/simde/derivative/derivative.hpp | 0 .../simde/derivative/derivative_pt.hpp | 0 .../include}/simde/derivative/nuclear.hpp | 0 .../include}/simde/derivative/traits.hpp | 0 .../include}/simde/energy/ao_energy.hpp | 0 .../simde/energy/electrostatic_energy.hpp | 0 .../include}/simde/energy/energy.hpp | 0 .../include}/simde/energy/total_energy.hpp | 0 .../simde/evaluate_braket/evaluate_braket.hpp | 0 .../integration_grids/collocation_matrix.hpp | 0 .../integration_grids/integration_grids.hpp | 0 .../integration_grids/molecular_grid.hpp | 0 .../simde/numerical_methods/eigen_solve.hpp | 0 .../generalized_eigen_solve.hpp | 0 .../numerical_methods/numerical_methods.hpp | 0 .../include}/simde/optimize/optimize.hpp | 0 .../simde/optimize/optimize_energy.hpp | 0 .../include}/simde/optimize/optimize_pt.hpp | 0 .../simde/quantum_mechanics/fock_operator.hpp | 0 .../simde/quantum_mechanics/initial_guess.hpp | 0 .../quantum_mechanics/quantum_mechanics.hpp | 0 .../simde/quantum_mechanics/update_guess.hpp | 0 {include => cxx/include}/simde/simde.hpp | 0 {include => cxx/include}/simde/types.hpp | 0 .../include}/simde/utils/convert.hpp | 0 .../src/simde}/basis_set/export_basis_set.hpp | 0 .../export_chemical_system.hpp | 0 .../simde}/derivative/export_derivative.hpp | 0 .../src/simde}/energy/export_energy.hpp | 0 .../export_evaluate_braket.hpp | 0 .../src/simde/export_simde.cpp | 0 .../python => cxx/src/simde}/export_simde.hpp | 0 .../export_numerical_methods.hpp | 0 .../src/simde}/optimize/export_optimize.hpp | 0 .../export_quantum_mechanics.hpp | 0 .../src/simde}/utils/export_utils.hpp | 0 pyproject.toml | 45 +++++++++ 50 files changed, 140 insertions(+), 74 deletions(-) rename {include => cxx/include}/simde/basis_set/atomic_basis_set.hpp (100%) rename {include => cxx/include}/simde/basis_set/basis_set.hpp (100%) rename {include => cxx/include}/simde/basis_set/molecular_basis_set.hpp (100%) rename {include => cxx/include}/simde/chemical_system/Z_from_symbol.hpp (100%) rename {include => cxx/include}/simde/chemical_system/atom.hpp (100%) rename {include => cxx/include}/simde/chemical_system/atomic_density_matrix.hpp (100%) rename {include => cxx/include}/simde/chemical_system/chemical_system.hpp (100%) rename {include => cxx/include}/simde/chemical_system/molecule_from_string.hpp (100%) rename {include => cxx/include}/simde/chemical_system/symbol_from_Z.hpp (100%) rename {include => cxx/include}/simde/density/density.hpp (100%) rename {include => cxx/include}/simde/density/initial_density.hpp (100%) rename {include => cxx/include}/simde/derivative/derivative.hpp (100%) rename {include => cxx/include}/simde/derivative/derivative_pt.hpp (100%) rename {include => cxx/include}/simde/derivative/nuclear.hpp (100%) rename {include => cxx/include}/simde/derivative/traits.hpp (100%) rename {include => cxx/include}/simde/energy/ao_energy.hpp (100%) rename {include => cxx/include}/simde/energy/electrostatic_energy.hpp (100%) rename {include => cxx/include}/simde/energy/energy.hpp (100%) rename {include => cxx/include}/simde/energy/total_energy.hpp (100%) rename {include => cxx/include}/simde/evaluate_braket/evaluate_braket.hpp (100%) rename {include => cxx/include}/simde/integration_grids/collocation_matrix.hpp (100%) rename {include => cxx/include}/simde/integration_grids/integration_grids.hpp (100%) rename {include => cxx/include}/simde/integration_grids/molecular_grid.hpp (100%) rename {include => cxx/include}/simde/numerical_methods/eigen_solve.hpp (100%) rename {include => cxx/include}/simde/numerical_methods/generalized_eigen_solve.hpp (100%) rename {include => cxx/include}/simde/numerical_methods/numerical_methods.hpp (100%) rename {include => cxx/include}/simde/optimize/optimize.hpp (100%) rename {include => cxx/include}/simde/optimize/optimize_energy.hpp (100%) rename {include => cxx/include}/simde/optimize/optimize_pt.hpp (100%) rename {include => cxx/include}/simde/quantum_mechanics/fock_operator.hpp (100%) rename {include => cxx/include}/simde/quantum_mechanics/initial_guess.hpp (100%) rename {include => cxx/include}/simde/quantum_mechanics/quantum_mechanics.hpp (100%) rename {include => cxx/include}/simde/quantum_mechanics/update_guess.hpp (100%) rename {include => cxx/include}/simde/simde.hpp (100%) rename {include => cxx/include}/simde/types.hpp (100%) rename {include => cxx/include}/simde/utils/convert.hpp (100%) rename {src/python => cxx/src/simde}/basis_set/export_basis_set.hpp (100%) rename {src/python => cxx/src/simde}/chemical_system/export_chemical_system.hpp (100%) rename {src/python => cxx/src/simde}/derivative/export_derivative.hpp (100%) rename {src/python => cxx/src/simde}/energy/export_energy.hpp (100%) rename {src/python => cxx/src/simde}/evaluate_braket/export_evaluate_braket.hpp (100%) rename src/python/module.cpp => cxx/src/simde/export_simde.cpp (100%) rename {src/python => cxx/src/simde}/export_simde.hpp (100%) rename {src/python => cxx/src/simde}/numerical_methods/export_numerical_methods.hpp (100%) rename {src/python => cxx/src/simde}/optimize/export_optimize.hpp (100%) rename {src/python => cxx/src/simde}/quantum_mechanics/export_quantum_mechanics.hpp (100%) rename {src/python => cxx/src/simde}/utils/export_utils.hpp (100%) create mode 100644 pyproject.toml diff --git a/CMakeLists.txt b/CMakeLists.txt index 6713c36d..b77bc9e0 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,72 +14,45 @@ 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(simde_version "${CMAKE_CURRENT_LIST_DIR}") +# Version from scikit-build-core (wheels/sdists) or the latest git tag. +include(nwx_set_version) +nwx_set_version(simde_version "${CMAKE_CURRENT_LIST_DIR}") project(simde VERSION "${simde_version}" LANGUAGES CXX) -set(CMAKE_CXX_STANDARD 20) - -include(get_cmaize) -include(nwx_cxx_api_docs) - -### Paths ### -set(SIMDE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src") -set(SIMDE_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include") -set(SIMDE_TESTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/tests") -set(SIMDE_EXP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/experimental") - -nwx_cxx_api_docs("${SIMDE_SOURCE_DIR}" "${SIMDE_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?" -) - -include(get_chemist) - -include(get_pluginplay) -cmaize_add_library( - ${PROJECT_NAME} - SOURCE_DIR "${SIMDE_SOURCE_DIR}/${PROJECT_NAME}" - INCLUDE_DIRS "${SIMDE_INCLUDE_DIR}/${PROJECT_NAME}" - DEPENDS chemist pluginplay -) - -# N.B. this is a no-op if BUILD_PYBIND11_PYBINDINGS is not turned on -include(nwx_pybind11) -nwx_add_pybind11_module( - ${PROJECT_NAME} - SOURCE_DIR "${SIMDE_SOURCE_DIR}/python" - DEPENDS "${PROJECT_NAME}" -) - -if("${BUILD_TESTING}") - set(CXX_TEST_DIR ${SIMDE_TESTS_DIR}/cxx) - set(PYTHON_TEST_DIR ${SIMDE_TESTS_DIR}/python) +include(disable_in_source_builds) +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_SCAN_FOR_MODULES OFF) - include(get_catch2) +option(BUILD_TESTING "Whether to build the unit tests" OFF) +option(BUILD_PYBIND11_BINDINGS "Build Python bindings via pybind11" ON) - cmaize_add_tests( - test_unit_${PROJECT_NAME} - SOURCE_DIR "${CXX_TEST_DIR}/unit_tests" - INCLUDE_DIRS "${SIMDE_SOURCE_DIR}/${PROJECT_NAME}" - DEPENDS Catch2 ${PROJECT_NAME} - ) - - # N.B. these are no-ops if BUILD_PYBIND11_PYBINDINGS is not turned on - nwx_pybind11_tests( - py_simde "${PYTHON_TEST_DIR}/unit_tests/test_simde.py" - SUBMODULES pluginplay chemist tensorwrapper parallelzone +# Documentation target +include(nwx_cxx_api_docs) +nwx_cxx_api_docs("cxx/include" "cxx/src") + +# Dependencies: simde is header-only; its C++ deps come from chemist+pluginplay +include(get_dependencies) +get_dependencies(chemist pluginplay) + +# Build the library (header-only → nwx_library creates INTERFACE target) +include(nwx_library) +nwx_library(${PROJECT_NAME} "cxx/include" "cxx/src" + chemist pluginplay) + +# Python module +include(nwx_python_module) +nwx_python_module(${PROJECT_NAME} "cxx/src") + +# C++ tests +if(BUILD_TESTING) + include(catch2_tests_from_dir) + catch2_tests_from_dir( + "unit_test_${PROJECT_NAME}" + "tests/cxx/unit_tests" + ${PROJECT_NAME} ) 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/simde/basis_set/atomic_basis_set.hpp b/cxx/include/simde/basis_set/atomic_basis_set.hpp similarity index 100% rename from include/simde/basis_set/atomic_basis_set.hpp rename to cxx/include/simde/basis_set/atomic_basis_set.hpp diff --git a/include/simde/basis_set/basis_set.hpp b/cxx/include/simde/basis_set/basis_set.hpp similarity index 100% rename from include/simde/basis_set/basis_set.hpp rename to cxx/include/simde/basis_set/basis_set.hpp diff --git a/include/simde/basis_set/molecular_basis_set.hpp b/cxx/include/simde/basis_set/molecular_basis_set.hpp similarity index 100% rename from include/simde/basis_set/molecular_basis_set.hpp rename to cxx/include/simde/basis_set/molecular_basis_set.hpp diff --git a/include/simde/chemical_system/Z_from_symbol.hpp b/cxx/include/simde/chemical_system/Z_from_symbol.hpp similarity index 100% rename from include/simde/chemical_system/Z_from_symbol.hpp rename to cxx/include/simde/chemical_system/Z_from_symbol.hpp diff --git a/include/simde/chemical_system/atom.hpp b/cxx/include/simde/chemical_system/atom.hpp similarity index 100% rename from include/simde/chemical_system/atom.hpp rename to cxx/include/simde/chemical_system/atom.hpp diff --git a/include/simde/chemical_system/atomic_density_matrix.hpp b/cxx/include/simde/chemical_system/atomic_density_matrix.hpp similarity index 100% rename from include/simde/chemical_system/atomic_density_matrix.hpp rename to cxx/include/simde/chemical_system/atomic_density_matrix.hpp diff --git a/include/simde/chemical_system/chemical_system.hpp b/cxx/include/simde/chemical_system/chemical_system.hpp similarity index 100% rename from include/simde/chemical_system/chemical_system.hpp rename to cxx/include/simde/chemical_system/chemical_system.hpp diff --git a/include/simde/chemical_system/molecule_from_string.hpp b/cxx/include/simde/chemical_system/molecule_from_string.hpp similarity index 100% rename from include/simde/chemical_system/molecule_from_string.hpp rename to cxx/include/simde/chemical_system/molecule_from_string.hpp diff --git a/include/simde/chemical_system/symbol_from_Z.hpp b/cxx/include/simde/chemical_system/symbol_from_Z.hpp similarity index 100% rename from include/simde/chemical_system/symbol_from_Z.hpp rename to cxx/include/simde/chemical_system/symbol_from_Z.hpp diff --git a/include/simde/density/density.hpp b/cxx/include/simde/density/density.hpp similarity index 100% rename from include/simde/density/density.hpp rename to cxx/include/simde/density/density.hpp diff --git a/include/simde/density/initial_density.hpp b/cxx/include/simde/density/initial_density.hpp similarity index 100% rename from include/simde/density/initial_density.hpp rename to cxx/include/simde/density/initial_density.hpp diff --git a/include/simde/derivative/derivative.hpp b/cxx/include/simde/derivative/derivative.hpp similarity index 100% rename from include/simde/derivative/derivative.hpp rename to cxx/include/simde/derivative/derivative.hpp diff --git a/include/simde/derivative/derivative_pt.hpp b/cxx/include/simde/derivative/derivative_pt.hpp similarity index 100% rename from include/simde/derivative/derivative_pt.hpp rename to cxx/include/simde/derivative/derivative_pt.hpp diff --git a/include/simde/derivative/nuclear.hpp b/cxx/include/simde/derivative/nuclear.hpp similarity index 100% rename from include/simde/derivative/nuclear.hpp rename to cxx/include/simde/derivative/nuclear.hpp diff --git a/include/simde/derivative/traits.hpp b/cxx/include/simde/derivative/traits.hpp similarity index 100% rename from include/simde/derivative/traits.hpp rename to cxx/include/simde/derivative/traits.hpp diff --git a/include/simde/energy/ao_energy.hpp b/cxx/include/simde/energy/ao_energy.hpp similarity index 100% rename from include/simde/energy/ao_energy.hpp rename to cxx/include/simde/energy/ao_energy.hpp diff --git a/include/simde/energy/electrostatic_energy.hpp b/cxx/include/simde/energy/electrostatic_energy.hpp similarity index 100% rename from include/simde/energy/electrostatic_energy.hpp rename to cxx/include/simde/energy/electrostatic_energy.hpp diff --git a/include/simde/energy/energy.hpp b/cxx/include/simde/energy/energy.hpp similarity index 100% rename from include/simde/energy/energy.hpp rename to cxx/include/simde/energy/energy.hpp diff --git a/include/simde/energy/total_energy.hpp b/cxx/include/simde/energy/total_energy.hpp similarity index 100% rename from include/simde/energy/total_energy.hpp rename to cxx/include/simde/energy/total_energy.hpp diff --git a/include/simde/evaluate_braket/evaluate_braket.hpp b/cxx/include/simde/evaluate_braket/evaluate_braket.hpp similarity index 100% rename from include/simde/evaluate_braket/evaluate_braket.hpp rename to cxx/include/simde/evaluate_braket/evaluate_braket.hpp diff --git a/include/simde/integration_grids/collocation_matrix.hpp b/cxx/include/simde/integration_grids/collocation_matrix.hpp similarity index 100% rename from include/simde/integration_grids/collocation_matrix.hpp rename to cxx/include/simde/integration_grids/collocation_matrix.hpp diff --git a/include/simde/integration_grids/integration_grids.hpp b/cxx/include/simde/integration_grids/integration_grids.hpp similarity index 100% rename from include/simde/integration_grids/integration_grids.hpp rename to cxx/include/simde/integration_grids/integration_grids.hpp diff --git a/include/simde/integration_grids/molecular_grid.hpp b/cxx/include/simde/integration_grids/molecular_grid.hpp similarity index 100% rename from include/simde/integration_grids/molecular_grid.hpp rename to cxx/include/simde/integration_grids/molecular_grid.hpp diff --git a/include/simde/numerical_methods/eigen_solve.hpp b/cxx/include/simde/numerical_methods/eigen_solve.hpp similarity index 100% rename from include/simde/numerical_methods/eigen_solve.hpp rename to cxx/include/simde/numerical_methods/eigen_solve.hpp diff --git a/include/simde/numerical_methods/generalized_eigen_solve.hpp b/cxx/include/simde/numerical_methods/generalized_eigen_solve.hpp similarity index 100% rename from include/simde/numerical_methods/generalized_eigen_solve.hpp rename to cxx/include/simde/numerical_methods/generalized_eigen_solve.hpp diff --git a/include/simde/numerical_methods/numerical_methods.hpp b/cxx/include/simde/numerical_methods/numerical_methods.hpp similarity index 100% rename from include/simde/numerical_methods/numerical_methods.hpp rename to cxx/include/simde/numerical_methods/numerical_methods.hpp diff --git a/include/simde/optimize/optimize.hpp b/cxx/include/simde/optimize/optimize.hpp similarity index 100% rename from include/simde/optimize/optimize.hpp rename to cxx/include/simde/optimize/optimize.hpp diff --git a/include/simde/optimize/optimize_energy.hpp b/cxx/include/simde/optimize/optimize_energy.hpp similarity index 100% rename from include/simde/optimize/optimize_energy.hpp rename to cxx/include/simde/optimize/optimize_energy.hpp diff --git a/include/simde/optimize/optimize_pt.hpp b/cxx/include/simde/optimize/optimize_pt.hpp similarity index 100% rename from include/simde/optimize/optimize_pt.hpp rename to cxx/include/simde/optimize/optimize_pt.hpp diff --git a/include/simde/quantum_mechanics/fock_operator.hpp b/cxx/include/simde/quantum_mechanics/fock_operator.hpp similarity index 100% rename from include/simde/quantum_mechanics/fock_operator.hpp rename to cxx/include/simde/quantum_mechanics/fock_operator.hpp diff --git a/include/simde/quantum_mechanics/initial_guess.hpp b/cxx/include/simde/quantum_mechanics/initial_guess.hpp similarity index 100% rename from include/simde/quantum_mechanics/initial_guess.hpp rename to cxx/include/simde/quantum_mechanics/initial_guess.hpp diff --git a/include/simde/quantum_mechanics/quantum_mechanics.hpp b/cxx/include/simde/quantum_mechanics/quantum_mechanics.hpp similarity index 100% rename from include/simde/quantum_mechanics/quantum_mechanics.hpp rename to cxx/include/simde/quantum_mechanics/quantum_mechanics.hpp diff --git a/include/simde/quantum_mechanics/update_guess.hpp b/cxx/include/simde/quantum_mechanics/update_guess.hpp similarity index 100% rename from include/simde/quantum_mechanics/update_guess.hpp rename to cxx/include/simde/quantum_mechanics/update_guess.hpp diff --git a/include/simde/simde.hpp b/cxx/include/simde/simde.hpp similarity index 100% rename from include/simde/simde.hpp rename to cxx/include/simde/simde.hpp diff --git a/include/simde/types.hpp b/cxx/include/simde/types.hpp similarity index 100% rename from include/simde/types.hpp rename to cxx/include/simde/types.hpp diff --git a/include/simde/utils/convert.hpp b/cxx/include/simde/utils/convert.hpp similarity index 100% rename from include/simde/utils/convert.hpp rename to cxx/include/simde/utils/convert.hpp diff --git a/src/python/basis_set/export_basis_set.hpp b/cxx/src/simde/basis_set/export_basis_set.hpp similarity index 100% rename from src/python/basis_set/export_basis_set.hpp rename to cxx/src/simde/basis_set/export_basis_set.hpp diff --git a/src/python/chemical_system/export_chemical_system.hpp b/cxx/src/simde/chemical_system/export_chemical_system.hpp similarity index 100% rename from src/python/chemical_system/export_chemical_system.hpp rename to cxx/src/simde/chemical_system/export_chemical_system.hpp diff --git a/src/python/derivative/export_derivative.hpp b/cxx/src/simde/derivative/export_derivative.hpp similarity index 100% rename from src/python/derivative/export_derivative.hpp rename to cxx/src/simde/derivative/export_derivative.hpp diff --git a/src/python/energy/export_energy.hpp b/cxx/src/simde/energy/export_energy.hpp similarity index 100% rename from src/python/energy/export_energy.hpp rename to cxx/src/simde/energy/export_energy.hpp diff --git a/src/python/evaluate_braket/export_evaluate_braket.hpp b/cxx/src/simde/evaluate_braket/export_evaluate_braket.hpp similarity index 100% rename from src/python/evaluate_braket/export_evaluate_braket.hpp rename to cxx/src/simde/evaluate_braket/export_evaluate_braket.hpp diff --git a/src/python/module.cpp b/cxx/src/simde/export_simde.cpp similarity index 100% rename from src/python/module.cpp rename to cxx/src/simde/export_simde.cpp diff --git a/src/python/export_simde.hpp b/cxx/src/simde/export_simde.hpp similarity index 100% rename from src/python/export_simde.hpp rename to cxx/src/simde/export_simde.hpp diff --git a/src/python/numerical_methods/export_numerical_methods.hpp b/cxx/src/simde/numerical_methods/export_numerical_methods.hpp similarity index 100% rename from src/python/numerical_methods/export_numerical_methods.hpp rename to cxx/src/simde/numerical_methods/export_numerical_methods.hpp diff --git a/src/python/optimize/export_optimize.hpp b/cxx/src/simde/optimize/export_optimize.hpp similarity index 100% rename from src/python/optimize/export_optimize.hpp rename to cxx/src/simde/optimize/export_optimize.hpp diff --git a/src/python/quantum_mechanics/export_quantum_mechanics.hpp b/cxx/src/simde/quantum_mechanics/export_quantum_mechanics.hpp similarity index 100% rename from src/python/quantum_mechanics/export_quantum_mechanics.hpp rename to cxx/src/simde/quantum_mechanics/export_quantum_mechanics.hpp diff --git a/src/python/utils/export_utils.hpp b/cxx/src/simde/utils/export_utils.hpp similarity index 100% rename from src/python/utils/export_utils.hpp rename to cxx/src/simde/utils/export_utils.hpp diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..03dcfb04 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,45 @@ +# 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-simde" +dynamic = ["version"] +description = "Simulation Domain Extensions for the NWChemEx ecosystem" +license = { text = "Apache-2.0" } +requires-python = ">=3.8" + +[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"] From 114cdbd583a43086151e32c9e5fff8f03d2f2c17 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Thu, 2 Jul 2026 09:00:40 -0500 Subject: [PATCH 02/20] adds upstream dependencies --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 03dcfb04..c2d671c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,6 +27,10 @@ dynamic = ["version"] description = "Simulation Domain Extensions for the NWChemEx ecosystem" license = { text = "Apache-2.0" } requires-python = ">=3.8" +dependencies = [ + "nwchemex-pluginplay", + "nwchemex-chemist", +] [tool.scikit-build] metadata.version.provider = "scikit_build_core.metadata.setuptools_scm" From 71b4f6e4ba4318a71ae5df301496382e60e57646 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Mon, 6 Jul 2026 14:55:47 -0500 Subject: [PATCH 03/20] code cleanup --- CMakeLists.txt | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b77bc9e0..1cb14d95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,11 +24,7 @@ nwx_set_version(simde_version "${CMAKE_CURRENT_LIST_DIR}") project(simde VERSION "${simde_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) # Documentation target include(nwx_cxx_api_docs) @@ -48,11 +44,9 @@ include(nwx_python_module) nwx_python_module(${PROJECT_NAME} "cxx/src") # C++ tests -if(BUILD_TESTING) - include(catch2_tests_from_dir) - catch2_tests_from_dir( - "unit_test_${PROJECT_NAME}" - "tests/cxx/unit_tests" - ${PROJECT_NAME} - ) -endif() +include(catch2_tests_from_dir) +catch2_tests_from_dir( + "unit_test_${PROJECT_NAME}" + "tests/cxx/unit_tests" + ${PROJECT_NAME} +) From cac6c959d93b8c774f5bc51c7ccc5b256fef51a8 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Tue, 7 Jul 2026 09:26:37 -0500 Subject: [PATCH 04/20] adds mac files to gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 09e31b5a..d03a068a 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,6 @@ toolchain.cmake # Commonly install to a subdirectory called install install/ + +# These are MacOS files +.DS_Store \ No newline at end of file From 2513ce2195a2a68b9c09987910230fb581efc718 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Thu, 9 Jul 2026 14:56:47 -0500 Subject: [PATCH 05/20] Retarget NWChemEx/ -> ryanmrichard/ for fork testing; adopt test_nwx_cmake_build Also adds a session-scoped RuntimeView pytest fixture (needed since chemist/ pluginplay-backed tests construct multiple objects that touch MPI), fixes a missing .gitignore trailing newline, and fixes the workflow's stale ".github Pull Request Workflow" name. Verified locally end-to-end (docker ubuntu:24.04 + gcc-14): configure, build, full CTest suite (15/15), and pytest (82/82) all pass; pre-commit (isort/black/flake8/clang-format/license-eye) all pass. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/merge.yaml | 6 ++--- .github/workflows/pull_request.yaml | 14 ++++++------ .gitignore | 2 +- cmake/get_nwx_cmake.cmake | 2 +- tests/python/conftest.py | 35 +++++++++++++++++++++++++++++ 5 files changed, 47 insertions(+), 12 deletions(-) create mode 100644 tests/python/conftest.py diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index b06caaf4..87f0abaf 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -18,15 +18,15 @@ 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: "simde_cxx_api" secrets: inherit diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 7a6060df..bf2537cd 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -13,23 +13,23 @@ # limitations under the License. # -name: .github Pull Request Workflow +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: "simde_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" diff --git a/.gitignore b/.gitignore index d03a068a..8957ea96 100644 --- a/.gitignore +++ b/.gitignore @@ -50,4 +50,4 @@ toolchain.cmake install/ # These are MacOS files -.DS_Store \ No newline at end of file +.DS_Store diff --git a/cmake/get_nwx_cmake.cmake b/cmake/get_nwx_cmake.cmake index 9188ad48..c936012a 100644 --- a/cmake/get_nwx_cmake.cmake +++ b/cmake/get_nwx_cmake.cmake @@ -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/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 2ecb16ed515a513a5887d2e8cb294090c7529f67 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Thu, 9 Jul 2026 15:22:52 -0500 Subject: [PATCH 06/20] Retrigger CI: workflow write permissions now enabled From 81cc6444c4f9bb6ef4eeea87d03842c5854f9745 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Fri, 10 Jul 2026 10:41:56 -0500 Subject: [PATCH 07/20] Retarget NWXCMake build dependency to fork Co-Authored-By: Claude Sonnet 5 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c2d671c3..108af751 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" From 649b9210c8f410f748e071a551b8127b408efe13 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Fri, 10 Jul 2026 11:46:32 -0500 Subject: [PATCH 08/20] Add TestPyPI publish job to merge.yaml (needs_mpi, needs_boost, extra_index_url) Co-Authored-By: Claude Sonnet 5 --- .github/workflows/merge.yaml | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index 87f0abaf..bfa11a84 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -30,3 +30,52 @@ jobs: with: doc_target: "simde_cxx_api" 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/ From f87a391c2506861beca65de769c4313e04a0e3a9 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Sun, 12 Jul 2026 12:37:03 -0500 Subject: [PATCH 09/20] Re-trigger CI to rebuild wheel with OpenMPI 4.1.6 fix (matches Ubuntu's ambient MPI ABI) From eb43e8edea2dc7e8b001159c0b726b6c608a83ca Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Sun, 12 Jul 2026 13:08:43 -0500 Subject: [PATCH 10/20] Re-trigger CI to rebuild wheel with OpenMPI --enable-mpirun-prefix-by-default fix From 6dc38cca438d3a2891b0840c2baf7b42e641b9f3 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Sun, 12 Jul 2026 13:45:25 -0500 Subject: [PATCH 11/20] Re-trigger CI to rebuild wheel with OpenMPI --disable-dlopen fix From 7f729a87ce181b22330b729bd82f0e09cc1e138b Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Sun, 12 Jul 2026 14:32:50 -0500 Subject: [PATCH 12/20] Republish: pick up build_pypi_dist fix (stop vendoring MPI, require system MPI on Linux) From eb6c033a92871b8ae4c1933999d06c531817af9e Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Sun, 12 Jul 2026 22:28:28 -0500 Subject: [PATCH 13/20] Republish: fix build_pypi_dist to use exact sonames for auditwheel --exclude (glob patterns don't work on cibuildwheel v2.22.0's pinned auditwheel 6.1.0) From 993dedaef49311c38250478644bd4df44f8fe22c Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Wed, 15 Jul 2026 10:12:34 -0500 Subject: [PATCH 14/20] use fork --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 108af751..59b46bc9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,8 +28,8 @@ description = "Simulation Domain Extensions for the NWChemEx ecosystem" license = { text = "Apache-2.0" } requires-python = ">=3.8" dependencies = [ - "nwchemex-pluginplay", - "nwchemex-chemist", + "nwchemex-pluginplay @ git+https://github.com/ryanmrichard/PluginPlay", + "nwchemex-chemist @ git+https://github.com/ryanmrichard/Chemist", ] [tool.scikit-build] From 3a766a6c8ba09307cb15b43a0bd55f8de7abd575 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Mon, 3 Aug 2026 12:16:22 -0500 Subject: [PATCH 15/20] add pre-commit to gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 8957ea96..dc56d3f4 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,6 @@ install/ # These are MacOS files .DS_Store + +# Automatically installed in dev mode +.pre-commit-config.yaml From ce268ec407f8b5cdc96a0c120bca78820700be37 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Mon, 3 Aug 2026 12:27:22 -0500 Subject: [PATCH 16/20] update pyproject.toml --- pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 59b46bc9..b1fc1f47 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,6 +32,9 @@ dependencies = [ "nwchemex-chemist @ git+https://github.com/ryanmrichard/Chemist", ] +[project.optional-dependencies] +dev = ["pytest", "pre-commit"] + [tool.scikit-build] metadata.version.provider = "scikit_build_core.metadata.setuptools_scm" cmake.build-type = "Release" @@ -46,4 +49,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 = ["-DDEVELOPER_SETUP=ON"] From 4bc8040ebbff23716990c57d09513362844f70a4 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Tue, 4 Aug 2026 11:52:23 -0500 Subject: [PATCH 17/20] 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 bf2537cd..5a5f216d 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -33,3 +33,6 @@ jobs: uses: ryanmrichard/.github/.github/workflows/test_nwx_cmake_build.yaml@master with: run_python_tests: "true" + + test_pip_build: + uses: ryanmrichard/.github/.github/workflows/test_nwx_pip_build.yaml@master From a244cb4ae27d727ac415ad9669f740c47b90bfc3 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Tue, 4 Aug 2026 21:45:45 -0500 Subject: [PATCH 18/20] move nwxcmake/pybind11 to project --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b1fc1f47..29c095a7 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 = "Simulation Domain Extensions for the NWChemEx ecosystem" license = { text = "Apache-2.0" } requires-python = ">=3.8" dependencies = [ + "pybind11", + "nwchemex-nwxcmake @ git+https://github.com/ryanmrichard/NWXCMake", "nwchemex-pluginplay @ git+https://github.com/ryanmrichard/PluginPlay", "nwchemex-chemist @ git+https://github.com/ryanmrichard/Chemist", ] From e438428c95c330c66e43130d54e3f928d539f27e Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Wed, 5 Aug 2026 10:32:34 -0500 Subject: [PATCH 19/20] update nightly --- .github/workflows/nightly.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index 13a475e6..f4246247 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -14,13 +14,20 @@ # 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_pip_build: + uses: ryanmrichard/.github/.github/workflows/test_nwx_pip_build.yaml@master From cd326c78bfbe1410c7ec53edc1428d78988ff67e Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Thu, 6 Aug 2026 09:39:01 -0500 Subject: [PATCH 20/20] 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 | 4 ++-- .github/workflows/pull_request.yaml | 10 +++++----- cmake/get_nwx_cmake.cmake | 2 +- pyproject.toml | 6 +++--- 5 files changed, 16 insertions(+), 18 deletions(-) diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index bfa11a84..71e1f134 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -18,21 +18,21 @@ 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: "simde_cxx_api" 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] @@ -43,11 +43,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" @@ -78,4 +77,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 f4246247..a751b3e8 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -25,9 +25,9 @@ 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_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 5a5f216d..cd68ed1e 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -18,21 +18,21 @@ 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: "simde_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_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 c936012a..9188ad48 100644 --- a/cmake/get_nwx_cmake.cmake +++ b/cmake/get_nwx_cmake.cmake @@ -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 29c095a7..4557adf4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,9 +27,9 @@ license = { text = "Apache-2.0" } requires-python = ">=3.8" dependencies = [ "pybind11", - "nwchemex-nwxcmake @ git+https://github.com/ryanmrichard/NWXCMake", - "nwchemex-pluginplay @ git+https://github.com/ryanmrichard/PluginPlay", - "nwchemex-chemist @ git+https://github.com/ryanmrichard/Chemist", + "nwchemex-nwxcmake>=0.1.0", + "nwchemex-pluginplay>=1.0.63", + "nwchemex-chemist>=1.3.44", ] [project.optional-dependencies]