FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Initial phase of scikit-package migration by cadenmyers13 · Pull Request #56 · diffpy/libdiffpy · GitHub

Repository navigation

Initial phase of scikit-package migration - #56

Merged
sbillinge merged 16 commits into
diffpy:skpkg-migrationfrom
cadenmyers13:skpkg-migration
Oct 23, 2026
Merged

sbillinge merged 16 commits into
diffpy:skpkg-migrationfrom
cadenmyers13:skpkg-migration

Conversation

cadenmyers13 commented Oct 20, 2026 •
edited
Loading

Copy link
Copy Markdown

What problem does this PR address?

Starts the migration of libdiffpy to the scikit-package standard. libdiffpy is a pure C++ library built with SCons, so only the non-Python parts of the template apply. The SCons build is unchanged.

Changes so far:

  • Generated the scikit-package template and moved the existing code into it. Source, SCons build files, tests, and examples keep their original paths.
  • Filled in requirements/ with the C++ build and test dependencies (cxx-compiler, scons, libboost-devel, gsl, libobjcryst, cxxtest, gcovr).
  • Converted README.md, LICENSE.txt, AUTHORS.txt, and CHANGELOG.md to .rst, keeping the project content. Updated the license and authors references in all source file headers.
  • Removed files that don't apply to a C++ library:
    • the old conda-recipe/ for the retired diffpy channel (conda-forge has its own feedstock)
    • the template's Python packaging files (setup.py, src/libdiffpy/, tests/, MANIFEST.in, requirements/pip.txt, and the pyproject.toml package metadata; only the tool config is kept)
    • the template's placeholder docs pages
    • the dead Travis CI config
  • Added the C++/SCons build files back to .gitignore.
  • CI:
    • tests-on-pr.yml: a new workflow that builds and runs the C++ tests with SCons in a conda-forge-only environment and uploads C++ coverage to Codecov.
    • release-github-on-tag.yml: releases to GitHub on tag using the scikit-package release scripts, without building a Python wheel.

Still to do:

  • pre-commit
  • replacing matrix-and-codecov.yml and build-and-publish-docs-on-dispatch.yml with SCons-based versions
  • merging doc/manual into docs/ and replacing the empty API page

cadenmyers13 marked this pull request as draft October 20, 2026 18:17

cadenmyers13 commented Oct 20, 2026 •
edited
Loading

Copy link
Copy Markdown
Author
  • Place all source code in scikit-package directory structure
  • Create CI that does everything that scikit-package CI does but for C++ code
  • Remove python specific modules liek version.py and the testing dir used for pytest
  • Decide if we need codecov, is there a replacement?
  • Remove python specific pre-commit config tools like .flake8, black, etc

Claude generated:

Versioning and release

  • Decide on the tag format (1.4.2 vs v1.4.2) and make these agree: release-scripts tag check, git describe --match in site_scons/libdiffpybuildutils.py, the tag: v regex in getversion(), and the feedstock source URL
  • Remove the manual FALLBACK_VERSION bump (or add it to the release checklist), so a release doesn't fail the SCons version check
  • Make sure the first release from migrated main is versioned after 1.4.1 (1.4.1 isn't in main's history)
  • Replace build-wheel-release-upload.yml with a workflow calling _check-tag-privilege.yml + _release-github.yml (no wheel, no PyPI)
  • Adapt .github/ISSUE_TEMPLATE/release_checklist.md, which assumes PyPI, python -m build and twine
  • Update conda-forge/libdiffpy-feedstock at the next release: license_file: LICENSE.rst, source URL tag format, and maybe run scons test in the feedstock tests (it only checks that the library file exists)

CI details

  • Linux, macOS, and Windows matrix (the feedstock builds Windows with dlfcn-win32)
  • Pin Python ≤ 3.14 for cxxtest
  • Handle the conda rpath in CI (a CI-only sconscript.local, or have SConstruct detect CONDA_PREFIX)
  • Compile and run examples/testlib.cpp against the installed library (the C++ version of the scikit-package "run the examples" check)
  • Fix the README |CI| badge filename once the workflow exists

Documentation

  • Merge doc/manual/source and docs/development_instructions.md into docs/source, then remove doc/
  • Replace docs/source/license.rst (still the template's BSD text) with the real license
  • Get the docs version from site_scons/libdiffpybuildutils.py instead of importlib.metadata
  • Replace the Python "Package API" page with C++ API docs (Doxygen + Breathe), or drop it
  • Docs publishing workflow (_release-docs.yml runs pip install -e ., so it needs a custom version)
  • Update the README pre-commit paragraph

Leftover template and legacy files

  • Cut pyproject.toml down to the [tool.*] sections pre-commit uses
  • Remove MANIFEST.in and requirements/pip.txt
  • Remove .travis.yml and .travis-sconscript.local
  • Set up codespell for C++ and data files (skip *.dat, *.cif, *.stru, and add an ignore-words list)

Process

  • Add a news item to every PR (check-news-item.yml already works)
  • Open a scikit-package issue for C++ library support, and propose a reusable C++ test workflow for release-scripts

Separate issues (not blocking)

  • scons -j parallel build sometimes produces empty test object files
  • CxxTest is unmaintained and tied to Python versions; consider moving to GoogleTest or Boost.Test

cadenmyers13 marked this pull request as ready for review October 21, 2026 13:22

cadenmyers13 commented Oct 21, 2026 •
edited
Loading

Copy link
Copy Markdown
Author

@sbillinge ready for review. Another PR will be put in for more changes, but it would be good to get this merged to keep edits on this PR low

PS, @SYMSCAE helped me with this on a call yesterday

sbillinge merged commit 6fa8582 into diffpy:skpkg-migration Oct 23, 2026
1 check passed
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL