Skip to content

Commit 4e4074e

Browse files
ptressellwasser
authored andcommitted
Update add-license-coc.md with more consistent LICENSE and CODE_OF_CONDUCT usage
Use uppercase and fixed-pitch when references to license and code of conduct are more likely references to actual files. (No formatting added in alt text.) Also tweak a few grammatical issues.
1 parent 4fef077 commit 4e4074e

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

tutorials/add-license-coc.md

+36-36
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
# Add a LICENSE & CODE_OF_CONDUCT to your Python package
1+
# Add a `LICENSE` & `CODE_OF_CONDUCT` to your Python package
22

33
In the [previous lesson](add-readme) you:
44

55
<i class="fa-solid fa-circle-check" style="color: #703c87;"></i> Created a basic `README.md` file for your scientific Python package
66

7-
<i class="fa-solid fa-circle-check" style="color: #703c87;"></i> Learned about the core components that are useful to have in a README file.
7+
<i class="fa-solid fa-circle-check" style="color: #703c87;"></i> Learned about the core components that are useful to have in a `README` file.
88

99
:::{admonition} Learning objectives
1010
:class: tip
1111

1212
In this lesson you will learn:
1313

14-
1. How to select and add a `LICENSE` file to your package repository with a focus on the GitHub interface.
14+
1. How to select a license and add a `LICENSE` file to your package repository, with a focus on the GitHub interface.
1515
2. How to add a `CODE_OF_CONDUCT` file to your package repository.
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

1919
## What is a license?
2020

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

23-
1. create LICENSE file in your project directory that specifies the license that you choose for your package and
24-
2. reference that file in your pyproject.toml data where metadata are set.
23+
1. create a `LICENSE` file in your project directory that specifies the license that you choose for your package and
24+
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. The LICENSE is also used in your GitHub repository's landing page interface.
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

@@ -34,104 +34,104 @@ license on [choosealicense.com](https://choosealicense.com/).
3434
[We discuss licenses for the scientific Python ecosystem in more detail here in our guidebook.](../documentation/repository-files/license-files)
3535
:::
3636

37-
### Where should the LICENSE file live
37+
### Where should the `LICENSE` file live
3838

3939
Your `LICENSE` file should be placed at the root of your package's repository.
40-
When you add the LICENSE at the root, GitHub will automagically discover it and
41-
provide users with a direct link to your license file within your GitHub
40+
When you add the `LICENSE` at the root, GitHub will automagically discover it and
41+
provide users with a direct link to your `LICENSE` file within your GitHub
4242
repository.
4343

4444
:::{figure-md} github-coc-readme-license-tabs
4545
<img src="../images/license-github-root-dir.png" alt="Image showing the GitHub repository for SunPy an accepted pyOpenSci package." width="500px">
4646

4747
Notice at the top of the
48-
README portion of the GitHub landing page, there are three tabs directly linking to the README file which is visible, the CODE_OF_CONDUCT file and one that specifies
48+
README portion of the GitHub landing page, there are three tabs directly linking to the `README` file which is visible, the `CODE_OF_CONDUCT` file and one that specifies
4949
the license that SunPy uses. These files are discovered by GitHub because they
5050
are placed in the root of the project directory using standard naming conventions.
5151
:::
5252

5353

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

56-
There are several ways to add a LICENSE file:
56+
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.
59-
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).
60-
3. You can add the file manually like we are doing in this lesson.
59+
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).
60+
3. You can add the file manually as we are doing in this lesson.
6161

6262
:::{tip}
6363
If you completed the past lessons including
6464

6565
1. [Making your code installable](installable-code.md) and
6666
2. [publishing your package to PyPI](publish-pypi.md)
6767

68-
then you already have a **LICENSE** file containing text for the MIT license in your Python package. Thus you can skip to the next section of this tutorial which walks you through adding a CODE_OF_CONDUCT.
68+
then you already have a `LICENSE` file containing text for the MIT license in your Python package. Thus you can skip to the next section of this tutorial which walks you through adding a `CODE_OF_CONDUCT`.
6969

70-
If you don't yet have a **LICENSE** file in your directory, then continue reading.
70+
If you don't yet have a `LICENSE` file in your directory, then continue reading.
7171
:::
7272

73-
### How to add a LICENSE to your package - the manual way
73+
### How to add a `LICENSE` to your package - the manual way
7474

75-
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
75+
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
7676

77-
1. Create a new file called LICENSE. If you are using shell you can type:
77+
1. Create a new file called `LICENSE`. If you are using shell you can type:
7878

7979
```
80-
# Create a license file in your shell
80+
# Create a `LICENSE` file in your shell
8181
> touch LICENSE
8282
```
8383

