Skip to content

Commit da47da3

Browse files
lwasserucodery
andauthored
Fix: Edits from @ucodery
Co-authored-by: Jeremy Paige <ucodery@gmail.com>
1 parent 2db0662 commit da47da3

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

tutorials/publish-pypi.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ Behind the scenes when hatch creates a new virtual environment,
155155
by default it uses venv[^venv].
156156

157157
hatch will:
158-
1. Creates a new virtualenv (venv). That is located on your computer. You can customize the location of this environment if you wish ....<where??>
159-
2. Installs your package into the environment in editable mode (similar to `pip install -e`). This means it installs both your project and your project's dependencies as declared in your pyproject.toml file.
158+
1. Create a new virtualenv (venv) that is located on your computer. You can customize the location of this environment if you wish ....<where??>
159+
2. Install your package into the environment in editable mode (similar to `pip install -e`). This means it installs both your project and your project's dependencies as declared in your pyproject.toml file.
160160

161161
## Step 2: Build your package's sdist and wheel distributions
162162

@@ -204,15 +204,15 @@ dist/pyospackage-0.1.0-py3-none-any.whl
204204
You've now built your Python package and created your package distribution files. The next step is to setup
205205
your account on PyPI so you can publish your package.
206206

207-
## Step 3. Setup your testPyPI account
207+
## Step 3. Setup your test PyPI account
208208

209-
Next, you'll setup an account on `testPyPI`. Remember that you
210-
are using testPyPI here instead of the real PyPI as a way to
209+
Next, you'll setup an account on test PyPI. Remember that you
210+
are using test PyPI here instead of the real PyPI as a way to
211211
safely learn how to publish a package without stressing the
212212
real PyPI's servers.
213213

214214
:::{admonition} Test vs. real PyPI
215-
If you have a package that you are confident belongs on the real PyPI. All of the steps below will also work for you with slight modifications which will be noted below.
215+
If you have a package that you are confident belongs on the real PyPI, all of the steps below will also work for you if you replace test.pypi.org with pypi.org wherever it appears.
216216
:::
217217

218218
1. [Open up a web browser and go to the test PyPI website](https://test.pypi.org/).
@@ -230,10 +230,10 @@ Show them how to do this
230230
:::
231231

232232
:::{figure-md} build-workflow-tutorial
233-
<img src="../images/tutorials/testpypi-search.png" alt="This is a screenshot of the test PyPI website. At the top in the search bar, you can see the search for pyosPackage. The search return says there were no results for pyosPackage Did you mean probpackage" width="700px">
233+
<img src="../images/tutorials/testpypi-search.png" alt="This is a screenshot of the test PyPI website. At the top in the search bar, you can see the search for pyosPackage. The search return says there were no results for pyosPackage Did you mean probpackage" width="700px">
234234

235-
Before you try to upload to (test) PyPI, check to see if the name of your package is already taken. You can do that using
236-
the search box at the top of the (test) PyPI website.
235+
Before you try to upload to test PyPI, check to see if the name of your package is already taken. You can do that using
236+
the search box at the top of the test PyPI website.
237237
:::
238238

239239

@@ -262,7 +262,7 @@ It's ideal to create a package-specific token. When you create an account wide t
262262

263263
### Follow the steps below to create your token.
264264

265-
* Login to testPyPI and go to your account settings
265+
* Login to test PyPI and go to your account settings
266266
* Scroll down to the **API tokens** section
267267
* Click on the **Add API Token** button
268268
* If you are new to using PyPI and don't have any packages there yet, OR if you have other packages on PyPI but are uploading a new package, you will need to create an account-wide token.
@@ -276,8 +276,6 @@ It's ideal to create a package-specific token. When you create an account wide t
276276
Once you have the token in a safe place, you are ready to publish to
277277
PyPI.
278278

279-
1. Set your username to `__token__`
280-
1. Set your password to the token value, including the `pypi-` prefix
281279

282280
Your token should look something like this:
283281

@@ -299,24 +297,24 @@ dist/pyospackage-0.1.0.tar.gz ... already exists
299297

300298
```
301299

302-
If your credentials are value, Hatch will publish your package to test-PyPI.
300+
If your credentials are valid, Hatch will publish your package to test PyPI.
303301

304302
Hatch also has a caching system so once you enter your credentials it will remember them.
305303

306-
## Install your package from TestPyPI
304+
## Install your package from test PyPI
307305

308306
Once your package upload is complete, you can install it from
309-
testPYPI. You can find the installation instructions on the testPyPI
307+
test PYPI. You can find the installation instructions on the test PyPI
310308
landing page for your newly uploaded package.
311309

312310
:::{figure-md} testpypi-landing-page
313-
<img src="../images/tutorials/test-pypi-package.png" alt="A screenshot of the testPyPI page for pyosPackage. It says pyosPackage 0.1.0 at the top with the pip install instructions below. The landing page of the package has information from the package's readme file. " width="700px">
311+
<img src="../images/tutorials/test-pypi-package.png" alt="A screenshot of the test PyPI page for pyosPackage. It says pyosPackage 0.1.0 at the top with the pip install instructions below. The landing page of the package has information from the package's readme file. " width="700px">
314312

315-
This is an example landing page for the pyosPackage that was just uploaded. Notice at the top of the page there is instructions for how to install the package from test PyPI. You can simply copy that code and use it to install your package from testPyPi locally.
313+
This is an example landing page for the pyosPackage that was just uploaded. Notice at the top of the page there is instruction for how to install the package from test PyPI. You can simply copy that code and use it to install your package from testPyPi locally.
316314
:::
317315

318316

319-
As an example, [check out our pyOpenSci pyosPackage landing page on testPyPI](https://test.pypi.org/project/pyosPackage/). Notice the page has information about the current package version and also installation instructions as follows:
317+
As an example, [check out our pyOpenSci pyosPackage landing page on test PyPI](https://test.pypi.org/project/pyosPackage/). Notice the page has information about the current package version and also installation instructions as follows:
320318

321319
`pip install -i https://test.pypi.org/simple/ pyosPackage`
322320

0 commit comments

Comments
 (0)