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

README in markdown instead of .rst? #24

Closed
darribas opened this issue Dec 16, 2018 · 4 comments
Closed

README in markdown instead of .rst? #24

darribas opened this issue Dec 16, 2018 · 4 comments

Comments

@darribas
Copy link
Member

While working on the Notebooks book project, I've realised that the README file for this project is structured in .rst. Is there a reason for this? If not, would it be possible to convert it markdown? I'm currently converting with pandoc but would probably be better to be consistent across de federation?

@weikang9009
Copy link
Member

I do not think there is a specific reason for only having the README file in .rst. But if .md is preferred in the notebooks book project and the meta package building, it makes sense to convert README.rst to .md. I also think it might make sense to require README.md in pysal submodules and list it in the submodule-contract since other packages such as spreg has README.rst only as well. Would it also be reasonable to require README.md only in submodules as README.rst seems to be just a duplicate in most pysal packages which have both files (e.g. spaghetti, giddy)?

@sjsrey
Copy link
Member

sjsrey commented Dec 17, 2018

If my memory is correct, I think there are issues with the listing on pypi for packages, and my guess is that is why we had rst and md in some cases?

@weikang9009
Copy link
Member

Based on the latest Python Packaging User Guide, it seems that we can set the parameterlong_description_content_type to be 'text/markdown' in setup() to use the content of README.md for the package long_description:

from setuptools import setup

# read the contents of your README file
from os import path
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
    long_description = f.read()

setup(
    name='an_example_package',
    # other arguments omitted
    long_description=long_description,
    long_description_content_type='text/markdown'
)

weikang9009 added a commit to weikang9009/pointpats that referenced this issue Dec 27, 2018
darribas added a commit that referenced this issue Dec 28, 2018
add README.md to resolve issue #24
@darribas
Copy link
Member Author

Closed as addressed in #26

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

No branches or pull requests

3 participants