Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DYN-6620 Add version size data to Package Details #15411

Merged
merged 2 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/DynamoCore/DynamoCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</ItemGroup>
<ItemGroup Label="Common dependencies">
<PackageReference Include="Autodesk.IDSDK" Version="1.1.8" />
<PackageReference Include="Greg" Version="3.0.1.4707" />
<PackageReference Include="Greg" Version="3.0.2.5756" />
<PackageReference Include="DynamoVisualProgramming.LibG_230_0_0" Version="3.0.0.5365" GeneratePathProperty="true" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" CopyXML="true" />
<PackageReference Include="RestSharp" Version="108.0.1" CopyXML="true" />
Expand Down
10 changes: 5 additions & 5 deletions src/DynamoCoreWpf/DynamoCoreWpf.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<UILib>true</UILib>
</PropertyGroup>
Expand Down Expand Up @@ -31,9 +31,9 @@
</Exec>
<Message Text="Skipping Install for $(PackageName) $(PackageVersion), package up to date." Condition="!$(ShouldInstall)" Importance="high" />
<!--This command updates the npm registry configuration if necessary-->
<Exec Command="$(PowerShellCommand) -ExecutionPolicy ByPass -Command $(SolutionDir)\setnpmreg.ps1" Condition="$(ShouldInstall)"/>
<Exec Command="$(PowerShellCommand) -ExecutionPolicy ByPass -Command $(SolutionDir)\setnpmreg.ps1" Condition="$(ShouldInstall)" />
<!--This command gets a specific splash screen build from npm-->
<Exec Command="npm pack @dynamods/splash-screen@$(PackageVersion)" Condition="$(ShouldInstall)"/>
<Exec Command="npm pack @dynamods/splash-screen@$(PackageVersion)" Condition="$(ShouldInstall)" />
</Target>

