Skip to content

Commit

Permalink
Merge pull request #318 from CamDavidsonPilon/rst-readme
Browse files Browse the repository at this point in the history
update setup.py to convert the md README to rst
  • Loading branch information
CamDavidsonPilon committed Jul 19, 2017
2 parents 31779e4 + c3c105c commit 466b247
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 104 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![logo](http://i.imgur.com/EOowdSD.png)
![](http://i.imgur.com/EOowdSD.png)

[![PyPI version](https://badge.fury.io/py/lifelines.svg)](https://badge.fury.io/py/lifelines)
[![Build Status](https://travis-ci.org/CamDavidsonPilon/lifelines.svg?branch=master)](https://travis-ci.org/CamDavidsonPilon/lifelines)
Expand Down Expand Up @@ -48,12 +48,14 @@ You can optionally run the test suite after install with
py.test


### *lifelines* Documentation and an Intro to Survival Analysis
### lifelines Documentation and an intro to survival analysis

If you are new to survival analysis, wondering why it is useful, or are interested in *lifelines* examples and syntax,
please check out the [Documentation and Tutorials page](http://lifelines.readthedocs.org/en/latest/index.html)

Also around on [Gitter](https://gitter.im/python-lifelines/)

### Contacting
There is a [Gitter](https://gitter.im/python-lifelines/) channel available. The main author, Cam Davidson-Pilon, is also available for contact on email and twitter.


### Citing lifelines
Expand All @@ -63,4 +65,4 @@ You can use this badge below to generate a DOI and reference text for the lastes
[![DOI](https://zenodo.org/badge/12420595.svg)](https://zenodo.org/badge/latestdoi/12420595)


![lifelines](http://i.imgur.com/QXW71zA.png)
![](http://i.imgur.com/QXW71zA.png)
92 changes: 0 additions & 92 deletions README.txt

This file was deleted.

3 changes: 2 additions & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
pytest
python-coveralls
pytest-cov
seaborn
seaborn
pypandoc
19 changes: 12 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@
from setuptools import setup


# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def filepath(fname):
return os.path.join(os.path.dirname(__file__), fname)

exec(compile(open('lifelines/version.py').read(),
'lifelines/version.py', 'exec'))

readme_md = filepath('README.md')

try:
import pypandoc
readme_rst = pypandoc.convert_file(readme_md, 'rst')
except(ImportError):
readme_rst = open(readme_md).read()


setup(
name="lifelines",
version=__version__,
Expand All @@ -27,7 +32,7 @@ def read(fname):
'lifelines.fitters',
'lifelines.utils',
],
long_description=read('README.txt'),
long_description=readme_rst,
classifiers=[
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
Expand Down

0 comments on commit 466b247

Please sign in to comment.