Skip to content

Commit 02a76b0

Browse files
committed
support readthedocs
1 parent 396ace2 commit 02a76b0

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

README.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Core components of this package are based on the original WFDB specifications. T
1818
Documentation and Usage
1919
-----------------------
2020

21-
See the documentation site for the public APIs.
21+
See the `documentation site`_ for the public APIs.
2222

2323
See the `demo.ipynb`_ notebook file for more example use cases.
2424

@@ -49,7 +49,7 @@ Contributing
4949
We welcome community contributions in the form of pull requests. When contributing code, please ensure:
5050

5151
* PEP8_ style guidelines are followed.
52-
* Documentation is provided. New functions and classes should have numpy/scipy style docstrings_.
52+
* Documentation is provided. New functions and classes should have numpy/scipy style docstrings_.
5353
* Unit tests are written for new features that are not covered by `existing tests`_.
5454

5555

@@ -64,6 +64,8 @@ Authors
6464
.. |Build Status| image:: https://travis-ci.org/MIT-LCP/wfdb-python.svg?branch=master
6565
:target: https://travis-ci.org/MIT-LCP/wfdb-python
6666

67+
.. _documentation site: http://wfdb.readthedocs.io
68+
6769
.. _PEP8: https://www.python.org/dev/peps/pep-0008/
6870
.. _docstrings: https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt
6971
.. _existing tests: https://github.com/MIT-LCP/wfdb-python/tree/master/tests

docs/conf.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,16 @@
5050
copyright = '2018, MIT Lab for Computational Physiology'
5151
author = 'Chen Xie, Julien Dubiel'
5252

53-
import wfdb
53+
with open('../wfdb/version.py') as f:
54+
__version__ = f.read().split()[-1].strip("'")
5455
# The version info for the project you're documenting, acts as replacement for
5556
# |version| and |release|, also used in various other places throughout the
5657
# built documents.
5758
#
5859
# The short X.Y version.
59-
version = wfdb.__version__
60+
version = __version__
6061
# The full version, including alpha/beta/rc tags.
61-
release = wfdb.__version__
62+
release = __version__
6263

6364
# The language for content autogenerated by Sphinx. Refer to documentation
6465
# for a list of supported languages.

0 commit comments

Comments
 (0)