update repo - #11
Open
LouieSlocombe wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
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 517pyproject.tomlbackend. - 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.
| "meson>=1.2", | ||
| "ninja", | ||
| "Cython>=3.0", | ||
| "numpy>=2.0", |
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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.