Skip to content

Move prepmd to the shared CCPBioSim workflows and add pre-commit - #50

Merged
harryswift01 merged 16 commits into
mainfrom
49-feature-move-to-the-shared-ccpbiosim-workflows
Oct 28, 2026
Merged

harryswift01 merged 16 commits into
mainfrom
49-feature-move-to-the-shared-ccpbiosim-workflows

Conversation

@harryswift01

Copy link
Copy Markdown
Member

Summary

This PR moves prepmd onto the shared CCPBioSim workflows, Renovate presets and pre-commit configuration in CCPBioSim/.github, so CI fixes are made once for every package instead of in each repository. It also fixes the Read the Docs build, makes the docs build without warnings, and fixes every ruff finding so pre-commit can run on pull requests. Closes #49.

Changes

  • Pull request CI: replace python-app.yml with pr.yaml, which runs Unit, Docs, Pre-commit and Conda build through the shared workflows, pinned to release 0.14.0, on Python 3.13 on ubuntu-26.04 and macos-26.
  • Unit tests: Unit calls ci-test-conda with environment.yaml (salilab and conda-forge), runs test/ with coverage, and reports to Coveralls.
  • Scheduled and main-branch workflows:
    • weekly-tests.yaml runs the unit tests every Monday.
    • weekly-docs.yaml builds the docs on both operating systems.
    • coveralls-main.yaml builds the coverage baseline on pushes to main.
  • Release: release.yaml, renamed from release.yml, uses the shared release-prepare, release-website and release-conda workflows with a dry-run input. The version is still updated in prepmd/__init__.py and CITATION.cff, and there is still no PyPI release.
  • License year: a new caller for the shared maintenance-license-year workflow.
  • Read the Docs: build with Python 3.13. requires-python excludes 3.14, so pip refused to install the package. Also drop myst-parser from extra_requirements, since it is a package in the docs extra, not an extra itself.
  • Docs warnings: the docs now build with warnings as errors.
    • Enable Google-style docstrings in conf.py, which the code uses throughout.
    • Add the missing blank lines before Args: and Returns: sections.
    • Rename Input: and Output: in lib/icp.py to Args: and Returns:.
  • New optional-dependency groups: testing (pytest, pytest-cov), installed by the shared test workflows, and pre-commit (pre-commit, ruff, pylint, rstcheck).
  • pre-commit:
    • Add the shared .pre-commit-config.yaml and the shared ruff settings (E, F, I, B, UP, line length 88).
    • Exclude test/test_data/ from the hooks, so the fixed-width PDB fixtures stay unchanged byte for byte.
  • Lint fixes: fix all 233 ruff findings in prepmd/ and test/, without changing behaviour:
    • formatting and import sorting
    • explicit imports in place of from openmm import * and from modeller import *
    • is None and type(x) is T comparisons
    • zip(..., strict=False), which keeps the current behaviour
    • except Exception in place of bare except (modeller raises ModellerError, an Exception, without a licence key, so the NO_MODELLER fallback still works)
    • raise ... from e
    • immutable default arguments
    • wrapped long lines, with the help text unchanged
  • Error messages: restore the "Run with --fmt cif to use it." hint, which was cut from the PDB download error, and add the missing space in "could not download sequence".
  • Whitespace: fix trailing whitespace and missing final newlines in the docs, logos and config files.
  • README: update the badges for the new workflows.

Testing

  • The docs build with warnings as errors (make -C docs html SPHINXOPTS="-W --keep-going") on Python 3.13.
  • Every pre-commit hook passes (pre-commit run --all-files).
  • In a conda environment built from environment.yaml:
    • all 18 prepmd modules import
    • test/test_packaging.py passes (4 tests)
    • prepmd --help and runmd --help run, and all 29 runmd help strings are identical to the originals
  • The inputs and secrets in every workflow match the pinned shared workflows, and actionlint reports no problems.
  • The integration tests in test/test_all.py were not run locally and will run in the Unit job on this PR.

Impact

  • CI and release fixes made in CCPBioSim/.github reach prepmd through Renovate pin updates instead of being repeated here.
  • Pull requests now build the docs, check the conda recipe and run pre-commit, so formatting, lint and docs warnings fail CI.
  • The Read the Docs build works again.
  • Coverage is measured on the Ubuntu leg only instead of merged across Ubuntu and macOS, so the first figure may change slightly.
  • The CI check names have changed.
  • Test jobs now time out after 60 minutes. Before, there was no limit set, so GitHub's 6-hour default applied.
  • The lowest-dependencies check is not enabled, because the runtime dependencies in pyproject.toml have no lower bounds. That needs floors first and is left for a follow-up.

Checklist

  • Tests added or updated
  • Documentation updated
  • If dependencies in pyproject.toml changed, the lower bounds were reviewed deliberately

@harryswift01 harryswift01 self-assigned this Oct 27, 2026
@harryswift01 harryswift01 added the enhancement New feature or request label Oct 27, 2026
@harryswift01 harryswift01 linked an issue Oct 27, 2026 that may be closed by this pull request
@harryswift01
harryswift01 requested a review from jimboid October 28, 2026 10:08

@jimboid jimboid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Happy to see this merge. We know it works on several other repos now.

@harryswift01
harryswift01 merged commit 68480ca into main Oct 28, 2026
11 of 13 checks passed
@harryswift01
harryswift01 deleted the 49-feature-move-to-the-shared-ccpbiosim-workflows branch October 28, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Move to the shared CCPBioSim workflows

2 participants