-
-
Notifications
You must be signed in to change notification settings - Fork 125
Expand contributing guide with specific style guidelines #345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,10 @@ your change proposal as promptly as we can, and help you become a member of our | |
| community. Everyone involved in [The Carpentries][cp-site] agrees to abide by | ||
| our [code of conduct](CODE_OF_CONDUCT.md). | ||
|
|
||
| ### Who Should Contribute? | ||
|
|
||
| Contributions to this lesson are welcome from anyone with an interest in the project. | ||
|
|
||
| ### How to Contribute | ||
|
|
||
| The easiest way to get started is to file an issue to tell us about a spelling | ||
|
|
@@ -43,7 +47,7 @@ documentation][template-doc]. | |
| to [The Workbench documentation][template-doc]. | ||
|
|
||
|
|
||
| ### What to Contribute | ||
| ### What to Contribute (General) | ||
|
|
||
| There are many ways to contribute, from writing new exercises and improving | ||
| 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 | |
| lessons for a while to forget how impenetrable some of this material can be, so | ||
| fresh eyes are always welcome. | ||
|
|
||
| ### What *Not* to Contribute | ||
| ### What to Contribute (This Lesson) | ||
|
|
||
| Any contributions are welcome, particularly ideas for how the existing content could be | ||
| improved or updated, and/or errors that need to be corrected. Comments on existing issues | ||
| and reviews of pull requests are similarly welcome. | ||
|
|
||
| If you plan to submit a pull request, please open an issue | ||
| (or comment on an existing thread) first to ensure that effort is not duplicated | ||
| or spent making a change that will not be accepted by the Maintainers. | ||
|
|
||
| #### Content / style guidelines | ||
| - If you add an image / figure that was generated from Python code, please include this | ||
| code in your PR under `episodes/fig/source`. | ||
|
|
||
| - Use the terms in the table below, when referring to Python libraries within the lesson. | ||
| The table gives two terms for each library: `Term for descriptive text` which should be | ||
| used when discussing the library in plain English / full sentences and `Term for code` | ||
| which should be used when referring to code (and within code). | ||
|
|
||
| | Python library | Term for descriptive text | Term for code | | ||
| | :------------- | :------------- | :------------- | | ||
| | [scikit-image](https://scikit-image.org/) | scikit-image | `skimage` | | ||
| | [NumPy](https://numpy.org/) | NumPy | `numpy` | | ||
| | [Matplotlib](https://matplotlib.org/) | Matplotlib | `matplotlib` | | ||
| | [imageio](https://imageio.readthedocs.io/en/stable/index.html) | imageio | `imageio` | | ||
|
|
||
|
|
||
| - When importing scikit-image use: | ||
| ```python | ||
| import skimage as ski | ||
| ``` | ||
| Therefore, to access specific functions, you need to use their submodule name. For example: | ||
|
|
||
| ```python | ||
| import skimage as ski | ||
|
|
||
| rr, cc = ski.draw.rectangle(start=(357, 44), end=(740, 720)) | ||
| ``` | ||
|
|
||
| - For reading and writing images, use the [imageio](https://imageio.readthedocs.io/en/stable/index.html) | ||
| library and avoid use of `skimage.io`. For example: | ||
| ```python | ||
| import imageio.v3 as iio | ||
K-Meech marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| chair = iio.imread(uri="data/chair.jpg") # read an image | ||
| iio.imwrite(uri="data/chair.tif", image=chair) # write an image | ||
| ``` | ||
|
|
||
| - Comments providing an overall description of a code snippet should use triple quotes `"""`, e.g., | ||
| ```python | ||
| """Python script to load a colour image in grayscale""" | ||
|
|
||
| chair = iio.imread(uri="data/chair.jpg") | ||
| gray_chair = ski.color.rgb2gray(chair) | ||
| ``` | ||
|
|
||
| ### What *Not* to Contribute (General) | ||
|
|
||
| Our lessons already contain more material than we can cover in a typical | ||
| 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 | |
| Linux users; in order to be usable, our lessons must run equally well on all | ||
| three. | ||
|
|
||
| ### What *Not* to Contribute (This Lesson) | ||
|
|
||
| Although most contributions will be welcome at this stage of the curriculum's development, | ||
| the time available to deliver the content in a training event is strictly limited | ||
| and needs to be accounted for when considering the addition of any new content. | ||
| If you want to suggest the addition of new content, especially whole new sections or episodes, | ||
| please open an issue to discuss this with the Maintainers first and provide the following | ||
| information alongside a summary of the content to be added: | ||
|
|
||
| 1. A suggested location for the new content. | ||
| 2. An estimate of how much time you estimate the new content would require in training | ||
| (teaching + exercises). | ||
| 3. The [learning objective(s)][cldt-lo] of this new content. | ||
| 4. (optional, but strongly preferred) | ||
| A suggestion of which of the currently-used learning objectives could be | ||
| removed from the curriculum to make space for the new content. | ||
|
|
||
| ### Using GitHub | ||
|
|
||
| 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 | |
| encourage others to do so. The maintainers are community volunteers, and have | ||
| final say over what gets merged into the lesson. | ||
|
|
||
| #### Merging Policy | ||
|
|
||
| Pull requests made to the default branch of this repository | ||
| (from which the lesson site is built) | ||
| can only be merged after at least one approving review from a Maintainer. | ||
| Any Maintainer can merge a pull request that has received at least one approval, | ||
| but they may prefer to wait for further input from others before merging. | ||
|
|
||
| ### Other Resources | ||
|
|
||
| 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 | |
| email][contact]. | ||
|
|
||
| [repo]: https://github.com/datacarpentry/image-processing | ||
| [cldt-lo]: https://carpentries.github.io/lesson-development-training/05-objectives.html#learning-objectives | ||
| [contact]: mailto:[email protected] | ||
| [cp-site]: https://carpentries.org/ | ||
| [dc-issues]: https://github.com/issues?q=user%3Adatacarpentry | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.