The final step in contributing to Dynamo for Revit is to submit your changes to the DynamoRevit repo by making a pull request (PR).
PRs involve the Dynamo team reviewing your code and making suggestions for improvement (where necessary). This might seem intimidating if you’re doing this for the first time, but it’s nothing to worry about. It’s normal and important part of the process. More than anything, this is an opportunity to improve - the Dynamo team is full of talented people and their standards are high, so look at this as a chance to learn from the best.
Pull requests let you tell others about changes you've pushed to a branch in a repository on GitHub. Once a pull request is opened, you can discuss and review the potential changes with collaborators and add follow-up commits before your changes are merged into the base branch.
PRs need to follow a certain structure. Luckily, Dynamo provide a template that you can use as a checklist to make sure you have everything you need to get your pull request accepted. As a minimum you need to include the following things.
Purpose. Always start your PR with a description of what you are submitting and why you think it’s needed.This serves as an overview for the reviewer.
Declarations. This is a checklist that contains everything you need to have in order to get your pull request accepted.
Reviewers. This is where you name the people you want to look at your pull request. If you aren't sure who to add here, take a look at some older pull requests to get a feel of who you could add.
FYIs. This is a space where you can add general comments about your work or your PR - this can be anything you feel the reviewer needs to know.
We’ve found in the past that adding an image of your Unit and Integration Tests to the‘Purpose’ section has been useful, as it makes it easy for the reviewer to see that this step has been completed successfully.
As well, you can include images of your testing graphs under the ‘FYIs’ section - this makes it easier for the reviewer to understand your tests and also gives them a chance to see your new nodes and their inputs/outputs.
You can find a full example of what a pull request looks like here.
We’ve put together a small task boilerplate of every task you’ll need to do when you’re adding new nodes to DynamoRevit. We found this particularly helpful for making sure that everything was up to the standard expected by the team at Dynamo:
Naming convention follow existing DynamoRevit nomenclature - this is a reference resource for naming conventions.
Nodes have relevant Tooltips for all Input and Output ports - for this one, make sure you add tooltips on your new nodes input/output ports so that users understand what they need.
Nodes have accurate and detailed Descriptions that correctly wrap in Dynamo - a detailed description of the nodes functionality is essential for all nodes in Dynamo, so make your description comprehensive.
Create and run Unit Tests - provide examples of your Unit Tests.
Create and run System/Integration Tests - provide examples of your Integration Test.
Create appropriate Node Icons
Create sample Dynamo Graph and provide associated Revit project for testing purposes - remember to include your Revit and .dyn files used for testing in the pull request.
And after you’ve ticked all of those boxes, you can go ahead and submit your pull request. Well done!
This wraps up our guide on contributing to Dynamo for Revit. During this series we have looked at how to go from creating your own personal copy of the DynamoRevit source-code to submitting your own code back to the Dynamo team. Hopefully you now feel more comfortable in submitting your own code to the DynamoRevit repo and are ready to get started!
If you have any questions about this guide, please feel free to get in touch with our team. We’re happy to help.