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/1-installable-code.md
+15-8Lines changed: 15 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -229,10 +229,9 @@ pyospackage # This is your project directory
229
229
230
230
```
231
231
232
-
## Step 2: Add code to your package
232
+
## Step 2: Add module to your package
233
233
234
-
Within the `pyospackage` subdirectory, add one or more Python modules.
235
-
A Python module refers to a `.py` file containing the code that you want your package to access and run.
234
+
A Python module refers to a `.py` file containing the code that you want your package to access and run. Within the `pyospackage` subdirectory, add at least one Python modules (.py files).
236
235
237
236
If you don't have code already and are just learning how to create a Python package, then create an empty `add_numbers.py` file. You will
238
237
populate the `add_numbers.py` file with code provided below.
@@ -258,7 +257,7 @@ pyospackage/
258
257
├── add_numbers.py
259
258
```
260
259
261
-
## Step 3: Add code to your`add_numbers.py` module
260
+
## Step 3. Add code to your module
262
261
263
262
If you are following along and making a Python package from scratch then you can add the code below to your `add_numbers.py` module. The function below adds two integers together and returns the result. Notice that the code below has a few features that we will review in future tutorials:
264
263
@@ -404,14 +403,22 @@ You will learn how to automate defining a package
404
403
version using git tags in the version and release your package lesson.
405
404
:::
406
405
407
-
### Adjust project classifiers
406
+
### OPTIONAL: Adjust your project classifiers
408
407
409
408
Hatch by default provides a list of classifiers that define what
410
-
Python versions your package supports. While this won't impact your package build, let's remove some of them that you likely don't need.
409
+
Python versions your package supports. These classifiers do not
410
+
in any way impact your package's build and are primarily
411
+
intended to be used when you publish your package to PyPI.
411
412
412
-
* Remove support for python 3.8
413
+
If you don't plan on publishing to PyPI, you can skip this section.
414
+
However, if you wish, you can clean it up a bit.
413
415
414
-
Also because we are assuming you're creating a pure Python package, you can remove the following classifiers:
416
+
To begin:
417
+
418
+
* Remove support for Python 3.8
419
+
420
+
Also because you are creating a pure Python package, you can
421
+
in this lesson, you can remove the following classifiers:
0 commit comments