Skip to content

PR-[10] - feat: add Windows CI support - #258

Draft
San1357 wants to merge 104 commits into
theochem:masterfrom
San1357:pr-10/windows-ci
Draft

PR-[10] - feat: add Windows CI support #258
San1357 wants to merge 104 commits into
theochem:masterfrom
San1357:pr-10/windows-ci

Conversation

@San1357

@San1357 San1357 commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Add Windows CI support to the pytest workflow.

Changes

  • Added windows-latest to the OS matrix in .github/workflows/pytest.yaml
  • Added separate install steps for Windows vs non-Windows runners
  • Windows uses pip install --no-build-isolation with cmake and ninja pre-installed

Testing

CI will verify that the build and tests pass on Windows with Python 3.9, 3.10, 3.11, and 3.12.

Related

  • Part of PR-10 (Windows CI support)
  • Complements existing Ubuntu and macOS CI coverage

Aayush Gupta and others added 30 commits June 5, 2026 00:42
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
PR[1]: build: migrate from setuptools to scikit-build-core
PR[2] : feat: add libcint C extension bindings for various integrals
PR[3]: feat: use PyArray_GETPTR instead of PyLong_AsVoidPtr + fix dylib rpath
PR[4]: fix: platform-aware libcint loading + moment integral libcint v6 fix
PR-5 - feat: add C shell loop for all 1-electron integrals

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Windows CI, but also substantially rewrites libcint packaging and APIs.

Changes:

  • Expands CI across Windows, macOS, and Ubuntu.
  • Migrates builds to CMake/scikit-build-core with native bindings.
  • Replaces CBasis integral APIs and adds extensive tests.

Reviewed changes

Copilot reviewed 7 out of 19 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
.github/workflows/pytest.yaml Adds platform-specific CI setup and execution.
CMakeLists.txt Builds and packages libcint bindings.
pyproject.toml Migrates packaging to scikit-build-core.
gbasis/integrals/src/libcint_wrap.c Implements native integral wrappers.
gbasis/integrals/libcint.py Reworks the Python libcint API.
gbasis/evals/_deriv.py Adds explicit Hermite argument casting.
tests/test_libcint.py Expands native-binding tests.
Suppressed comments (3)

gbasis/integrals/src/libcint_wrap.c:480

  • The Cartesian gradient bindings have the same component-loss issue as the spherical variants: libcint emits three components, while the scalar macro exposes only component zero. Switch these to a three-component wrapper and propagate that shape through the Python API.
DEFINE_INT1E_LOOP_FN(ipkin_integral_array, cart, int1e_ipkin, int1e_ipkin)
DEFINE_INT1E_LOOP_FN(ipnuc_integral_array, cart, int1e_ipnuc, int1e_ipnuc)
DEFINE_INT1E_LOOP_FN(iprinv_integral_array, cart, int1e_iprinv, int1e_iprinv)

gbasis/integrals/src/libcint_wrap.c:485

  • The Cartesian GIAO bindings also route three-component libcint functions through the scalar macro, silently dropping two components. Use the multi-component wrapper and expose the full result in the Cartesian Python methods.
DEFINE_INT1E_LOOP_FN(ia01p_integral_array, cart, int1e_ia01p, int1e_ia01p)
DEFINE_INT1E_LOOP_FN(ircxp_integral_array, cart, int1e_cg_irxp, int1e_cg_irxp)
DEFINE_INT1E_LOOP_FN(igkin_integral_array, cart, int1e_igkin, int1e_igkin)
DEFINE_INT1E_LOOP_FN(igovlp_integral_array, cart, int1e_igovlp, int1e_igovlp)
DEFINE_INT1E_LOOP_FN(ignuc_integral_array, cart, int1e_ignuc, int1e_ignuc)

.github/workflows/pytest.yaml:64

  • MSYS2 also treats > as shell redirection, so the Windows command does not pass numpy>=2.0 to pip and writes to =2.0. Quote the requirement string.
          pip install numpy>=2.0 setuptools_scm scikit-build-core cmake ninja

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

DEFINE_INT1E_LOOP_FN_OPT(overlap_integral_array, sph, int1e_ovlp, int1e_ovlp)
DEFINE_INT1E_LOOP_FN_OPT(kinetic_integral_array, sph, int1e_kin, int1e_kin)
DEFINE_INT1E_LOOP_FN_OPT(nuclear_integral_array, sph, int1e_nuc, int1e_nuc)
DEFINE_INT1E_LOOP_FN_MULTICOMP(momentum_integral_array, sph, int1e_ipovlp, int1e_ipovlp, 3)
Comment on lines +460 to +462
DEFINE_INT1E_LOOP_FN(ipkin_integral_array, sph, int1e_ipkin, int1e_ipkin)
DEFINE_INT1E_LOOP_FN(ipnuc_integral_array, sph, int1e_ipnuc, int1e_ipnuc)
DEFINE_INT1E_LOOP_FN(iprinv_integral_array, sph, int1e_iprinv, int1e_iprinv)
Comment on lines +463 to +467
DEFINE_INT1E_LOOP_FN(ia01p_integral_array, sph, int1e_ia01p, int1e_ia01p)
DEFINE_INT1E_LOOP_FN(ircxp_integral_array, sph, int1e_cg_irxp, int1e_cg_irxp)
DEFINE_INT1E_LOOP_FN(igkin_integral_array, sph, int1e_igkin, int1e_igkin)
DEFINE_INT1E_LOOP_FN(igovlp_integral_array, sph, int1e_igovlp, int1e_igovlp)
DEFINE_INT1E_LOOP_FN(ignuc_integral_array, sph, int1e_ignuc, int1e_ignuc)
self._ovlp_minhalf = None


def overlap(self, transform=None):
Comment on lines +996 to +999
# Apply permutation
out = out[self._permutations, :][:, self._permutations]
# Apply permutation
out = out[self._permutations, :][:, self._permutations]
Comment thread CMakeLists.txt
Comment on lines +5 to +9
# Force MinGW compiler on Windows before project() declaration
if(WIN32)
set(CMAKE_C_COMPILER "gcc" CACHE STRING "" FORCE)
set(CMAKE_CXX_COMPILER "g++" CACHE STRING "" FORCE)
endif()
- name: Install development version (non-Windows)
if: ${{ runner.os != 'Windows' }}
run: |
pip install numpy>=2.0 setuptools_scm scikit-build-core cmake ninja
Comment on lines +1 to +3
/*
* libcint_wrap.c — Python/C API bindings for libcint GTO integral library.
*
Comment thread tests/test_libcint.py
Comment on lines +604 to +608
if integral == "gradient_kinetic":
# Compare C shell-loop against make_int1e path on same CBasis instance
lc_int = lc_basis.gradient_kinetic()
npt.assert_array_equal(lc_int.shape, (lc_basis.nbfn, lc_basis.nbfn))
assert np.all(np.isfinite(lc_int))

extern int int3c2e_sph(double *out, int *dims, int *shls, int *atm, int natm,
int *bas, int nbas, double *env, void *opt, double *cache);
extern void cint3c2e_sph_optimizer(CINTOpt **, int *, int, int *, int, double *);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants