Skip to content

Commit 72bbd95

Browse files
authored
Merge pull request #345 from datacarpentry/km/contributing-guide
Expand contributing guide with specific style guidelines
2 parents 3982f8c + 9293c50 commit 72bbd95

File tree

2 files changed

+93
-3
lines changed

2 files changed

+93
-3
lines changed

CONTRIBUTING.md

Lines changed: 88 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ your change proposal as promptly as we can, and help you become a member of our
1414
community. Everyone involved in [The Carpentries][cp-site] agrees to abide by
1515
our [code of conduct](CODE_OF_CONDUCT.md).
1616

17+
### Who Should Contribute?
18+
19+
Contributions to this lesson are welcome from anyone with an interest in the project.
20+
1721
### How to Contribute
1822

1923
The easiest way to get started is to file an issue to tell us about a spelling
@@ -43,7 +47,7 @@ documentation][template-doc].
4347
to [The Workbench documentation][template-doc].
4448

4549

46-
### What to Contribute
50+
### What to Contribute (General)
4751

4852
There are many ways to contribute, from writing new exercises and improving
4953
existing ones to updating or filling in the documentation and submitting [bug
@@ -58,7 +62,63 @@ are particularly valuable**: it's easy for people who have been using these
5862
lessons for a while to forget how impenetrable some of this material can be, so
5963
fresh eyes are always welcome.
6064

61-
### What *Not* to Contribute
65+
### What to Contribute (This Lesson)
66+
67+
Any contributions are welcome, particularly ideas for how the existing content could be
68+
improved or updated, and/or errors that need to be corrected. Comments on existing issues
69+
and reviews of pull requests are similarly welcome.
70+
71+
If you plan to submit a pull request, please open an issue
72+
(or comment on an existing thread) first to ensure that effort is not duplicated
73+
or spent making a change that will not be accepted by the Maintainers.
74+
75+
#### Content / style guidelines
76+
- If you add an image / figure that was generated from Python code, please include this
77+
code in your PR under `episodes/fig/source`.
78+
79+
- Use the terms in the table below, when referring to Python libraries within the lesson.
80+
The table gives two terms for each library: `Term for descriptive text` which should be
81+
used when discussing the library in plain English / full sentences and `Term for code`
82+
which should be used when referring to code (and within code).
83+
84+
| Python library | Term for descriptive text | Term for code |
85+
| :------------- | :------------- | :------------- |
86+
| [scikit-image](https://scikit-image.org/) | scikit-image | `skimage` |
87+
| [NumPy](https://numpy.org/) | NumPy | `numpy` |
88+
| [Matplotlib](https://matplotlib.org/) | Matplotlib | `matplotlib` |
89+
| [imageio](https://imageio.readthedocs.io/en/stable/index.html) | imageio | `imageio` |
90+
91+
92+
- When importing scikit-image use:
93+
```python
94+
import skimage as ski
95+
```
96+
Therefore, to access specific functions, you need to use their submodule name. For example:
97+
98+
```python
99+
import skimage as ski
100+
101+
rr, cc = ski.draw.rectangle(start=(357, 44), end=(740, 720))
102+
```
103+
104+
- For reading and writing images, use the [imageio](https://imageio.readthedocs.io/en/stable/index.html)
105+
library and avoid use of `skimage.io`. For example:
106+
```python
107+
import imageio.v3 as iio
108+
109+
chair = iio.imread(uri="data/chair.jpg") # read an image
110+
iio.imwrite(uri="data/chair.tif", image=chair) # write an image
111+
```
112+
113+
- Comments providing an overall description of a code snippet should use triple quotes `"""`, e.g.,
114+
```python
115+
"""Python script to load a colour image in grayscale"""
116+
117+
chair = iio.imread(uri="data/chair.jpg")
118+
gray_chair = ski.color.rgb2gray(chair)
119+
```
120+
121+
### What *Not* to Contribute (General)
62122

63123
Our lessons already contain more material than we can cover in a typical
64124
workshop, so we are usually *not* looking for more concepts or tools to add to
@@ -72,6 +132,23 @@ platform. Our workshops typically contain a mixture of Windows, macOS, and
72132
Linux users; in order to be usable, our lessons must run equally well on all
73133
three.
74134

135+
### What *Not* to Contribute (This Lesson)
136+
137+
Although most contributions will be welcome at this stage of the curriculum's development,
138+
the time available to deliver the content in a training event is strictly limited
139+
and needs to be accounted for when considering the addition of any new content.
140+
If you want to suggest the addition of new content, especially whole new sections or episodes,
141+
please open an issue to discuss this with the Maintainers first and provide the following
142+
information alongside a summary of the content to be added:
143+
144+
1. A suggested location for the new content.
145+
2. An estimate of how much time you estimate the new content would require in training
146+
(teaching + exercises).
147+
3. The [learning objective(s)][cldt-lo] of this new content.
148+
4. (optional, but strongly preferred)
149+
A suggestion of which of the currently-used learning objectives could be
150+
removed from the curriculum to make space for the new content.
151+
75152
### Using GitHub
76153

77154
If you choose to contribute via GitHub, you may want to look at [How to
@@ -92,6 +169,14 @@ Each lesson has a team of maintainers who review issues and pull requests or
92169
encourage others to do so. The maintainers are community volunteers, and have
93170
final say over what gets merged into the lesson.
94171

172+
#### Merging Policy
173+
174+
Pull requests made to the default branch of this repository
175+
(from which the lesson site is built)
176+
can only be merged after at least one approving review from a Maintainer.
177+
Any Maintainer can merge a pull request that has received at least one approval,
178+
but they may prefer to wait for further input from others before merging.
179+
95180
### Other Resources
96181

97182
The Carpentries is a global organisation with volunteers and learners all over
@@ -102,6 +187,7 @@ media, slack, newsletters, and email lists. You can also [reach us by
102187
email][contact].
103188

104189
[repo]: https://github.com/datacarpentry/image-processing
190+
[cldt-lo]: https://carpentries.github.io/lesson-development-training/05-objectives.html#learning-objectives
105191
[contact]: mailto:team@carpentries.org
106192
[cp-site]: https://carpentries.org/
107193
[dc-issues]: https://github.com/issues?q=user%3Adatacarpentry

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ A lesson teaching foundational image processing skills with Python and [scikit-i
77

88
## Lesson Content
99

10-
This lesson introduces fundamental concepts in image handling and processing. Learners will gain the skills needed to load images into Python, to select, summarise, and modify specific regions in these image, and to identify and extract objects within an image for further analysis.
10+
This lesson introduces fundamental concepts in image handling and processing. Learners will gain the skills needed to load images into Python, to select, summarise, and modify specific regions in these images, and to identify and extract objects within an image for further analysis.
1111

1212
The lesson assumes a working knowledge of Python and some previous exposure to the Bash shell.
1313
A detailed list of prerequisites can be found in [`learners/prereqs.md`](learners/prereqs.md).
@@ -16,6 +16,10 @@ A detailed list of prerequisites can be found in [`learners/prereqs.md`](learner
1616

1717
- Make a suggestion or correct an error by [raising an Issue](https://github.com/datacarpentry/image-processing/issues).
1818

19+
Please see the [CONTRIBUTING.md file](CONTRIBUTING.md) for contributing guidelines and details on how to get involved with
20+
this project. Some specific guidelines for content / style are provided in the
21+
['What to Contribute (This Lesson)' section](CONTRIBUTING.md#what-to-contribute-this-lesson).
22+
1923
## Code of Conduct
2024

2125
All participants should agree to abide by the [The Carpentries Code of Conduct](https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html).

0 commit comments

Comments
 (0)