Skip to content

Commit f84e278

Browse files
bonus template
1 parent b120354 commit f84e278

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

_quarto.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ book:
3232
- blog/workflow/pre-commit.qmd
3333
- blog/workflow/publish-to-pypi.qmd
3434
- blog/bonus/index.qmd
35+
- python-package-template.qmd
3536
- contributing.qmd
3637

3738
format:

blog/code-quality/unit-tests.qmd

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ Let’s look at how unit tests work using a basic example. We assume that we hav
2727
sunflower/
2828
├── sunflower/
2929
│ └── __init__.py
30-
├── .venv/
3130
└── pyproject.toml
3231
```
3332

@@ -62,7 +61,6 @@ sunflower/
6261
│ └── count_sunflower_module.py
6362
├── tests/
6463
│ └── test_count_sunflower.py
65-
├── .venv/
6664
└── pyproject.toml
6765
```
6866

@@ -94,7 +92,7 @@ Unit testing becomes even more valuable as your project grows and others start u
9492

9593
Tests protect against accidental changes that could break existing behavior. If you modify a function, running your tests will quickly show if the new version still satisfies the old expectations.
9694

97-
For example, let's say we modify our `count_sunflowers()` function in order to make it 2x faster. We don't want to change anything from the user point of view, it should just be faster.
95+
For example, let's say we modify our `count_sunflowers()` function in order to make it 2x faster. **This change should not make anything different** from the user point of view, it should just be faster.
9896

9997
### CI
10098

@@ -104,7 +102,7 @@ There is a [dedicated blog post](./../workflow/github-actions) that covers GitHu
104102

105103
### Collaborative work and external contributions
106104

107-
Having a robust test suite helps contributors understand what your code is supposed to do. It also encourages better code quality and smoother collaboration, since developers can make changes confidently and verify them with tests.
105+
Having a robust test suite helps contributors understand what your code is supposed to do. It also encourages better code quality and smoother collaboration, since developers **can make changes confidently** and verify them with tests.
108106

109107
<br><br>
110108

python-package-template.qmd

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Python package template {.unnumbered}
2+
3+
As long as the website you're currently at, we made a **Python package template**. It's basically a Github repo with everything pre-defined: metadata, documentation, CI/CD, pre-commit, etc.
4+
5+
6+
7+
You can find it [here](https://github.com/y-sunflower/python-package-template).
8+
9+
It relies almost entirely on all the principles described on this website, which are primarily designed to enable users to quickly start working in a clean environment for their package.

0 commit comments

Comments
 (0)