<Target Name="ExtractTGZFile" DependsOnTargets="NpmRunBuild" BeforeTargets="BeforeBuild" Condition="$(ShouldInstall)">
Expand Down Expand Up @@ -67,7 +67,7 @@
</Exec>
<Message Text="Skipping Install for $(PackageName) $(PackageVersion), package up to date." Condition="!$(ShouldInstall)" Importance="high"></Message>
<!--This command updates the npm registry configuration if necessary-->
<Exec Command="$(PowerShellCommand) -ExecutionPolicy ByPass -Command $(SolutionDir)\setnpmreg.ps1" Condition="$(ShouldInstall)"/>
<Exec Command="$(PowerShellCommand) -ExecutionPolicy ByPass -Command $(SolutionDir)\setnpmreg.ps1" Condition="$(ShouldInstall)" />
<!--Download a specific build of the Dynamo Home package from npm-->
<Exec Command="npm pack @dynamods/dynamo-home@$(PackageVersion)" Condition="$(ShouldInstall)" />
</Target>
Expand Down Expand Up @@ -186,7 +186,7 @@
<PackageReference Include="DynamoVisualProgramming.LibG_230_0_0" Version="3.0.0.5365" />
<PackageReference Include="FontAwesome5" Version="2.1.11" />
<PackageReference Include="AvalonEdit" Version="6.3.0.90" CopyXML="true" />
<PackageReference Include="Greg" Version="3.0.1.4707" />
<PackageReference Include="Greg" Version="3.0.2.5756" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2045.28" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="RestSharp" Version="108.0.1" />
Expand Down
2 changes: 1 addition & 1 deletion src/DynamoMLDataPipeline/DynamoMLDataPipeline.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="RestSharp" Version="108.0.1" />
<PackageReference Include="Greg" Version="3.0.1.4707" />
<PackageReference Include="Greg" Version="3.0.2.5756" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DynamoCore\DynamoCore.csproj">
Expand Down
2 changes: 1 addition & 1 deletion src/DynamoPackages/DynamoPackages.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<Content Include="PackageManagerExtension_ExtensionDefinition.xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Greg" Version="3.0.1.4707" />
<PackageReference Include="Greg" Version="3.0.2.5756" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="RestSharp" Version="108.0.1" />
<PackageReference Include="System.Reflection.MetadataLoadContext" Version="8.0.0" />
Expand Down
3 changes: 1 addition & 2 deletions src/PackageDetailsViewExtension/PackageDetailItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,7 @@ public PackageDetailItem(string packageName, PackageVersion packageVersion, bool
this.CopyRightYear = PackageVersion.copyright_year;
this.CanInstall = canInstall;
this.IsEnabledForInstall = isEnabledForInstall && canInstall;
//TODO: point this property to the package version size after it has been added to the db.
this.PackageSize = Dynamo.Properties.Resources.NoneString;
this.PackageSize = string.IsNullOrEmpty(PackageVersion.size) ? "--" : PackageVersion.size;


// To avoid displaying package self-dependencies.
Expand Down
2 changes: 1 addition & 1 deletion src/PackageDetailsViewExtension/PackageDetailsView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@

<!-- Size -->
<DataGridTextColumn MinWidth="110"
Binding="{Binding PythonVersion}"
Binding="{Binding PackageSize}"
Header="{x:Static p:Resources.PackageDetailsSize}"
HeaderStyle="{StaticResource DataGridColumnHeaderText}"
IsReadOnly="True" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<EnableDefaultPageItems>false</EnableDefaultPageItems>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Greg" Version="3.0.1.4707" />
<PackageReference Include="Greg" Version="3.0.2.5756" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="RestSharp" Version="108.0.1" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.8.0" />
<PackageReference Include="Greg" Version="3.0.1.4707" />
<PackageReference Include="Greg" Version="3.0.2.5756" />
<PackageReference Include="DynamoVisualProgramming.LibG_230_0_0" Version="3.0.0.5365" />
<PackageReference Include="Magick.NET.Core" Version="7.0.1" />
<PackageReference Include="Magick.NET-Q8-AnyCPU" Version="7.24.1" />
Expand Down
2 changes: 1 addition & 1 deletion test/DynamoCoreTests/DynamoCoreTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Greg" Version="3.0.1.4707">
<PackageReference Include="Greg" Version="3.0.2.5756">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion test/DynamoCoreWpfTests/DynamoCoreWpfTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="Cyotek.Drawing.BitmapFont" Version="2.0.0" />
<PackageReference Include="Greg" Version="3.0.1.4707">
<PackageReference Include="Greg" Version="3.0.2.5756">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using Dynamo.PackageDetails;
using Dynamo.PackageManager;
Expand Down Expand Up @@ -49,6 +49,7 @@ public class PackageDetailsViewExtensionTests : SystemTestBase
host_dependencies = new List<string>(Hosts),
version = "0.0.1",
name = "test",
size = "2.19 MiB",
},
new PackageVersion
{
Expand All @@ -61,6 +62,7 @@ public class PackageDetailsViewExtensionTests : SystemTestBase
host_dependencies = new List<string>(Hosts),
version = "0.0.2",
name = "test",
size = "4.19 MiB",
},
new PackageVersion
{
Expand All @@ -73,6 +75,7 @@ public class PackageDetailsViewExtensionTests : SystemTestBase
host_dependencies = new List<string>(Hosts),
version = "0.0.3",
name = "test",
size = "5.19 MiB",
},
};
private static List<string> DependencyVersions { get; } = new List<string> {"1", "2", "3"};
Expand Down Expand Up @@ -418,6 +421,7 @@ public void TestViewPackageDetailsCommand()
Assert.AreEqual(packageToOpen, packageDetailsViewModel.PackageName);
Assert.AreEqual(packageAuthor.First().username, packageDetailsViewModel.PackageAuthorName);
Assert.AreEqual(packageDescription, packageDetailsViewModel.PackageDescription);
Assert.AreEqual(false, string.IsNullOrEmpty(packageDetailsViewModel.PackageDetailItems.FirstOrDefault().PackageSize));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="Greg" Version="3.0.1.4707">
<PackageReference Include="Greg" Version="3.0.2.5756">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Loading