8484
1. Go to [choosealicense.com](https://choosealicense.com/)
8585
2. Select permissive license
8686
3. It will suggest that you use the [MIT license](https://choosealicense.com/licenses/mit/).
87-
4. Copy the license text that it provides into your LICENSE file that you created above.
87+
4. Copy the license text that it provides into your `LICENSE` file that you created above.
8888
5. Save your file. You're all done!
8989

90-
:::{admonition} An overview of LICENSES in the scientific Python ecosystem
90+
:::{admonition} An overview of licenses in the scientific Python ecosystem
9191
:class: note
9292

93-
In the pyOpenSci [packaging guidebook](../documentation/repository-files/license-files), we provide an overview of license in the scientific Python ecosystem. We review why license files are important, which ones are most commonly used for scientific software and how to select the correct license.
93+
In the pyOpenSci [packaging guidebook](../documentation/repository-files/license-files), we provide an overview of licenses in the scientific Python ecosystem. We review why license files are important, which ones are most commonly used for scientific software and how to select the correct license.
9494

9595
If you want a broad overview of why licenses are important for protecting open source software, [check out this blog post that overviews the legal side of things.](https://opensource.guide/legal/#just-give-me-the-tldr-on-what-i-need-to-protect-my-project)
9696
:::
9797

98-
::::::{dropdown} Instructions for adding a license files within the GitHub interface
98+
::::::{dropdown} Instructions for adding a `LICENSE` file within the GitHub interface
9999
:color: primary
100100

101101
:::::{tab-set}
102102

103103
::::{tab-item} Add license: new GitHub repository
104104

105-
When you create a new GitHub repository you can add a license
105+
When you create a new GitHub repository you can add a `LICENSE` file
106106
through the GitHub interface.
107107

108108
:::{figure-md} github-new-repo
109109

110110
<img src="../images/tutorials/github-new-repo.png" alt="Screenshot of the create new repository interface that GitHub provides. The elements of this are the owner and repository name for the new repo. Below that you can add a description of the repository. Below that you can set it to be public or private. At the bottom of the interface there is an Add a README checkbox where it will add a blank readme file for you. At the very bottom there is a line to add a .gitignore file and another to choose a license." width="500px">
111111

112-
Image showing the GitHub interface that allows you to add a LICENSE and README file when you create a new repository.
112+
Image showing the GitHub interface that allows you to add a `LICENSE` and `README` file when you create a new repository.
113113
:::
114114
::::
115115

116-
::::{tab-item} Add License: Existing GitHub repository
116+
::::{tab-item} Add `LICENSE`: Existing GitHub repository
117117

118-
If you already have a GitHub repository for your package, then you can add a LICENSE using the GitHub interface by adding a new file to the repository.
118+
If you already have a GitHub repository for your package, then you can add a `LICENSE` using the GitHub interface by adding a new file to the repository.
119119

120120
- Follow the instructions to select and add a license to your repository on the [GitHub LICENSE page](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/adding-a-license-to-a-repository) .
121-
- Once you have added your LICENSE file, be sure to sync your git local repository with the repository on GitHub.com. This means running `git pull` to update your local branch.
121+
- Once you have added your `LICENSE` file, be sure to sync your git local repository with the repository on GitHub.com. This means running `git pull` to update your local branch.
122122

123123
:::{figure-md} view-license
124124
<img src="../images/tutorials/view-license-github.png" alt="Image showing what the LICENSE file looks like in the GItHub interface. At the top you can see the actual license which in this image is BSD 3-clause New or revised license. Then there is some text describing both what the license is and the associated permissions for that specific license. At the bottom of the image, the actual text for the license is shown in the LICENSE file." width="500px">
125125

126-
You can view a summary of the LICENSE chosen on your project's
126+
You can view a summary of the `LICENSE` chosen on your project's
127127
GitHub landing page.
128128
:::
129129
::::
130130

131131
:::::
132132
::::::
133133

134-
Now you know how to add a LICENSE to your project. Next, you'll learn
134+
Now you know how to add a `LICENSE` to your project. Next, you'll learn
135135
about the `CODE_OF_CONDUCT.md` file and how to add it to your
136136
package directory.
137137

@@ -148,16 +148,16 @@ grows. The `CODE_OF_CONDUCT`:
148148

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

151-
### What to put in your code of conduct file
151+
### What to put in your `CODE_OF_CONDUCT` file
152152

153153
If you are unsure of what language to add to your `CODE_OF_CONDUCT`
154154
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.
155155

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

158-
The `CODE_OF_CONDUCT.md` should be placed at the root of your project directory, similar to the LICENSE file.
158+
The `CODE_OF_CONDUCT.md` should be placed at the root of your project directory, similar to the `LICENSE` file.
159159

160-
### How to add a CODE_OF_CONDUCT file to your package directory
160+
### How to add a `CODE_OF_CONDUCT` file to your package directory
161161

162162
- Add a `CODE_OF_CONDUCT.md` file to the root of your repository if it doesn't already exist.
163163

@@ -191,7 +191,7 @@ interact with package maintainers.
191191
In the upcoming lessons, you will:
192192

193193
- [Add more metadata to your `pyproject.toml` file](pyproject-toml) to support building and publishing your package on PyPI.
194-
- Publish a new version of your Python package to (Test) PyPI to preview the
194+
- Publish a new version of your Python package to the test PyPI to preview the
195195
updated metadata landing page.
196196

197197
---

0 commit comments

Comments
 (0)