Skip to content

Commit

Permalink
Add section on configuring PyPI to the user guide (#205)
Browse files Browse the repository at this point in the history
- Make page title consistent with the others
- Rename markdown file to match the page title
- Add section about configuring PyPi to the user guide
- Update release notes
  • Loading branch information
llucax authored Dec 27, 2023
2 parents 711ac38 + 56e4ed3 commit c82454d
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 1 deletion.
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ You can follow these steps to upgrade without regenerating the whole project, if
- New GitHub rulesets are provided with the recommended configuration to protect branches and tags.
- The documentation is restructured into a more organized, easier-to-navigate user guide.
- Documentation on how to configure the GitHub project and PyPI package is now provided.
### Cookiecutter template
Expand Down
51 changes: 51 additions & 0 deletions docs/user-guide/start-a-new-project/configure-pypi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Configure PyPI

## Configure a trusted publisher

Before a package can be published to [PyPI] after a release, a trusted
publisher needs to be configured.

!!! Note

You need a [PyPI] account to do this. You can
[register](https://pypi.org/account/register/) for free.

1. [Log-in](https://pypi.org/account/login/) to [PyPI].

2. Go to the [Publishing](https://pypi.org/manage/account/publishing/) section
of your account.

3. Scroll down to the section **Add a new pending publisher**, and fill in the fields.

* **PyPI Project Name:** The name of the package you want to publish.
Usually is the same as the [GitHub] repository name, removing the `-python`
suffix if any.

* **Owner:** The [GitHub] username/organization of the owner of the package.
For Frequenz projects this is `frequenz-floss`.

* **Repository name:** The name of the [GitHub] repository of the package.

* **Workflow name:** `ci.yaml`.

* **Environment name:** Leave empty.

4. Click on `Add`.

5. Now uploading the new package from [GitHub] should work.

6. After the new package was uploaded / created.

1. Invite other maintainers to co-maintain the new package.

1. Go to your account [Projects](https://pypi.org/manage/projects/).
2. Click on **Manage** for the new package.
3. Click on **Collaborators**.
4. Scroll down to the section **Invite collaborator**.
5. Fill in the **Username** and the appropriate **Role** for the new
collaborator.
6. Click on **Add**.
7. Repeat steps to add more collaborators.

[PyPI]: https://pypi.org/
[GitHub]: https://github.com/
2 changes: 1 addition & 1 deletion docs/user-guide/start-a-new-project/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Starting a new project
# Start a new project

## Install Cookiecutter

Expand Down

0 comments on commit c82454d

Please sign in to comment.