Skip to content

Conversation

tclose
Copy link
Contributor

@tclose tclose commented Apr 10, 2025

Types of changes

  • New feature (non-breaking change which adds functionality)

Summary

Adds two functions serialize_task_class and unserialize_task_class to enable you to serialise task definitions to dictionaries (i.e. to be written to JSON/YAML if desired)

Checklist

  • I have added tests to cover my changes (if necessary)
  • I have updated documentation (if necessary)

Copy link

codecov bot commented Apr 10, 2025

Codecov Report

Attention: Patch coverage is 93.82239% with 16 lines in your changes missing coverage. Please review.

Project coverage is 88.74%. Comparing base (da37abb) to head (a490a01).
Report is 29 commits behind head on main.

Files with missing lines Patch % Lines
pydra/utils/tests/test_general.py 92.20% 4 Missing and 2 partials ⚠️
pydra/compose/base/task.py 78.26% 4 Missing and 1 partial ⚠️
pydra/utils/general.py 91.66% 2 Missing and 2 partials ⚠️
pydra/compose/base/helpers.py 91.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #792      +/-   ##
==========================================
+ Coverage   88.62%   88.74%   +0.12%     
==========================================
  Files          83       84       +1     
  Lines       17763    17885     +122     
  Branches     3456     3485      +29     
==========================================
+ Hits        15742    15872     +130     
+ Misses       1654     1643      -11     
- Partials      367      370       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tclose tclose requested review from djarecka and effigies April 10, 2025 11:41
@tclose tclose force-pushed the task-def-dict-util branch 2 times, most recently from 71f0573 to 058c01f Compare April 14, 2025 02:24
@tclose tclose changed the base branch from main to handle-none-outputs April 16, 2025 04:46
@tclose tclose changed the base branch from handle-none-outputs to main April 16, 2025 04:46
@tclose tclose force-pushed the task-def-dict-util branch from 058c01f to 063a83f Compare April 17, 2025 01:55
Copy link
Contributor

@effigies effigies left a comment

Choose a reason for hiding this comment

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

Makes sense. task_as_dict() is a somewhat confusing name, though...

Copy link
Collaborator

@djarecka djarecka left a comment

Choose a reason for hiding this comment

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

i left just a couple of questions/suggestions. But it's a great addition

@tclose tclose force-pushed the task-def-dict-util branch from b6daee4 to 55bab79 Compare April 29, 2025 06:33
…ture and structure, respectively, to match terminology used by attrs
@tclose tclose merged commit b2f4e04 into main Apr 29, 2025
30 checks passed
@tclose tclose deleted the task-def-dict-util branch April 29, 2025 07:23
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.

3 participants