From 0984ed997cd1b8be296d1e2b4248ce22ff507e03 Mon Sep 17 00:00:00 2001
From: reddyashish <43763136+reddyashish@users.noreply.github.com>
Date: Tue, 16 Apr 2024 17:42:20 -0700
Subject: [PATCH] Final improvements to Dynamo ML data pipeline. (#15116)
(#15145)
* updates
* more updates
* Update DynamoViewModel.cs
* Update DynamoMLDataPipeline.cs
* Remove IExtensionSource from DynamoMLDataPipelineExtension.
* Update PublicAPI.Unshipped.txt
* Update IDSDKManager.cs
* updates
* Update DynamoMLDataPipeline.cs
* Update DynamoMLDataPipeline.cs
* Update App.config
* update log message.
* change parameter type.
* Update DynamoMLDataPipeline.cs
* update greg nuget version.
* Use IOAuth2UserIDProvider interface
* update conflicts
* Update PublicAPI.Unshipped.txt
* rename to RequestAttribute
* change class name.
* update analytics info
* Update DynamoViewModel.cs
* add checks for authprovider
* Update DynamoMLDataPipeline.cs
* Remove PII data from workspace
* Update PIIDetector.cs
(cherry picked from commit 727fe42bed006c77dcac55d0fcdbc22afba38863)
---
.../Configuration/GraphChecksumItem.cs | 11 --
src/DynamoCore/Core/IDSDKManager.cs | 14 +-
src/DynamoCore/DynamoCore.csproj | 2 +-
src/DynamoCore/Models/DynamoModel.cs | 6 -
src/DynamoCore/PublicAPI.Unshipped.txt | 9 +-
src/DynamoCoreWpf/DynamoCoreWpf.csproj | 2 +-
.../ViewModels/Core/DynamoViewModel.cs | 77 ++++----
.../ViewModels/Core/WorkspaceViewModel.cs | 1 -
src/DynamoMLDataPipeline/App.config | 6 -
src/DynamoMLDataPipeline/BaseComponent.cs | 4 +-
src/DynamoMLDataPipeline/BinaryAsset.cs | 8 +-
.../BinaryReferenceComponent.cs | 10 +-
.../DynamoMLDataPipeline.cs | 165 +++++++-----------
.../DynamoMLDataPipeline.csproj | 26 +--
.../DynamoMLDataPipelineExtension.cs | 27 +--
src/DynamoMLDataPipeline/ExchangeComponent.cs | 8 +-
src/DynamoMLDataPipeline/InstanceAsset.cs | 2 +-
.../ParameterComponent.cs | 6 +-
.../{Attribute.cs => RequestAttribute.cs} | 4 +-
src/DynamoMLDataPipeline/Schema.cs | 6 +-
.../UploadAssetsRequestBody.cs | 2 +-
src/DynamoPackages/DynamoPackages.csproj | 2 +-
src/DynamoUtilities/Hash.cs | 3 +
src/DynamoUtilities/PIIDetector.cs | 12 +-
.../Properties/AssemblyInfo.cs | 1 +
.../PackageDetailsViewExtension.csproj | 2 +-
.../NodeDocumentationMarkdownGenerator.csproj | 2 +-
test/DynamoCoreTests/DynamoCoreTests.csproj | 2 +-
.../DynamoCoreWpfTests.csproj | 2 +-
.../PackageManagerTests.csproj | 2 +-
.../DynamoPackagesAnalyzer.csproj | 2 +-
31 files changed, 187 insertions(+), 239 deletions(-)
rename src/DynamoMLDataPipeline/{Attribute.cs => RequestAttribute.cs} (78%)
diff --git a/src/DynamoCore/Configuration/GraphChecksumItem.cs b/src/DynamoCore/Configuration/GraphChecksumItem.cs
index de6bfdd2fe8..8f5963c52a8 100644
--- a/src/DynamoCore/Configuration/GraphChecksumItem.cs
+++ b/src/DynamoCore/Configuration/GraphChecksumItem.cs
@@ -1,5 +1,4 @@
using System;
-using System.Collections.Generic;
namespace Dynamo.Configuration
{
@@ -13,14 +12,4 @@ public class GraphChecksumItem
public string Checksum { get; set; }
}
-
- ///
- /// Represents the stringified version of the nodes connections from a graph
- ///
- public class GraphChecksumPair
- {
- public string GraphId { get; set; }
-
- public List Checksum { get; set; }
- }
}
diff --git a/src/DynamoCore/Core/IDSDKManager.cs b/src/DynamoCore/Core/IDSDKManager.cs
index c3aff23ea2a..533b0768cc2 100644
--- a/src/DynamoCore/Core/IDSDKManager.cs
+++ b/src/DynamoCore/Core/IDSDKManager.cs
@@ -12,7 +12,7 @@ namespace Dynamo.Core
///
/// The class to provide auth APIs for IDSDK related methods.
///
- public class IDSDKManager : IOAuth2AuthProvider, IOAuth2AccessTokenProvider, IDisposable
+ public class IDSDKManager : IOAuth2AuthProvider, IOAuth2AccessTokenProvider, IOAuth2UserIDProvider, IDisposable
{
///
/// Used by the auth provider to request authentication.
@@ -78,6 +78,18 @@ public string Username
}
}
+ ///
+ /// Gets the userid of the logged in user.
+ ///
+ public string UserId
+ {
+ get
+ {
+ var result = IDSDK_GetUserInfo();
+ return result != null ? result.UserId : String.Empty;
+ }
+ }
+
///
/// Used by the auth provider to sign request with the authorized token.
///
diff --git a/src/DynamoCore/DynamoCore.csproj b/src/DynamoCore/DynamoCore.csproj
index 4f3cdcc70bd..930e9db7436 100644
--- a/src/DynamoCore/DynamoCore.csproj
+++ b/src/DynamoCore/DynamoCore.csproj
@@ -31,7 +31,7 @@
-
+
diff --git a/src/DynamoCore/Models/DynamoModel.cs b/src/DynamoCore/Models/DynamoModel.cs
index 2a41a547573..c13014e3ccf 100644
--- a/src/DynamoCore/Models/DynamoModel.cs
+++ b/src/DynamoCore/Models/DynamoModel.cs
@@ -155,11 +155,6 @@ internal LuceneSearchUtility LuceneUtility
///
internal Dictionary> GraphChecksumDictionary { get; set; }
- ///
- /// Return a list of GraphChecksumItems
- ///
- public List GraphChecksumList { get; set; }
-
#endregion
#region static properties
@@ -992,7 +987,6 @@ protected DynamoModel(IStartConfiguration config)
LuceneUtility.DisposeWriter();
}
- GraphChecksumList = new List();
GraphChecksumDictionary = new Dictionary>();
// This event should only be raised at the end of this method.
diff --git a/src/DynamoCore/PublicAPI.Unshipped.txt b/src/DynamoCore/PublicAPI.Unshipped.txt
index b2d6700c3d2..f1d04bf7b45 100644
--- a/src/DynamoCore/PublicAPI.Unshipped.txt
+++ b/src/DynamoCore/PublicAPI.Unshipped.txt
@@ -107,12 +107,6 @@ Dynamo.Configuration.GraphChecksumItem.Checksum.set -> void
Dynamo.Configuration.GraphChecksumItem.GraphChecksumItem() -> void
Dynamo.Configuration.GraphChecksumItem.GraphId.get -> string
Dynamo.Configuration.GraphChecksumItem.GraphId.set -> void
-Dynamo.Configuration.GraphChecksumPair
-Dynamo.Configuration.GraphChecksumPair.Checksum.get -> System.Collections.Generic.List
-Dynamo.Configuration.GraphChecksumPair.Checksum.set -> void
-Dynamo.Configuration.GraphChecksumPair.GraphChecksumPair() -> void
-Dynamo.Configuration.GraphChecksumPair.GraphId.get -> string
-Dynamo.Configuration.GraphChecksumPair.GraphId.set -> void
Dynamo.Configuration.GroupStyleItem
Dynamo.Configuration.GroupStyleItem.GroupStyleItem() -> void
Dynamo.Configuration.PreferenceSettings
@@ -374,6 +368,7 @@ Dynamo.Core.IDSDKManager.LoginStateChanged -> System.Action void
Dynamo.Core.IDSDKManager.RequestLogin -> System.Func