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

Add Analytics Coverage for Python Operations #11208

Merged
merged 13 commits into from
Oct 29, 2020

Conversation

QilongTang
Copy link
Contributor

@QilongTang QilongTang commented Oct 27, 2020

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

Adding anaytics coverage for Python operations, way points added as part of https://git.autodesk.com/Dynamo/Analytics.NET/pull/22.

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

Reviewers

@DynamoDS/dynamo

FYIs

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

@mjkkirschner
Copy link
Member

Is this attached to a specific jira task?

@@ -147,6 +147,10 @@
<Name>PythonNodeModels</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\NodeServices\DynamoServices.csproj">
Copy link
Member

Choose a reason for hiding this comment

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

whats added from this project?

Copy link
Contributor Author

@QilongTang QilongTang Oct 27, 2020

Choose a reason for hiding this comment

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

Analytics is only available from logging, so in the future, everytime we want to track on extension layer (at least the OOTB ones developed by us), this will be a dependency in that case seems. We could expose APIs but unless we expose dashboards as well, APIs wont be useful I think

@@ -209,14 +218,24 @@ private void OnMoreInfoClicked(object sender, RoutedEventArgs e)

private void OnEngineChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
{
if (CachedEngine != nodeModel.Engine || originalScript != editText.Text) { nodeWasModified = true; }
if (CachedEngine != nodeModel.Engine || originalScript != editText.Text)
{
Copy link
Member

Choose a reason for hiding this comment

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

👍

@QilongTang
Copy link
Contributor Author

Is this attached to a specific jira task?

https://jira.autodesk.com/browse/DYN-3024

@QilongTang QilongTang changed the title Add Analytics Coverage for Python Editor Add Analytics Coverage for Python Operations Oct 28, 2020
@QilongTang QilongTang requested a review from pinzart October 28, 2020 17:07
@QilongTang
Copy link
Contributor Author

Seems https://github.com/DynamoDS/Dynamo/blob/master/test/DynamoCoreTests/AnalyticsTests.cs#L76 already covers regular event tracking on analytics side so new analytics code can be added without adding unit test unless a new type of type introduced. @pinzart What do you think?

@@ -8,7 +8,7 @@ public class SideBySideViewModel : IDiffViewViewModel
public SideBySideDiffModel DiffModel { get; set; }
public DiffPaneModel AfterPane { get { return DiffModel.NewText; } }
public DiffPaneModel BeforePane { get { return DiffModel.OldText; } }
private bool HasChanges { get { return DiffModel.NewText.HasDifferences | DiffModel.OldText.HasDifferences; } }
public bool HasChanges { get { return DiffModel.NewText.HasDifferences | DiffModel.OldText.HasDifferences; } }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mmisol @aparajit-pratap @mjkkirschner I dont recall why we specifically made this property private, but I would like to expose it on interface level and add analytics coverage so we know not only user clicked accept or Reject but also if there are any real code changes.

@QilongTang QilongTang marked this pull request as ready for review October 28, 2020 20:24
@pinzart90
Copy link
Contributor

Seems https://github.com/DynamoDS/Dynamo/blob/master/test/DynamoCoreTests/AnalyticsTests.cs#L76 already covers regular event tracking on analytics side so new analytics code can be added without adding unit test unless a new type of type introduced. @pinzart What do you think?

Existing unit tests should be good enough

Copy link
Contributor

@pinzart90 pinzart90 left a comment

Choose a reason for hiding this comment

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

LGTM

@QilongTang QilongTang requested a review from zeusongit October 29, 2020 15:01
Copy link
Contributor

@zeusongit zeusongit left a comment

Choose a reason for hiding this comment

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

LGTM

@QilongTang
Copy link
Contributor Author

Merging. @mjkkirschner I am thinking to actually cherry-picking this into RC2.9.0 so we have Python3 feature adoption baseline earlier. Any concerns?

@QilongTang QilongTang merged commit 67f7976 into master Oct 29, 2020
@QilongTang QilongTang deleted the AddingAnalyticsCoverageForPythonEditor branch October 29, 2020 17:26
QilongTang added a commit that referenced this pull request Oct 30, 2020
* Initial Commit

* Analytics For Migration Assistant

* More changes

* Update Code Sequence

* Add Analytics for Python Evaluation

* Clean Up

* More comments

* Updates

* Updates
QilongTang added a commit that referenced this pull request Oct 30, 2020
* Initial Commit

* Analytics For Migration Assistant

* More changes

* Update Code Sequence

* Add Analytics for Python Evaluation

* Clean Up

* More comments

* Updates

* Updates
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.

4 participants