You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorials/add-license-coc.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ Your `LICENSE` file should be placed at the root of your package's repository.
32
32
33
33
There are several ways to add a license file:
34
34
35
-
1. When you create a new repository on GitHub, it will ask you if you wish to add a `LICENSE` file at that time. It will also create the file for you.
35
+
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.
36
36
2. You can add a license through the GitHub gui following the [<iclass="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).
37
37
3. You can add the file manually like we are doing in this lesson.
38
38
@@ -42,7 +42,7 @@ If you completed the past lessons including
42
42
1.[Making your code installable](1-installable-code.md) and
43
43
2.[publishing your package to PyPI](publish-pypi.md)
44
44
45
-
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 tutorials which walks you through adding a CODE_OF_CONDUCT.
45
+
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.
46
46
47
47
If you don't yet have a **LICENSE** file in your directory, then continue reading.
48
48
:::
@@ -51,7 +51,7 @@ If you don't yet have a **LICENSE** file in your directory, then continue readin
51
51
52
52
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
53
53
54
-
1. Create a new file called LICENSE. If you are using shell you can use:
54
+
1. Create a new file called LICENSE. If you are using a shell you can use:
55
55
56
56
```
57
57
# Create a license file in your shell
@@ -100,7 +100,7 @@ If you already have a GitHub repo for your package, then you can add a LICENSE u
Copy file name to clipboardExpand all lines: tutorials/pyproject-toml.md
+13-14Lines changed: 13 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ is 2 above enough for examples? should we show a few others?
15
15
16
16
In [the installable code lesson](2-installable-code), you learned how to add the bare minimum information to a `pyproject.toml` file to make it installable. You then learned how to [publish that bare minimum version of your package to PyPI](publish-pypi.md).
17
17
18
-
FOllowing that you learned how to add a:
18
+
Following that you learned how to add a:
19
19
*[README.md](add-readme)
20
20
*[LICENSE](add-license-coc) and
21
21
*[CODE_OF_CONDUCT](add-coc)
@@ -29,7 +29,6 @@ file. This
29
29
lesson will guide you through the process.
30
30
31
31
32
-
In future lessons you will add a license and README file to your package which will further flesh out both your PyPI landing page and the landing page
33
32
of your GitHub or GitLab repository.
34
33
35
34
:::{admonition} Learning Objectives
@@ -46,7 +45,7 @@ If you wish to learn more about the `pyproject.toml` format, [check out this pag
46
45
<!-- TODO:Friends - As you are reviewing ...as a beginner is this TLDR too technical when you have no idea what the elements in it are? or is it a nice summary? -->
47
46
48
47
49
-
:::{dropdown} Click for Lesson highlights TL&DR
48
+
:::{dropdown} Click for lesson highlights
50
49
:color: secondary
51
50
:icon: unlock
52
51
@@ -67,9 +66,9 @@ When creating your pyproject.toml file, consider the following:
67
66
68
67
## What is a pyproject.toml file?
69
68
70
-
The `pyproject.toml` file is a human and machine-readable file that serves as the primary configuration file for your pure Python package.
69
+
The `pyproject.toml` file is a human and machine-readable file that serves as the primary configuration file for your Python package.
71
70
72
-
The TOML format can be compared to structured formats such as`.json`. However, the TOML format is an easier-to-read format - especially for us humans.
71
+
The TOML format can be compared to other structured formats such as`.json`. However, the TOML format was designed to be easier to read for humans.
73
72
74
73
:::{tip}
75
74
[Building your package](build-package) is the step that created the distribution files that are required for you to publish to PyPI.
@@ -148,7 +147,7 @@ In the last lesson, you created a bare-bones pyproject.toml
148
147
file that contained the core elements needed to build your
149
148
package:
150
149
151
-
1. A `[build]` table where ou defined your project's backend build tool (`hatchling`)
150
+
1. A `[build-system]` table where you defined your project's backend build tool (`hatchling`)
152
151
2. A `[project]` table where you defined your project's version and name.
153
152
154
153
The `pyproject.toml` file that you created, looked like this:
@@ -192,7 +191,7 @@ Let's add the following to your table:
192
191
- package **authors**
193
192
- package **maintainers**
194
193
195
-
When you add authors and maintainers you need to use a format that will look like a Python list with a dictionary within it type of format:
194
+
When you add authors and maintainers you need to use a format that will look like a Python list with a dictionary within it:
@@ -231,7 +230,7 @@ Whereas maintainers are the people that are currently, actively working on the p
231
230
232
231
A good example of when the lists might diverge is sometimes you have a package where an initial author developed it and then stepped down as a maintainer to move on to other things. This person may continue to be considered an author but no longer actively maintains the package.
233
232
234
-
It is important to note there that there are many ways define author vs maintainer and we don't prescribe a single approach in this tutorial.
233
+
It is important to note that there are many ways to define author vs maintainer and we don't prescribe a single approach in this tutorial.
235
234
236
235
However, we encourage you to consider carefully, for PyPI publication, who
237
236
you want to have listed as authors and maintainers on your PyPI landing page.
@@ -251,7 +250,7 @@ If you do not [use standard classifier values](https://PyPI.org/classifiers/), w
251
250
Review that list and add items below to your `pyproject.toml` file:
Pinnning dependencies references to specifying a specific version of a dependency like this `numpy == 1.0`. In some specific cases, you may chose to pin or specify a lower or upper bound of a specific package. You can do that using syntax like this:
288
+
Pinnning dependencies refers to specifying a specific version of a dependency like this `numpy == 1.0`. In some specific cases, you may chose to pin or specify a lower or upper bound of a specific package. You can do that using syntax like this:
290
289
291
290
`ruamel-yaml>=0.17.21`
292
291
@@ -483,8 +482,8 @@ license = { FILE = LICENSE }
483
482
## Example `pyproject.toml` files
484
483
485
484
Below are some examples of `pyproject.toml` files from various packages in the scientific and pyOpenSci ecosystem.
*[taxpasta has a nicely organized pyProject.toml file and is a pyOpenSci approved package](https://github.com/taxprofiler/taxpasta/blob/f9f6eea2ae7dd08bb60a53dd49ad77e4cf143573/pyproject.toml)
485
+
*[PyPA's fully documented example pyproject.toml file](https://github.com/pypa/sampleproject/blob/main/pyproject.toml)
486
+
*[taxpasta has a nicely organized pyproject.toml file and is a pyOpenSci approved package](https://github.com/taxprofiler/taxpasta/blob/f9f6eea2ae7dd08bb60a53dd49ad77e4cf143573/pyproject.toml)
488
487
489
488
490
489
## <iclass="fa-solid fa-hands-bubbles"></i> Wrap up
@@ -493,8 +492,8 @@ Below are some examples of `pyproject.toml` files from various packages in the s
493
492
At this point you've created:
494
493
495
494
* A [README.md](add-readme) file for your package
496
-
* A [code of conduct](add-coc) to support your user community
497
-
* And a [LICENSE](add-license-coc) file which provides legal boundaries around how people can and can't use your software.
495
+
* A [CODE_OF_CONDUCT.md](add-coc) file to support your user community
496
+
* And a [LICENSE](add-license-coc) file which provides legal boundaries around how people can and can't use your software
498
497
499
498
You also learned [how to publish your package to (test)PyPI](publish-pypi).
0 commit comments