Skip to content

Commit acd08a7

Browse files
committed
Final tweaks to Python packaging lecture
1 parent 1ee2206 commit acd08a7

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

03_building_and_packaging/intro_slides.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ slideOptions:
2727

2828
---
2929

30-
## Learning goals of chapter
30+
## Learning Goals of Chapter
3131

3232
- Explain why software is packaged.
3333
- Create a distributable package of a Python code, publish on PyPI, and install with pip.
@@ -38,7 +38,7 @@ slideOptions:
3838

3939
---
4040

41-
## What is packaging?
41+
## What is Packaging?
4242

4343
- Bare code is often hard to understand for everyone except the developer(s).
4444
- Packaging is a workflow to convert a code into a standardized distributable software.
@@ -50,7 +50,7 @@ slideOptions:
5050

5151
---
5252

53-
## Why should we package code? 1/2
53+
## Why Package Code? 1/2
5454

5555
- A code with many files typically has difficulties like
5656
- multiple dependencies and requirements of specific versions of dependencies.
@@ -59,7 +59,7 @@ slideOptions:
5959

6060
---
6161

62-
## Why should we package code? 2/2
62+
## Why Package Code? 2/2
6363

6464
- Create a package to
6565
- benefit from a package index or package manager which is familiar to a broad audience.
@@ -69,7 +69,7 @@ slideOptions:
6969

7070
---
7171

72-
## How to package code?
72+
## How to Package Code?
7373

7474
- First step is finding the right standard for your code.
7575
- There are several options:
@@ -83,15 +83,15 @@ slideOptions:
8383

8484
---
8585

86-
## Why do we look at packaging a Python code?
86+
## Why Packaging a Python Code?
8787

8888
- Python is easy to understand and widely used in research software.
8989
- Well established package managers and packaging tools already exist in the Python community.
90-
- Several examples of packaged codes: [NumPy](https://pypi.org/project/numpy/), [SciPy](https://pypi.org/project/scipy/), [PyTorch](https://pypi.org/project/torch/).
90+
- Many famous examples: [NumPy](https://pypi.org/project/numpy/), [SciPy](https://pypi.org/project/scipy/), [PyTorch](https://pypi.org/project/torch/).
9191

9292
---
9393

94-
## Key takeaways
94+
## Key Takeaways
9595

9696
- Packaging or creating build recipe of a code is a standardized process.
9797
- Many options in packaging / building tools.

03_building_and_packaging/pypi_slides.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ In this lecture we work with pip, because ...
6464

6565
## Python Enhancement Proposals (PEPs)
6666

67-
- PEP is an evolving design document which guides Python development.
68-
- PEPs typically involve concise technical information, which also act as standards.
67+
- PEPs are evolving design documents that guide Python development.
68+
- PEPs typically involve concise technical information. They are essentially standards.
6969
- Packaging is standardized by [Packaging PEPs](https://peps.python.org/topic/packaging/).
7070
- Example of a Packaging PEP: [PEP 427 – The Wheel Binary Package Format 1.0](https://peps.python.org/pep-0427/).
7171

@@ -84,13 +84,13 @@ Import package ...
8484
- ... is used within a file: `import pkg` or `from pkg import xyz`.
8585
- ... is available when its distribution package is installed.
8686

87-
Distribution package name and import package need not be the same, but usually is. Read more about [distribution package vs. import package](https://packaging.python.org/en/latest/discussions/distribution-package-vs-import-package/#distribution-package-vs-import-package).
87+
Both names need not be the same, but they usually are. Read more about [distribution package vs. import package](https://packaging.python.org/en/latest/discussions/distribution-package-vs-import-package/#distribution-package-vs-import-package).
8888

8989
---
9090

9191
## Steps in Packaging a Python Code
9292

93-
1. Get or create a source tree of the code.
93+
1. Create a source tree of the code.
9494
2. Write a packaging configuration file, typically `pyproject.toml`.
9595
3. Create build artifacts.
9696
4. Upload the build artifacts to a packaging index.
@@ -203,7 +203,7 @@ python3 -m build
203203

204204
Source distribution (sdist)
205205

206-
- Contains files enough to install the package from source.
206+
- Contains files to install the package from source.
207207
- Run
208208

209209
```bash
@@ -216,7 +216,7 @@ Source distribution (sdist)
216216

217217
Built distribution (wheel)
218218

219-
- Contains files needed only to run package.
219+
- Contains binary files to run package.
220220
- No compilation done, just a copy paste into a directory.
221221
- In most cases only one generic wheel is required. Exceptions are different Python interpreters, different OS configurations.
222222
- Run

0 commit comments

Comments
 (0)