Process

A guide on contributing to Dynamo for Revit - Part 4

Back to Insights
Grey down arrow

Sylvester Knudsen
November 22, 2021

Part 4: Submitting a pull request

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.
Source: Github

Structuring your pull request

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.

The node creation boilerplate

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!

Conclusion

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.

A guide on contributing to Dynamo for Revit - Part 3

Part 3: Testing. In this part of our series on how to contribute to Dynamo, we'll run through how to test your code.
Read more

A guide on contributing to Dynamo for Revit - Part 2

Part 2: Getting started. In this part of our series on how to contribute to Dynamo, we'll tell you how to get started and 'fork the repo'.
Read more

A guide on contributing to Dynamo for Revit - Part 1

Part 1: Why Contribute? This part of our series on contributing to Dynamo introduces the contribution process and discusses why it's worth getting involved.
Read more

Subscribe to Our Newsletter

Stay up to date with our latest news and product launches.
Thank you! We've added you to our mailing list.
Oops! Something went wrong while submitting the form.