Skip to content

update repo - #11

Open
LouieSlocombe wants to merge 1 commit into
llnl:masterfrom
SMTG-Bham:modernise-packaging
Open

update repo#11
LouieSlocombe wants to merge 1 commit into
llnl:masterfrom
SMTG-Bham:modernise-packaging

Conversation

@LouieSlocombe

Copy link
Copy Markdown

No description provided.

Copilot AI lite review requested due to automatic review settings August 10, 2026 16:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR modernizes the project’s build/packaging workflow by migrating from legacy setup.py/Makefile-based builds to a meson-python (pyproject.toml + meson.build) build, updating imports to use installed-package paths, and adding CI + pytest coverage to validate the compiled extensions and example workflows end-to-end.

Changes:

  • Replace setup.py/Makefile packaging with Meson build definitions and a PEP 517 pyproject.toml backend.
  • Add smoke + end-to-end pytest suites (including “slow” example runs) and CI to build/install/test on Linux and macOS.
  • Update internal imports and CLI modules to work as installed console scripts (with optional dependency handling for phonopy).

Reviewed changes

Copilot reviewed 39 out of 40 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_extensions.py Adds smoke tests for compiled extensions and a few core routines.
tests/test_examples.py Adds end-to-end example runs via csld_main and checks physics-level invariants.
tests/conftest.py Ensures tests exercise the installed package (not the source tree) and provides example fixture.
setup.py Removed legacy setuptools/Cython build entrypoint.
setup.cfg Removed legacy setuptools config.
README.md Updates installation instructions for pip/Meson flow and adds conda/dev guidance.
pyproject.toml Introduces PEP 517 build config, dependencies, and console scripts.
PKG-INFO Removed generated legacy packaging metadata.
meson.build Adds top-level Meson project config (languages, NumPy/f2py include discovery, LAPACK detection, installs).
manual.rst Updates installation docs to the new pip install . + extras workflow.
MANIFEST.in Removed legacy sdist include rule.
Makefile Removed legacy compilation driver for f2py artifacts.
examples/Si/fit-forcefield.sh Switches to calling installed csld_main instead of a repo-relative script path.
environment.yml Adds a conda environment to provide compilers, BLAS/LAPACK, and build tooling.
cssolve/setup.py Removed legacy cssolve packaging script.
cssolve/meson.build Adds Meson targets to build/install cssolve.bregman and Python sources.
cssolve/csfit.py Updates import to use installed cssolve.bcs_driver.
cssolve/bregman_func.py Updates import to use installed cssolve.bregman.
csld/util/meson.build Installs csld.util sources and ensures periodic_table.json is installed next to module.
csld/util/mathtool.py Updates extension import to csld._c_util.
csld/util/io_utils.py Replaces Python 2 basestring check with str.
csld/symmetry_structure.py Updates spglib dataset access style to attribute-based API.
csld/structure.py Updates compiled-extension imports to installed package module paths.
csld/phonon/phonon.py Updates f2py module import to csld.phonon.f_phonon.
csld/phonon/meson.build Adds Meson target for building/installing csld.phonon.f_phonon and phonon Python sources.
csld/meson.build Installs core csld Python sources and subdirs.
csld/lattice_dynamics.py Updates compiled-extension imports to installed package module paths.
csld/cli/polaron_main.py Refactors into a proper console-script main() while keeping global options behavior.
csld/cli/phonopy_qha.py Defers optional phonopy import errors until script execution; adds main() wrapper.
csld/cli/meson.build Installs CLI modules for console scripts.
csld/cli/csld_main.py Adds main() entrypoint for console script.
csld/cli/cs_fit.py Adds main() entrypoint and updates csfit() unpacking to match return signature.
csld/cli/init.py Documents CLI entrypoints and their console-script mappings.
csld/basic_lattice_model.py Updates compiled-extension imports to installed package module paths.
csld/analyzer.py Updates spglib dataset access to attribute-based API and updates docstrings accordingly.
compile/f_util/meson.build Adds Meson target to build/install csld.f_util f2py extension.
compile/c_util/meson.build Adds Meson target to build/install csld._c_util Cython/C++ extension.
compile/c_util/_c_util.pyx Sets language_level=3 for Cython.
.gitignore Adds ignores for Meson, wheels, and generated f2py/cython artifacts.
.github/workflows/ci.yml Adds CI workflow to build/install and run tests on Linux/macOS + build wheel.

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

Comment thread pyproject.toml
"meson>=1.2",
"ninja",
"Cython>=3.0",
"numpy>=2.0",
Comment thread .github/workflows/ci.yml
Comment on lines +38 to +41
run: |
brew install gcc pkg-config
# gfortran ships inside the gcc formula
echo "FC=$(brew --prefix gcc)/bin/gfortran" >> "$GITHUB_ENV"
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.

2 participants