1
1
# How to contribute
2
2
3
- First of all, thanks for contributing!
3
+ First of all, thanks for contributing! This document provides some basic guidelines for contributing to this repository.
4
4
5
- This document provides some basic guidelines for contributing to this repository. To propose improvements or fix a bug,
6
- feel free to submit a PR.
5
+ There are several ways you can get involved:
7
6
8
- ## Legal requirements
7
+ | Type of contribution | Contribution method |
8
+ | ------------------------------------------------- | ------------------------------------------------------- |
9
+ | - Support request<br />- Question<br />- Discussion | Post on the [ Arduino Forum] [ forum ] |
10
+ | - Bug report<br />- Feature request | Issue report (read the [ issue guidelines] [ issues ] ) |
11
+ | Beta testing | Try out the [ nightly build] [ nightly ] |
12
+ | - Bug fix<br />- Enhancement | Pull Request (read the [ pull request guidelines] [ prs ] ) |
13
+ | Translations for Arduino CLI | [ transifex] [ translate ] |
14
+ | Monetary | - [ Donate] [ donate ] <br />- [ Buy official products] [ store ] |
9
15
10
- Before we can accept your contributions you have to sign the [ Contributor License Agreement] [ 0 ]
16
+ ## Issue Reports
17
+
18
+ Do you need help or have a question about using Arduino CLI? Support requests should be made to Arduino CLI's dedicated
19
+ board in the [ Arduino forum] [ forum ] .
20
+
21
+ High quality bug reports and feature requests are valuable contributions to the Arduino CLI project.
22
+
23
+ ### Before reporting an issue
24
+
25
+ - Give the [ nightly build] [ nightly ] a test drive to see if your issue was already resolved.
26
+ - Search [ existing pull requests and issues] [ issue-tracker ] to see if it was already reported. If you have additional
27
+ information to provide about an existing issue, please comment there. You can use the [ Reactions feature] [ reactions ]
28
+ if you only want to express support.
29
+
30
+ ### Qualities of an excellent report
31
+
32
+ - The issue title should be descriptive. Vague titles make it difficult to understand the purpose of the issue, which
33
+ might cause your issue to be overlooked.
34
+ - Provide a full set of steps necessary to reproduce the issue. Demonstration code or commands should be complete and
35
+ simplified to the minimum necessary to reproduce the issue.
36
+ - Be responsive. We may need you to provide additional information in order to investigate and resolve the issue.
37
+ - If you find a solution to your problem, please comment on your issue report with an explanation of how you were able
38
+ to fix it and close the issue.
11
39
12
40
## Pull Requests
13
41
42
+ To propose improvements or fix a bug, feel free to submit a PR.
43
+
44
+ ### Legal requirements
45
+
46
+ Before we can accept your contributions you have to sign the [ Contributor License Agreement] [ 0 ]
47
+
48
+ ### Pull request checklist
49
+
14
50
In order to ease code reviews and have your contributions merged faster, here is a list of items you can check before
15
51
submitting a PR:
16
52
@@ -25,7 +61,7 @@ submitting a PR:
25
61
- Your PR must pass all CI tests before we will merge it. If you're seeing an error and don't think it's your fault, it
26
62
may not be! The reviewer will help you if there are test failures that seem not related to the change you are making.
27
63
28
- ## Prerequisites
64
+ ### Prerequisites
29
65
30
66
To build the Arduino CLI from sources you need the following tools to be available in your local environment:
31
67
@@ -42,7 +78,7 @@ If you're working on the gRPC interface you will also have to:
42
78
- download the [ protoc] [ 6 ] compiler
43
79
- run ` go get -u github.com/golang/protobuf/protoc-gen-go `
44
80
45
- ## Building the source code
81
+ ### Building the source code
46
82
47
83
From the project folder root, just run:
48
84
@@ -53,7 +89,7 @@ task build
53
89
The project uses Go modules so dependencies will be downloaded automatically. At the end of the build, you should find
54
90
an ` arduino-cli ` executable in the same folder.
55
91
56
- ## Running the tests
92
+ ### Running the tests
57
93
58
94
There are several checks and test suites in place to ensure the code works as expected and is written in a way that's
59
95
consistent across the whole codebase. To avoid pushing changes that will cause the CI system to fail, you can run most
@@ -77,7 +113,7 @@ To run integration tests (these will take some time and require special setup, s
77
113
task test-integration
78
114
```
79
115
80
- ### Running only some tests
116
+ #### Running only some tests
81
117
82
118
By default, all tests from all go packages are run. To run only unit tests from one or more specific packages, you can
83
119
set the TARGETS environment variable, e.g.:
@@ -102,7 +138,7 @@ confidence that the code is working.
102
138
For these reasons, in addition to regular unit tests the project has a suite of integration tests that actually run
103
139
Arduino CLI in a different process and assess the options are correctly understood and the output is what we expect.
104
140
105
- #### Hardware requirements for running the full suite of integration tests:
141
+ ##### Hardware requirements for running the full suite of integration tests:
106
142
107
143
An Arduino board attached to a serial port. The board must:
108
144
@@ -114,7 +150,7 @@ An Arduino board attached to a serial port. The board must:
114
150
Note that running the integration tests will result in a sketch being uploaded to every attached Arduino board meeting
115
151
the above requirements.
116
152
117
- #### Software requirements for running integration tests:
153
+ ##### Software requirements for running integration tests:
118
154
119
155
A working Python environment. Chances are that you already have Python installed in your system, if this is not the case
120
156
you can [ download] [ 3 ] the official distribution or use the package manager provided by your Operating System.
@@ -177,7 +213,7 @@ In case of linting errors you should be able to solve most of them by automatica
177
213
task python:format
178
214
```
179
215
180
- ### Configuration files formatting
216
+ #### Configuration files formatting
181
217
182
218
To keep the configurations tidy and in order we use [ Prettier] [ prettier-website ] to automatically format all YAML files
183
219
in the project. Keeping and enforcing a formatting standard helps everyone make small PRs and avoids the introduction of
@@ -204,12 +240,12 @@ task config:format
204
240
When opening a new Pull Request, checks are automatically run to verify that configuration files are correctly
205
241
formatted. In case of failures we might ask you to update the PR with correct formatting.
206
242
207
- ## Working on docs
243
+ ### Working on docs
208
244
209
245
Documentation is provided to final users in form of static HTML content generated from a tool called [ MkDocs] [ 9 ] and
210
246
hosted on [ GitHub Pages] [ 7 ] .
211
247
212
- ### Local development
248
+ #### Local development
213
249
214
250
Most of the documentation consists of static content written over several Markdown files under the ` docs ` folder at the
215
251
root of this git repository but some other content is dynamically generated from the CI pipelines - this is the case
@@ -239,14 +275,14 @@ task docs:serve
239
275
240
276
If you don't see any error, hit http://127.0.0.1:8000 with your browser to navigate the generated docs.
241
277
242
- ### Docs publishing
278
+ #### Docs publishing
243
279
244
280
The present git repository has a special branch called ` gh-pages ` that contains the generated HTML code for the docs
245
281
website; every time a change is pushed to this special branch, GitHub automatically triggers a deployment to pull the
246
282
change and publish a new version of the website. Do not open Pull Requests to push changes to the ` gh-pages ` branch,
247
283
that will be done exclusively from the CI.
248
284
249
- ### Docs versioning
285
+ #### Docs versioning
250
286
251
287
In order to provide support for multiple Arduino CLI releases, Documentation is versioned so that visitors can select
252
288
which version of the documentation website should be displayed. Unfortunately this feature isn't provided by GitHub
@@ -275,7 +311,7 @@ few things for us:
275
311
> ** Note:** unless you're working on the generation process itself, you should never run Mike from a local environment,
276
312
> either directly or through the Task ` docs:publish ` . This might result in unwanted changes to the public website.
277
313
278
- ### Docs formatting
314
+ #### Docs formatting
279
315
280
316
To keep the documentation tidy and in order we use [ Prettier] [ prettier-website ] to automatically format all Markdown
281
317
files in the project. Keeping and enforcing a formatting standard helps everyone make small PRs and avoids the
@@ -302,7 +338,7 @@ task docs:format
302
338
When opening a new Pull Request, checks are automatically run to verify that documentation is correctly formatted. In
303
339
case of failures we might ask you to update the PR with correct formatting.
304
340
305
- ### Docs automation
341
+ #### Docs automation
306
342
307
343
In order to avoid unwanted changes to the public website hosting the Arduino CLI documentation, only Mike is allowed to
308
344
push changes to the ` gh-pages ` branch, and this only happens from within the CI, in a workflow named [ publish-docs] [ 11 ] .
@@ -313,7 +349,7 @@ the logic is implemented in a Python script called [`build.py`][12]. The script
313
349
Arduino CLI that was modified in the current commit (either ` dev ` or an official, numbered release) and whether the
314
350
redirect to the latest version that happens on the landing page should be updated or not.
315
351
316
- ## Internationalization (i18n)
352
+ ### Internationalization (i18n)
317
353
318
354
In order to support i18n in the CLI, any messages that are intended to be translated should be wrapped in a call to
319
355
` i18n.Tr ` . This call allows us to build a catalog of translatable strings, replacing the reference string at runtime
@@ -350,7 +386,7 @@ func main() {
350
386
}
351
387
```
352
388
353
- ## Additional settings
389
+ ### Additional settings
354
390
355
391
If you need to push a commit that's only shipping documentation changes or example files, thus a complete no-op for the
356
392
test suite, please start the commit message with the string ** [ skip ci] ** to skip the build and give that slot to
@@ -371,6 +407,15 @@ If your PR doesn't need to be included in the changelog, please start the commit
371
407
[ 10 ] : https://github.com/jimporter/mike
372
408
[ 11 ] : https://github.com/arduino/arduino-cli/blob/master/.github/workflows/publish-docs.yaml
373
409
[ 12 ] : https://github.com/arduino/arduino-cli/blob/master/docs/build.py
410
+ [ forum ] : https://forum.arduino.cc/index.php?board=145.0
411
+ [ issues ] : #issue-reports
412
+ [ nightly ] : https://arduino.github.io/arduino-cli/latest/installation/#nightly-builds
413
+ [ prs ] : #pull-requests
414
+ [ translate ] : https://www.transifex.com/arduino-1/arduino-cli/
415
+ [ donate ] : https://www.arduino.cc/en/Main/Contribute
416
+ [ store ] : https://store.arduino.cc
417
+ [ issue-tracker ] : https://github.com/arduino/arduino-cli/issues?q=
418
+ [ reactions ] : https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments
374
419
[ prettier-website ] : https://prettier.io/
375
420
[ prettier-vscode-extension ] : https://github.com/prettier/prettier-vscode
376
421
[ npm-install-docs ] : https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
0 commit comments