Skip to content

Commit bf7d434

Browse files
committed
Bring over contributing.rst from scancode.io #186
Signed-off-by: Jono Yang <jyang@nexb.com>
1 parent 4ea5f5d commit bf7d434

File tree

1 file changed

+145
-0
lines changed

1 file changed

+145
-0
lines changed
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
.. _contributing:
2+
3+
Contributing to ScanCode.io
4+
===========================
5+
6+
Thank you so much for being so interested in contributing to ScanCode.io. We
7+
are always on the lookout for enthusiastic contributors like you who can make
8+
our project better, and we're willing to lend a helping hand if you have any
9+
questions or need guidance along the way. That being said, here are a few
10+
resources to help you get started.
11+
12+
.. note::
13+
By contributing to the ScanCode.io project, you agree to the Developer
14+
`Certificate of Origin <http://developercertificate.org/>`_.
15+
16+
Do Your Homework
17+
----------------
18+
19+
Before adding a contribution or create a new issue, take a look at the project’s
20+
`README <https://github.com/aboutcode-org/scancode.io#readme>`_, read through our
21+
`documentation <https://scancodeio.readthedocs.io/en/latest/>`_,
22+
and browse existing `issues <https://github.com/aboutcode-org/scancode.io/issues>`_,
23+
to develop some understanding of the project and confirm whether a given
24+
issue/feature has previously been discussed.
25+
26+
Ways to Contribute
27+
------------------
28+
29+
Contributing to the codebase is not the only way to add value to ScanCode.io or
30+
join our community. Below are some examples to get involved:
31+
32+
First Timers
33+
^^^^^^^^^^^^
34+
35+
You are here to help, but you're a new contributor! No worries, we always
36+
welcome newcomer contributors. We maintain some
37+
`good first issues <https://github.com/aboutcode-org/scancode.io/labels/good%20first%20issue>`_
38+
and encourage new contributors to work on those issues for a smooth start.
39+
40+
.. warning::
41+
**"Can I work on this issue?"**
42+
43+
You do not need our permission to work on an open issue.
44+
A good start is to present your understanding of the problem/bug and how you
45+
would fix it. Providing some code using a pull request will come handy,
46+
but being able to explain a solution is always a good start.
47+
48+
Make sure to read through this page and follow the recommendations.
49+
50+
.. warning::
51+
**"Is this issue is open?"**
52+
53+
Unless closed, yes it is open.
54+
55+
Report Issues
56+
^^^^^^^^^^^^^
57+
58+
- Report a new `bug <https://github.com/aboutcode-org/scancode.io/issues>`_; just remember to be
59+
as specific as possible.
60+
- Create a `new issue <https://github.com/aboutcode-org/scancode.io/issues>`_ to request a
61+
feature, submit a feedback, or ask a question.
62+
- Look into existing `bugs <https://github.com/aboutcode-org/scancode.io/labels/bug>`_,
63+
try to reproduce the issue on your side, and discuss solutions in the comments.
64+
65+
.. note::
66+
Make sure to check existing `issues <https://github.com/aboutcode-org/scancode.io/issues>`_,
67+
and :ref:`faq` to confirm whether a given issue or a question has previously been
68+
discussed.
69+
70+
Code Contributions
71+
^^^^^^^^^^^^^^^^^^
72+
73+
Code is contributed to the codebase using **pull requests**.
74+
A pull request should always be attached to an existing issue.
75+
When there is no existing issues, start by `creating one <https://github.com/aboutcode-org/scancode.io/issues>`_
76+
to discuss potential solutions and implementation details before writing any code.
77+
78+
We use several conventions to ensure code quality regarding format, testing, and
79+
attribution.
80+
81+
**Make sure to follow those conventions before submitting your code:**
82+
83+
1. **Code validation**
84+
85+
We use `PEP8 <https://peps.python.org/pep-0008/>`_ conventions.
86+
A command is available to automatically format your code::
87+
88+
make valid
89+
90+
2. **Unit tests**
91+
92+
We write tests, a lot of tests, thousands of tests.
93+
When fixing bugs or adding new features, you should add tests too.
94+
You can run the test suite with::
95+
96+
make test
97+
98+
3. **Commit messages and Developer Certificate of Origin**
99+
100+
Follow the instructions at `Writing good Commit Messages <https://aboutcode.readthedocs.io/en/latest/contributing/writing_good_commit_messages.html>`_
101+
and `check some examples <https://github.com/aboutcode-org/scancode.io/commits/main>`_.
102+
103+
**You must include a "Signed-off-by" to your commit messages**::
104+
105+
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
106+
107+
4. **Your code is now ready to be pushed as a PR**
108+
109+
.. note::
110+
Pull requests that are not passing the automated integration tests are unlikely
111+
to be reviewed. Focus on making all the "Checks" to pass before asking for a
112+
code review.
113+
114+
Documentation Improvements
115+
^^^^^^^^^^^^^^^^^^^^^^^^^^
116+
117+
Documentation is a critical aspect of any project that is usually neglected or
118+
overlooked. We value any suggestions to improve
119+
`ScanCode.io documentation <https://scancodeio.readthedocs.io/en/latest/>`_.
120+
121+
.. tip::
122+
Our documentation is treated like code. Make sure to check our
123+
`writing guidelines <https://scancode-toolkit.readthedocs.io/en/latest/contribute/contrib_doc.html>`_
124+
to help guide new users.
125+
126+
Other Ways
127+
^^^^^^^^^^
128+
129+
You want to contribute to other aspects of the ScanCode.io project, and you
130+
can't find what you're looking for! You can always discuss new topics, ask
131+
questions, and interact with us and other community members on
132+
`Gitter <https://gitter.im/aboutcode-org/discuss>`_.
133+
134+
.. _contributing_resources:
135+
136+
Helpful Resources
137+
-----------------
138+
139+
- Review our `comprehensive guide <https://scancode-toolkit.readthedocs.io/en/latest/contribute/index.html>`_
140+
for more details on how to add quality contributions to our codebase and documentation
141+
- Check this free resource on `how to contribute to an open source project on github <https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github>`_
142+
- Follow `this wiki page <https://aboutcode.readthedocs.io/en/latest/contributing/writing_good_commit_messages.html>`_
143+
on how to write good commit messages
144+
- `Pro Git book <https://git-scm.com/book/en/v2>`_
145+
- `How to write a good bug report <https://www.softwaretestinghelp.com/how-to-write-good-bug-report/>`_

0 commit comments

Comments
 (0)