Skip to content
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

feature/#1197 pass job as metadata for event #1277

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

toan-quach
Copy link
Member

Copy link
Contributor

github-actions bot commented May 10, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
18247 15977 88% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
taipy/core/_entity/_reload.py 100% 🟢
taipy/core/_orchestrator/_orchestrator.py 93% 🟢
taipy/core/submission/_submission_manager.py 98% 🟢
taipy/core/submission/submission.py 95% 🟢
taipy/gui_core/_context.py 58% 🟢
TOTAL 89% 🟢

updated for commit: 95b902f by action🐍

Copy link
Member

@jrobinAV jrobinAV left a comment

Choose a reason for hiding this comment

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

  • We are missing the unit tests covering the new code on both reload.py and submission.py modules.
  • Even if the code looks smart, I don't like giving the notification responsibility to the entity itself. For me, it should be the repository/self_setter layer.

We can discuss and try to challenge your solution to see if we can propose a better design.

taipy/core/_entity/_reload.py Show resolved Hide resolved
@toan-quach toan-quach force-pushed the feature/#1197-add-job-to-on-submission-change-event branch from 44e9311 to a47bac4 Compare May 15, 2024 04:44
@toan-quach toan-quach requested a review from jrobinAV May 16, 2024 07:02
EventOperation.UPDATE,
"submission_status",
submission._submission_status,
job_triggered_submission_status_changed=job.id,
Copy link
Member

Choose a reason for hiding this comment

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

This parameter name is exposed to the user through the event. It becomes an attribute of the event. We must find a better name. What about: "job_id"?

Copy link
Member Author

Choose a reason for hiding this comment

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

a bit vague imho, how about trigger_job_id?

@@ -174,7 +174,10 @@ def submission_status_callback(self, submission_id: t.Optional[str]):
self.gui._call_user_callback(
client_id,
submission_name,
[core_get(submission.entity_id), {"submission_status": new_status.name}],
[
core_get(submission.entity_id),
Copy link
Member

Choose a reason for hiding this comment

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

core_get(submission.entity_id) is a scenario. I guess we want to pass the submission instead: core_get(submission.id).

@FredLL-Avaiga @toan-quach What do you think?

Copy link
Member

Choose a reason for hiding this comment

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

the doc indicates : 1st param is a submittable (scenario or sequence)
We could add the submission to the detail but I think the main object is rightly the submittable.

Copy link
Member Author

Choose a reason for hiding this comment

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

well, I'm not sure either so I don't have any comments on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants