Skip to content

Commit 9d3ea27

Browse files
committed
Fix: edits to first two lessons for flow
1 parent d6589ff commit 9d3ea27

File tree

2 files changed

+66
-43
lines changed

2 files changed

+66
-43
lines changed

tutorials/add-license-coc.md

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ In this lesson you will learn:
1616
3. How you can use the Contributors Covenant website to add generic language as a starting place for your `CODE_OF_CONDUCT`.
1717
:::
1818

19-
## What is a license and why is it important?
19+
## What is a license?
2020

2121
A license contains legal language about how users can use and reuse your software. To set the LICENSE for your project, you:
2222

2323
1. create LICENSE file in your project directory that specifies the license that you choose for your package and
2424
2. reference that file in your pyproject.toml data where metadata are set.
2525

26-
By adding the LICENSE file to your pyproject.toml file, the LICENSE will be included in your package's metadata which is used to populate your package's PyPI landing page. It is also used in your GitHub repository (see image below).
26+
By adding the LICENSE file to your pyproject.toml file, the LICENSE will be included in your package's metadata which is used to populate your package's PyPI landing page. The LICENSE is also used in your GitHub repository's landing page interface.
2727

2828
### What license should you use?
2929

@@ -51,14 +51,13 @@ are placed in the root of the project directory using standard naming convention
5151
:::
5252

5353

54-
## How to add a LICENSE file to your package repository
54+
### How to add a LICENSE file to your package directory
5555

5656
There are several ways to add a LICENSE file:
5757

5858
1. When you create a new repository on GitHub, it will ask you if you wish to add a `LICENSE` file at that time. If you select yes, it will create the file for you.
5959
2. You can add a license through the GitHub gui following the [<i class="fa-brands fa-github"></i> instructions here](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/adding-a-license-to-a-repository).
6060
3. You can add the file manually like we are doing in this lesson.
61-
4. Or, if you are using a tool such as Hatch, it will add a LICENSE file for you.
6261

6362
:::{tip}
6463
If you completed the past lessons including
@@ -71,11 +70,11 @@ then you already have a **LICENSE** file containing text for the MIT license in
7170
If you don't yet have a **LICENSE** file in your directory, then continue reading.
7271
:::
7372

74-
### Add a LICENSE to your existing GitHub repository
73+
### How to add a LICENSE to your package - the manual way
7574

7675
If you don't already have a LICENSE file, and you are not yet using a platform such as GitHub or GitLab, then you can create a license file by
7776

78-
1. Create a new file called LICENSE. If you are using a shell you can use:
77+
1. Create a new file called LICENSE. If you are using shell you can type:
7978

8079
```
8180
# Create a license file in your shell
@@ -86,6 +85,7 @@ If you don't already have a LICENSE file, and you are not yet using a platform s
8685
2. Select permissive license
8786
3. It will suggest that you use the [MIT license](https://choosealicense.com/licenses/mit/).
8887
4. Copy the license text that it provides into your LICENSE file that you created above.
88+
5. Save your file. You're all done!
8989

9090
:::{admonition} An overview of LICENSES in the scientific Python ecosystem
9191
:class: note
@@ -131,29 +131,43 @@ GitHub landing page.
131131
:::::
132132
::::::
133133

134+
Now you know how to add a LICENSE to your project. Next, you'll learn
135+
about the `CODE_OF_CONDUCT.md` file and how to add it to your
136+
package directory.
137+
134138
(add-coc)=
135-
## Add a CODE_OF_CONDUCT file to your repository
139+
## What is a code of conduct file?
136140

137-
Now that you have added a LICENSE to your project, you are ready to add a `CODE_OF_CONDUCT.md` to your package directory. The `CODE_OF_CONDUCT.md` should be placed at the root of your project directory, similar to the LICENSE file,.
141+
A `CODE_OF_CONDUCT` file is used to establish guidelines for how people in your community interact.
138142

139-
A `CODE_OF_CONDUCT` file is critical to supporting your community as it
143+
This file is critical to supporting your community as it
140144
grows. The `CODE_OF_CONDUCT`:
141145

142146
1. Establishes guidelines for how users and contributors interact with each other and you in your software repository.
143147
2. Identifies negative behaviors that you don't want in your interactions.
144148

145149
You can use your code of conduct as a tool that can be referenced when moderating challenging conversations.
146150

151+
### What to put in your code of conduct file
152+
147153
If you are unsure of what language to add to your `CODE_OF_CONDUCT`
148154
file, we suggest that you adopt the [contributor covenant language](https://www.contributor-covenant.org/version/2/1/code_of_conduct/) as a starting place.
149155

150156
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](#)
151157

152-
### Add your CODE_OF_CONDUCT file
158+
The `CODE_OF_CONDUCT.md` should be placed at the root of your project directory, similar to the LICENSE file.
159+
160+
### How to add a CODE_OF_CONDUCT file to your package directory
161+
162+
- Add a `CODE_OF_CONDUCT.md` file to the root of your repository if it doesn't already exist.
153163

154-
- Add a `CODE_OF_CONDUCT.md` file to your repository if it doesn't
155-
already exist.
156-
- Visit the [contributor covenant website](https://www.contributor-covenant.org/) and add [the markdown version of their code of conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/code_of_conduct.md) to your `CODE_OF_CONDUCT.md` file.
164+
```bash
165+
> touch CODE_OF_CONDUCT.md
166+
```
167+
168+
- Visit the [contributor covenant website](https://www.contributor-covenant.org/) and add [the markdown version of their code of conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/code_of_conduct.md) to your `CODE_OF_CONDUCT.md` file. Read the text closely to ensure you both understand it and also agree with its contents!
169+
170+
That's it - you've now added a code of conduct to your package directory.
157171

158172
:::{admonition} Additional Code of Conduct resources
159173
:class: note
@@ -173,11 +187,11 @@ In this lesson and the [last lesson](add-readme), you have added a:
173187

174188
These are fundamental files needed for every scientific Python package
175189
repository. These files help users understand how to use your package and
176-
interact with package maintainers. In the upcoming
177-
lessons, you will:
190+
interact with package maintainers.
191+
192+
In the upcoming lessons, you will:
178193

179-
- [Flesh out your `pyproject.toml` file](pyproject-toml) to support building
180-
and publishing your package on PyPI.
194+
- [Add more metadata to your `pyproject.toml` file](pyproject-toml) to support building and publishing your package on PyPI.
181195
- Publish a new version of your Python package to (Test) PyPI to preview the
182196
updated metadata landing page.
183197

tutorials/add-readme.md

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
In the previous lessons you learned:
44

5-
1. What a Python package is
6-
2. How to make your code installable
7-
3. How to publish your package to (test) PyPI
5+
1. [What a Python package is](intro.md)
6+
2. [How to make your code installable](1-installable-code)
7+
3. [How to publish your package to (test) PyPI](publish-pypi.md)
8+
4. [How to publish your package to conda-forge](publish-conda-forge.md)
89

910
:::{admonition} Learning objectives
1011

@@ -26,15 +27,17 @@ a user understand:
2627
- How to contribute to your package
2728
- How to cite your package
2829

29-
Your **README.md** file is important as it is often the first thing that someone sees before they install your package. The README file also will be used to populate your PyPI landing page.
30+
Your **README.md** file is important as it is often the first thing that someone sees before they install your package. The README file is also used to populate your PyPI landing page.
3031

31-
Note that there is no required format for README files. This page simply outlines sections that we suggest you have in your README file.
32+
Note that there is no specific content structure for README files.
33+
However, this tutorial outlines the sections that we suggest that you
34+
include in your README file.
3235

3336
## Create a README.md file for your package
3437

3538
It's time to add a `README.md` file to your project directory.
3639

37-
### Step 0. Create a README file
40+
### Step 0: Create a README file
3841
To get started, if you don't already have a README.md file in your project directory, create one.
3942

4043
:::{tip}
@@ -49,27 +52,27 @@ Then you may already have a README.MD file in your project directory.
4952
<!-- If they use hatch init in the very first lesson -
5053
the readme will already be there-->
5154

52-
### Step 1. Add the name of your package as the README title
55+
### Step 1: Add the name of your package as the README title
5356

5457
At the top of the `README.md` file, add the name of your package.
5558

56-
If you are using markdown it should be a header 1 tag which is denoted with a single `#` sign.
59+
If you are using markdown it should be a header 1 (H1) tag which is denoted with a single `#` sign.
5760

5861
`# Package-title-here`
5962

60-
### Step 2 - add badges to the top of your README file
63+
### Step 2: add badges to the top of your README file
6164

62-
It's common for maintainers to add badges to the top of their README files. Badges allow you and your package users to track things like
65+
It's common for maintainers to add badges to the top of their README files. Badges allow you and your package users to track things like:
6366

6467
* Broken documentation and test builds.
6568
* Versions of your package that are on PyPI and conda.
6669
* Whether your package has been reviewed and vetted by an organization such as pyOpenSci and/or JOSS.
6770

