diff --git a/src/Config/CS_SDK.props b/src/Config/CS_SDK.props
index 5ad2265ce79..9eb8d9a18f9 100644
--- a/src/Config/CS_SDK.props
+++ b/src/Config/CS_SDK.props
@@ -35,8 +35,12 @@
true
false
-
- full
+
+
+ full
+
+
+ portable
false
diff --git a/src/DynamoCore/DynamoCore.csproj b/src/DynamoCore/DynamoCore.csproj
index b1100b3cca2..cad82bee639 100644
--- a/src/DynamoCore/DynamoCore.csproj
+++ b/src/DynamoCore/DynamoCore.csproj
@@ -31,7 +31,7 @@
-
+
diff --git a/src/DynamoCore/Graph/Nodes/NodeModel.cs b/src/DynamoCore/Graph/Nodes/NodeModel.cs
index b7e1edaf75a..8131c81469a 100644
--- a/src/DynamoCore/Graph/Nodes/NodeModel.cs
+++ b/src/DynamoCore/Graph/Nodes/NodeModel.cs
@@ -1222,6 +1222,20 @@ protected NodeModel(IEnumerable inPorts, IEnumerable outPo
RaisesModificationEvents = true;
}
+ ///
+ /// The method returns the assembly name from which the node originated.
+ ///
+ /// Assembly Name
+ internal virtual AssemblyName GetNameOfAssemblyReferencedByNode()
+ {
+ AssemblyName assemblyName = null;
+
+ var assembly = this.GetType().Assembly;
+ assemblyName = AssemblyName.GetAssemblyName(assembly.Location);
+
+ return assemblyName;
+ }
+
///
/// Here we try to find the correct port names and tooltips.
/// ideally we'd use the runtime information to correctly update or localize
diff --git a/src/DynamoCore/Graph/Nodes/ZeroTouch/DSFunctionBase.cs b/src/DynamoCore/Graph/Nodes/ZeroTouch/DSFunctionBase.cs
index a87667d2bce..26ccfea9c91 100644
--- a/src/DynamoCore/Graph/Nodes/ZeroTouch/DSFunctionBase.cs
+++ b/src/DynamoCore/Graph/Nodes/ZeroTouch/DSFunctionBase.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Reflection;
using System.Xml;
using Dynamo.Engine;
using Dynamo.Engine.CodeGeneration;
@@ -76,6 +77,24 @@ public override IdentifierNode GetAstIdentifierForOutputIndex(int outputIndex)
}
}
+ ///
+ /// The method returns the assembly name from which the node originated.
+ /// Only if the node was added from a package
+ ///
+ /// Assembly Name
+ internal override AssemblyName GetNameOfAssemblyReferencedByNode()
+ {
+ AssemblyName assemblyName = null;
+
+ var descriptor = this.Controller.Definition;
+ if (descriptor.IsPackageMember)
+ {
+ assemblyName = AssemblyName.GetAssemblyName(descriptor.Assembly);
+ }
+
+ return assemblyName;
+ }
+
///
/// Copy command will call it to serialize this node to xml data.
///
@@ -358,4 +377,4 @@ protected override AssociativeNode GetFunctionApplication(NodeModel model, List<
return rhs;
}
}
-}
\ No newline at end of file
+}
diff --git a/src/DynamoCore/Graph/Workspaces/WorkspaceModel.cs b/src/DynamoCore/Graph/Workspaces/WorkspaceModel.cs
index bc856d3685b..bb58ac0a0b9 100644
--- a/src/DynamoCore/Graph/Workspaces/WorkspaceModel.cs
+++ b/src/DynamoCore/Graph/Workspaces/WorkspaceModel.cs
@@ -2174,7 +2174,7 @@ internal PackageInfo GetNodePackage(NodeModel node)
throw new Exception("There are multiple subscribers to Workspace.CollectingNodePackageDependencies. " +
"Only PackageManagerExtension should subscribe to this event.");
}
- var assemblyName = GetNameOfAssemblyReferencedByNode(node);
+ var assemblyName = node.GetNameOfAssemblyReferencedByNode();
if (assemblyName != null)
{
return CollectingNodePackageDependencies(assemblyName);
diff --git a/src/DynamoCore/Models/DynamoModel.cs b/src/DynamoCore/Models/DynamoModel.cs
index 1914c756cc0..c1b267cd378 100644
--- a/src/DynamoCore/Models/DynamoModel.cs
+++ b/src/DynamoCore/Models/DynamoModel.cs
@@ -1472,11 +1472,18 @@ private void InitializeCustomNodeManager()
var customNodeSearchRegistry = new HashSet();
CustomNodeManager.InfoUpdated += info =>
{
+ //just bail in service mode.
+ if (IsServiceMode)
+ {
+ return;
+ }
+
if (customNodeSearchRegistry.Contains(info.FunctionId)
|| !info.IsVisibleInDynamoLibrary)
return;
- var elements = SearchModel.Entries.OfType().
+
+ var elements = SearchModel?.Entries.OfType().
Where(x =>
{
// Search for common paths and get rid of empty paths.
@@ -1494,6 +1501,7 @@ private void InitializeCustomNodeManager()
}
return;
}
+
customNodeSearchRegistry.Add(info.FunctionId);
var searchElement = new CustomNodeSearchElement(CustomNodeManager, info);
@@ -1530,6 +1538,7 @@ private void InitializeCustomNodeManager()
}
};
};
+
CustomNodeManager.DefinitionUpdated += UpdateCustomNodeDefinition;
}
@@ -2807,7 +2816,7 @@ internal void DumpLibraryToXml(object parameter)
string fileName = String.Format("LibrarySnapshot_{0}.xml", DateTime.Now.ToString("yyyyMMddHmmss"));
string fullFileName = Path.Combine(pathManager.LogDirectory, fileName);
- SearchModel.DumpLibraryToXml(fullFileName, PathManager.DynamoCoreDirectory);
+ SearchModel?.DumpLibraryToXml(fullFileName, PathManager.DynamoCoreDirectory);
Logger.Log(string.Format(Resources.LibraryIsDumped, fullFileName));
}
diff --git a/src/DynamoCore/Utilities/LuceneSearchUtility.cs b/src/DynamoCore/Utilities/LuceneSearchUtility.cs
index b4db72395df..953e76e4e91 100644
--- a/src/DynamoCore/Utilities/LuceneSearchUtility.cs
+++ b/src/DynamoCore/Utilities/LuceneSearchUtility.cs
@@ -390,7 +390,7 @@ internal string CreateSearchQuery(string[] fields, string SearchTerm, bool IsPac
foreach (string s in searchTerm.Split(' '))
{
//If is a ByEmptySpace search and the split words match with more than MaxNodeNamesRepeated nodes then the word is skipped (otherwise the results will be polluted with hundred of not related nodes)
- int nodesFrequency = dynamoModel.SearchModel.Entries.Where(entry => entry.Name.ToLower().Contains(s) && !string.IsNullOrEmpty(s)).Count();
+ int? nodesFrequency = dynamoModel.SearchModel?.Entries.Where(entry => entry.Name.ToLower().Contains(s) && !string.IsNullOrEmpty(s)).Count();
if (nodesFrequency > MaxNodeNamesRepeated) continue;
if (string.IsNullOrEmpty(s)) continue;
diff --git a/src/DynamoCoreWpf/DynamoCoreWpf.csproj b/src/DynamoCoreWpf/DynamoCoreWpf.csproj
index 6991abf7249..61cf848aa8e 100644
--- a/src/DynamoCoreWpf/DynamoCoreWpf.csproj
+++ b/src/DynamoCoreWpf/DynamoCoreWpf.csproj
@@ -189,7 +189,7 @@
-
+
diff --git a/src/DynamoCoreWpf/Properties/Resources.Designer.cs b/src/DynamoCoreWpf/Properties/Resources.Designer.cs
index 89e76447cf8..2f115a7510b 100644
--- a/src/DynamoCoreWpf/Properties/Resources.Designer.cs
+++ b/src/DynamoCoreWpf/Properties/Resources.Designer.cs
@@ -1,4 +1,4 @@
-//------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
@@ -5646,6 +5646,33 @@ public static string PackageDeprecatedTooltip {
}
}
+ ///
+ /// Looks up a localized string similar to COMPATIBILITY.
+ ///
+ public static string PackageDetailsCompatibility {
+ get {
+ return ResourceManager.GetString("PackageDetailsCompatibility", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Compatible with your current setup.
+ ///
+ public static string PackageDetailsCompatibilityWithSetup {
+ get {
+ return ResourceManager.GetString("PackageDetailsCompatibilityWithSetup", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to This version should be compatible with your current setup.
+ ///
+ public static string PackageDetailsCompatibleVersionTooltip {
+ get {
+ return ResourceManager.GetString("PackageDetailsCompatibleVersionTooltip", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Copyright Holder.
///
@@ -5664,6 +5691,15 @@ public static string PackageDetailsCopyRightYear {
}
}
+ ///
+ /// Looks up a localized string similar to Depends on.
+ ///
+ public static string PackageDetailsDependsOn {
+ get {
+ return ResourceManager.GetString("PackageDetailsDependsOn", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to DESCRIPTION.
///
@@ -5691,6 +5727,15 @@ public static string PackageDetailsHost {
}
}
+ ///
+ /// Looks up a localized string similar to This version may be incompatible with your current setup.
+ ///
+ public static string PackageDetailsIncompatibileVersionTooltip {
+ get {
+ return ResourceManager.GetString("PackageDetailsIncompatibileVersionTooltip", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to KEYWORDS.
///
@@ -5736,6 +5781,15 @@ public static string PackageDetailsPython {
}
}
+ ///
+ /// Looks up a localized string similar to Release notes.
+ ///
+ public static string PackageDetailsReleaseNotes {
+ get {
+ return ResourceManager.GetString("PackageDetailsReleaseNotes", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Size.
///
@@ -5745,6 +5799,15 @@ public static string PackageDetailsSize {
}
}
+ ///
+ /// Looks up a localized string similar to The compatibility of this version has not been verified. It may or may not be compatible with your current setup.
+ ///
+ public static string PackageDetailsUnknownCompatibilityVersionTooltip {
+ get {
+ return ResourceManager.GetString("PackageDetailsUnknownCompatibilityVersionTooltip", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Versions.
///
@@ -6016,6 +6079,24 @@ public static string PackageManagerFinishedPackagePackagePath {
}
}
+ ///
+ /// Looks up a localized string similar to This version is incompatible with your current setup (Dynamo and host version, if applicable). It may not work properly. Do you want to install it anyway?.
+ ///
+ public static string PackageManagerIncompatibleVersionDownloadMsg {
+ get {
+ return ResourceManager.GetString("PackageManagerIncompatibleVersionDownloadMsg", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Incompatible version.
+ ///
+ public static string PackageManagerIncompatibleVersionDownloadTitle {
+ get {
+ return ResourceManager.GetString("PackageManagerIncompatibleVersionDownloadTitle", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Install.
///
@@ -6512,7 +6593,7 @@ public static string PackageSearchResultRequirements {
}
///
- /// Looks up a localized string similar to View Details.
+ /// Looks up a localized string similar to Info.
///
public static string PackageSearchResultViewDetails {
get {
@@ -10357,6 +10438,33 @@ public static string UnsavedChangesMessageBoxTitle {
}
}
+ ///
+ /// Looks up a localized string similar to Set Python Engine.
+ ///
+ public static string UpdateAllPythonEngineMainMenuHeader {
+ get {
+ return ResourceManager.GetString("UpdateAllPythonEngineMainMenuHeader", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Update all {0} python nodes in the current workspace to use {1} engine?.
+ ///
+ public static string UpdateAllPythonEngineWarning {
+ get {
+ return ResourceManager.GetString("UpdateAllPythonEngineWarning", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Update All Python Nodes.
+ ///
+ public static string UpdateAllPythonEngineWarningTitle {
+ get {
+ return ResourceManager.GetString("UpdateAllPythonEngineWarningTitle", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to An update is available for Dynamo.
///Installing the latest update requires Dynamo and any host applications to close.
@@ -10586,38 +10694,5 @@ public static string ZoomLevel {
return ResourceManager.GetString("ZoomLevel", resourceCulture);
}
}
-
- ///
- /// Looks up a localized string similar to Update all {0} python nodes in the current workspace to use {1} engine?.
- ///
- public static string UpdateAllPythonEngineWarning
- {
- get
- {
- return ResourceManager.GetString("UpdateAllPythonEngineWarning", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Update All Python Nodes.
- ///
- public static string UpdateAllPythonEngineWarningTitle
- {
- get
- {
- return ResourceManager.GetString("UpdateAllPythonEngineWarningTitle", resourceCulture);
- }
- }
-
- ///
- /// Looks up a localized string similar to Set Python Engine.
- ///
- public static string UpdateAllPythonEngineMainMenuHeader
- {
- get
- {
- return ResourceManager.GetString("UpdateAllPythonEngineMainMenuHeader", resourceCulture);
- }
- }
}
}
diff --git a/src/DynamoCoreWpf/Properties/Resources.en-US.resx b/src/DynamoCoreWpf/Properties/Resources.en-US.resx
index 0b891e0236f..f0ad09bd3b1 100644
--- a/src/DynamoCoreWpf/Properties/Resources.en-US.resx
+++ b/src/DynamoCoreWpf/Properties/Resources.en-US.resx
@@ -2892,7 +2892,7 @@ If the toggle is off custom packages that are not already loaded will load once
Header in Package Search 'Sort By' Button Context Menu
- View Details
+ Info
In package search result card.
@@ -4045,4 +4045,34 @@ To make this file into a new template, save it to a different folder, then move
Set Python Engine
+
+ Release notes
+
+
+ Depends on
+
+
+ COMPATIBILITY
+
+
+ Compatible with your current setup
+
+
+ Size
+
+
+ This version should be compatible with your current setup
+
+
+ The compatibility of this version has not been verified. It may or may not be compatible with your current setup
+
+
+ This version may be incompatible with your current setup
+
+
+ This version is incompatible with your current setup (Dynamo and host version, if applicable). It may not work properly. Do you want to install it anyway?
+
+
+ Incompatible version
+
diff --git a/src/DynamoCoreWpf/Properties/Resources.resx b/src/DynamoCoreWpf/Properties/Resources.resx
index 85f5b6d1e48..2677838dd7f 100644
--- a/src/DynamoCoreWpf/Properties/Resources.resx
+++ b/src/DynamoCoreWpf/Properties/Resources.resx
@@ -1512,7 +1512,7 @@ If the toggle is off custom packages that are not already loaded will load once
Sort by
- View Details
+ Info
In package search result card.
@@ -4032,4 +4032,34 @@ To make this file into a new template, save it to a different folder, then move
Set Python Engine
+
+ Release notes
+
+
+ Depends on
+
+
+ COMPATIBILITY
+
+
+ Compatible with your current setup
+
+
+ Size
+
+
+ This version should be compatible with your current setup
+
+
+ The compatibility of this version has not been verified. It may or may not be compatible with your current setup
+
+
+ This version may be incompatible with your current setup
+
+
+ This version is incompatible with your current setup (Dynamo and host version, if applicable). It may not work properly. Do you want to install it anyway?
+
+
+ Incompatible version
+
diff --git a/src/DynamoCoreWpf/PublicAPI.Unshipped.txt b/src/DynamoCoreWpf/PublicAPI.Unshipped.txt
index 3416ded0706..bbbc8a21c76 100644
--- a/src/DynamoCoreWpf/PublicAPI.Unshipped.txt
+++ b/src/DynamoCoreWpf/PublicAPI.Unshipped.txt
@@ -183,6 +183,10 @@ Dynamo.Controls.DateToPackageLabelConverter
Dynamo.Controls.DateToPackageLabelConverter.Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) -> object
Dynamo.Controls.DateToPackageLabelConverter.ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) -> object
Dynamo.Controls.DateToPackageLabelConverter.DateToPackageLabelConverter() -> void
+Dynamo.Controls.DateToPackageTooltipConverter
+Dynamo.Controls.DateToPackageTooltipConverter.Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) -> object
+Dynamo.Controls.DateToPackageTooltipConverter.ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) -> object
+Dynamo.Controls.DateToPackageTooltipConverter.DateToPackageTooltipConverter() -> void
Dynamo.Controls.DateToVisibilityCollapsedConverter
Dynamo.Controls.DateToVisibilityCollapsedConverter.Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) -> object
Dynamo.Controls.DateToVisibilityCollapsedConverter.ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) -> object
@@ -337,6 +341,10 @@ Dynamo.Controls.InverseBoolToVisibilityConverter
Dynamo.Controls.InverseBoolToVisibilityConverter.Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) -> object
Dynamo.Controls.InverseBoolToVisibilityConverter.ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) -> object
Dynamo.Controls.InverseBoolToVisibilityConverter.InverseBoolToVisibilityConverter() -> void
+Dynamo.Controls.InverseEmptyListToVisibilityConverter
+Dynamo.Controls.InverseEmptyListToVisibilityConverter.Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) -> object
+Dynamo.Controls.InverseEmptyListToVisibilityConverter.ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) -> object
+Dynamo.Controls.InverseEmptyListToVisibilityConverter.InverseEmptyListToVisibilityConverter() -> void
Dynamo.Controls.LacingToAbbreviationConverter
Dynamo.Controls.LacingToAbbreviationConverter.Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) -> object
Dynamo.Controls.LacingToAbbreviationConverter.ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) -> object
@@ -460,6 +468,10 @@ Dynamo.Controls.NonEmptyStringToCollapsedConverter
Dynamo.Controls.NonEmptyStringToCollapsedConverter.Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) -> object
Dynamo.Controls.NonEmptyStringToCollapsedConverter.ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) -> object
Dynamo.Controls.NonEmptyStringToCollapsedConverter.NonEmptyStringToCollapsedConverter() -> void
+Dynamo.Controls.NullOrEmptyListToVisibilityVisibleConverter
+Dynamo.Controls.NullOrEmptyListToVisibilityVisibleConverter.Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) -> object
+Dynamo.Controls.NullOrEmptyListToVisibilityVisibleConverter.ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) -> object
+Dynamo.Controls.NullOrEmptyListToVisibilityVisibleConverter.NullOrEmptyListToVisibilityVisibleConverter() -> void
Dynamo.Controls.NullOrEmptyStringToVisibiltyCollapsedConverter
Dynamo.Controls.NullOrEmptyStringToVisibiltyCollapsedConverter.Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) -> object
Dynamo.Controls.NullOrEmptyStringToVisibiltyCollapsedConverter.ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture) -> object
@@ -1295,6 +1307,8 @@ Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.Hosts.get
Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.IsDeprecated.get -> bool
Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.IsEnabledForInstall.get -> bool
Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.IsOnwer.get -> bool
+Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.IsSelectedVersionCompatible.get -> bool?
+Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.IsSelectedVersionCompatible.set -> void
Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.LatestVersion.get -> string
Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.LatestVersionCreated.get -> string
Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.Maintainers.get -> string
@@ -1306,11 +1320,14 @@ Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.PackageSea
Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.PkgVersion.get -> System.Collections.Generic.IEnumerable
Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.RequestDownload -> Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.PackageSearchElementDownloadHandler
Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.RequestShowFileDialog -> System.EventHandler
+Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.ReversedVersionInformationList.get -> System.ComponentModel.ICollectionView
Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.SearchElementModel.get -> Dynamo.PackageManager.PackageManagerSearchElement
-Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.SelectedVersion.get -> string
+Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.SelectedVersion.get -> Dynamo.PackageManager.VersionInformation
Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.SelectedVersion.set -> void
Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.UpvoteCommand.get -> System.Windows.Input.ICommand
Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.UpvoteCommand.set -> void
+Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.VersionInformationList.get -> System.Collections.Generic.List
+Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.VersionInformationList.set -> void
Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.Versions.get -> System.Collections.Generic.List>>
Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.VisitRepositoryCommand.get -> System.Windows.Input.ICommand
Dynamo.PackageManager.ViewModels.PackageManagerSearchElementViewModel.VisitRepositoryCommand.set -> void
@@ -4982,17 +4999,24 @@ static Dynamo.Wpf.Properties.Resources.PackageContextMenuUnmarkDeletePackageTool
static Dynamo.Wpf.Properties.Resources.PackageContextMenuUnmarkUnloadPackageText.get -> string
static Dynamo.Wpf.Properties.Resources.PackageContextMenuUnmarkUnloadPackageTooltip.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDeprecatedTooltip.get -> string
+static Dynamo.Wpf.Properties.Resources.PackageDetailsCompatibility.get -> string
+static Dynamo.Wpf.Properties.Resources.PackageDetailsCompatibilityWithSetup.get -> string
+static Dynamo.Wpf.Properties.Resources.PackageDetailsCompatibleVersionTooltip.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsCopyRightHolder.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsCopyRightYear.get -> string
+static Dynamo.Wpf.Properties.Resources.PackageDetailsDependsOn.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsDescription.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsGroup.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsHost.get -> string
+static Dynamo.Wpf.Properties.Resources.PackageDetailsIncompatibileVersionTooltip.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsKeywords.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsLicense.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsLinks.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsPackage.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsPython.get -> string
+static Dynamo.Wpf.Properties.Resources.PackageDetailsReleaseNotes.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsSize.get -> string
+static Dynamo.Wpf.Properties.Resources.PackageDetailsUnknownCompatibilityVersionTooltip.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsVersions.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDetailsVersionsAndPackageRequirements.get -> string
static Dynamo.Wpf.Properties.Resources.PackageDownloadConfirmMessageBoxTitle.get -> string
@@ -5023,6 +5047,8 @@ static Dynamo.Wpf.Properties.Resources.PackageManagerClearAllButtonText.get -> s
static Dynamo.Wpf.Properties.Resources.PackageManagerFinishedPackageFilesPublishedMessage.get -> string
static Dynamo.Wpf.Properties.Resources.PackageManagerFinishedPackageFilesUploadedMessage.get -> string
static Dynamo.Wpf.Properties.Resources.PackageManagerFinishedPackagePackagePath.get -> string
+static Dynamo.Wpf.Properties.Resources.PackageManagerIncompatibleVersionDownloadMsg.get -> string
+static Dynamo.Wpf.Properties.Resources.PackageManagerIncompatibleVersionDownloadTitle.get -> string
static Dynamo.Wpf.Properties.Resources.PackageManagerInstall.get -> string
static Dynamo.Wpf.Properties.Resources.PackageManagerInstalledPackagesTab.get -> string
static Dynamo.Wpf.Properties.Resources.PackageManagerLoadingTimedOutWarningMessage.get -> string
diff --git a/src/DynamoCoreWpf/UI/Converters.cs b/src/DynamoCoreWpf/UI/Converters.cs
index 469b7ecd994..dcd8ea1cfcc 100644
--- a/src/DynamoCoreWpf/UI/Converters.cs
+++ b/src/DynamoCoreWpf/UI/Converters.cs
@@ -170,6 +170,42 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu
}
}
+ ///
+ /// Returns Visibility.Visible if the collection is empty, otherwise returns Visibility.Collapsed.
+ ///
+ public class NullOrEmptyListToVisibilityVisibleConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (!(value is ICollection collection)) return Visibility.Visible;
+
+ return collection.Count == 0 ? Visibility.Visible : Visibility.Collapsed;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return null;
+ }
+ }
+
+ ///
+ /// Returns Visible if the collection is not empty, otherwise returns Collapsed
+ ///
+ public class InverseEmptyListToVisibilityConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (!(value is ICollection collection)) return Visibility.Collapsed;
+
+ return collection.Count == 0 ? Visibility.Collapsed : Visibility.Visible;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return null;
+ }
+ }
+
public class PackageSearchStateToStringConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter,
@@ -1549,6 +1585,40 @@ public object ConvertBack(object value, Type targetType, object parameter, Syste
}
}
+ ///
+ /// Used to determine the tooltip which appears next to a package when it's either
+ /// brand new, recently updated, or deprecated.
+ /// If the package was updated in the last 30 days it says 'Updated'.
+ /// If the package is brand new (only has 1 version) and is less than 30 days it says 'New'.
+ ///
+ public class DateToPackageTooltipConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ if (!(value is Dynamo.PackageManager.PackageManagerSearchElement packageManagerSearchElement)) return String.Empty;
+ if (packageManagerSearchElement.IsDeprecated) return Resources.PackageDeprecatedTooltip;
+
+ DateTime.TryParse(packageManagerSearchElement.LatestVersionCreated, out DateTime dateLastUpdated);
+
+ // For testing purposes
+ var test = DateTime.TryParse((string)parameter, out DateTime testDate);
+ TimeSpan difference = test ? testDate - dateLastUpdated : DateTime.Now - dateLastUpdated;
+
+ int numberVersions = packageManagerSearchElement.Header.num_versions;
+
+ if (numberVersions > 1)
+ {
+ return difference.TotalDays >= 30 ? "" : Resources.PackageFilterUpdatedTooltip;
+ }
+ return Resources.PackageFilterNewTooltip;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ {
+ throw new NotSupportedException();
+ }
+ }
+
public class InverseBoolToVisibilityConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
diff --git a/src/DynamoCoreWpf/UI/Themes/Modern/DynamoColorsAndBrushes.xaml b/src/DynamoCoreWpf/UI/Themes/Modern/DynamoColorsAndBrushes.xaml
index 5e1c7521e16..b8e10e3a1c2 100644
--- a/src/DynamoCoreWpf/UI/Themes/Modern/DynamoColorsAndBrushes.xaml
+++ b/src/DynamoCoreWpf/UI/Themes/Modern/DynamoColorsAndBrushes.xaml
@@ -33,7 +33,7 @@
#2EFFFFFF
#66999999
#F5F5F5
-
+
@@ -194,7 +194,24 @@
-
+
+
+
+ #DFDFDF
+ #5F5F5F
+ #3f3f3f
+ #474747
+ #87B340
+ #EB5555
+ #73C5FF
+
+
+
+
+
+
+
+
diff --git a/src/DynamoCoreWpf/UI/Themes/Modern/DynamoModern.xaml b/src/DynamoCoreWpf/UI/Themes/Modern/DynamoModern.xaml
index 32b3fdf8f62..814db03e096 100644
--- a/src/DynamoCoreWpf/UI/Themes/Modern/DynamoModern.xaml
+++ b/src/DynamoCoreWpf/UI/Themes/Modern/DynamoModern.xaml
@@ -3,9 +3,9 @@
xmlns:avalonedit="clr-namespace:ICSharpCode.AvalonEdit;assembly=ICSharpCode.AvalonEdit"
xmlns:clr="clr-namespace:System;assembly=mscorlib"
xmlns:controls="clr-namespace:Dynamo.Views;assembly=DynamoCoreWpf"
- xmlns:nodes="clr-namespace:Dynamo.Nodes;assembly=DynamoCoreWpf"
xmlns:dynui="clr-namespace:Dynamo.UI.Controls;assembly=DynamoCoreWpf"
xmlns:fa="clr-namespace:FontAwesome5;assembly=FontAwesome5.Net"
+ xmlns:nodes="clr-namespace:Dynamo.Nodes;assembly=DynamoCoreWpf"
xmlns:p="clr-namespace:Dynamo.Wpf.Properties;assembly=DynamoCoreWpf"
xmlns:ui="clr-namespace:Dynamo.UI;assembly=DynamoCoreWpf">
@@ -53,9 +53,9 @@
Black
#808080
-
-
-
+
+
+
@@ -72,7 +72,7 @@
53
-
+
@@ -143,12 +143,38 @@
-
-
-
+
+
+
-
-
+
+
@@ -168,19 +194,48 @@
-
-
-
-
+
+
+
+ BorderThickness="0,0,0,1" />
-
-
+
+
-
-
+
+
-
-
+
+ BorderThickness="0" />
-
-
+
+
-
+
-
+
-
-
+
-
-
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
-
+
+
-
+
-
+
-
-
-
+
+
-
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#999999
#CCCCCC
#38abdf
@@ -5783,32 +5777,33 @@
-
+
-
+
-
+
-
-
+
+
-
+
@@ -5957,42 +5968,38 @@
-
-
-
-
+
+
+
+
@@ -6016,17 +6023,16 @@
-
+
@@ -6035,34 +6041,34 @@
-
-
+
+
-
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs
index 4d53d96fc3a..e36a618e6d1 100644
--- a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs
+++ b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs
@@ -2771,6 +2771,7 @@ var customNodeWorkspace in
}
// Center the view on the model
this.CurrentSpaceViewModel.OnRequestCenterViewOnElement(this, new ModelEventArgs(e));
+ FitView(false);
}
private void CancelActiveState(NodeModel node)
diff --git a/src/DynamoCoreWpf/ViewModels/Core/WorkspaceViewModel.cs b/src/DynamoCoreWpf/ViewModels/Core/WorkspaceViewModel.cs
index 544340baab2..ac712a0585e 100644
--- a/src/DynamoCoreWpf/ViewModels/Core/WorkspaceViewModel.cs
+++ b/src/DynamoCoreWpf/ViewModels/Core/WorkspaceViewModel.cs
@@ -1156,7 +1156,7 @@ public double GetSelectionAverageY()
public double GetSelectionMinX()
{
- return DynamoSelection.Instance.Selection.Where((x) => !(x is AnnotationModel) && x is ILocatable)
+ return DynamoSelection.Instance.Selection.Where((x) => x is ILocatable)
.Cast()
.Select((x) => x.X)
.Min();
@@ -1164,7 +1164,7 @@ public double GetSelectionMinX()
public double GetSelectionMinY()
{
- return DynamoSelection.Instance.Selection.Where((x) => !(x is AnnotationModel) && x is ILocatable)
+ return DynamoSelection.Instance.Selection.Where((x) => x is ILocatable)
.Cast()
.Select((x) => x.Y)
.Min();
@@ -1172,7 +1172,7 @@ public double GetSelectionMinY()
public double GetSelectionMaxX()
{
- return DynamoSelection.Instance.Selection.Where((x) => !(x is AnnotationModel) && x is ILocatable)
+ return DynamoSelection.Instance.Selection.Where((x) => x is ILocatable)
.Cast()
.Select((x) => x.X + x.Width)
.Max();
@@ -1188,7 +1188,7 @@ public double GetSelectionMaxLeftX()
public double GetSelectionMaxY()
{
- return DynamoSelection.Instance.Selection.Where((x) => !(x is AnnotationModel) && x is ILocatable)
+ return DynamoSelection.Instance.Selection.Where((x) => x is ILocatable)
.Cast()
.Select((x) => x.Y + x.Height)
.Max();
diff --git a/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerClientViewModel.cs b/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerClientViewModel.cs
index d3e52b4f8bb..4bb304d263c 100644
--- a/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerClientViewModel.cs
+++ b/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerClientViewModel.cs
@@ -9,7 +9,6 @@
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
-using Dynamo.Controls;
using Dynamo.Core;
using Dynamo.Graph.Nodes.CustomNodes;
using Dynamo.Graph.Workspaces;
@@ -749,11 +748,28 @@ private bool WarnAboutDuplicatePackageConflicts(PackageVersion package,
internal async void ExecutePackageDownload(string name, PackageVersion package, string installPath)
{
- string msg = String.IsNullOrEmpty(installPath) ?
+ string msg;
+ MessageBoxResult result;
+
+ var compatible = PackageManagerSearchElement.CalculateCompatibility(package.compatibility_matrix);
+ if (compatible == false && !DynamoModel.IsTestMode)
+ {
+ msg = Resources.PackageManagerIncompatibleVersionDownloadMsg;
+ result = MessageBoxService.Show(ViewModelOwner, msg,
+ Resources.PackageManagerIncompatibleVersionDownloadTitle,
+ MessageBoxButton.OKCancel, MessageBoxImage.Warning);
+
+ if (result != MessageBoxResult.OK)
+ {
+ return;
+ }
+ }
+
+ msg = String.IsNullOrEmpty(installPath) ?
String.Format(Resources.MessageConfirmToInstallPackage, name, package.version) :
String.Format(Resources.MessageConfirmToInstallPackageToFolder, name, package.version, installPath);
- var result = MessageBoxService.Show(ViewModelOwner, msg,
+ result = MessageBoxService.Show(ViewModelOwner, msg,
Resources.PackageDownloadConfirmMessageBoxTitle,
MessageBoxButton.OKCancel, MessageBoxImage.Question);
@@ -1099,6 +1115,7 @@ public void GoToWebsite()
Process.Start(sInfo);
}
}
+
}
}
diff --git a/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerSearchElementViewModel.cs b/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerSearchElementViewModel.cs
index c91081b8ea0..fecf1340d3c 100644
--- a/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerSearchElementViewModel.cs
+++ b/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerSearchElementViewModel.cs
@@ -1,7 +1,10 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
+using System.Windows;
+using System.Windows.Data;
using System.Windows.Input;
using Dynamo.ViewModels;
using Dynamo.Wpf.ViewModels;
@@ -14,7 +17,6 @@ public class PackageManagerSearchElementViewModel : BrowserItemViewModel, IEquat
{
public ICommand DownloadLatestCommand { get; set; }
public ICommand UpvoteCommand { get; set; }
-
public ICommand VisitSiteCommand { get; set; }
public ICommand VisitRepositoryCommand { get; set; }
public ICommand DownloadLatestToCustomPathCommand { get; set; }
@@ -66,7 +68,39 @@ public class PackageManagerSearchElementViewModel : BrowserItemViewModel, IEquat
///
/// The currently selected version of a package
///
- public string SelectedVersion { get; set; }
+ private VersionInformation selectedVersion;
+
+ public bool? IsSelectedVersionCompatible
+ {
+ get { return isSelectedVersionCompatible; }
+ set
+ {
+ if (isSelectedVersionCompatible != value)
+ {
+ isSelectedVersionCompatible = value;
+ RaisePropertyChanged(nameof(IsSelectedVersionCompatible));
+ }
+ }
+ }
+
+ ///
+ /// Keeps track of the currently selected package version in the UI
+ ///
+ public VersionInformation SelectedVersion
+ {
+ get { return selectedVersion; }
+ set
+ {
+ if (selectedVersion != value)
+ {
+ selectedVersion = value;
+
+ // Update the compatibility info so the icon of the currently selected version is updated
+ IsSelectedVersionCompatible = selectedVersion.IsCompatible;
+ SearchElementModel.SelectedVersion = selectedVersion;
+ }
+ }
+ }
///
/// Alternative constructor to assist communication between the
@@ -83,14 +117,19 @@ public PackageManagerSearchElementViewModel(PackageManagerSearchElement element,
CanInstall = install;
IsEnabledForInstall = isEnabledForInstall;
- this.SelectedVersion = this.SearchElementModel.LatestVersion;
+ // Attempts to show the latest compatible version. If no compatible, will return the latest instead.
+ this.SelectedVersion = this.SearchElementModel.LatestCompatibleVersion;
+ this.VersionInformationList = this.SearchElementModel.VersionDetails;
+ WeakEventManager
+ .AddHandler(this.SearchElementModel, nameof(INotifyPropertyChanged.PropertyChanged), OnSearchElementModelPropertyChanged);
+
this.ToggleIsExpandedCommand = new DelegateCommand(() => this.SearchElementModel.IsExpanded = !this.SearchElementModel.IsExpanded);
this.DownloadLatestCommand = new DelegateCommand(
- () => OnRequestDownload(SearchElementModel.Header.versions.First(x => x.version.Equals(SelectedVersion)), false),
+ () => OnRequestDownload(false),
() => !SearchElementModel.IsDeprecated && CanInstall);
- this.DownloadLatestToCustomPathCommand = new DelegateCommand(() => OnRequestDownload(SearchElementModel.Header.versions.First(x => x.version.Equals(SelectedVersion)), true));
+ this.DownloadLatestToCustomPathCommand = new DelegateCommand(() => OnRequestDownload(true));
this.UpvoteCommand = new DelegateCommand(SearchElementModel.Upvote, () => canLogin);
@@ -100,6 +139,19 @@ public PackageManagerSearchElementViewModel(PackageManagerSearchElement element,
new DelegateCommand(() => GoToUrl(FormatUrl(SearchElementModel.RepositoryUrl)), () => !String.IsNullOrEmpty(SearchElementModel.RepositoryUrl));
}
+ private void OnSearchElementModelPropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ if (e.PropertyName == nameof(SearchElementModel.LatestCompatibleVersion))
+ {
+ this.SelectedVersion = this.SearchElementModel.LatestCompatibleVersion;
+ }
+ if (e.PropertyName == nameof(SearchElementModel.VersionDetails))
+ {
+ this.VersionInformationList = this.SearchElementModel.VersionDetails;
+ }
+ }
+
+
///
/// PackageManagerSearchElementViewModel Constructor (only used for testing in Dynamo).
///
@@ -181,6 +233,9 @@ private static void GoToUrl(string url)
}
}
+ ///
+ /// A collection of key-value pairs to allow the download of specific package version
+ ///
public List>> Versions
{
get
@@ -193,8 +248,39 @@ public List>> Versions
}
}
+ private List versionInformationList;
+
+ ///
+ /// A collection containing all package versions
+ ///
+ public List VersionInformationList
+ {
+ get { return versionInformationList; }
+ set
+ {
+ if (value != versionInformationList)
+ {
+ versionInformationList = value;
+ RaisePropertyChanged(nameof(VersionInformationList));
+ }
+ }
+ }
+
+ ///
+ /// Display the reversed version list - newest to oldest
+ ///
+ public ICollectionView ReversedVersionInformationList
+ {
+ get
+ {
+ var reversedList = VersionInformationList?.AsEnumerable().Reverse().ToList();
+ return CollectionViewSource.GetDefaultView(reversedList);
+ }
+ }
+
private List CustomPackageFolders;
-
+ private bool? isSelectedVersionCompatible;
+
public delegate void PackageSearchElementDownloadHandler(
PackageManagerSearchElement element, PackageVersion version, string downloadPath = null);
public event PackageSearchElementDownloadHandler RequestDownload;
@@ -215,6 +301,24 @@ public void OnRequestDownload(PackageVersion version, bool downloadToCustomPath)
RequestDownload(this.SearchElementModel, version, downloadPath);
}
+ private void OnRequestDownload(bool downloadToCustomPath)
+ {
+ var version = this.SearchElementModel.Header.versions.First(x => x.version.Equals(SelectedVersion.Version));
+
+ string downloadPath = String.Empty;
+
+ if (downloadToCustomPath)
+ {
+ downloadPath = GetDownloadPath();
+
+ if (String.IsNullOrEmpty(downloadPath))
+ return;
+ }
+
+ if (RequestDownload != null)
+ RequestDownload(this.SearchElementModel, version, downloadPath);
+ }
+
///
/// Comparator of two PackageManagerSearchElementViewModel based on package Id.
/// Override for package results union.
diff --git a/src/DynamoCoreWpf/Views/PackageManager/Controls/ControlColorsAndBrushes.xaml b/src/DynamoCoreWpf/Views/PackageManager/Controls/ControlColorsAndBrushes.xaml
index a17172d23a1..a86afbed395 100644
--- a/src/DynamoCoreWpf/Views/PackageManager/Controls/ControlColorsAndBrushes.xaml
+++ b/src/DynamoCoreWpf/Views/PackageManager/Controls/ControlColorsAndBrushes.xaml
@@ -1,4 +1,5 @@
-
@@ -6,56 +7,56 @@
-
+
#555
-
+
-
+
-
-
-
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -82,7 +124,7 @@
-
+
@@ -165,20 +203,16 @@
-
+
@@ -191,77 +225,94 @@
Margin="15,15,5,0"
LastChildFill="False">
-
-
@@ -693,211 +717,199 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -910,11 +922,10 @@
-
+
@@ -927,85 +938,78 @@
-
+
-
-
-
+
+
+
-
+
-
-
+
+
-
+
diff --git a/src/DynamoCoreWpf/Views/PackageManager/Controls/PackageManagerPackagesControl.xaml.cs b/src/DynamoCoreWpf/Views/PackageManager/Controls/PackageManagerPackagesControl.xaml.cs
index ed1763588b6..f7ac53b36ee 100644
--- a/src/DynamoCoreWpf/Views/PackageManager/Controls/PackageManagerPackagesControl.xaml.cs
+++ b/src/DynamoCoreWpf/Views/PackageManager/Controls/PackageManagerPackagesControl.xaml.cs
@@ -93,8 +93,23 @@ private void ViewDetailsButton_OnClick(object sender, RoutedEventArgs e)
if (!(sender is Button button)) return;
if (!(button.DataContext is PackageManagerSearchElementViewModel packageManagerSearchElementViewModel)) return;
- var PkgSearchVM = this.DataContext as PackageManagerSearchViewModel;
+ var pkgSearchVM = this.DataContext as PackageManagerSearchViewModel;
+
+ ExecuteOpenPackageDetails(packageManagerSearchElementViewModel, pkgSearchVM);
+ }
+
+ private void PackageName_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
+ {
+ if (!(sender is TextBlock textBlock)) return;
+ if (!(textBlock.DataContext is PackageManagerSearchElementViewModel packageManagerSearchElementViewModel)) return;
+ var pkgSearchVM = this.DataContext as PackageManagerSearchViewModel;
+
+ ExecuteOpenPackageDetails(packageManagerSearchElementViewModel, pkgSearchVM);
+ }
+
+ private void ExecuteOpenPackageDetails(PackageManagerSearchElementViewModel packageManagerSearchElementViewModel, PackageManagerSearchViewModel pkgSearchVM)
+ {
var name = this.Name;
if (name.Equals(packageManagerSearchPackagesName))
{
@@ -121,8 +136,8 @@ private void ViewDetailsButton_OnClick(object sender, RoutedEventArgs e)
}
}
- PkgSearchVM.IsDetailPackagesExtensionOpened = true;
- PkgSearchVM?.ViewPackageDetailsCommand.Execute(packageManagerSearchElementViewModel.SearchElementModel);
+ pkgSearchVM.IsDetailPackagesExtensionOpened = true;
+ pkgSearchVM?.ViewPackageDetailsCommand.Execute(packageManagerSearchElementViewModel.SearchElementModel);
}
diff --git a/src/DynamoCoreWpf/Views/PackageManager/Controls/PackageManagerSearchControl.xaml b/src/DynamoCoreWpf/Views/PackageManager/Controls/PackageManagerSearchControl.xaml
index 93968bc06db..6e493d7fcf7 100644
--- a/src/DynamoCoreWpf/Views/PackageManager/Controls/PackageManagerSearchControl.xaml
+++ b/src/DynamoCoreWpf/Views/PackageManager/Controls/PackageManagerSearchControl.xaml
@@ -1,35 +1,35 @@
+ mc:Ignorable="d">
-
+
-
+
@@ -77,13 +76,13 @@
-
+
-
+
@@ -96,7 +95,7 @@
@@ -112,21 +111,18 @@
DockPanel.Dock="Right"
IsEnabled="{Binding Path=InitialResultsLoaded, UpdateSourceTrigger=PropertyChanged}">
-
+
-
+
+ Visibility="{Binding Path=InitialResultsLoaded, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource BoolToVisibilityCollapsedConverter}}">
@@ -137,8 +133,8 @@
-
@@ -147,8 +143,7 @@
-
+
@@ -196,8 +191,7 @@
-
+
@@ -232,21 +226,18 @@
DockPanel.Dock="Right"
IsEnabled="{Binding Path=InitialResultsLoaded, UpdateSourceTrigger=PropertyChanged}">
-
+
-
+
+ Visibility="{Binding Path=InitialResultsLoaded, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource BoolToVisibilityCollapsedConverter}}">
@@ -265,33 +256,34 @@
StaysOpen="True"
Style="{StaticResource ContextMenuStyle}">
-
-
-
+
+
-
+
-
+
@@ -304,8 +296,7 @@
-
+
@@ -318,8 +309,7 @@
-
+
@@ -334,24 +324,27 @@
+ Margin="12,0,12,5"
+ Visibility="{Binding Path=InitialResultsLoaded, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource BoolToVisibilityCollapsedConverter}}">
-
+
-
-
+
+
@@ -362,11 +355,10 @@
-
+ TagName="{Binding FilterName}"
+ Visibility="{Binding OnChecked, Converter={StaticResource BoolToVisibilityCollapsedConverter}}" />
@@ -376,15 +368,15 @@
-
+
@@ -395,21 +387,18 @@
-
+ Visibility="{Binding Path=InitialResultsLoaded, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource BoolToVisibilityCollapsedConverter}}" />
+
-
+ Visibility="{Binding Path=IsDetailPackagesExtensionOpened, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource BoolToVisibilityCollapsedConverter}}" />
diff --git a/src/DynamoCoreWpf/Views/PackageManager/PackageManagerView.xaml b/src/DynamoCoreWpf/Views/PackageManager/PackageManagerView.xaml
index ce10c101b8c..b06d6c04d06 100644
--- a/src/DynamoCoreWpf/Views/PackageManager/PackageManagerView.xaml
+++ b/src/DynamoCoreWpf/Views/PackageManager/PackageManagerView.xaml
@@ -1,27 +1,27 @@
+ Background="Transparent"
+ BorderThickness="0"
+ Closed="WindowClosed"
+ ResizeMode="NoResize"
+ WindowStartupLocation="CenterOwner"
+ WindowStyle="None"
+ mc:Ignorable="d">
@@ -33,10 +33,10 @@
-
+
+
+
-
+ Opacity="0.1"
+ Color="#FFFFFF" />
-
+
+ CornerRadius="4">
-
-
+
+
-
-
+
+
-
+
-
-
+ MouseDown="PackageManagerPanel_MouseDown" />
+
+
+ MouseDown="PackageManagerPanel_MouseDown">
+ Orientation="Horizontal">
-
+
+ Orientation="Horizontal">
+ Style="{DynamicResource CloseButtonStyle}" />
-
-
-
+
+
+
-
+
+ TabStripPlacement="Left">
-
-
-
+ PreviewMouseDown="tab_PreviewMouseDown"
+ Style="{StaticResource PackageManagerTab}">
+
+
+
-
+
@@ -251,14 +249,13 @@
-
-
-
-
+ Style="{StaticResource PackageManagerTab}">
+
+
+
-
+
-
-
-
+ PreviewMouseDown="tab_PreviewMouseDown"
+ Style="{StaticResource PackageManagerTab}">
+
+
+
-
-
+
+
-
-
+
-
+
-
+
-
-
@@ -333,12 +328,11 @@
-
-
-
+ PreviewMouseDown="tab_PreviewMouseDown"
+ Style="{StaticResource PackageManagerTab}">
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
+
+
+
+
+ Visibility="{Binding Path=PackageManagerViewModel.PackageSearchViewModel.InitialResultsLoaded, ElementName=PackageManagerWindow, Converter={StaticResource BoolToVisibilityCollapsedConverter}, UpdateSourceTrigger=PropertyChanged}" />
-
+ Visibility="{Binding Path=PackageManagerViewModel.PackageSearchViewModel.IsDetailPackagesExtensionOpened, UpdateSourceTrigger=PropertyChanged, ElementName=PackageManagerWindow, Converter={StaticResource BoolToVisibilityCollapsedConverter}}" />
+
-
-
+
-
+
+ Margin="0,0,0,50"
+ HorizontalAlignment="Center"
+ VerticalAlignment="Center"
+ Source="pack://application:,,,/DynamoCoreWpf;component/UI/Images/PackageManager/empty-state-first-use-light-gray.png" />
-
-
+
-
-
-
+
@@ -510,74 +490,66 @@
-
-
-
+ PreviewMouseDown="tab_PreviewMouseDown"
+ Style="{StaticResource PackageManagerTab}">
+
+
+
+ DataContext="{Binding Path=PackageManagerViewModel.PreferencesViewModel, ElementName=PackageManagerWindow}">
-
-
+
+ Foreground="{StaticResource PreferencesWindowFontColor}">
-
-
+
+
.
-
-
-
+
+
-
+
-
-
-
+ ItemsSource="{Binding Path=PackagePathsViewModel.RootLocations, UpdateSourceTrigger=PropertyChanged}"
+ Style="{DynamicResource PkgMngListBoxStyle}" />
diff --git a/src/DynamoMLDataPipeline/DynamoMLDataPipeline.csproj b/src/DynamoMLDataPipeline/DynamoMLDataPipeline.csproj
index 4230fb66a10..d70de1d7a9d 100644
--- a/src/DynamoMLDataPipeline/DynamoMLDataPipeline.csproj
+++ b/src/DynamoMLDataPipeline/DynamoMLDataPipeline.csproj
@@ -11,7 +11,7 @@
-
+
diff --git a/src/DynamoPackages/DynamoPackages.csproj b/src/DynamoPackages/DynamoPackages.csproj
index b4a19a0df20..c409d05e0f5 100644
--- a/src/DynamoPackages/DynamoPackages.csproj
+++ b/src/DynamoPackages/DynamoPackages.csproj
@@ -30,7 +30,7 @@
-
+
diff --git a/src/DynamoPackages/PackageManagerClient.cs b/src/DynamoPackages/PackageManagerClient.cs
index 943c96ea155..792efba6777 100644
--- a/src/DynamoPackages/PackageManagerClient.cs
+++ b/src/DynamoPackages/PackageManagerClient.cs
@@ -2,11 +2,13 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
+using System.Text.Json;
using System.Threading.Tasks;
using Dynamo.Graph.Workspaces;
using Greg;
using Greg.Requests;
using Greg.Responses;
+using Newtonsoft.Json.Linq;
namespace Dynamo.PackageManager
{
@@ -55,6 +57,8 @@ internal PackageManagerClient(IGregClient client, IPackageUploadBuilder builder,
this.uploadBuilder = builder;
this.client = client;
this.packageMaintainers = new Dictionary();
+
+ this.LoadCompatibilityMap(); // Load the compatibility map
}
internal bool Upvote(string packageId)
@@ -78,6 +82,21 @@ internal List UserVotes()
return votes?.has_upvoted;
}
+ internal List CompatibilityMap()
+ {
+ var compatibilityMap = FailFunc.TryExecute(() =>
+ {
+ var cm = new GetCompatibilityMap();
+ var pkgResponse = this.client.ExecuteAndDeserializeWithContent
+
-
-
@@ -256,10 +197,10 @@
Margin="0,0,0,10"
Orientation="Horizontal">
+ Width="Auto"
+ FontSize="16px"
+ Foreground="White"
+ Text="{Binding PackageName}" />
-
+
@@ -305,9 +246,9 @@
Orientation="Horizontal">
-
+ Style="{StaticResource ImageButton}" />
@@ -354,7 +295,7 @@
Text="{Binding PackageDescription}" />
-
+
-
+
-
+
@@ -388,58 +329,56 @@
+ MinWidth="0"
+ Style="{StaticResource LabelStyle}"
+ Text="{x:Static p:Resources.PackageDetailsLinks}" />
+ Margin="0,10,0,10"
+ Orientation="Horizontal"
+ Visibility="{Binding PackageSiteURL, Converter={StaticResource EmptyStringToCollapsedConverter}}">
+ Width="16px"
+ Height="16px">
-
-
-
-
-
+
+
+
+
+
+ Margin="0,0,0,10"
+ Orientation="Horizontal"
+ Visibility="{Binding PackageRepositoryURL, Converter={StaticResource EmptyStringToCollapsedConverter}}">
+ Width="16px"
+ Height="16px">
-
-
-
-
-
+
+
+
+
+
-
+
-
+
-
+ ScrollViewer.CanContentScroll="True"
+ ScrollViewer.HorizontalScrollBarVisibility="Disabled"
+ ScrollViewer.VerticalScrollBarVisibility="Disabled"
+ Template="{StaticResource CustomListViewTemplate}">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
diff --git a/src/PackageDetailsViewExtension/PackageDetailsView.xaml.cs b/src/PackageDetailsViewExtension/PackageDetailsView.xaml.cs
index 84a8a759839..f61ede6f252 100644
--- a/src/PackageDetailsViewExtension/PackageDetailsView.xaml.cs
+++ b/src/PackageDetailsViewExtension/PackageDetailsView.xaml.cs
@@ -29,23 +29,41 @@ private void VersionsDataGrid_OnPreviewMouseWheel(object sender, MouseWheelEvent
if (e.Handled) return;
e.Handled = true;
- var eventArg = new MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta)
+
+ var parentScrollViewer = this.MainScrollViewer;
+ if (parentScrollViewer != null)
{
- RoutedEvent = MouseWheelEvent,
- Source = sender
- };
- var parent = ((Control)sender).Parent as UIElement;
- parent?.RaiseEvent(eventArg);
+ parentScrollViewer.ScrollToVerticalOffset(parentScrollViewer.VerticalOffset - e.Delta);
+ }
+
}
+ ///
+ /// The DataContext of this control is an individual PackageDetailItem
+ /// Scroll up to the start of the item's info page when we assign a new PackageDetailItem
+ ///
+ ///
+ ///
private void FrameworkElement_OnDataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
{
- MainScrollViewer.ScrollToTop();
+ this.Dispatcher.BeginInvoke(new Action(() =>
+ {
+ MainScrollViewer.ScrollToTop();
+ }), System.Windows.Threading.DispatcherPriority.Loaded);
}
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
{
- System.Diagnostics.Process.Start(new ProcessStartInfo(e.Uri.ToString()) { UseShellExecute = true });
+ try
+ {
+ System.Diagnostics.Process.Start(new ProcessStartInfo(e.Uri.ToString()) { UseShellExecute = true });
+ }
+ catch (Exception ex)
+ {
+ // Have to make packageManagerClientViewModel internal in order to get to the DynamoViewModel/Model/Logger
+ var dataContext = this.DataContext as PackageDetailsViewModel;
+ dataContext?.packageManagerClientViewModel?.DynamoViewModel?.Model.Logger.Log("Error navigating to package url: " + ex.StackTrace);
+ }
e.Handled = true;
}
@@ -54,4 +72,5 @@ private void CloseButton_OnClick(object sender, RoutedEventArgs e)
Closed?.Invoke(this, EventArgs.Empty);
}
}
+
}
diff --git a/src/PackageDetailsViewExtension/PackageDetailsViewExtension.csproj b/src/PackageDetailsViewExtension/PackageDetailsViewExtension.csproj
index 1b67027e0f6..43a12c841a1 100644
--- a/src/PackageDetailsViewExtension/PackageDetailsViewExtension.csproj
+++ b/src/PackageDetailsViewExtension/PackageDetailsViewExtension.csproj
@@ -14,7 +14,7 @@
false
-
+
diff --git a/src/PackageDetailsViewExtension/PackageDetailsViewModel.cs b/src/PackageDetailsViewExtension/PackageDetailsViewModel.cs
index 1bec053eecd..6fedfcad5ac 100644
--- a/src/PackageDetailsViewExtension/PackageDetailsViewModel.cs
+++ b/src/PackageDetailsViewExtension/PackageDetailsViewModel.cs
@@ -18,7 +18,7 @@ public class PackageDetailsViewModel : NotificationObject
/// A reference to the ViewExtension.
///
private PackageDetailsViewExtension PackageDetailsViewExtension { get; set; }
- private readonly PackageManagerClientViewModel packageManagerClientViewModel;
+ internal readonly PackageManagerClientViewModel packageManagerClientViewModel;
private List packageDetailItems;
private string license;
private IPreferences Preferences
@@ -174,6 +174,7 @@ internal void TryInstallPackageVersion(object obj)
if (!(obj is string versionName)) return;
PackageManagerSearchElement packageManagerSearchElement = GetPackageByName(PackageName);
if (packageManagerSearchElement == null) return;
+ var compatible = packageManagerSearchElement.VersionDetails?.First(x => x.Version.Equals(versionName))?.IsCompatible;
PackageInfo packageInfo = new PackageInfo(PackageName, Version.Parse(versionName));
@@ -270,12 +271,19 @@ PackageManagerSearchElement packageManagerSearchElement
.Reverse()
.Select(x => new PackageDetailItem
(
+ packageManagerSearchElement.VersionDetails,
packageManagerSearchElement.Name,
x,
DetectWhetherCanInstall(packageLoader, x.version, packageManagerSearchElement.Name),
IsEnabledForInstall && !IsPackageDeprecated
)).ToList();
+ var packageDetailItem = PackageDetailItems.FirstOrDefault(x => x.PackageVersionNumber.Equals(packageManagerSearchElement?.SelectedVersion?.Version));
+ if (packageDetailItem != null)
+ {
+ packageDetailItem.IsExpanded = true;
+ }
+
PackageName = packageManagerSearchElement.Name;
PackageAuthorName = packageManagerSearchElement.Maintainers;
PackageDescription = packageManagerSearchElement.Description;
diff --git a/src/Tools/NodeDocumentationMarkdownGenerator/NodeDocumentationMarkdownGenerator.csproj b/src/Tools/NodeDocumentationMarkdownGenerator/NodeDocumentationMarkdownGenerator.csproj
index bada63b972e..6e9b6b131d3 100644
--- a/src/Tools/NodeDocumentationMarkdownGenerator/NodeDocumentationMarkdownGenerator.csproj
+++ b/src/Tools/NodeDocumentationMarkdownGenerator/NodeDocumentationMarkdownGenerator.csproj
@@ -12,6 +12,7 @@
+
diff --git a/test/DynamoCoreTests/DynamoCoreTests.csproj b/test/DynamoCoreTests/DynamoCoreTests.csproj
index 164208d1ec4..f961461eb6d 100644
--- a/test/DynamoCoreTests/DynamoCoreTests.csproj
+++ b/test/DynamoCoreTests/DynamoCoreTests.csproj
@@ -34,7 +34,7 @@
-
+
all
compile; build; native; contentfiles; analyzers; buildtransitive
diff --git a/test/DynamoCoreTests/PackageDependencyTests.cs b/test/DynamoCoreTests/PackageDependencyTests.cs
index 624b82e09af..ddedef357a7 100644
--- a/test/DynamoCoreTests/PackageDependencyTests.cs
+++ b/test/DynamoCoreTests/PackageDependencyTests.cs
@@ -6,10 +6,12 @@
using Dynamo.Graph.Workspaces;
using Dynamo.Interfaces;
using Dynamo.Models;
+using Dynamo.PythonServices;
using Dynamo.Scheduler;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NUnit.Framework;
+using PythonNodeModels;
namespace Dynamo.Tests
{
@@ -22,9 +24,17 @@ protected override void GetLibrariesToPreload(List libraries)
libraries.Add("ProtoGeometry.dll");
libraries.Add("DesignScriptBuiltin.dll");
libraries.Add("DSCoreNodes.dll");
+ libraries.Add("DSCPython.dll");
base.GetLibrariesToPreload(libraries);
}
+ private void UpdatePythonEngineAndRun(PythonNode pythonNode, string pythonEngineVersion)
+ {
+ pythonNode.EngineName = pythonEngineVersion;
+ //to kick off a run node modified must be called
+ pythonNode.OnNodeModified();
+ }
+
private PackageDependencyInfo GetPackageInfo(string packageName)
{
var loader = GetPackageLoader();
@@ -94,6 +104,63 @@ public void ZeroTouchPackageDependencyIsCollectedAndSerialized()
Assert.AreEqual(package.Nodes.Select(n => n.ToString("N")), nodes);
}
+ [Test]
+ public void PythonEnginePackageDependencyIsCollectedAndSerialized()
+ {
+ // Load JSON file graph
+ string path = Path.Combine(TestDirectory, @"core\packageDependencyTests\PythonDependency.dyn");
+
+ // Assert package dependency is not already serialized to .dyn
+ using (StreamReader file = new StreamReader(path))
+ {
+ var data = file.ReadToEnd();
+ var json = (JObject)JsonConvert.DeserializeObject(data);
+ Assert.IsEmpty(json[WorkspaceReadConverter.NodeLibraryDependenciesPropString]);
+ }
+
+ string packageDirectory = Path.Combine(TestDirectory, @"core\packageDependencyTests\PythonEnginePackage");
+ LoadPackage(packageDirectory);
+
+ OpenModel(path);
+
+ //TO-DO: Force load binaries or mock the python engine instead of loading a package
+ //assert that default python engine was selected, and 2 different engines are loaded
+ var currentws = CurrentDynamoModel.CurrentWorkspace;
+ var pyNode = currentws.Nodes.OfType().FirstOrDefault();
+ Assert.IsNotNull(pyNode);
+ Assert.AreEqual(pyNode.EngineName, PythonEngineManager.CPython3EngineName);
+ Assert.AreEqual(PythonEngineManager.Instance.AvailableEngines.Count, 2);
+ UpdatePythonEngineAndRun(pyNode, "PythonNet3");
+ currentws.ForceComputeWorkspaceReferences = true;
+
+
+ //assert that python engine imported from a package gets added to NodeLibraryDependencies
+ var packageDependencies = currentws.NodeLibraryDependencies;
+ Assert.AreEqual(1, packageDependencies.Count);
+ var package = packageDependencies.First();
+ Assert.AreEqual(new PackageDependencyInfo("TestCP311", new Version("1.0.8")), package);
+ Assert.AreEqual(1, package.Nodes.Count);
+
+ Assert.IsTrue(package.IsLoaded);
+ if (package is PackageDependencyInfo)
+ {
+ var packageDependencyState = ((PackageDependencyInfo)package).State;
+ Assert.AreEqual(PackageDependencyState.Loaded, packageDependencyState);
+ }
+
+ // Assert package dependency is serialized
+ var ToJson = currentws.ToJson(CurrentDynamoModel.EngineController);
+ var JObject = (JObject)JsonConvert.DeserializeObject(ToJson);
+ var deserializedPackageDependencies = JObject[WorkspaceReadConverter.NodeLibraryDependenciesPropString];
+ Assert.AreEqual(1, deserializedPackageDependencies.Count());
+ var name = deserializedPackageDependencies.First()[NodeLibraryDependencyConverter.NamePropString].Value();
+ Assert.AreEqual(package.Name, name);
+ var version = deserializedPackageDependencies.First()[NodeLibraryDependencyConverter.VersionPropString].Value();
+ Assert.AreEqual(package.Version.ToString(), version);
+ var nodes = deserializedPackageDependencies.First()[NodeLibraryDependencyConverter.NodesPropString].Values();
+ Assert.AreEqual(package.Nodes.Select(n => n.ToString("N")), nodes);
+ }
+
[Test]
public void CustomNodePackageDependencyIsCollected()
{
diff --git a/test/DynamoCoreWpfTests/DynamoCoreWpfTests.csproj b/test/DynamoCoreWpfTests/DynamoCoreWpfTests.csproj
index 1320ea0b1c7..36db2a40387 100644
--- a/test/DynamoCoreWpfTests/DynamoCoreWpfTests.csproj
+++ b/test/DynamoCoreWpfTests/DynamoCoreWpfTests.csproj
@@ -37,7 +37,7 @@
-
+
all
compile; build; native; contentfiles; analyzers; buildtransitive
diff --git a/test/DynamoCoreWpfTests/NodeAutoCompleteSearchTests.cs b/test/DynamoCoreWpfTests/NodeAutoCompleteSearchTests.cs
index f93fc5c51fb..916a4070d18 100644
--- a/test/DynamoCoreWpfTests/NodeAutoCompleteSearchTests.cs
+++ b/test/DynamoCoreWpfTests/NodeAutoCompleteSearchTests.cs
@@ -18,6 +18,8 @@ namespace DynamoCoreWpfTests
class NodeAutoCompleteSearchTests : DynamoTestUIBase
{
+ private readonly List expectedNodes = new List { "ByFillet", "ByFilletTangentToCurve", "ByGeometry", "ByMinimumVolume", "ByBlendBetweenCurves", "ByTangency", "ByLineAndPoint", "ByJoinedCurves", "ByThickeningCurveNormal", "ByLoft", "ByLoft", "ByLoftGuides", "BySweep", "ByLoft", "ByLoft", "ByRevolve", "BySweep", "BySweep2Rails", "ByLoft", "ByLoft", "ByPatch", "ByRevolve", "ByRuledLoft", "BySweep", "BySweep2Rails", "BuildFromLines", "BuildPipes", "ByExtrude", "ByPlaneLineAndPoint", "ByRevolve", "BySweep", "DoesIntersect", "IsAlmostEqualTo", "DistanceTo", "Intersect", "IntersectAll", "Project", "Project", "ProjectInputOnto", "ProjectInputOnto", "Split", "Trim", "SerializeAsSAB", "ClosestPointTo", "Join", "ByGroupedCurves", "SweepAsSolid", "ExportToSAT", "SweepAsSurface", "LocateSurfacesByLine", "BridgeEdgesToEdges", "BridgeEdgesToFaces", "BridgeFacesToEdges", "BridgeFacesToFaces", "CreateMatch", "ExtrudeEdgesAlongCurve", "ExtrudeFacesAlongCurve", "PullVertices" };
+
[NodeDescription("This is test node with multiple output ports and types specified.")]
[NodeName("node with multi type outputs")]
[InPortNames("input1", "input2")]
@@ -166,7 +168,9 @@ public void NodeSuggestions_CanAutoCompleteOnCustomNodesOutPort_WithSpaceInPortN
// Results will be nodes that accept Line as parameter.
searchViewModel.PopulateAutoCompleteCandidates();
- Assert.AreEqual(58, searchViewModel.FilteredResults.Count());
+ var nodeNamesResultList = searchViewModel.FilteredResults.Select(x => x.Name).ToList();
+
+ Assert.AreEqual(expectedNodes.Count(), nodeNamesResultList.Count(),string.Format("Missing nodes: {0} ", string.Join(", ",expectedNodes.Except(nodeNamesResultList))));
}
[Test]
public void NodeSuggestions_CanAutoCompleteOnCustomNodesOutPort_WithWhiteSpaceStartingPortName()
@@ -186,7 +190,9 @@ public void NodeSuggestions_CanAutoCompleteOnCustomNodesOutPort_WithWhiteSpaceSt
// Results will be nodes that accept Line as parameter.
searchViewModel.PopulateAutoCompleteCandidates();
- Assert.AreEqual(58, searchViewModel.FilteredResults.Count());
+ var nodeNamesResultList = searchViewModel.FilteredResults.Select(x => x.Name).ToList();
+
+ Assert.AreEqual(expectedNodes.Count(), nodeNamesResultList.Count(), string.Format("Missing nodes: {0} ", string.Join(", ", expectedNodes.Except(nodeNamesResultList))));
}
[Test]
diff --git a/test/DynamoCoreWpfTests/PackageManager/PackageManagerSearchElementViewModelTests.cs b/test/DynamoCoreWpfTests/PackageManager/PackageManagerSearchElementViewModelTests.cs
index 29ef0653d92..706e22c0b3d 100644
--- a/test/DynamoCoreWpfTests/PackageManager/PackageManagerSearchElementViewModelTests.cs
+++ b/test/DynamoCoreWpfTests/PackageManager/PackageManagerSearchElementViewModelTests.cs
@@ -16,6 +16,25 @@ namespace Dynamo.PackageManager.Wpf.Tests
{
class PackageManagerSearchElementViewModelTests : SystemTestBase
{
+ ///
+ /// A mock-up version of the compatibility map received via Greg
+ ///
+ private static Dictionary> compatibilityMap = new Dictionary>
+ {
+ { "Revit", new Dictionary {
+ {"2016", "1.3.2"}, {"2017", "2.0.2"}, {"2018", "2.0.2"}, {"2019", "2.0.2"},
+ {"2020", "2.1.0"}, {"2020.1", "2.2.1"}, {"2020.2", "2.3.0"}, {"2021", "2.5.2"},
+ {"2021.1", "2.6.1"}, {"2022", "2.10.1"}, {"2022.1", "2.12.0"}, {"2023", "2.13.1"},
+ {"2023.1", "2.16.1"}, {"2023.1.3", "2.16.2"}, {"2024", "2.17.0"}, {"2024.1", "2.18.1"},
+ {"2024.2", "2.19.3"}, {"2025", "3.0.3"}, {"2025.1", "3.0.3"}, {"2025.2", "3.2.1"}
+ }},
+ { "Civil3D", new Dictionary {
+ {"2020", "2.1.1"}, {"2020.1", "2.2.0"}, {"2020.2", "2.4.1"}, {"2021", "2.5.2"},
+ {"2022", "2.10.1"}, {"2023", "2.13.1"}, {"2024", "2.17.1"}, {"2024.1", "2.18.1"},
+ {"2024.2", "2.18.1"}, {"2024.3", "2.19"}, {"2025", "3.0.3"}, {"2025.1", "3.2.2"}
+ }}
+ };
+
///
/// A test to ensure the CanInstall property of a package updates correctly.
///
@@ -162,7 +181,7 @@ public void TestPackageManagerInstallStatusByResourceName()
}
///
- /// This unit test will validate that after we set the host filters in the package search, we will get an intersection of the results (instead of a union)
+ /// This unit test will validate that after we set the hostName filters in the package search, we will get an intersection of the results (instead of a union)
///
[Test]
public void PackageSearchDialogSearchIntersectAgainstHostFilters()
@@ -703,5 +722,149 @@ public void PackageSearchOrderAfterTextReset()
//Assert - validate order by Votes
Assert.IsTrue(isOrderedByVotes && packageManagerSearchVM.SearchResults.Count != 0);
}
+
+ [Test]
+ public void TestComputeVersionCompatibility()
+ {
+ //Arrange
+ var compatibilityMatrix = new List
+ {
+ new Greg.Responses.Compatibility { name = "Dynamo", min = "2.0", max = "2.5" },
+ new Greg.Responses.Compatibility { name = "Host", min = "2020", max = "2025" }
+ };
+
+ var compatibilityMatrixNoHost = new List
+ {
+ new Greg.Responses.Compatibility { name = "Dynamo", min = "2.0", max = "2.5" },
+ };
+
+ var customDynamoVersion = new Version("2.3");
+ var customHostVersion = new Version("2023.0");
+
+ // Act
+ var result = PackageManagerSearchElement.CalculateCompatibility(compatibilityMatrix, customDynamoVersion, compatibilityMap, customHostVersion);
+ var resultNoHost = PackageManagerSearchElement.CalculateCompatibility(compatibilityMatrixNoHost, customDynamoVersion, compatibilityMap, customHostVersion);
+
+ // Assert
+ Assert.IsTrue(result);
+ Assert.IsTrue(resultNoHost);
+ }
+
+ [Test]
+ public void TestComputeIncompatibleVersionCompatibility()
+ {
+ //Arrange
+ var compatibilityMatrixIncompatibleDynamo = new List
+ {
+ new Greg.Responses.Compatibility { name = "Dynamo", min = "3.0", max = "3.5" },
+ new Greg.Responses.Compatibility { name = "Host", min = "2020.0", max = "2025.0" }
+ };
+
+ var compatibilityMatrixIncompatibleHost = new List
+ {
+ new Greg.Responses.Compatibility { name = "Dynamo", min = "2.0", max = "3.5" },
+ new Greg.Responses.Compatibility { name = "Host", min = "2020.0", max = "2022.0" }
+ };
+
+ var customDynamoVersion = new Version("2.9");
+ var customHostVersion = new Version("2023.0");
+ var customHostName = "Host";
+
+ // Act
+ var resultIncompatibleDynamo = PackageManagerSearchElement.CalculateCompatibility(compatibilityMatrixIncompatibleDynamo, customDynamoVersion, compatibilityMap, customHostVersion, customHostName);
+ var resultIncompatibleHost = PackageManagerSearchElement.CalculateCompatibility(compatibilityMatrixIncompatibleHost, customDynamoVersion, compatibilityMap, customHostVersion, customHostName);
+
+ // Assert
+ Assert.IsFalse(resultIncompatibleDynamo);
+ Assert.IsFalse(resultIncompatibleHost);
+ }
+
+ [Test]
+ public void TestComputeVersionNoDynamoCompatibility()
+ {
+ //Arrange
+ var compatibilityMatrix = new List
+ {
+ new Greg.Responses.Compatibility { name = "Revit", min = "2020", max = "2025" }
+ };
+
+ var minValueCompatibilityMatrix = new List
+ {
+ new Greg.Responses.Compatibility { name = "Revit", min = "2020", }
+ };
+
+
+ var incompleteCompatibilityMatrix = new List
+ {
+ new Greg.Responses.Compatibility { name = "Revit" }
+ };
+
+ var customIncompatibleDynamoVersion = new Version("2.0.2"); // Matches Revit 2019
+ var customCompatibleDynamoVersion = new Version("2.13.1"); // Dynamo 2.13.1 matches Revit 2023.0
+ var customHostVersion = new Version("2023.0"); // Revit 2023.0 matches Dynamo 2.13.1
+ var hostName = "Revit";
+
+ // Act
+ // True - No dynamo compatibility provided, we extract Dynamo versions from Host and check against the current Dynamo Version
+ var resultNoDynamoCompatibilityUnderDynamo = PackageManagerSearchElement.CalculateCompatibility(compatibilityMatrix, customCompatibleDynamoVersion, compatibilityMap);
+ // True - No dynamo compatibility provided, but we are under a Host
+ var resultNoDynamoCompatibilityUnderHost = PackageManagerSearchElement.CalculateCompatibility(compatibilityMatrix, customCompatibleDynamoVersion, compatibilityMap, customHostVersion, hostName);
+ // True - We will assume that, if we have 'min' value but no 'max' value, anything above that is OK
+ var resultMinValue = PackageManagerSearchElement.CalculateCompatibility(minValueCompatibilityMatrix, customCompatibleDynamoVersion, compatibilityMap);
+ // False - looking for support for Dynamo 2.0.2 (matching Revit 2019), but the min Revit version is 2020
+ var resultIncompatible = PackageManagerSearchElement.CalculateCompatibility(compatibilityMatrix, customIncompatibleDynamoVersion, compatibilityMap);
+ // Null - Not enough information provided to extract DynamoCompatibility, we return 'null' for unknown compatibility
+ var resultIncomplete = PackageManagerSearchElement.CalculateCompatibility(incompleteCompatibilityMatrix, customIncompatibleDynamoVersion, compatibilityMap);
+
+ // Assert
+ Assert.IsTrue(resultNoDynamoCompatibilityUnderDynamo);
+ Assert.IsTrue(resultNoDynamoCompatibilityUnderHost);
+ Assert.IsTrue(resultMinValue);
+ Assert.IsFalse(resultIncompatible);
+ }
+
+ [Test]
+ public void TestReverseDynamoCompatibilityFromHost()
+ {
+ //Arrange
+ var compatibilityMatrix = new List
+ {
+ new Greg.Responses.Compatibility { name = "Revit", min = "2020", max = "2025", versions = new List() { "2016", "2018" } }
+ };
+
+ var expectedDynamoCompatibility = new Compatibility()
+ {
+ name = "Dynamo",
+ min = "2.1.0",
+ max = "3.0.3",
+ versions = new List() { "1.3.2", "2.0.2" }
+ };
+
+ var result = PackageManagerSearchElement.GetDynamoCompatibilityFromHost(compatibilityMatrix, compatibilityMap);
+
+ Assert.That(result.name, Is.EqualTo(expectedDynamoCompatibility.name));
+ Assert.That(result.min, Is.EqualTo(expectedDynamoCompatibility.min));
+ Assert.That(result.max, Is.EqualTo(expectedDynamoCompatibility.max));
+ Assert.That(result.versions, Is.EqualTo(expectedDynamoCompatibility.versions));
+ }
+
+ [Test]
+ public void TestNullCompatibilityMap()
+ {
+ // Arrange
+ var compatibilityMatrix = new List
+ {
+ new Greg.Responses.Compatibility { name = "Revit", min = "2020", max = "2025", versions = new List() { "2016", "2018" } }
+ };
+
+ // Act & Assert: Check that an InvalidOperationException is thrown
+ var exception = Assert.Throws(() =>
+ {
+ var result = PackageManagerSearchElement.GetDynamoCompatibilityFromHost(compatibilityMatrix, null);
+ });
+
+ // Assert the exception message if needed
+ Assert.AreEqual("The compatibility map is not initialized.", exception.Message);
+ }
}
}
diff --git a/test/DynamoCoreWpfTests/ViewExtensions/PackageDetailsViewExtensionTests.cs b/test/DynamoCoreWpfTests/ViewExtensions/PackageDetailsViewExtensionTests.cs
index 17fe0c8fad7..8d2451aab2a 100644
--- a/test/DynamoCoreWpfTests/ViewExtensions/PackageDetailsViewExtensionTests.cs
+++ b/test/DynamoCoreWpfTests/ViewExtensions/PackageDetailsViewExtensionTests.cs
@@ -6,7 +6,6 @@
using Greg.Responses;
using Moq;
using NUnit.Framework;
-using PythonNodeModels;
using SystemTestServices;
namespace DynamoCoreWpfTests
@@ -36,6 +35,23 @@ public class PackageDetailsViewExtensionTests : SystemTestBase
new Dependency {_id = string.Empty, name = "Dependency"},
new Dependency {_id = string.Empty, name = "Dependency"}
};
+ private static List CompatibilityList { get; } = new List
+ {
+ new Greg.Responses.Compatibility
+ {
+ name = "Dynamo",
+ versions = new List { "2.19", "3.0" },
+ min = "3.2",
+ max = "3.4"
+ },
+ new Greg.Responses.Compatibility
+ {
+ name = "Revit",
+ versions = null,
+ min = "2022",
+ max = string.Empty
+ }
+ };
private static List PackageVersions = new List
{
new PackageVersion
@@ -50,6 +66,7 @@ public class PackageDetailsViewExtensionTests : SystemTestBase
version = "0.0.1",
name = "test",
size = "2.19 MiB",
+ compatibility_matrix = CompatibilityList,
},
new PackageVersion
{
@@ -63,6 +80,7 @@ public class PackageDetailsViewExtensionTests : SystemTestBase
version = "0.0.2",
name = "test",
size = "4.19 MiB",
+ compatibility_matrix = CompatibilityList,
},
new PackageVersion
{
@@ -76,13 +94,14 @@ public class PackageDetailsViewExtensionTests : SystemTestBase
version = "0.0.3",
name = "test",
size = "5.19 MiB",
+ compatibility_matrix = CompatibilityList,
},
};
private static List DependencyVersions { get; } = new List {"1", "2", "3"};
///
/// Tests whether a PackageDetailItem detects its dependencies and sets correponding values properly.
- /// These display in the PackageDetailsView versions DataGrid as the 'Host' and 'Python' columns.
+ /// These display in the PackageDetailsView dynamoVersions DataGrid as the 'Host' and 'Python' columns.
///
[Test]
public void TestDependencyDetection()
@@ -173,7 +192,7 @@ public void TestDependencyDetection()
}
///
- /// Tests whether the PackageDetailsViewModel receives the package versions properly.
+ /// Tests whether the PackageDetailsViewModel receives the package dynamoVersions properly.
///
[Test]
public void TestVersionsDisplayedInView()
@@ -211,7 +230,7 @@ public void TestVersionsDisplayedInView()
PackageDetailsView packageDetailsView = PackageDetailsViewExtension.PackageDetailsView;
// Assert
- Assert.IsNotNull(packageDetailsView.VersionsDataGrid);
+ Assert.IsNotNull(packageDetailsView.VersionsListView);
Assert.IsInstanceOf(packageDetailsView.DataContext);
PackageDetailsViewModel packageDetailsViewModel = packageDetailsView.DataContext as PackageDetailsViewModel;
@@ -368,7 +387,7 @@ public void TestOpenDependencyDetails()
///
/// Tests whether the extension opens and display package details when a user
- /// clicks on the 'View Details' button in the package manager searh view.
+ /// clicks on the 'View Details' button in the package manager search view.
///
[Test]
public void TestViewPackageDetailsCommand()
@@ -423,5 +442,118 @@ public void TestViewPackageDetailsCommand()
Assert.AreEqual(packageDescription, packageDetailsViewModel.PackageDescription);
Assert.AreEqual(false, string.IsNullOrEmpty(packageDetailsViewModel.PackageDetailItems.FirstOrDefault().PackageSize));
}
+
+ ///
+ /// Verifies that the package's compatibility info (name and version details) is correctly flattened
+ /// and displayed in the package details view based on the CompatibilityList response.
+ ///
+ [Test]
+ public void TestFlattenedVersionCompatibility()
+ {
+ // Arrange
+ string packageToOpen = "Sample View Extension";
+ List packageAuthor = new List { new User { _id = "1", username = "DynamoTeam" } };
+ string packageDescription = "Dynamo sample view extension.";
+
+ PackageDetailsViewExtension.PackageManagerClientViewModel = ViewModel.PackageManagerClientViewModel;
+
+ PackageHeader packageHeader = new PackageHeader
+ {
+ _id = null,
+ name = packageToOpen,
+ versions = PackageVersions,
+ latest_version_update = System.DateTime.Now,
+ num_versions = PackageVersions.Count,
+ comments = null,
+ num_comments = 0,
+ latest_comment = null,
+ votes = 0,
+ downloads = 0,
+ repository_url = null,
+ site_url = null,
+ banned = false,
+ deprecated = false,
+ @group = null,
+ engine = null,
+ license = null,
+ used_by = null,
+ host_dependencies = Hosts,
+ num_dependents = 0,
+ description = packageDescription,
+ maintainers = packageAuthor,
+ keywords = null
+ };
+ PackageManagerSearchElement packageManagerSearchElement = new PackageManagerSearchElement(packageHeader);
+ PackageDetailsViewExtension.OpenPackageDetails(packageManagerSearchElement);
+ PackageDetailsView packageDetailsView = PackageDetailsViewExtension.PackageDetailsView;
+ Assert.IsInstanceOf(packageDetailsView.DataContext);
+ PackageDetailsViewModel packageDetailsViewModel = packageDetailsView.DataContext as PackageDetailsViewModel;
+
+ var item = packageDetailsViewModel.PackageDetailItems.FirstOrDefault();
+ var dynamoVersions = $"{CompatibilityList.FirstOrDefault().min} - {CompatibilityList.FirstOrDefault().max}," +
+ $" {string.Join(", ", CompatibilityList.FirstOrDefault().versions)}";
+
+ // Assert
+ Assert.IsNotNull(item.VersionInformation);
+ Assert.AreEqual(2, item.VersionInformation.Count);
+
+ // Complete
+ Assert.AreEqual(CompatibilityList[0].name, item.VersionInformation[0].CompatibilityName);
+ Assert.AreEqual(dynamoVersions, item.VersionInformation[0].Versions);
+ // Missing or incomplete compatibility information
+ Assert.AreEqual(CompatibilityList[1].name, item.VersionInformation[1].CompatibilityName);
+ Assert.AreEqual(string.Empty, item.VersionInformation[1].Versions);
+ }
+
+ ///
+ /// Asserts that the last version in a list of equally compatible versions is the latestCompatibilityVersion assigned in the vm
+ ///
+ [Test]
+ public void TestCorrectLatestCompatibleVersionIsFound()
+ {
+ // Arrange
+ string packageToOpen = "Sample View Extension";
+ List packageAuthor = new List { new User { _id = "1", username = "DynamoTeam" } };
+ string packageDescription = "Dynamo sample view extension.";
+
+ PackageDetailsViewExtension.PackageManagerClientViewModel = ViewModel.PackageManagerClientViewModel;
+
+ PackageHeader packageHeader = new PackageHeader
+ {
+ _id = null,
+ name = packageToOpen,
+ versions = PackageVersions,
+ latest_version_update = System.DateTime.Now,
+ num_versions = PackageVersions.Count,
+ comments = null,
+ num_comments = 0,
+ latest_comment = null,
+ votes = 0,
+ downloads = 0,
+ repository_url = null,
+ site_url = null,
+ banned = false,
+ deprecated = false,
+ @group = null,
+ engine = null,
+ license = null,
+ used_by = null,
+ host_dependencies = Hosts,
+ num_dependents = 0,
+ description = packageDescription,
+ maintainers = packageAuthor,
+ keywords = null
+ };
+ PackageManagerSearchElement packageManagerSearchElement = new PackageManagerSearchElement(packageHeader);
+ PackageDetailsViewExtension.OpenPackageDetails(packageManagerSearchElement);
+ PackageDetailsView packageDetailsView = PackageDetailsViewExtension.PackageDetailsView;
+ Assert.IsInstanceOf(packageDetailsView.DataContext);
+ PackageDetailsViewModel packageDetailsViewModel = packageDetailsView.DataContext as PackageDetailsViewModel;
+
+ var latestCompatibleVersion = packageManagerSearchElement.LatestCompatibleVersion;
+
+ // Assert
+ Assert.AreEqual(PackageVersions[2].version, latestCompatibleVersion.Version);
+ }
}
}
diff --git a/test/Libraries/PackageManagerTests/PackageManagerClientTests.cs b/test/Libraries/PackageManagerTests/PackageManagerClientTests.cs
index 0e4b77706c9..9c1efa3e2c9 100644
--- a/test/Libraries/PackageManagerTests/PackageManagerClientTests.cs
+++ b/test/Libraries/PackageManagerTests/PackageManagerClientTests.cs
@@ -7,6 +7,7 @@
using Greg.Requests;
using Greg.Responses;
using Moq;
+using Newtonsoft.Json.Linq;
using NUnit.Framework;
namespace Dynamo.PackageManager.Tests
@@ -631,5 +632,69 @@ public void Undeprecate_ReturnsFailureObjectWhenRequestThrowsException()
#endregion
+ #region Compatibility Map
+
+ [Test]
+ public void CompatibilityMap_ReturnsValidMap()
+ {
+ // Mocking the response
+ var responseContent = new List
+ {
+ new JObject
+ {
+ { "Revit", new JObject { { "2021", "2.5.2" }, { "2022", "2.10.1" } } }
+ },
+ new JObject
+ {
+ { "Civil3D", new JObject { { "2021", "2.5.2" }, { "2022", "2.10.1" } } }
+ }
+ };
+
+ var pkgResponse = new ResponseWithContentBody
-
+
all
compile; build; native; contentfiles; analyzers; buildtransitive
diff --git a/test/core/packageDependencyTests/PythonDependency.dyn b/test/core/packageDependencyTests/PythonDependency.dyn
new file mode 100644
index 00000000000..bc84cdb5ce8
--- /dev/null
+++ b/test/core/packageDependencyTests/PythonDependency.dyn
@@ -0,0 +1,106 @@
+{
+ "Uuid": "0760a737-55e1-4e89-a175-e10147e36042",
+ "IsCustomNode": false,
+ "Description": "",
+ "Name": "PythonDependency",
+ "ElementResolver": {
+ "ResolutionMap": {}
+ },
+ "Inputs": [],
+ "Outputs": [],
+ "Nodes": [
+ {
+ "ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels",
+ "Code": "# Load the Python Standard and DesignScript Libraries\r\nimport sys\r\nimport clr\r\nclr.AddReference('ProtoGeometry')\r\nfrom Autodesk.DesignScript.Geometry import *\r\n\r\n# The inputs to this node will be stored as a list in the IN variables.\r\ndataEnteringNode = IN\r\n\r\n# Place your code below this line\r\n\r\n# Assign your output to the OUT variable.\r\nOUT = 0",
+ "Engine": "CPython3",
+ "VariableInputPorts": true,
+ "Id": "eea559999b3e43e18488b587b1218082",
+ "NodeType": "PythonScriptNode",
+ "Inputs": [
+ {
+ "Id": "0898a31365ca449fb054872d1f2a81d1",
+ "Name": "IN[0]",
+ "Description": "Input #0",
+ "UsingDefaultValue": false,
+ "Level": 2,
+ "UseLevels": false,
+ "KeepListStructure": false
+ }
+ ],
+ "Outputs": [
+ {
+ "Id": "5bc0033faea34070897bc93a50cfaa15",
+ "Name": "OUT",
+ "Description": "Result of the python script",
+ "UsingDefaultValue": false,
+ "Level": 2,
+ "UseLevels": false,
+ "KeepListStructure": false
+ }
+ ],
+ "Replication": "Disabled",
+ "Description": "Runs an embedded Python script."
+ }
+ ],
+ "Connectors": [],
+ "Dependencies": [],
+ "NodeLibraryDependencies": [],
+ "EnableLegacyPolyCurveBehavior": null,
+ "Thumbnail": "",
+ "GraphDocumentationURL": null,
+ "ExtensionWorkspaceData": [
+ {
+ "ExtensionGuid": "28992e1d-abb9-417f-8b1b-05e053bee670",
+ "Name": "Properties",
+ "Version": "3.4",
+ "Data": {}
+ }
+ ],
+ "Author": "",
+ "Linting": {
+ "activeLinter": "None",
+ "activeLinterId": "7b75fb44-43fd-4631-a878-29f4d5d8399a",
+ "warningCount": 0,
+ "errorCount": 0
+ },
+ "Bindings": [],
+ "View": {
+ "Dynamo": {
+ "ScaleFactor": 1.0,
+ "HasRunWithoutCrash": true,
+ "IsVisibleInDynamoLibrary": true,
+ "Version": "3.4.0.6124",
+ "RunType": "Automatic",
+ "RunPeriod": "1000"
+ },
+ "Camera": {
+ "Name": "_Background Preview",
+ "EyeX": -17.0,
+ "EyeY": 24.0,
+ "EyeZ": 50.0,
+ "LookX": 12.0,
+ "LookY": -13.0,
+ "LookZ": -58.0,
+ "UpX": 0.0,
+ "UpY": 1.0,
+ "UpZ": 0.0
+ },
+ "ConnectorPins": [],
+ "NodeViews": [
+ {
+ "Id": "eea559999b3e43e18488b587b1218082",
+ "Name": "Python Script",
+ "IsSetAsInput": false,
+ "IsSetAsOutput": false,
+ "Excluded": false,
+ "ShowGeometry": true,
+ "X": 341.0,
+ "Y": 287.0
+ }
+ ],
+ "Annotations": [],
+ "X": 0.0,
+ "Y": 0.0,
+ "Zoom": 1.0
+ }
+}
\ No newline at end of file
diff --git a/test/core/packageDependencyTests/PythonEnginePackage/bin/DSPythonNet3Empty.dll b/test/core/packageDependencyTests/PythonEnginePackage/bin/DSPythonNet3Empty.dll
new file mode 100644
index 00000000000..62f6d8cfa89
Binary files /dev/null and b/test/core/packageDependencyTests/PythonEnginePackage/bin/DSPythonNet3Empty.dll differ
diff --git a/test/core/packageDependencyTests/PythonEnginePackage/extra/DSPythonNet3.dll b/test/core/packageDependencyTests/PythonEnginePackage/extra/DSPythonNet3.dll
new file mode 100644
index 00000000000..273f960e2a7
Binary files /dev/null and b/test/core/packageDependencyTests/PythonEnginePackage/extra/DSPythonNet3.dll differ
diff --git a/test/core/packageDependencyTests/PythonEnginePackage/extra/DSPythonNet3Extension.dll b/test/core/packageDependencyTests/PythonEnginePackage/extra/DSPythonNet3Extension.dll
new file mode 100644
index 00000000000..93a822b5e12
Binary files /dev/null and b/test/core/packageDependencyTests/PythonEnginePackage/extra/DSPythonNet3Extension.dll differ
diff --git a/test/core/packageDependencyTests/PythonEnginePackage/extra/DSPythonNet3Extension_ExtensionDefinition.xml b/test/core/packageDependencyTests/PythonEnginePackage/extra/DSPythonNet3Extension_ExtensionDefinition.xml
new file mode 100644
index 00000000000..81ab3b5cf6d
--- /dev/null
+++ b/test/core/packageDependencyTests/PythonEnginePackage/extra/DSPythonNet3Extension_ExtensionDefinition.xml
@@ -0,0 +1,4 @@
+
+ DSPythonNet3Extension.dll
+ DSPythonNet3Extension.DSPythonNet3Extension
+
\ No newline at end of file
diff --git a/test/core/packageDependencyTests/PythonEnginePackage/extra/Python.Runtime.dll b/test/core/packageDependencyTests/PythonEnginePackage/extra/Python.Runtime.dll
new file mode 100644
index 00000000000..0cc8c27782d
Binary files /dev/null and b/test/core/packageDependencyTests/PythonEnginePackage/extra/Python.Runtime.dll differ
diff --git a/test/core/packageDependencyTests/PythonEnginePackage/pkg.json b/test/core/packageDependencyTests/PythonEnginePackage/pkg.json
new file mode 100644
index 00000000000..ef5f2920d6d
--- /dev/null
+++ b/test/core/packageDependencyTests/PythonEnginePackage/pkg.json
@@ -0,0 +1,23 @@
+{
+ "license": "MIT",
+ "file_hash": null,
+ "name": "TestCP311",
+ "version": "1.0.8",
+ "description": "***This is a test package ***",
+ "group": "",
+ "keywords": [],
+ "dependencies": [],
+ "host_dependencies": [],
+ "contents": "",
+ "engine_version": "3.3.0.6046",
+ "engine": "dynamo",
+ "engine_metadata": "",
+ "site_url": "https://dynamobim.org/",
+ "repository_url": "https://github.com/DynamoDS/Dynamo",
+ "contains_binaries": true,
+ "node_libraries": [
+ "DSPythonNet3Empty, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
+ ],
+ "copyright_holder": "DynamoTeam",
+ "copyright_year": "2024"
+}
\ No newline at end of file
diff --git a/tools/NuGet/BuildPackages.bat b/tools/NuGet/BuildPackages.bat
index d6ba089a87a..775c93c2dcf 100644
--- a/tools/NuGet/BuildPackages.bat
+++ b/tools/NuGet/BuildPackages.bat
@@ -1,3 +1,5 @@
+:: PLEASE SOMEONE FIND THE TIME TO REPLACE THIS WITH ANOTHER SCRIPTING LANGUAGE :(
+
:: Argument %1: path to template folder
:: Argument %2: path to dynamo build directory
::
@@ -37,6 +39,9 @@ for /f %%f in ('cscript //Nologo ..\install\GetFileVersion.vbs %harvestPath%\Dyn
setlocal DisableDelayedExpansion
set version=%Major%.%Minor%.%Build%-beta%Revision%
+for /f %%i in ('git rev-parse HEAD') do set COMMIT=%%i
+
+echo %COMMIT%
:: Get target framework from build.xml
for /f %%f in ('cscript //Nologo .\GetTargetFramework.vbs ..\..\src\build.xml') do (
setlocal EnableDelayedExpansion
@@ -47,12 +52,18 @@ setlocal DisableDelayedExpansion
:: Clean files generated from the previous run
if exist *.nupkg ( del *.nupkg )
+echo %1|find ".nuspec" >nul
+if errorlevel 1 (goto :packfolder) else (goto:packsingle_nuspec)
+
+:packsingle_nuspec
+nuget pack %1 -basepath %harvestPath% -properties gitcommitid=%COMMIT%;Version=%version%;TargetFramework=%targetFramework%
+:packfolder
:: Pack .nupkg files based on each .nuspec in the "nuspec" folder
for %%f in (%1\*.nuspec) do (
:: Check if nuspec file name containing "Symbols"
echo %%f|find "Symbols" >nul
:: When nuget pack symbols, set to release path where the symbol files live
- if errorlevel 1 ( nuget pack %%f -basepath %harvestPath% -properties Version=%version%;TargetFramework=%targetFramework%) else (nuget pack %%f -basepath %releasePath% -properties Version=%version%;TargetFramework=%targetFramework%)
+ if errorlevel 1 ( nuget pack %%f -basepath %harvestPath% -properties gitcommitid=%COMMIT%;Version=%version%;TargetFramework=%targetFramework%) else (nuget pack %%f -basepath %releasePath% -properties Version=%version%;TargetFramework=%targetFramework%)
if not exist %%~nf.%version%.nupkg (
exit /b 1
)
diff --git a/tools/NuGet/template-service-core/DynamoVisualProgramming.ServiceCoreRuntime-debug.nuspec b/tools/NuGet/template-service-core/DynamoVisualProgramming.ServiceCoreRuntime-debug.nuspec
new file mode 100644
index 00000000000..d4611fd0ddf
--- /dev/null
+++ b/tools/NuGet/template-service-core/DynamoVisualProgramming.ServiceCoreRuntime-debug.nuspec
@@ -0,0 +1,25 @@
+
+
+
+ DynamoVisualProgramming.ServiceCoreRuntime-debug
+ $Version$
+ Autodesk
+ Autodesk
+ Apache-2.0
+ https://github.com/DynamoDS/Dynamo
+ false
+ Assemblies required to start a DynamoModel and execute DesignScript code bundled along with their dependencies.
+ Built targeting linux.
+ Copyright Autodesk 2023
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/Performance/DynamoPerformanceTests/DynamoPerformanceTests.csproj b/tools/Performance/DynamoPerformanceTests/DynamoPerformanceTests.csproj
index 4ec15be1199..1efcef2dda2 100644
--- a/tools/Performance/DynamoPerformanceTests/DynamoPerformanceTests.csproj
+++ b/tools/Performance/DynamoPerformanceTests/DynamoPerformanceTests.csproj
@@ -36,6 +36,9 @@
..\..\..\bin\$(Platform)\$(Configuration)\DynamoServices.dll
+
+ ..\..\..\bin\$(Platform)\$(Configuration)\SystemTestServices.dll
+