Skip to content

Node markdown generator tool unit tests#34

Open
SHKnudsen wants to merge 9 commits intoNode-Markdown-generator-toolfrom
node-markdown-generator-tool-unit-tests
Open

Node markdown generator tool unit tests#34
SHKnudsen wants to merge 9 commits intoNode-Markdown-generator-toolfrom
node-markdown-generator-tool-unit-tests

Conversation

@SHKnudsen
Copy link
Owner

Purpose

Adds unit tests for the commands used in the Markdown generator tool

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated

Reviewers

@mjkkirschner

FYIs

@SHKnudsen SHKnudsen requested a review from mjkkirschner August 18, 2021 12:35
@mjkkirschner
Copy link
Collaborator

mjkkirschner commented Aug 18, 2021

@SHKnudsen thanks! 🎉

I think this PR is missing your inspectionTest.dll - and the source for it. - probably need to be git add -f

because I am working on a version of your PR that removes the metadatacontext support I'll need to work through which tests work and which don't with that version of my PR.

I don't think we can include all the revit dlls in the Dynamo repo so I don't think having a dependency on Revit will work for the test package - is it possible to write a regular ZT package that recreates some of the issues you were using Revit to test for? If you don't have bandwidth for that - thats fine.

Maybe we can just chat about what issues were seen in DynamoRevitNodes that were not seen in the core nodes?

@SHKnudsen
Copy link
Owner Author

@mjkkirschner I mainly did it for a package with Revit dependencies to also test that the reference paths worked. I can switch to a regular ZT package, I think there are a few in the test folder already.

@mjkkirschner
Copy link
Collaborator

@SHKnudsen thanks, maybe just the DynamoSamples package or something like that?

{
internal static IEnumerable<FileInfo> DynamoDirectoryAssemblyPaths;
static void Main(string[] args)
private static IEnumerable<FileInfo> dynamoDirectoryAssemblyPaths;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious about this change? Are you trying to make this faster?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was more so that we could unit test without Program.Main, the AssemblyHandler uses the dynamoDirectoryAssemblyPaths so if main hadn't been executed the assembly handler would fail here:
https://github.com/DynamoDS/Dynamo/pull/11725/files#diff-4ec66792a154bbfd3bc76223fc2de6df6a91cc71eebc43d29d427b0a96ada7a2R294

"engine_version": "2.0.0",
"engine_metadata": "",
"engine": "dynamo",
"node_libraries": [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, were these changes necessary to get the package command to work?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If so, would you mind also making the same change to the DynamoSamples repo? If we regen the sample package and then tests start failing it's going to be hard to figure out why.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the pkg json did not specify any node libraries, which I actually thought was required. So the package command would not know which assemblies to scan

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right - makes sense - there is some fallback behavior in dynamo for very old packages before node_libraries existed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants