diff --git a/README.md b/README.md deleted file mode 100644 index 51113c8..0000000 --- a/README.md +++ /dev/null @@ -1,78 +0,0 @@ -tango-facadedevice -================== - -[![Documentation Status](https://readthedocs.org/projects/tango-facadedevice/badge/?version=latest)](http://tango-facadedevice.readthedocs.io/en/latest/?badge=latest) -[![Build Status](https://travis-ci.org/MaxIV-KitsControls/tango-facadedevice.svg?branch=master)](https://travis-ci.org/MaxIV-KitsControls/tango-facadedevice) -[![Coverage Status](https://coveralls.io/repos/github/MaxIV-KitsControls/tango-facadedevice/badge.svg?branch=master)](https://coveralls.io/github/MaxIV-KitsControls/tango-facadedevice?branch=master) - -This python package provide a descriptive interface for reactive high-level -Tango devices. - - -Requirements ------------- - -The library requires: - - - **python** >= 2.7 or >= 3.4 - - **pytango** >= 9.2.1 - - -Installation ------------- - -Install the library by running: - -```console -$ python setup.py install # Or -$ pip install . -``` - - -Documentation -------------- - -The documentation is hosted on [ReadTheDocs][1]. - -Generating the documentation requires: - - - sphinx - - sphinx.ext.autodoc - - sphinx.ext.napoleon - -Build the documentation using: - -```console -$ python setup.py build_sphinx -$ sensible-browser build/sphinx/html/index.html -``` - - -Unit testing ------------- - -The tests run on [TravisCI][2] and the coverage report is updated on [Coveralls][3] - -Run the tests using: - -```console -$ python setup.py test -``` - -The following libraries will be downloaded if necessary: - - - pytest - - pytest-runner - - pytest-mock - - pytest-xdist - - pytest-coverage - - -Contact -------- - -Vincent Michel: vincent.michel@maxlab.lu.se - -[1]: http://tango-facadedevice.readthedocs.io/en/latest -[2]: https://travis-ci.org/MaxIV-KitsControls/tango-facadedevice -[3]: https://coveralls.io/github/MaxIV-KitsControls/tango-facadedevice?branch=master diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..cdeb87b --- /dev/null +++ b/README.rst @@ -0,0 +1,85 @@ +tango-facadedevice +================== + +|Doc Status| +|Build Status| +|Coverage Status| + +This python package provide a descriptive interface for reactive high-level +Tango devices. + + +Requirements +------------ + +The library requires: + +- **python** >= 2.7 or >= 3.4 +- **pytango** >= 9.2.1 + + +Installation +------------ + +Install the library by running:: + + + $ python setup.py install # Or + $ pip install . + + +Documentation +------------- + +The documentation is hosted on ReadTheDocs_. + +Generating the documentation requires: + +- sphinx +- sphinx.ext.autodoc +- sphinx.ext.napoleon + +Build the documentation using:: + + $ python setup.py build_sphinx + $ sensible-browser build/sphinx/html/index.html + + +Unit testing +------------ + +The tests run on TravisCI_ and the coverage report is updated on Coveralls_ + +Run the tests using:: + + $ python setup.py test + +The following libraries will be downloaded if necessary: + +- pytest +- pytest-runner +- pytest-mock +- pytest-xdist +- pytest-coverage + + +Contact +------- + +Vincent Michel: vincent.michel@esrf.fr + +.. |Doc Status| image:: http://readthedocs.org/projects/tango-facadedevice/badge/?version=latest + :target: http://tango-facadedevice.readthedocs.io/en/latest/?badge=latest + :alt: + +.. |Build Status| image:: https://travis-ci.org/MaxIV-KitsControls/tango-facadedevice.svg?branch=master + :target: https://travis-ci.org/MaxIV-KitsControls/tango-facadedevice + :alt: + +.. |Coverage Status| image:: https://coveralls.io/repos/github/MaxIV-KitsControls/tango-facadedevice/badge.svg?branch=master + :target: https://coveralls.io/github/MaxIV-KitsControls/tango-facadedevice?branch=master + :alt: + +.. _ReadTheDocs: http://tango-facadedevice.readthedocs.io/en/latest +.. _TravisCI: https://travis-ci.org/MaxIV-KitsControls/tango-facadedevice +.. _Coveralls: https://coveralls.io/github/MaxIV-KitsControls/tango-facadedevice?branch=master diff --git a/setup.py b/setup.py index f929a45..3954489 100755 --- a/setup.py +++ b/setup.py @@ -8,12 +8,15 @@ TESTING = any(x in sys.argv for x in ['test', 'pytest']) -# Read function -def safe_read(fname): - try: - return open(fname).read() - except IOError: - return "" +# README helper +def get_readme(name='README.rst'): + """Get readme file contents without the badges.""" + with open(name) as f: + return '\n'.join( + line for line in f.read().splitlines() + if not line.startswith('|') + or not line.endswith('|')) + # Setup setup( @@ -22,12 +25,14 @@ def safe_read(fname): packages=['facadedevice'], # Metadata - description="Provide a facade device to subclass.", + description=( + "Provide a descriptive interface for " + "reactive high-level Tango devices."), author="Vincent Michel", - author_email="vincent.michel@maxlab.lu.se", + author_email="vincent.michel@esrf.fr", license="GPLv3", - url="http://www.maxlab.lu.se", - long_description=safe_read("README.md"), + url="https://github.com/MaxIV-KitsControls/tango-facadedevice", + long_description=get_readme(), # Classifiers classifiers=[