Skip to content

Commit c25d728

Browse files
committed
Fix: local cleanup of commented things
1 parent 0eecf5e commit c25d728

File tree

1 file changed

+15
-81
lines changed

1 file changed

+15
-81
lines changed

tutorials/intro.md

Lines changed: 15 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,15 @@
11
# Python packaging 101
22
*A start to finish beginner-friendly tutorial*
33

4-
<!-- This is the start at making the graphic below using css
5-
<div class="container-fluid">
6-
<div class="row">
7-
<div class="col-md-6 left-div">
8-
Python Packaging 101
9-
</div>
10-
<div class="col-md-6 right-div">
11-
<div class="lesson-div">
12-
<a href="#">What is a python package? </a>
13-
</div>
14-
<div class="lesson-div">
15-
<a href="1-installable-code.html">Make your code installable</a>
16-
</div>
17-
<div class="lesson-div">
18-
<a href="2-add-readme.html">Add a README file</a>
19-
</div>
20-
<div class="lesson-div">
21-
<a href="#link4">Add a LICENSE and Code of Conduct file</a>
22-
</div>
23-
<div class="lesson-div">
24-
<a href="#link5">Add metadata (pyproject.toml)</a>
25-
</div>
26-
27-
<div class="lesson-div">
28-
<a href="#link6">Publish to PyPI</a>
29-
</div>
30-
31-
<div class="lesson-div">
32-
<a href="#link7">Publish to conda-forge</a>
33-
</div>
34-
</div>
35-
</div>
36-
</div>
37-
-->
38-
39-
40-
<!--
41-
42-
TODO: whatever graphic we use we can then add it to the top of each page to show the user where they are in the progression
43-
* Work on the create a license lesson next?? that is the most incomplete
44-
* then start the conda one and place the pyos package on conda-forge??
45-
* Below i have an image overview of the lessons and a list of links. i'm thinking a visual html / css block that is clickable would be a more powerful "graphic". it could still have colors.
46-
-->
47-
48-
49-
Welcome to the pyOpenSci Python packaging tutorial series. The lessons on the upcoming pages walk you through the core steps needed to
4+
Welcome to the pyOpenSci Python packaging tutorial series. The lessons
5+
on the upcoming pages walk you through the core steps needed to
506
create a Python package.
517

52-
538
:::{figure-md} packaging-outline
549

55-
<img src="../images/tutorials/packaging-101-outline.png" alt="Diagram showing .. more here if this stays." width="800px">
10+
<img src="../images/tutorials/packaging-101-outline.png" alt="Diagram showing the lessons in our packaging tutorial." width="800px">
5611

57-
TODO: This will be replaced with a interactive CSS element that walks users through lessons
12+
Packaging tutorial overview graphic
5813
:::
5914

6015
## Who are these tutorials for?
@@ -64,9 +19,6 @@ that you have not created a Python package before. However, the
6419
content will still be valuable if you are interested in better
6520
understanding the steps involved in creating a Python package.
6621

67-
<!-- it might be interesting to make the above graphic a css
68-
set of blocks that are colored. then you could hover over each on to get to the lesson of choice. this would make it easier to also
69-
customize each page with that block at the top -->
7022

7123
In this series you will learn about the core elements that you need to publish your package to the [Python Package Index (PyPI)](https://pypi.org/).
7224

@@ -106,34 +58,22 @@ to manage and reuse code across different projects.
10658

10759
A package is installable, which means that you can add the functionality within
10860
the package code to any Python environment and import that functionality like
109-
you would import numpy or matplotlib.
61+
you would import NumPy or matplotlib.
11062

11163
At a high level, you can think about each package as a toolbox filled with
11264
different tools that perform specific actions in your code when imported and
11365
called.
11466

11567
:::{figure-md} python-toolbox
11668

117-
<img src="../images/tutorials/toolbox.png" alt="Diagram showing ADD ALT." width="300px">
69+
<img src="../images/tutorials/toolbox.png" alt="Diagram showing a sketch of a toolbox filled with different tools including a hammer and a saw." width="400px">
11870

119-
You can think about a package as a toolbox filled with coding tools. A tool may be a function or a
120-
class. Each tool does a specific thing well.
71+
You can think about a package as a toolbox filled with coding tools.
72+
A tool may be a function or a class. Each tool does a specific thing
73+
well.
12174
:::
12275

12376

124-
<!--
125-
:::{admonition} TODOS
126-
:class: todo
127-
TODOs:
128-
* Create a nice graphic for this landing page that introduces the pieces of a python package and also how these tutorials are organized ... maybe even that step box diagram?
129-
130-
- sometimes people might start by creating a new repo and cloning it.
131-
* It would be good to have them add development requirements up front in their pyproject.toml file
132-
* Other times they might start by working locally and then pushing the repo content to github / gitlab. in any case the readme and license lessons may or may not be relevant. so we should have a pregame for setting up a fresh repo, creating an initial .gitignore, readme and license. and then link to the chose a license lesson.
133-
134-
::: -->
135-
136-
13777
## The elements of a Python package
13878

13979
:::{figure-md} package-components
@@ -204,12 +144,6 @@ Integrated CI/CD will help you maintain your software ensuing that changes to t
204144
The lifecycle of a scientific Python package.
205145
:::
206146

207-
<!-- >then in the publish section below we can add the arrow with that structure being
208-
>built into distributions that get published on PyPI and conda...
209-
210-
>then in the community part we add another section that is the github repo with users contributing... very simple diagrams... -->
211-
212-
213147
```{toctree}
214148
:hidden:
215149
:caption: Pre game
@@ -223,16 +157,16 @@ extras/*
223157

224158
Ideally the code in your Python package is general. This means it
225159
can be used on different data or for different scientific applications. An example
226-
of a package that is written in a generalized way is `matplotlib`.
160+
of a package that is written in a generalized way is matplotlib.
227161

228-
`matplotlib` does
162+
matplotlib does
229163
one (big important) thing really well:
230164

231165
*It creates visual plots of data.*
232166

233-
`Matplotlib` is used by thousands of users for different plotting applications
167+
Matplotlib is used by thousands of users for different plotting applications
234168
using different types of data. While few scientific packages will have the same
235-
broad application as tools like `matplotlib` or `numpy`, the
169+
broad application as tools like matplotlib or NumPy, the
236170
idea of code being used for something more than a single workflow still applies
237171
to package development if you want other people to use your package.
238172

@@ -272,12 +206,12 @@ which supports a specific project.
272206
### Python packages and environments
273207

274208
A Python package can be installed into a Python environment in the same way
275-
you might install `numpy` or `pandas`. Installing your package into an environment
209+
you might install NumPy or pandas. Installing your package into an environment
276210
allows you to access it from any code run with that specific Python environment activated.
277211

278212
:::{figure-md} packages-environment
279213

280-
<img src="../images/tutorials/environment-package-install.png" alt="Diagram showing the steps associated with creating a package and then installing it. The first arrow says your package and the second says pip install package. The second arrow leads to a box that represents a python environment that already has some packages installed such as pandas and numpy. Your package will also get installed into that same environment when you pip install it." width="700px">
214+
<img src="../images/tutorials/environment-package-install.png" alt="Diagram showing the steps associated with creating a package and then installing it. The first arrow says your package and the second says pip install package. The second arrow leads to a box that represents a python environment that already has some packages installed such as pandas and NumPy. Your package will also get installed into that same environment when you pip install it." width="700px">
281215

282216
You don't have to publish to PyPI in order to make your code installable.
283217
WIth the correct file structure and project metadata you can make your code

0 commit comments

Comments
 (0)