Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc updates for pyproject.toml and instructions for pypi #480

Merged
merged 4 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,5 @@ please :doc:`/source/contact`
practices/issue_pr_templating
practices/sphinx
practices/publishing_package
practices/customizing_project

23 changes: 23 additions & 0 deletions docs/practices/customizing_project.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Configuration with pyproject.toml
===============================================================================

What is it? Why do it?
-------------------------------------------------------------------------------

The ``pyproject.toml`` file is used to define many different project configurations.
It replaces the need for setup.py, requirements.txt, and other configuration files.

A fundamental use for ``pyproject.toml`` is to define dependencies. You should
make an effort to add all the required dependencies to the ``[dependencies]``
section of the file.
drewoldag marked this conversation as resolved.
Show resolved Hide resolved

In addition to dependencies, ``pyproject.toml`` centralizes the project's
configuration and makes it easier to manage. If you examine your ``pyproject.toml``
file, you'll see sections with titles like ``[tool.<blah>]``. These sections are
used to configure tools that are used in the project that would otherwise require
their own configuration files.

A ``pyproject.toml`` file provides a vast number of customization options well
beyond what can be covered here. For an in-depth look at how the file can be used
and how it compares to the older ``setup.py`` checkout the
`Python Packaging User Guide <https://packaging.python.org/en/latest/guides/writing-pyproject-toml/>`_.
7 changes: 5 additions & 2 deletions docs/practices/pypi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ To support this, you'll need to configure your repository.

* For previously unpublished packages: https://docs.pypi.org/trusted-publishers/creating-a-project-through-oidc/
* For existing published packaged: https://docs.pypi.org/trusted-publishers/adding-a-publisher/

* When configuring your trusted publisher, the value to use for the "Workflow name" is "publish-to-pypi.yml".

* When configuring your trusted publisher

* Set the value of "Workflow name" to "publish-to-pypi.yml".
* Leave the value of "Environment name" blank.


Releasing new versions
Expand Down