Allow configuration via pyproject.toml
See original GitHub issueOriginally reported by pradyunsg (Bitbucket: pradyunsg, GitHub: pradyunsg)
As per PEP 518, tools can use tool.<pypi-name>
namespace within the pyproject.toml
file if they own <pypi-name>
on PyPI.
Allowing configuration via the above mechanism would allow for users to have a single file in their root directory, for configuring this coverage
(and other tools) for their project. Essentially, this would allow eliminating a .coveragerc
file in the root of the project in favor of using pyproject.toml
.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:31
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Configuring setuptools using pyproject.toml files
from setuptools import setup setup(). Starting with PEP 621, the Python community selected pyproject.toml as a standard way of specifying project metadata.
Read more >Allow configuration using pyproject.toml · Issue #537 - GitHub
Using pyproject.toml for per-project settings moves in the direction of being the preferred default. For simplicity, it should just work (i.e., ...
Read more >A Practical Guide to Setuptools and Pyproject.toml
An example driven guide to setting up and building a python package using Setuptools together with pyproject.toml.
Read more >The pyproject.toml file | Documentation | Poetry
Using packages disables the package auto-detection feature meaning you have to explicitly specify the “default” package. For instance, if you have a package ......
Read more >Using Black with other tools - Black 22.12.0 documentation
Please note that Black only supports the TOML file format for its configuration (e.g. pyproject.toml ). The provided examples are to only configure...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is a good idea. One twist: coverage.py has no required dependencies. It will need a toml parser to parse the pyproject.toml file. My inclination is to implement this so that if the toml module is available, then coverage will try to read the pyproject.toml file. Installing coverage won’t install toml automatically, you’ll have to do that yourself if you want to use pyproject.toml for configuration.
This is available in 5.0b1: https://pypi.org/project/coverage/5.0b1/