Poetry: `readme` is not required in pyproject.toml, but docs say it is

Created on 19 Jun 2018  路  10Comments  路  Source: python-poetry/poetry

The docs say that the readme key is required:

readme

The readme file of the package. Required

The file can be either README.rst or README.md.

but poetry check works just fine without any mention of the readme in pyproject.toml.

Most helpful comment

Should we close this since #242 got merged in? The "Closes #237" text on there didn't trigger an automatic close here because develop is not the default branch.

@sdispater - FWIW, I think it will be confusing to have people submit PRs against different branches depending on the type of change. If possible, I recommend having one branch to land incoming changes and making it the default branch. That will address issues like the one here.

All 10 comments

I'll try to make a PR handling this

Does it have to be required, though? Perhaps the docs should be changed instead.

Yeah, I thought about it as well and came to the conclusion that having a README is a good practice, so there is nothing wrong with poetry enforcing it. Also, since it was required in the docs, I guess that was @sdispater initial intention, so I thought that firstly we can bring repo to this intended state and eventually changed it from there :)

If it's going to be required, I think it should also be added to the pyproject.toml generated by poetry new (and probably poetry init too).

@tadeoos Well, if it's good practice it should be recommended, not _required_.

the pep 345 makes it optional :
https://www.python.org/dev/peps/pep-0345/#description-optional

You guys are right, I made a new PR with docs update.
Thanks!

poetry new creates a new README.rst but doesn't add it to the pyproject.toml. That could be changed as well, right?
(I also think it should default to markdown, but that's arguable)

I think this should be mandatory when you publish (so most of the time when you build a library) but not required when you build an application.

There is not this distinction yet in poetry but that's somathing worth considering in a near future.

Should we close this since #242 got merged in? The "Closes #237" text on there didn't trigger an automatic close here because develop is not the default branch.

@sdispater - FWIW, I think it will be confusing to have people submit PRs against different branches depending on the type of change. If possible, I recommend having one branch to land incoming changes and making it the default branch. That will address issues like the one here.

Was this page helpful?
0 / 5 - 0 ratings