question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow configuration via pyproject.toml

See original GitHub issue

Originally 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:closed
  • Created 5 years ago
  • Reactions:31
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

15reactions
nedbatcommented, Jun 23, 2018

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.

12reactions
nedbatcommented, Nov 11, 2019

This is available in 5.0b1: https://pypi.org/project/coverage/5.0b1/

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found