Skip to content

Commit ce25857

Browse files
lwasserMidnighter
andcommitted
Fix: edits from Moritz @Midnighter
Co-authored-by: Moritz E. Beber <midnighter@posteo.net>
1 parent 4b651ac commit ce25857

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tutorials/1-installable-code.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ pyospackage/ # Your project directory
9292

9393
Notice a few things about the above layout:
9494

95-
1. Your package code lives within a `src/packagename` directory. We suggest that you use `src` (short for **source code**) directory as it [ensures that you are running tests on the installed version of your code](https://www.pyopensci.org/python-package-guide/package-structure-code/python-package-structure.html#the-src-layout-and-testing). However, you are welcome to instead use a [flat layout](https://www.pyopensci.org/python-package-guide/package-structure-code/python-package-structure.html#about-the-flat-python-package-layout) which does not have a `src` directory at the root.
96-
1. Within the `src` directory you have a package directory called `pyospackage`. Use the name of your package for that directory name.
95+
1. Your package code lives within a `src/packagename` directory. We suggest that you use `src` (short for **source code**) directory as it [ensures that you are running tests on the installed version of your code](https://www.pyopensci.org/python-package-guide/package-structure-code/python-package-structure.html#the-src-layout-and-testing).
96+
1. Within the `src` directory you have a package directory called `pyospackage`. Use the name of your package for that directory name. This will be the name for importing your package in Python code once installed.
9797
1. In your package directory, you have an `__init__.py` file and all of your Python modules. You will learn more about the __init__.py file below.
9898
1. The `pyproject.toml` file lives at the root directory of your package.
9999
1. The name of the root directory for the package is **pyospackage** which is the name of the package. This is not a requirement but you will often see that the GitHub / GitLab repo and the root directory name are the same as the package name.
100100

101-
### What is an __init__.py file?
101+
### What is an `__init__.py` file?
102102

103103
The `__init__.py` file tells Python that a directory
104104
should be treated as a Python package. As such, a directory with an `__init__.py` file can be imported
@@ -117,7 +117,7 @@ The **pyproject.toml** file is:
117117

118118
- Where you define your project’s metadata (including its name, authors, license, etc)
119119
- Where you define dependencies (the packages that it depends on)
120-
- Used to specify and configure what build back end you want to use to [build your package](../package-structure-code/python-package-distribution-files-sdist-wheel).
120+
- Used to specify and configure what build backend you want to use to [build your package](../package-structure-code/python-package-distribution-files-sdist-wheel).
121121

122122
After the `__init__.py` and `pyproject.toml` files have been added,
123123
your package can be built and distributed as an installable Python
@@ -318,7 +318,7 @@ build-backend = "hatchling.build"
318318
name = "pyospackage" # rename this if you plan to publish to test PyPI
319319
# Here you add the package version manually.
320320
# You will learn how to setup dynamic versioning in a followup tutorial.
321-
version = "1.1"
321+
version = "1.1.0"
322322

323323
```
324324

0 commit comments

Comments
 (0)