Skip to content

Commit bb45c18

Browse files
authored
Add docs for would-be contributors. (#213)
1 parent 75bdc4c commit bb45c18

File tree

4 files changed

+1048
-0
lines changed

4 files changed

+1048
-0
lines changed

doc/contributing.md

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Contributing to Emboss
2+
3+
If you would like to fix a bug or add a new feature to Emboss, great! This
4+
document is intended to help you understand the procedure, so that your change
5+
can land in the main Emboss repository.
6+
7+
You do not have to take a change all the way from start to finish, either: if
8+
you can get a design approved, then someone else can implement it much more
9+
easily. Conversely, if you are looking for a way to help, you might look for
10+
existing [feature
11+
requests](https://github.com/google/emboss/labels/enhancement) that have
12+
designs or at [open design sketches](design_docs/) that you might be able to
13+
implement.
14+
15+
16+
## All Changes
17+
18+
Because Emboss is a Google project, in order to submit code you will need to
19+
sign a [Google Contributor License Agreement
20+
(CLA)](https://cla.developers.google.com/).
21+
22+
**IMPORTANT**: if your contribution includes code that is not covered by a
23+
Google CLA and is not owned by Google, the Emboss project has to follow special
24+
procedures to include it. Please let us know ([filing an issue on
25+
GitHub](https://github.com/google/emboss/issues/new) is probably the easiest
26+
way) so that we can walk you through the process. In particular, we generally
27+
cannot accept any code from StackExchange or similar sites, and any code that
28+
comes from a non-Google open source project needs to have an acceptable license
29+
and be committed to the Emboss repository in a specific location.
30+
31+
32+
### How-To Guides
33+
34+
This document covers the process of getting a change into the main Emboss
35+
repository — i.e., what you need to do to get your change into
36+
[the main Emboss repository](https://github.com/google/emboss/).
37+
38+
[How to Implement Changes to Emboss](how-to-implement.md) has an overview of
39+
how to make code changes to Emboss.
40+
41+
[How to Design Features for Emboss](how-to-design.md) has an overview of what
42+
to think about during your design.
43+
44+
45+
### Bug Fixes vs New Features
46+
47+
The general process for bug fixes and new features is the same, but bug fixes
48+
usually require less design work, and therefore can go through lighter
49+
processes.
50+
51+
52+
## Very Small Changes
53+
54+
If you have a tiny change — for example, making a fix that does not change the
55+
design of `embossc` — you can jump directly into coding.
56+
57+
This process works best if your change is small and not likely to be
58+
controversial, or if you have already completed [the steps for small
59+
changes](#small-changes).
60+
61+
1. [Code up your proposed change](how-to-implement.md) and open a [pull
62+
request
63+
(PR)](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request)
64+
to [the main Emboss repository](https://github.com/google/emboss/). If you
65+
have not completed [the steps for small changes](#small-changes), this
66+
gives the Emboss maintainers something more concrete to look at, but you
67+
may end up doing more work if your initial proposal turns out to be the
68+
wrong approach.
69+
70+
2. The Emboss maintainers will review your PR, and may request changes. Don't
71+
be discouraged if your PR is not immediately accepted — even PRs that
72+
maintainers send to each other often have requests for changes! We want
73+
the Emboss code to be high-quality, which means helping you make your code
74+
better.
75+
76+
3. Once your PR reaches a point where it is good enough, an Emboss maintainer
77+
will merge it into the Emboss repository.
78+
79+
80+
## Small Changes
81+
82+
If your change is small, but still requires some design work — for example,
83+
adding a new utility function in the C++ runtime library, or making a bug fix
84+
that involves re-structuring some of the `embossc` code — it is usually best to
85+
get some feedback before you start coding.
86+
87+
1. [File an issue on GitHub](https://github.com/google/emboss/issues/new), if
88+
there is not an issue already. It is best to use the *problem you want to
89+
solve* for the issue title and description, and then propose your design in
90+
a comment.
91+
92+
2. Once the Emboss maintainers have had a chance to review your proposal and
93+
agree on the general outline, follow [the procedure for very small
94+
changes](#very-small-changes).
95+
96+
97+
## Medium and Large Changes
98+
99+
If you have a medium or large change — for example, introducing a new pass in
100+
`embossc`, adding a new data type, adding a new operator to the Emboss
101+
expression language, making a cross-cutting refactoring of `embossc`, etc. —
102+
then you should start by writing a *design sketch*.
103+
104+
A design sketch is, basically, an informal design doc — it covers the topics
105+
that a design doc would cover, but may have open questions or alternatives that
106+
haven't been locked down.
107+
108+
1. [File an issue on GitHub](https://github.com/google/emboss/issues/new), if
109+
there is not an issue already. It is best to use the *problem you want to
110+
solve* for the issue title and description.
111+
112+
2. Look at [existing design sketches](design_docs/) and [archived design docs
113+
for changes that have already landed](design_docs/archive/) to get a feel
114+
for what should be in a design sketch.
115+
116+
3. If you have not already done so, read [How to Design Features for
117+
Emboss](how-to-design.md).
118+
119+
4. Write a draft design sketch for your change, and open a pull request
120+
against [the main Emboss repository](https://github.com/google/emboss/).
121+
122+
5. It is very likely that your design sketch will need revision before it is
123+
accepted. If it does, do not be discouraged — we want your change to
124+
succeed!
125+
126+
6. Once your design sketch has been accepted, you can move on to
127+
implementation, following (more or less) the same procedure you would
128+
follow for [small](#small-changes) or [very small
129+
changes](#very-small-changes). Depending on the complexity of the change,
130+
you may need to split your implementation into multiple changes.

0 commit comments

Comments
 (0)