-
Notifications
You must be signed in to change notification settings - Fork 57
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
update for the Dynamo 3.0 release #50
Conversation
List<string> resolutionPaths; | ||
|
||
[OneTimeSetUp] | ||
public void RunBeforeAllTests() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for doing this - I do hope we can come up with something better long term though. I believe there is a task in the backlog for it.
One thing we explored in the past was pulling full dynamo builds directly from s3 - that worked pretty well. There was even a msbuild task for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having dynamo (runtime) installed on the test machine + 3dParty tests pointing to that install path sounds like a good approach .
Maybe the 3dparty dev should make sure to install dynamocore on the build machine (not sure if we should do it as part of the test project build process)
But if we do want to provide this convenience, we could also include a script as part of the test nuget, that the user could use to download a specific version of dynamo (runtime) and set the proper paths in the test config file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be a good idea for our test framework too (in order to segregate test deps from the runtime), separate out all the tests in a new solution and all tests would have a resolver to point to the dynamo output folder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do install dynamo runtime as part of tests in other places (e.g. GD repos).
@@ -56,7 +56,7 @@ public static TraceExampleItem ByString(string description) | |||
|
|||
TraceExampleItem item = null; | |||
|
|||
int id; | |||
string id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of changing these types, you could just serialize and parse as it's just an int, or illustrate serialization using system.text.json.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
<PackageXml Include="$(OutputPath)SampleLinter_ExtensionDefinition.xml" /> | ||
<SettingsXml Include="$(OutputPath)LinterSettings.xml" /> | ||
</ItemGroup> | ||
<Copy SourceFiles="@(PackageDll)" DestinationFolder="$(ProjectDir)..\..\dynamo_linter\Sample Linter\bin" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whats the structure of this output path - does it live in the package output folder? Is it a separate package from the main samples one, or is it in the same package?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is a separate dynamo_linter folder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These packages are not exactly published, are they? Are they simply there for testing in Dynamo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not know if anyone has published these packages (manually ?). There is no automation for it.
From the looks of it, it is there just to provide an example of how to build a package/linter/extension.
I do not think we have an example for the publishing process
run: echo "::remove-matcher owner=csc::" | ||
- name: Install dependencies for SampleIntegration | ||
run: | | ||
dotnet restore $Env:GITHUB_WORKSPACE\DynamoSamples\src\SampleIntegration\SampleIntegration.sln /p:Configuration=Release --runtime=win-x64 -p:DotNet=net8.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is -p:DotNet=...
the same as /p:DotNet=...
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes..but dotnet restore has a different format for properties than msbuild
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, why are you using both formats here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not need the -p:DotNet=net8.0
here. Removed
Looks like dotnet restore requires /p: for supplying properties
--runtime=win-x64 is separate from properties.
<add key="RequestedLibraryVersion" value="Version223"/> | ||
</appSettings> | ||
<appSettings> | ||
<add key="DynamoBasePath" value="D:\dev\dynamo\DynamoDS\bin\AnyCPU\debug"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Obviously, this is not meant for CICD, is there CICD setup for this project?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
<ItemGroup> | ||
<PackageFiles Include="$(OutDir)\SampleLibraryUI.dll;$(OutDir)\SampleLibraryUI.XML;$(OutDir)\SampleLibraryUI.dll.config" /> | ||
<PackageFiles Include="$(OutDir)\SampleLibraryUI.dll;$(OutDir)\SampleLibraryUI.XML" /> | ||
<ENResourceFiles Include="$(OutDir)\en-US\*.*" /> | ||
<ESResourceFiles Include="$(OutDir)\es-ES\*.*" /> | ||
</ItemGroup> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason I'm having difficulty getting these afterbuild targets to run in Meshtoolkit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few minor comments, and some questions, then LGTM.
Needs to consume Dynamo nugets after this PR goes in DynamoDS/Dynamo#14774 |
src/Config/CS.props
Outdated
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<PlatformTarget >x64</PlatformTarget> | ||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">16.0</VisualStudioVersion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
src/Config/CS.props
Outdated
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">16.0</VisualStudioVersion> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<FileAlignment>512</FileAlignment> | ||
<RuntimeIdentifier>win-x64</RuntimeIdentifier> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this needed for all projects? I guess it's not that important now but it would be nice if our ZT and extension samples could run on linux builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<TargetFrameworkProfile /> | ||
<EnableDynamicLoading>true</EnableDynamicLoading> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because this is a sample and this is a pretty rare property, maybe add a comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<TargetFrameworkProfile /> | ||
<TargetFramework>net8.0-windows</TargetFramework> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these are worth adding comments for so that sample users don't blindly add these to their repos if they don't need them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
<Target Name="AfterBuild"> | ||
</Target> | ||
<ItemGroup> | ||
<PackageReference Include="DynamoVisualProgramming.Tests" Version="1.0.0" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.0.0 ? Is this a local build?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes...will change once I have the dynamo nugets
<WarningLevel>4</WarningLevel> | ||
<DocumentationFile>bin\Release\$(UICulture)\SampleLibraryUI.XML</DocumentationFile> | ||
<Prefer32Bit>false</Prefer32Bit> | ||
<TargetFramework>net8.0-windows</TargetFramework> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yada yada, this is a UI project that references wpf so add these properties
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still a few comments but looks good.
public void RunBeforeAllTests() | ||
{ | ||
var thisDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); | ||
var configPath = Path.Combine(thisDir, "TestServices.dll.config"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this config file is in the test nuget package that is a dependency of dynamosamples from the work done in DynamoDS/Dynamo#14774?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YEs. And ideally the content of this file (Setup.cs) would live in the SystemTestServices.dll (or somewhere in Dynamo). But I found it too complicated to do it now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just one last question, LGTM!
@pinzart90 looks like there are some build failures due to nunit API changes? |
Yeah, nunit should come with dynamotests. Waiting for the nuggets |
Changed how tests are run:
The resolver in Dynamo test infrastructure is broken (missing resolver paths for the main dynamo assemblies and for resources)
Added a custom resolver in the test.