-
Notifications
You must be signed in to change notification settings - Fork 7
(WIP) LIU-455: Move the simple DALiuGEApps to simple PyFuncApps #352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Ryan Bunney <[email protected]>
This deletes lots of code and makes it easier to drop them in-place. Signed-off-by: Ryan Bunney <[email protected]>
Reviewer's GuideThis PR migrates simple DALiuGE applications to pure PyFuncApps, refactors the branch app implementation accordingly, updates the corresponding tests to leverage the new functions, and enhances drop loader resilience. Class diagram for refactored simple DALiuGE Apps to PyFuncAppsclassDiagram
class BarrierAppDROP
class CopyApp
class PyFuncApp
%% Removed classes
class SleepApp
class RandomArrayApp
class HelloWorldApp
class UrlRetrieveApp
class ListAppendThrashingApp
class BranchAppDrop
%% New/Refactored classes and functions
class SleepAndCopyApp {
+float sleep_time
+run()
}
class Branch {
+int bufsize
+bool result
+write_results(result: bool)
}
%% PyFunc-based functions
class sleep {
+sleep_time: float
}
class hello_world {
+greet: str
}
class random_array {
+low: float
+high: float
+size: int
+integer: bool
+seed: int
}
class retrieve_url {
+url: str
}
class list_thrashing {
+n: int
}
%% Inheritance
SleepAndCopyApp --|> CopyApp
Branch --|> PyFuncApp
%% Removed classes inheritances (for context)
SleepApp --|> BarrierAppDROP
RandomArrayApp --|> BarrierAppDROP
HelloWorldApp --|> BarrierAppDROP
UrlRetrieveApp --|> BarrierAppDROP
ListAppendThrashingApp --|> BarrierAppDROP
BranchAppDrop --|> BarrierAppDROP
%% Indicate that PyFuncApps are now functions, not classes
sleep ..> PyFuncApp : now a function
hello_world ..> PyFuncApp : now a function
random_array ..> PyFuncApp : now a function
retrieve_url ..> PyFuncApp : now a function
list_thrashing ..> PyFuncApp : now a function
Class diagram for refactored Branch app (branch.py)classDiagram
class PyFuncApp
class Branch {
+int bufsize
+bool result
+write_results(result: bool)
}
Branch --|> PyFuncApp
%% Removed class
class BranchAppDrop
BranchAppDrop --|> BarrierAppDROP
%% Note: BranchAppDrop replaced by Branch(PyFuncApp)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
- Still need to fix unittests by updating existing graphs. Signed-off-by: Ryan Bunney <[email protected]>
| import logging | ||
| import time | ||
| import numpy as np | ||
| # from tests.data.example_eagle import RandomArrayApp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The doxygen comments for the new functions are not required at all and we should remove them. However, we might then want to move all the functions into the simple_functions.py file and just leave the real Apps in here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think they still need to be there because otherwise the dlg_paletteGen won't parse them for the EAGLE palettes (from what I understand, this is what the tag: daliuge is for).
|
@awicenec this PR is still marked as a draft and has been put on hold, so don't worry about giving it any in-depth review for the time being. |
JIRA Ticket
Type
Problem/Issue
Solution
Checklist
Summary by Sourcery
Migrate simple built-in DALiuGE applications from custom BarrierAppDROP subclasses to function-based PyFuncApp definitions, refactor the Branch app accordingly, adjust drop loader behavior for empty inputs, and update tests to exercise the new PyFuncApp APIs
New Features:
Bug Fixes:
Enhancements:
Tests: