Skip to content

Initial phase of scikit-package migration - #56

Draft
cadenmyers13 wants to merge 16 commits into
diffpy:skpkg-migrationfrom
cadenmyers13:skpkg-migration
Draft

cadenmyers13 wants to merge 16 commits into
diffpy:skpkg-migrationfrom
cadenmyers13:skpkg-migration

Conversation

@cadenmyers13

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 dependencies (cxx-compiler, scons, libboost-devel, gsl, libobjcryst, cxxtest).
  • 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 the old conda-recipe/ used for the retired diffpy channel and the template setup.py.

tests ran with scons test and all tests pass

Still to do: pre-commit, replacing the GitHub workflows with SCons-based CI, and merging doc/manual into docs/

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

cadenmyers13 commented Oct 20, 2026 •

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

This branch has not been deployed

No deployments
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.

1 participant