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

Migrated README to Markdown (PEP 566) #66

Merged
merged 3 commits into from
Apr 2, 2018
Merged

Migrated README to Markdown (PEP 566) #66

merged 3 commits into from
Apr 2, 2018

Conversation

9999years
Copy link

@9999years 9999years commented Mar 17, 2018

Migrated README.rst to README.md and updated setup.py to match;
this is in line with PEP 566 and the new long_description_content_type
arg in setuptools.

Also updated MANIFEST.in to include the new README.md with include *.md as suggested by check-manifest — is that the right way to do that?

See also:

Migrated `README.rst` to `README.md` and updated `setup.py` to match;
this is in line with PEP 566 and the new long_description_content_type
arg in setuptools.

Also updated `MANIFEST.in` to include the new `README.md`.

See:

 * [Relevant section in PEP 566](https://www.python.org/dev/peps/pep-0566/#description-content-type-optional)
 * [The CommonMark specification](http://spec.commonmark.org)
 * [The Description-Content-Type field documentation in the Python
   packaging documentation](https://packaging.python.org/specifications/core-metadata/#description-content-type-optional)
setup.py Outdated
#
# This field corresponds to the "Description-Content-Type" metadata field:
# https://packaging.python.org/specifications/core-metadata/#description-content-type-optional
long_description_content_type='text/markdown', # Optional
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to add a note here that while this field is technically optional, it's required if you want a Markdown long_description.

@9999years
Copy link
Author

Added a comment to clarify:

Optional if long_description is written in RST but required for plain-text or Markdown; if unspecified, "applications should attempt to render [the long_description] as text/x-rst; charset=UTF-8 and fall back to text/plain if it is not valid rst" (link)

setup.py Outdated
# plain-text or Markdown; if unspecified, "applications should attempt to
# render [the long_description] as text/x-rst; charset=UTF-8 and fall back
# to text/plain if it is not valid rst" (see link below)
#
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is in the wrong place, it should be below long_description_content_type=....

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, noticed just after pushing. Should be updated now.

Added a comment clarifying that `long_description_content_type` in `setup()`
is only optional if the `long_description` is written in RST and a quote
from relevant documentation.
Copy link
Member

@di di left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small changes, otherwise this LGTM.

README.md Outdated
# A sample Python project

A sample project that exists as an aid to the [Python Packaging User
Guide][packaging guide]’s [Tutorial on Packaging and Distributing
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you replace the character with ' here?

README.md Outdated
Guide][packaging guide]’s [Tutorial on Packaging and Distributing
Projects][distribution tutorial].

This projects does not aim to cover best practices for Python project
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a typo here that's not your fault, should be "this project".

setup.py Outdated
# Denotes that our long_description is in Markdown; valid values are
# text/plain, text/x-rst, and text/markdown
#
# Optional if long_description is written in rst but required for
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change rst here to reStructuredText? Since newcomers might not know what "rst" stands for.

setup.py Outdated
#
# This field corresponds to the "Description-Content-Type" metadata field:
# https://packaging.python.org/specifications/core-metadata/#description-content-type-optional
long_description_content_type='text/markdown', # Optional
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe change # Optional here to # Optional (see note above)?

* Changed true quotes to ASCII quotes in `README.md`
* Fixed a typo (`This projects` instead of `This project`) in
  `README.md`
* Changed `rst` to `reStructuredText (rst)` in `setup.py` for
  people who might not be familiar with the format
* Added small note to `# Optional` comment on the
  `long_description_content_type` arg in `setup.py:L70`
@9999years
Copy link
Author

OK, fixed.

Copy link
Member

@di di left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! I'm going to hold off on merging this until pypi/warehouse#869 is closed.

@9999years
Copy link
Author

Can we get this merged now that pypi/warehouse#869 is closed?
Thanks!

@di di merged commit c64cc7d into pypa:master Apr 2, 2018
@di
Copy link
Member

di commented Apr 2, 2018

Thanks @9999years!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants