Skip to content

Commit

Permalink
Merge pull request #236 from sdmccabe/doc-tweaks
Browse files Browse the repository at this point in the history
 Generate PyPI description and long_description from README
  • Loading branch information
sdmccabe authored Jun 18, 2019
2 parents 3065243 + 9e7a27d commit 03288a1
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Travis](https://img.shields.io/travis/netsiphd/netrd.svg)](
https://travis-ci.org/netsiphd/netrd)

# `netrd`: A library for network {reconstruction, distances, dynamics}
# netrd: A library for network {reconstruction, distances, dynamics}

This library provides a consistent, NetworkX-based interface to various
utilities for graph distances, graph reconstruction from time series data, and
Expand Down
2 changes: 1 addition & 1 deletion doc/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
``netrd``: A library for network {reconstruction, distances, dynamics}
netrd: A library for network {reconstruction, distances, dynamics}
======================================================================

This library provides a consistent, NetworkX-based interface to various
Expand Down
37 changes: 29 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,40 @@
with open('requirements.txt') as file:
requires = [line.strip() for line in file if not line.startswith('#')]

with open('README.md') as fin:
# read the first section of README - set between the first two '#' lines -
# as long_description, and use the first section header as description.
long_description = ""
at_first_section = False
read = iter(fin.readlines())
for line in read:
if at_first_section:
break
at_first_section = line.startswith('#')
description = line[1:].strip()
long_description += line
for line in read:
if line.startswith('#'):
break
long_description += line
long_description = long_description.strip()


setuptools.setup(
name='netrd',
version='0.1.0',
version='0.1.1',
author='NetSI 2019 Collabathon Team',
author_email='stefanmccabe@gmail.com',
description='Repository of network reconstruction, distance, and simulation methods',
description=description,
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/netsiphd/netrd',
packages=setuptools.find_packages(),
install_requires=requires,
classifiers=['Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent'],
extras_require={
'doc': ['POT>=0.5.1'],
}
classifiers=[
'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
],
extras_require={'doc': ['POT>=0.5.1']},
)

0 comments on commit 03288a1

Please sign in to comment.