Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Python template support 2.0 #8122
Note : this PR replaces the previous PR #8034 as that was based on
This PR fixes #7604 , wish for adding a Python template that can be used to populate any
This allows users and organisations to rollout the template as part of users profiles or as logon scripts.
@radumg thanks for the work here. I notice there are no new tests. Would it be possible to add a test for this preference, like:
which just asserts the deserialization is working correctly
and then something which modifies the template then asserts the python script changes? A potential test location is here:
Thanks @mjkkirschner for the review. I thought about potential tests for a second but couldn't imagine any useful ones - obvs my imagination failed me
I'm fairly new to TDD so I really appreciate the guidance!
@mjkkirschner - if you happen to see this before i start working on it again tonight, i'm having a hard time adding any Dynamo node to the
Just thought I'd check before I delve deeper, pretty sure I'm missing an obvious trick here
@radumg what you can do is use a createNode command and execute it on the dynamoModel
Another possibility is to make the python test assembly able to access internal members of other assemblies with
Ok, I think I've figured out these tests
I've added 3 tests in total @mjkkirschner (screenshot only shows 2) :
Test 1 : LoadInvalidPythonTemplateFromSetting in test/DynamoCoreTests/Settings.cs#39
Test 2 : CanReadPythonTemplateSetting in test/DynamoCoreTests/CoreTests.cs#55
Test 3 : CanUpdatePythonTemplateSettings in test/DynamoCoreTests/CoreTests.cs#77
It's ready for review again @mjkkirschner , thanks so much for the pointers !