Skip to content

Updating Sphinx documentation and typing for PyRosettaCluster#646

Open
klimaj wants to merge 142 commits intoRosettaCommons:mainfrom
klimaj:docstrings
Open

Updating Sphinx documentation and typing for PyRosettaCluster#646
klimaj wants to merge 142 commits intoRosettaCommons:mainfrom
klimaj:docstrings

Conversation

@klimaj
Copy link
Copy Markdown
Member

@klimaj klimaj commented Apr 7, 2026

This PR adds several improvements to the PyRosettaCluster framework (to be merged after #636 for incremental versioning).

Major changes (maintaining runtime functionality)

  1. Improve formatting and clarity of docstrings for Sphinx-based PyRosetta documentation.
  2. Consolidate typing aliases into a single pyrosetta.distributed.cluster.type_defs module for easier maintainability.
  3. Add typing to attributes in attrs classes.
  4. Clean up imports and typing (preserving Python-3.8 compatibility)
  5. Add pickle and cloudpickle warnings to relevant docstrings.
  6. Clarify and format logging and error messages.
  7. Add PackedPoseHasher and secure_read_pickle to the top-level pyrosetta.distributed.cluster namespace for easier usability.

Minor changes (updating runtime functionality)

  1. Update usage of dataclasses module to use the attrs package instead. Also package Dask task arguments in a new ExtraArgs attrs class (with slots and typing) instead of a simple dictionary.
  2. Slightly loosen a validation: test whether two Base64-encoded pickled Pose objects are identical -> test whether the scientific state of two Pose objects are identical.
  3. Handle edge case of single dictionary outputs from PyRosetta protocols decorated with the reserve_scores decorator.
  4. Handle edge case of unordered iterables (i.e., set objects) and raise exceptions: input PyRosetta protocols, and outputs produced by PyRosetta protocols, must be ordered for reproducibility purposes.
  5. Fix exception handling for Exception rather than BaseException.

klimaj added 30 commits March 17, 2026 15:41
@klimaj klimaj requested a review from lyskov April 7, 2026 19:28
@klimaj klimaj added documentation Improvements or additions to documentation enhancement New feature or request 03 PyRosetta industry labels Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

03 PyRosetta documentation Improvements or additions to documentation enhancement New feature or request industry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant