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

Graph Preview States For New Node #12908

Merged
merged 3 commits into from
Oct 28, 2022
Merged

Graph Preview States For New Node #12908

merged 3 commits into from
Oct 28, 2022

Conversation

QilongTang
Copy link
Contributor

@QilongTang QilongTang commented May 20, 2022

Please Note:

  1. Before submitting the PR, please review How to Contribute to Dynamo
  2. Dynamo Team will meet 1x a month to review PRs found on Github (Issues will be handled separately)
  3. PRs will be reviewed from oldest to newest
  4. If a reviewed PR requires changes by the owner, the owner of the PR has 30 days to respond. If the PR has seen no activity by the next session, it will be either closed by the team or depending on its utility will be taken over by someone on the team
  5. PRs should use either Dynamo's default PR template or one of these other template options in order to be considered for review.
  6. PRs that do not have one of the Dynamo PR templates completely filled out with all declarations satisfied will not be reviewed by the Dynamo team.
  7. PRs made to the DynamoRevit repo will need to be cherry-picked into all the DynamoRevit Release branches that Dynamo supports. Contributors will be responsible for cherry-picking their reviewed commits to the other branches after a LGTM label is added to the PR.

Purpose

Per https://jira.autodesk.com/browse/DYN-4357, enable Graph Preview States for new node
RunPreviewState

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated

Release Notes

enable Graph Preview States for new node

Reviewers

@DynamoDS/dynamo

FYIs

(FILL ME IN, Optional) Names of anyone else you wish to be notified of

previewGraphData = engineController.PreviewGraphSyncData(modifiedNodes,verboseLogging);
TargetedWorkspace = workspace;
modifiedNodes = ComputeModifiedNodes(workspace);
previewGraphData = engineController.PreviewGraphSyncData(modifiedNodes, verboseLogging);
Copy link
Contributor Author

@QilongTang QilongTang May 20, 2022

Choose a reason for hiding this comment

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

@aparajit-pratap @mjkkirschner @sm6srw @pinzart90 I have a question, if a graph(in manual mode) has been run once, then the user add a new node, what should this function return? I would expect this function to return me the new node's node id, but it is currently returning an empty set and causing a bug.

Copy link
Member

@mjkkirschner mjkkirschner May 20, 2022

Choose a reason for hiding this comment

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

was PreviewGraphSyncData returning empty list before your change to ComputeModifiedNodes? To clarify - which function were you referring to?

Copy link
Contributor Author

@QilongTang QilongTang May 20, 2022

Choose a reason for hiding this comment

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

@mjkkirschner Previously the function PreviewGraphSyncData is also returning empty. modifiedNodes were always all of the nodes in workspace so I would not trust the return value at all. As you can see from the comment from Ben, that TODO from 7 years ago never finished. Right now I am setting the modified nodes as an example, and in my case, I am adding a new node to the existing workspace, but this function does not return the expected results.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the description of the PreviewGraphSyncData function is This is called on the main thread from PreviewGraphSyncData to generate the list of node id's that will be executed on the next run. I would expect it to return the id of newly added node.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks to Turbo Team who fixed this API, this is now working

@QilongTang QilongTang changed the title Graph Preview States [Blocked] Graph Preview States May 31, 2022
@QilongTang QilongTang changed the title [Blocked] Graph Preview States Graph Preview States Oct 27, 2022
@QilongTang QilongTang added this to the 2.17.0 milestone Oct 27, 2022
@QilongTang QilongTang changed the title Graph Preview States Graph Preview States For New Node Oct 27, 2022
@QilongTang QilongTang marked this pull request as ready for review October 27, 2022 17:22
@QilongTang QilongTang merged commit 712eb41 into master Oct 28, 2022
@QilongTang QilongTang deleted the GraphPreviewStates branch October 28, 2022 18:28
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