Skip to content

Commit 313f40e

Browse files
Merge pull request #396 from oss-slu/354-improve-contributing-guidelines
Improved contributing guidelines
2 parents eb7d8a1 + a76b08b commit 313f40e

1 file changed

Lines changed: 68 additions & 75 deletions

File tree

CONTRIBUTING.md

Lines changed: 68 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,142 +1,135 @@
1-
### Contribute to the Pi4Micronaut Library
1+
# Contribute to the Pi4Micronaut Library
22

3-
## Get Familiar with the Library
3+
## General Contribution Guidelines
44

5-
# Before making contributions,understand the purpose and functionality of the Pi4Micronaut library.
5+
### Get Familiar with the Library
66

7-
# Review the library documentation, any related articles, or tutorials.
7+
* Before making contributions, understand the purpose and functionality of the Pi4Micronaut library.
88

9-
## Set Up Your Development Environment
9+
* Review the library documentation, any related articles, or tutorials.
1010

11-
# Fork the library’s repository from the GitHub.
11+
Our documentation can be found online at [oss-slu.github.io/Pi4Micronaut](https://oss-slu.github.io/Pi4Micronaut/). Good information and tutorials on Raspberry Pis and electronic components can be found online from [Sunfounder](https://docs.sunfounder.com/en/latest/), [SparkFun](https://learn.sparkfun.com/), or others.
1212

13-
# Clone your fork locally.
13+
This file will go over some quick information about our library, but please refer to our documentation webpage for more complete information.
1414

15-
# Follow setup instructions provided in the repository’s README or ADOC files.
15+
### Set Up Your Development Environment
1616

17-
## Understand the Contribution Process
17+
* Fork the library’s repository from the GitHub.
1818

19-
# Familiarize yourself with the library’s contribution guidelines.
19+
* Clone your fork locally.
2020

21-
# Understand the community guidelines.
21+
* Follow setup instructions provided in the repository’s README or our online documentation.
2222

23-
# Find out the preferred method of communication (e.g., issues, mailing list, discord).
23+
### Understand the Contribution Process
2424

25-
## Identify a Way to Contribute
25+
* Familiarize yourself with the library’s contribution guidelines.
2626

27-
# Bug fixes: Look for open issues tagged as 'bug' or report new ones.
27+
* Understand the [community guidelines](community-guidelines.md).
2828

29-
# New features: Discuss new ideas before implementing, to gauge interest and get guidance.
29+
### Identify a Way to Contribute
3030

31-
# Documentation: Contribute to the README, ADOC or other documentation.
31+
* Bug fixes: Look for open issues tagged as 'bug' or report new ones.
3232

33-
# Testing: Improve or expand the test suite.
33+
* New features: Discuss new ideas before implementing, to gauge interest and get guidance.
3434

35-
# Refactoring: Optimize existing code or improve its readability.
35+
* Documentation: Contribute to the README, ADOC or other documentation.
3636

37-
## Making Changes
37+
* Testing: Improve or expand the test suite.
3838

39-
# Always create a new branch for your changes.
39+
* Refactoring: Optimize existing code or improve its readability.
4040

41-
# Follow the library’s coding style and standards.
41+
### Making Changes
4242

43-
# Write clean, well-documented code.
43+
* Always create a new branch for your changes.
4444

45-
# Add or update tests for your changes, if necessary.
45+
* Follow the library’s coding style and standards.
4646

47-
# Commit frequently with meaningful commit messages.
47+
* Write clean, well-documented code.
4848

49-
## Test Your Changes
49+
* Add or update tests for your changes, if necessary.
5050

51-
# Ensure that all tests pass.
51+
* Commit frequently with meaningful commit messages.
5252

53-
# Manually test your changes for unforeseen issues.
53+
### Test Your Changes
5454

55-
# Ensure your changes do not introduce regressions.
55+
* Ensure that all tests pass.
5656

57-
# Use your own hardware to test the new component integration.
57+
* Manually test your changes for unforeseen issues.
5858

59-
# Note: A test suite will be developed in future to test the components without the use of external hardware
59+
* Ensure your changes do not introduce regressions.
6060

61-
## Signing the Contributor License Agreement
61+
* Use your own hardware to test the new component integration.
6262

63-
# While creating a pull request, you’ll be prompted to sign a Contributor License Agreement. Please do so by logging in with your GitHub account.
63+
* Note: A test suite will be developed in future to test the components without the use of external hardware
6464

65-
## Submit a Pull Request (PR)
65+
### Signing the Contributor License Agreement
6666

67-
# Push your changes to your forked repository. Create a pull request from your branch to the main library’s main branch.
67+
* While creating a pull request, you’ll be prompted to sign a Contributor License Agreement. Please do so by logging in with your GitHub account.
6868

69-
# In the PR description, explain your changes, motivations, and any decisions made.
69+
### Submit a Pull Request (PR)
7070

71-
# Link to any related issues or discussions.
71+
* Push your changes to your forked repository. Create a pull request from your branch to the main library’s main branch.
7272

73-
## Respond to Feedback
73+
* In the PR description, explain your changes, motivations, and any decisions made.
7474

75-
# Maintainers or other contributors might provide feedback. Be open to suggestions and make necessary revisions.
75+
* Link to any related issues or discussions.
7676

77-
# Engage in a constructive dialogue to ensure the quality of the contribution.
77+
### Respond to Feedback
7878

79-
## Stay Updated
79+
* Maintainers or other contributors might provide feedback. Be open to suggestions and make necessary revisions.
8080

81-
# Keep your fork synchronized with the main repository to ease future contributions.
81+
* Engage in a constructive dialogue to ensure the quality of the contribution.
8282

83-
# Regularly check for updates or changes in the library’s contribution guidelines.
83+
### Stay Updated
8484

85-
## Engage with the Community
85+
* Keep your fork synchronized with the main repository to ease future contributions.
8686

87-
# Attend community meetings or join chat groups.
87+
* Regularly check for updates or changes in the library’s contribution guidelines.
8888

89-
# Help other contributors or users when you can.
89+
### Engage with the Community
9090

91-
# Note: While your contribution is highly valued, there’s no guarantee that all pull requests will be merged. It depends on the library’s direction, quality of the contribution, and decisions of the maintainers.
91+
* Learn more about Open Source with SLU on the [website](https://oss-slu.github.io/), and join the `#project_pi4micronaut` channel in [the OSS Slack community](https://join.slack.com/t/oswslu/shared_invite/zt-24f0qhjbo-NkSfQ4LOg5wXxBdxP4vzfA).
9292

93-
Thanks for considering a contribution to the Pi4Micronaut library! Your involvement helps make the project better for everyone.
94-
95-
96-
### 3.1. How to Create a New Component
93+
* Help other contributors or users when you can.
9794

98-
If its compatible with a Raspberry Pi then it should work well with the Pi4Micronaut. The following steps should encompass how most components are added to the library. Start by creating a new Issue to suggest changes.
95+
* Note: While your contribution is highly valued, there’s no guarantee that all pull requests will be merged. It depends on the library’s direction, quality of the contribution, and decisions of the maintainers.
9996

100-
## Determine the communication type for the component which you want to use. For example, Buzzer works with PWM and LCD1602 works with I2C.
101-
102-
## Setup the circuit.
103-
104-
## Add Component to the Application yml
97+
Thanks for considering a contribution to the Pi4Micronaut library! Your involvement helps make the project better for everyone.
10598

106-
# The new component will need to be added to the application yml found at components/src/main/resources/application.yml.
99+
## How to Create a New Component
107100

108-
# More information on the application.yml found in Communicating with a Hardware Component
101+
If it's compatible with a Raspberry Pi, then it should work well with Pi4Micronaut. The following steps should encompass in brief how most components are added to the library; further details can be found on our documentation webpage. Start by creating a new issue to suggest changes.
109102

110-
## Create a Helper:
103+
### Create a Helper
111104

112-
# A Helper is what the Controller calls to do an action. For example, to change the color of an RGB LED the controller will take the request to change it. The Controller will then call the change color method in the helper. The helper then takes all the actions needed to change the color of the LED.
105+
A helper communicates directly with the hardware component. These classes form the core of our library, and they define methods for developers to import into and call in their controllers. For example, to change the color of an RGB LED, the controller will receive the API request to change it. The controller will then call the change color method in the helper. The helper then takes all the actions needed to change the color of the LED.
113106

114-
# See the RBG Helper for an example of a Helper.
107+
All helpers should be kept here: `pi4micronaut-utils/src/main/java/com/opensourcewithslu/(inputdevices or outputdevices)`
115108

116-
# All Helpers should be kept here: pi4micronaut-utils\src\main\java\com\opensourcewithslu\(inputdevices or outputdevices)
109+
### Add Component to the Application YAML
117110

118-
## Create a Controller:
111+
Developers using our library will create an `application.yml` file to define necessary configurations for the hardware they are using. To create a controller, the new component will need to be added to the application YAML file found at `components/src/main/resources/application.yml`. More information on the `application.yml` can be found in our online documentation.
119112

120-
# Controllers define and handle interactions with a given component. The Controller of a component will have a @Controller("/example") right above the class declaration that acts as the endpoint for requests to the component. Instead of "example", you should name the endpoint something that is identifiable to the component. Each method of the Controller should have a @Get("/exampleEndPoint") above the method declaration. The endpoint for the method should have the same name as the method and any parameters should be included in the endpoint /exampleEndPoint/{parameter1},{parameter2}.
113+
For this, you will need to know the communication type for the component. For example, Buzzer works with PWM and LCD1602 works with I2C. Online documentation for your component will be able to tell you what is best. You will also need an understanding of what the circuit will look like; online resources can similarly be useful here.
121114

122-
# See the RGB Controller for an example of a Controller.
115+
### Create a Controller
123116

124-
# Consult the Micronaut Documentation for more explanation on Controllers.
117+
A Controller is a special class type in the Micronaut framework, which developers will build to create APIs using our library. We build controllers in this repository as demonstrations for how to interface with our helper classes. These are kept in a separate top-level folder as the helpers, as the controllers are for demonstration purposes, whereas the helpers are the importable portion of our library.
125118

126-
# All Controllers should be kept here: components\src\main\java\com\opensourcewithslu\components\controllers
119+
The controller of a component will have `@Controller("/example")` right above the class declaration that acts as the endpoint for requests to the component. Instead of "example", you should name the endpoint something that is identifiable to the component. Each method of the controller should have `@Get("/exampleEndPoint")` above the method declaration. The endpoint for the method should have the same name as the method and any parameters should be included in the endpoint `/exampleEndPoint/{parameter1},{parameter2}`.
127120

128-
## Thoroughly test:
121+
All controllers should be kept here: `components/src/main/java/com/opensourcewithslu/components/controllers`. Consult the [Micronaut documentation](https://docs.micronaut.io/) for more explanation on controllers.
129122

130-
# Contributors should thoroughly test their integrations
123+
### Thoroughly test
131124

132-
# When submitting a pull request, make sure to include how you tested the component, any circuits that you may have used, and how to run any examples you may have created.
125+
Contributors should thoroughly test their integrations. Software unit tests should be written in `pi4micronaut-utils/src/test/java/com/opensourcewithslu/(inputdevices or outputdevices)`.
133126

134-
# It is important that reviewers are able to replicated your work in order to properly test the implementation.
127+
Hardware testing should also be done. When submitting a pull request, make sure to include how you tested the component, any circuits that you may have used, and how to run any examples you may have created. Instructions for how to conduct hardware testing, including how to send the files over to the Raspberry Pi device, are on our online documentation.
135128

136-
## Create documentation for the component:
129+
It is important that reviewers are able to replicate your work in order to properly test the implementation.
137130

138-
# Create an .adoc file with the component name as the file name.
131+
### Create documentation for the component
139132

140-
# Make sure to include all the information that the other components. Simply copy/paste an existing components documentation and edit as needed.
133+
We write documentation files for each component, which are compiled and hosted on our online documentation webpage. Create an .adoc file with the component name as the file name. Make sure to include all the information that the other components include. Simply copy/paste an existing component's documentation and edit as needed. Add the file here: `pi4micronaut-utils/src/docs/asciidoc/components/(inputComponents or outputComponents)`.
141134

142-
# Add the file here: pi4micronaut-utils/src/docs/asciidoc/components under either input or output components.
135+
Also ensure that the classes you have written have appropriate Javadoc comments.

0 commit comments

Comments
 (0)