6871
If you have already published your package to pypi.org you can use [shields.io to create a package version badge](https://shields.io/badges/py-pi-version). This badge will dynamically update as you release new versions of your package to PyPI.
6972

70-
If not, you can leave the top empty for now and add badges to your README at a later point as they make sense for your package.
73+
If not, you can leave the top empty for now and add badges to your README at a later point as they make sense.
7174

72-
### Step 3 - Add a description of what your package does
75+
### Step 3: Add a description of what your package does
7376

7477
Below the badges (if you have them), add a section of text
7578
that provides an easy-to-understand overview of what your
@@ -81,7 +84,7 @@ package does.
8184

8285
Remember that the more people understand what your package does, the more people will use it.
8386

84-
### Step 4 - Add package installation instructions
87+
### Step 4: Add package installation instructions
8588

8689
Next, add instructions that tell users how to install your package.
8790

@@ -96,7 +99,7 @@ If you haven't yet published your package to pypi.org then
9699
you can skip this section and come back and add these
97100
instructions later.
98101

99-
### Step 5 - Any additional setup
102+
### Step 5: Any additional setup
100103

101104
In some cases, your package users may need to manually
102105
install other tools in order to use your package. If that
@@ -111,14 +114,14 @@ This might include:
111114
* additional tool installations, such as GDAL.
112115

113116
:::{note}
114-
Many packages won't need this section in their README. In that case you can always skip this section!
117+
Many packages won't need an additional setup section in their README.
118+
In that case you can always skip this section.
115119
:::
116120

117121

118-
### Step 6 - Add a get started section
122+
### Step 6: Add a get started section
119123

120-
Next add a getting started section that shows how to use your package. This
121-
section should include a small code snippet that demonstrates importing and using
124+
Next add a get-started section. Within this section, add a small code example that demonstrates importing and using
122125
some of the functionality in your package.
123126

124127
:::{admonition} Provide a fully functional code snippet if possible
@@ -128,7 +131,7 @@ It is important to try to make the code examples that you provide your users as
128131

129132
Be sure to provide a copy/paste code example that will work as-is when pasted into a Jupyter Notebook or .py file if that is possible.
130133

131-
If there are tokens and other steps needed to run your package, be sure to be clear about what those steps entail.
134+
If there are tokens and other steps needed to run your package, be sure to be clear about what those steps are.
132135
:::
133136

134137
For the pyosPackage, a short get started demo might look like this:
@@ -143,22 +146,28 @@ Or it could simply be a link to a getting started tutorial that you have created
143146
you don't have this yet, you can leave it empty for the time being.
144147

145148
This would
146-
also be a great place to add links to any tutorials that you have created that
149+
also be a great place to add links to tutorials that
147150
help users understand how to use your package for common workflows.
148151

149152

150-
### Step 7 - Community section
153+
### Step 7: Community section
151154

152155
The community section of your README file is a place to include information for users who may want to engage with your project. This engagement will likely happen on a platform like GitHub or GitLab.
153156

154157
In the community section, you will add links to your contributing guide
155-
and `CODE_OF_CONDUCT.md`. You will add a [`CODE_OF_CONDUCT.md` file in the next lesson](add-license-coc).
158+
and `CODE_OF_CONDUCT.md`. You will create a [`CODE_OF_CONDUCT.md` file in the next lesson](add-license-coc).
156159

157-
As your package grows you may also have a link to a development guide that contributors and your maintainer team will follow.
160+
As your package grows you may also have a link to a development guide that contributors and your maintainer team will follow. The development guide
161+
outlines how to perform maintenance tasks such as:
158162

163+
* running tests
164+
* making package releases
165+
* building documentation
166+
* and more.
159167

160168

161-
### Step 8 - Citation information
169+
170+
### Step 8: Citation information
162171

163172
Finally it is important to let users know how to cite your package.
164173
You can communicate citation information in a few different ways.
@@ -168,8 +177,8 @@ information for your package if it is hosted on a platform such as
168177
GitHub. [Check out this short tutorial that covers setting that up.](https://coderefinery.github.io/github-without-command-line/doi/)
169178

170179
Alternatively if you send your package through a peer review process such
171-
as the [one lead by pyOpenSci](https://www.pyopensci.org/about-peer-review/index.html), then you can get a cross-ref DOI through our partnership
172-
with the Journal of Open Source Software.
180+
as the [one lead by pyOpenSci](https://www.pyopensci.org/about-peer-review/index.html). After being accepted by pyOpenSci, if your package is in scope, you can be accepted by the Journal of Open Source Software and get a cross-ref DOI through [our partnership with the Journal of Open Source Software.](https://www.pyopensci.org/about-peer-review/index.html)
181+
173182

174183
## The finished README file
175184

0 commit comments

Comments
 (0)