-
Notifications
You must be signed in to change notification settings - Fork 636
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…14911) * Dynamo ML data ingestion Pipeline Extension. (#14749) * commit * updates * updates * Update DynamoCoreWpf.csproj * Update DynamoCore.csproj * remove extra whitespaces * updates * updates * new changes * switch to prod * add to dynamocore.sln * Control by feature flag. * Update DynamoMLDataPipelineExtension.cs * Update DynamoMLDataPipelineExtension.cs * Update DynamoMLDataPipeline.csproj * Separating the extension code from core code and addressing comments. * Update DynamoMLDataPipeline.csproj * Update to feature flag and some comments * Fix Analytics reference error * Fix failing tests. * Remove beta keyword * Make the test as failure --------- Co-authored-by: reddyashish <[email protected]>
- Loading branch information
1 parent
762914c
commit 79a3c97
Showing
29 changed files
with
1,000 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
using System; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Reflection; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<appSettings> | ||
<add key="StagingClientUrl" value="https://developer-stg.api.autodesk.com/exchange"/> | ||
<add key="StagingCollectionID" value="9R09ArUBUEDVRIGQ5OE373_L2C"/> | ||
<add key="ProductionClientUrl" value="https://developer.api.autodesk.com/exchange"/> | ||
<add key="ProductionCollectionID" value="jcQm4Ir2Z8L4ANOmziL1rd_L2C"/> | ||
</appSettings> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /> | ||
</startup> | ||
<runtime> | ||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" /> | ||
</dependentAssembly> | ||
</assemblyBinding> | ||
</runtime> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace DynamoMLDataPipeline | ||
{ | ||
// Attributes for the data request object. | ||
class Attribute | ||
{ | ||
[JsonProperty("category")] | ||
public string Category { get; set; } | ||
[JsonProperty("name")] | ||
public string Name { get; set; } | ||
[JsonProperty("value")] | ||
public string Value { get; set; } | ||
[JsonProperty("type")] | ||
public string Type { get; set; } | ||
|
||
public Attribute(string name, string value, string category = "application", string type = "String") | ||
{ | ||
Category = category; | ||
Name = name; | ||
Value = value; | ||
Type = type; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
|
||
namespace DynamoMLDataPipeline | ||
{ | ||
class BaseComponent : Dictionary<string, Dictionary<string, ObjectInfo>> | ||
{ | ||
private string objectId = "autodesk.design:components.base-1.0.0"; | ||
public BaseComponent(string name) | ||
{ | ||
var objectInfo = new ObjectInfo(name); | ||
var item = new Dictionary<string, ObjectInfo> | ||
{ | ||
{ "String", objectInfo } | ||
}; | ||
this.Add("objectInfo", item); | ||
} | ||
|
||
public string ObjectId { get { return objectId; } } | ||
} | ||
|
||
class ObjectInfo | ||
{ | ||
[JsonProperty("name")] | ||
public string Name { get; set; } | ||
|
||
public ObjectInfo(string name) | ||
{ | ||
Name = name; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
|
||
|
||
namespace DynamoMLDataPipeline | ||
{ | ||
class BaseBinaryAsset | ||
{ | ||
[JsonProperty("id")] | ||
public string Id { get; set; } | ||
} | ||
|
||
class UploadedBinaryAsset : BaseBinaryAsset | ||
{ | ||
public UploadedBinaryAsset(string guid) | ||
{ | ||
Id = guid; | ||
} | ||
} | ||
|
||
class BinaryAsset : BaseBinaryAsset | ||
{ | ||
public BinaryAsset() | ||
{ | ||
Id = Guid.NewGuid().ToString("N").ToUpper(); | ||
Parts = 1; | ||
IncludeUploadUrl = true; | ||
Type = "single"; | ||
} | ||
|
||
[JsonProperty("parts")] | ||
public int Parts { get; set; } | ||
[JsonProperty("includeUploadUrl")] | ||
public bool IncludeUploadUrl { get; set; } | ||
[JsonProperty("type")] | ||
public string Type { get; set; } | ||
} | ||
|
||
class BinaryAssets | ||
{ | ||
[JsonProperty("binaries")] | ||
public List<BaseBinaryAsset> Binaries { get; set; } | ||
|
||
public BinaryAssets() | ||
{ | ||
Binaries = new List<BaseBinaryAsset>(); | ||
} | ||
|
||
public void AddBinary(BaseBinaryAsset binary) | ||
{ | ||
Binaries.Add(binary); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using System.Collections.Generic; | ||
using Newtonsoft.Json; | ||
|
||
namespace DynamoMLDataPipeline | ||
{ | ||
class BinaryReferenceComponent : Dictionary<string, Dictionary<string, IPropertySet>> | ||
{ | ||
private string objectId = "autodesk.data:binary.reference.component-1.0.0"; | ||
public string ObjectId { get { return objectId; } } | ||
public BinaryReferenceComponent(string binaryId) | ||
{ | ||
var propertyDictionary = new Dictionary<string, IPropertySet>(); | ||
propertyDictionary.Add("String", new StringPropertySet(binaryId)); | ||
propertyDictionary.Add("Uint32", new IntPropertySet()); | ||
|
||
this.Add("binary_reference", propertyDictionary); | ||
} | ||
} | ||
|
||
class StringPropertySet : IPropertySet | ||
{ | ||
[JsonProperty("id")] | ||
public string Id { get; set; } | ||
[JsonProperty("revision")] | ||
public string Revision { get; set; } | ||
|
||
public StringPropertySet(string binaryId, string revision = "v0") | ||
{ | ||
Id = binaryId; | ||
Revision = revision; | ||
} | ||
} | ||
|
||
class IntPropertySet : IPropertySet | ||
{ | ||
[JsonProperty("end")] | ||
public int End { get; set; } | ||
[JsonProperty("start")] | ||
public int Start { get; set; } | ||
|
||
public IntPropertySet(int start = 0, int end = 8710) | ||
{ | ||
End = end; | ||
Start = start; | ||
} | ||
} | ||
|
||
interface IPropertySet { } | ||
} |
Oops, something went wrong.