Skip to content

Commit 81ea657

Browse files
authored
Merge branch 'main' into unique-package-name
2 parents 4b7f1e9 + e2c4978 commit 81ea657

File tree

10 files changed

+115
-23
lines changed

10 files changed

+115
-23
lines changed

.all-contributorsrc

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,76 @@
533533
"code",
534534
"review"
535535
]
536+
},
537+
{
538+
"login": "kenseehart",
539+
"name": "Ken Seehart",
540+
"avatar_url": "https://avatars.githubusercontent.com/u/612119?v=4",
541+
"profile": "https://github.com/kenseehart",
542+
"contributions": [
543+
"code",
544+
"review"
545+
]
546+
},
547+
{
548+
"login": "ryanskeith",
549+
"name": "Ryan",
550+
"avatar_url": "https://avatars.githubusercontent.com/u/657220?v=4",
551+
"profile": "https://github.com/ryanskeith",
552+
"contributions": [
553+
"code",
554+
"review"
555+
]
556+
},
557+
{
558+
"login": "pb-413",
559+
"name": "Patrick Byers",
560+
"avatar_url": "https://avatars.githubusercontent.com/u/36516871?v=4",
561+
"profile": "https://github.com/pb-413",
562+
"contributions": [
563+
"code",
564+
"review"
565+
]
566+
},
567+
{
568+
"login": "sosey",
569+
"name": "Megan Sosey",
570+
"avatar_url": "https://avatars.githubusercontent.com/u/503615?v=4",
571+
"profile": "http://www.stsci.edu/",
572+
"contributions": [
573+
"code",
574+
"review"
575+
]
576+
},
577+
{
578+
"login": "BSuperbad",
579+
"name": "Brianne Wilhelmi",
580+
"avatar_url": "https://avatars.githubusercontent.com/u/100496041?v=4",
581+
"profile": "https://github.com/BSuperbad",
582+
"contributions": [
583+
"code",
584+
"review"
585+
]
586+
},
587+
{
588+
"login": "chenghlee",
589+
"name": "Cheng H. Lee",
590+
"avatar_url": "https://avatars.githubusercontent.com/u/3485949?v=4",
591+
"profile": "https://github.com/chenghlee",
592+
"contributions": [
593+
"code",
594+
"review"
595+
]
596+
},
597+
{
598+
"login": "Vaunty",
599+
"name": "Vaunty",
600+
"avatar_url": "https://avatars.githubusercontent.com/u/68826427?v=4",
601+
"profile": "https://github.com/Vaunty",
602+
"contributions": [
603+
"code",
604+
"review"
605+
]
536606
}
537607
],
538608
"contributorsPerLine": 7,

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# <img src="https://www.pyopensci.org/images/logo.png" width=100 /> pyOpenSci scientific Python Packaging Guide
22
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
3-
[![All Contributors](https://img.shields.io/badge/all_contributors-51-orange.svg?style=flat-square)](#contributors-)
3+
[![All Contributors](https://img.shields.io/badge/all_contributors-58-orange.svg?style=flat-square)](#contributors-)
44
<!-- ALL-CONTRIBUTORS-BADGE:END -->
55

66
![GitHub release (latest by date)](https://img.shields.io/github/v/release/pyopensci/python-package-guide?color=purple&display_name=tag&style=plastic)
@@ -140,6 +140,15 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
140140
<tr>
141141
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/tylerjbonnell/"><img src="https://avatars.githubusercontent.com/u/89505514?v=4?s=100" width="100px;" alt="Tyler Bonnell"/><br /><sub><b>Tyler Bonnell</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=Tyler-Bonnell" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3ATyler-Bonnell" title="Reviewed Pull Requests">👀</a></td>
142142
<td align="center" valign="top" width="14.28%"><a href="http://www.linkedin.com/pub/pat-tressel/2/b6/610"><img src="https://avatars.githubusercontent.com/u/618916?v=4?s=100" width="100px;" alt="Pat Tressel"/><br /><sub><b>Pat Tressel</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=ptressel" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Aptressel" title="Reviewed Pull Requests">👀</a></td>
143+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/kenseehart"><img src="https://avatars.githubusercontent.com/u/612119?v=4?s=100" width="100px;" alt="Ken Seehart"/><br /><sub><b>Ken Seehart</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=kenseehart" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Akenseehart" title="Reviewed Pull Requests">👀</a></td>
144+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ryanskeith"><img src="https://avatars.githubusercontent.com/u/657220?v=4?s=100" width="100px;" alt="Ryan"/><br /><sub><b>Ryan</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=ryanskeith" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Aryanskeith" title="Reviewed Pull Requests">👀</a></td>
145+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/pb-413"><img src="https://avatars.githubusercontent.com/u/36516871?v=4?s=100" width="100px;" alt="Patrick Byers"/><br /><sub><b>Patrick Byers</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=pb-413" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Apb-413" title="Reviewed Pull Requests">👀</a></td>
146+
<td align="center" valign="top" width="14.28%"><a href="http://www.stsci.edu/"><img src="https://avatars.githubusercontent.com/u/503615?v=4?s=100" width="100px;" alt="Megan Sosey"/><br /><sub><b>Megan Sosey</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=sosey" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Asosey" title="Reviewed Pull Requests">👀</a></td>
147+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/BSuperbad"><img src="https://avatars.githubusercontent.com/u/100496041?v=4?s=100" width="100px;" alt="Brianne Wilhelmi"/><br /><sub><b>Brianne Wilhelmi</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=BSuperbad" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3ABSuperbad" title="Reviewed Pull Requests">👀</a></td>
148+
</tr>
149+
<tr>
150+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/chenghlee"><img src="https://avatars.githubusercontent.com/u/3485949?v=4?s=100" width="100px;" alt="Cheng H. Lee"/><br /><sub><b>Cheng H. Lee</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=chenghlee" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3Achenghlee" title="Reviewed Pull Requests">👀</a></td>
151+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Vaunty"><img src="https://avatars.githubusercontent.com/u/68826427?v=4?s=100" width="100px;" alt="Vaunty"/><br /><sub><b>Vaunty</b></sub></a><br /><a href="https://github.com/pyOpenSci/python-package-guide/commits?author=Vaunty" title="Code">💻</a> <a href="https://github.com/pyOpenSci/python-package-guide/pulls?q=is%3Apr+reviewed-by%3AVaunty" title="Reviewed Pull Requests">👀</a></td>
143152
</tr>
144153
</tbody>
145154
</table>

documentation/repository-files/readme-file-best-practices.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sees before they install your package.
66

77
The README.md file is the landing page of:
88

9-
* Your package as it appears on a repository site such as PyPI or Anaconda
9+
* Your package as it appears on a repository site such as PyPI or Anaconda.org
1010
* Your package's GitHub repository
1111

1212
Your README.md file is also used as a measure of package and community
@@ -68,7 +68,7 @@ README file for others to quickly browse.
6868

6969
Some badges that you might consider adding to your README file include:
7070

71-
* Current version of the package on PyPI / Anaconda Cloud
71+
* Current version of the package on PyPI / Anaconda.org
7272

7373
Example: [![PyPI version shields.io](https://img.shields.io/pypi/v/pandera.svg)](https://pypi.org/project/pandera/)
7474

@@ -114,7 +114,7 @@ file.
114114
### ✔️ Installation instructions
115115

116116
Include instructions for installing your package. If you have published
117-
the package on both PyPI and Anaconda Cloud be sure to include instructions for both.
117+
the package on both PyPI and Anaconda.org, be sure to include instructions for both.
118118

119119
### ✔️ Document any additional setup required
120120

package-structure-code/publish-python-package-pypi-conda.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Publishing Your Package In A Community Repository: PyPI or Anaconda Cloud
1+
# Publishing Your Package In A Community Repository: PyPI or Anaconda.org
22

33
<!--todo: add as resource https://docs.conda.io/projects/conda/en/latest/glossary.html -->
44

55
pyOpenSci requires that your package has an distribution that can be installed
66
from a public community repository such as PyPI or a conda channel such as
7-
`bioconda` or `conda-forge` in the Anaconda cloud.
7+
`bioconda` or `conda-forge` on Anaconda.org.
88

99
Below you will learn more about the various publishing options for your Python
1010
package.
@@ -13,7 +13,7 @@ package.
1313

1414
* Installing packages in the same environment using both pip and conda can
1515
lead to package conflicts.
16-
* To minimize conflicts for users who may be using conda (or pip) to manage local environments, consider publishing your package to both PyPI and the conda-forge channel of the Anaconda Cloud.
16+
* To minimize conflicts for users who may be using conda (or pip) to manage local environments, consider publishing your package to both PyPI and the conda-forge channel on Anaconda.org.
1717

1818
Below you will learn more specifics about the differences between PyPI and conda publishing of your Python package.
1919
:::
@@ -57,13 +57,13 @@ your package.
5757
:::
5858

5959
(about-conda)=
60-
## What is Anaconda Cloud and conda?
60+
## What is conda and Anaconda.org?
6161

6262
conda is an open source package and environment management tool.
63-
conda can be used to install tools from the [Anaconda Cloud
63+
conda can be used to install tools from the [Anaconda
6464
repository](https://repo.anaconda.com/).
6565

66-
Anaconda cloud (anaconda.org) contains public and private repositories for
66+
Anaconda.org contains public and private repositories for
6767
packages. These repositories are known as channels (discussed below).
6868

6969
:::{admonition} A brief history of conda's evolution
@@ -95,12 +95,12 @@ channels. The conda package manager can install packages from different channels
9595
There are several core public channels that most people use to install
9696
packages using conda, including:
9797

98-
- **defaults:** this is a channel managed by Anaconda. It is the version of the Python packages that you will install if you install the Anaconda Distribution. Anaconda decides what packages live on the default channel.
98+
- **defaults:** this is a channel managed by Anaconda. It is the version of the Python packages that you will install if you install the Anaconda Distribution. Anaconda (the company) decides what packages live on the `defaults` channel.
9999
- [**conda-forge:**](https://anaconda.org/conda-forge) this is a community-driven channel that focuses on scientific packages. This channel is ideal for tools that support geospatial data. Anyone can publish a package to this channel.
100100
- [**bioconda**](https://anaconda.org/bioconda): this channel focuses on biomedical tools.
101101

102102
**conda-forge** emerged as many of the scientific packages did not
103-
exist in the default Anaconda cloud channel.
103+
exist in the `defaults` Anaconda channel.
104104

105105
:::{figure-md} pypi-conda-channels
106106

package-structure-code/python-package-structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ If your package tests require data, we suggest that you do NOT include that
147147
data within your package structure. We will discuss this in more detail in a
148148
tutorial. Include data in your package structure increases the size of your
149149
distribution files. This places a maintenance toll on repositories like PyPI and
150-
anaconda cloud that have to deal with thousands of package uploads.
150+
Anaconda.org that have to deal with thousands of package uploads.
151151
```
152152

153153
## About the flat Python package layout

tutorials/get-to-know-hatch.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ To open the config file in your file browser, run the following command in your
4444

4545
This will open up a directory window that will allow you to double click on the file and open it in your favorite text editor.
4646

47+
You can also retrieve the location of the Hatch config file by running the following command in your shell:
48+
49+
```bash
50+
hatch config find
51+
# hatch config --help will show you all the options for config.
52+
```
53+
4754
### Step 2 - update your email and name
4855

4956
Once the file is open, update the [template] table of the `config.toml` file with your name and email. This information will be used in any `pyproject.toml` metadata files that you create using Hatch.

tutorials/intro.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ understanding the steps involved in creating a Python package.
2929
:caption: Python Packaging Tutorial Setup
3030

3131
Get to know Hatch <get-to-know-hatch>
32-
Migrate setup.py to a pyproject.toml using Hatch <setup-py-to-pyproject-toml>
3332
:::
3433

3534
:::{toctree}
@@ -51,6 +50,13 @@ Add a license & code of conduct <add-license-coc>
5150
Update metadata in pyproject.toml <pyproject-toml>
5251
:::
5352

53+
:::{toctree}
54+
:hidden:
55+
:caption: Hatch for Existing Packages
56+
57+
Migrate setup.py to a pyproject.toml using Hatch <setup-py-to-pyproject-toml>
58+
:::
59+
5460
:::{admonition} Learning Objectives
5561

5662
This lesson introduces you to the basic components of a Python package.

tutorials/publish-conda-forge.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ Once you have published both package distributions (the source distribution and
3838
## What is conda-forge?
3939

4040
conda is an open source package and environment management tool that
41-
can be used to install tools from the different channels within the Anaconda Cloud repository.
41+
can be used to install tools from the different channels on Anaconda.org.
4242

43-
You can think about a channel as a specific location where a group of packages are stored and can be installed from using a command such as `conda install packagename`. In the case of the Anaconda cloud channels, some of these channels such as the default channel, is managed by Anaconda (the company). Only Anaconda can decide what packages are available in the default channel. However, the conda-forge (and bioconda) channel are community-managed channels.
43+
You can think about a channel as a specific location where a group of packages are stored and can be installed from using a command such as `conda install packagename`. In the case of conda channels, some of these channels such as the `defaults` channel, is managed by Anaconda (the company). Only Anaconda can decide what packages are available in the `defaults` channel. However, the conda-forge (and bioconda) channel are community-managed channels.
4444
Anyone can submit a package to these channels however they must pass a technical review in the [staged-recipes GitHub repository](https://github.com/conda-forge/staged-recipes) to be published.
4545

4646
[Learn more about conda channels here.](#about-conda)

tutorials/publish-pypi.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ To build your package run `hatch build`:
160160
```bash
161161
➜ hatch build
162162
──────────────── sdist ─────────────────
163-
dist/pyospackage-0.1.0.tar.gz
163+
dist/pyospackage-0.1.tar.gz
164164
──────────────── wheel ─────────────────
165-
dist/pyospackage-0.1.0-py3-none-any.whl
165+
dist/pyospackage-0.1-py3-none-any.whl
166166

167167
```
168168

@@ -178,9 +178,9 @@ your package to conda-forge](publish-conda-forge). You will learn about this in
178178
:::{todo}
179179
➜ hatch build
180180
────────────────────────────────────── sdist ──────────────────────────────────────
181-
dist/pyospackage-0.1.0.tar.gz
181+
dist/pyospackage-0.1.tar.gz
182182
────────────────────────────────────── wheel ──────────────────────────────────────
183-
dist/pyospackage-0.1.0-py3-none-any.whl
183+
dist/pyospackage-0.1-py3-none-any.whl
184184
:::
185185

186186
### <i class="fa-solid fa-wand-magic-sparkles"></i> Congratulations - you've created your Python package distribution files <i class="fa-solid fa-wand-magic-sparkles"></i>
@@ -280,8 +280,8 @@ TestPyPI.
280280
❯ hatch publish -r test
281281
Enter your username: __token__
282282
Enter your credentials: <paste-your-token-value-here>
283-
dist/pyospackage-0.1.0-py3-none-any.whl ... already exists
284-
dist/pyospackage-0.1.0.tar.gz ... already exists
283+
dist/pyospackage-0.1-py3-none-any.whl ... already exists
284+
dist/pyospackage-0.1.tar.gz ... already exists
285285

286286
```
287287

tutorials/pyproject-toml.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ You are now ready to publish a new version of your Python package to (test) PyPI
688688
Try to republish now.
689689

690690
First, update the version of your package in your pyproject toml file. Below version is updated from
691-
`0.1.0` to `0.1.1`.
691+
`0.1` to `0.1.1`.
692692

693693
```TOML
694694
[build-system]

0 commit comments

Comments
 (0)