Code contribution¶
Welcome to the PYLEECAN code contributing guidelines. On this page we will define the different steps you can follow to contribute to the code:
First step: talk about it
Second step: Contribute to the code
Third step: Submit your contribution
You can also watch the first part of this webinar replay for a step-by-step video tutorial.
Talk about it¶
As a first step to contribute to PYLEECAN code (to fix a bug, add a new feature, a new topology, etc.), we recommend to talk about it to make sure that it doesn’t already exist (for instance) or to be guided on how to do it. There are two ways to talk about contributing to pyleecan:
open an issue or a discussion on github
send a message to the PYLEECAN mailing list to contact the maintainers.
Contribute to the code¶
Prerequisites¶
Before contributing to the code, you may want to read about how we organize the classes and what is the PYLEECAN coding convention.
How to fork Pyleecan¶
In order to develop in PYLEECAN, you first need to fork and download the source code, following this tutorial.
How to create your own branch¶
Before starting to develop, we recommend that you create your own branch in order to cleanly track your modifications. To do so, please follow this tutorial.
How to implement your modifications¶
The main steps to implement a new feature are:
create a class that represents a new object (e.g. machine, slot, model, etc., optional)
develop class methods and functions
validate that everything works (and that it will always do) by adding tests
This tutorial on how to add a new slot gives an example of code contribution. We recommend to read it before starting a contribution.
This tutorial provides guidelines to add tests.
Submit your contribution¶
Once the development steps done, you will be able to share your work to the PYLEECAN community. To do that, please follow this tutorial.