diff --git a/AUTHORS.rst b/AUTHORS.rst index 04b5015cda3ca80f29303206b8d8925dcb36ff8f..461cefa51b1a61703bef43ed611550ac4e4a4c91 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -11,6 +11,7 @@ Development * A Egli <adrian.egli@sbb.ch> +* Mattias Ljungström <ml@mljx.io> Contributors ------------ diff --git a/README.rst b/README.rst index f285d1f406e421315e28c05b6803b3870b8af263..a105fc676137ca054271f9d66e8edbc4ba3242d6 100644 --- a/README.rst +++ b/README.rst @@ -21,12 +21,20 @@ Generate Docs | **TODO**: Mohanty to add atleast a neat outline herefor the contents to the docs here. .. code-block:: bash - + Linux and macOS setup git clone git@gitlab.aicrowd.com:flatland/flatland.git cd flatland pip install -r requirements_dev.txt make docs + Windows Setup + git clone git@gitlab.aicrowd.com:flatland/flatland.git + cd flatland + pip install -r requirements_dev.txt + python setup.py develop + python make_docs.py + + Features -------- @@ -36,4 +44,5 @@ Authors -------- * Sharada Mohanty <mohanty@aicrowd.com> * Giacomo Spigler <giacomo.spigler@gmail.com> +* Mattias Ljungström <ml@mljx.io> <please fill yourself in> \ No newline at end of file diff --git a/make_docs.py b/make_docs.py new file mode 100644 index 0000000000000000000000000000000000000000..909a0d99c6d17846ec63872fec48fe7adacdc7af --- /dev/null +++ b/make_docs.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python + +import os +import webbrowser +import subprocess + +def browser(pathname): + try: + from urllib import pathname2url + except: + from urllib.request import pathname2url + webbrowser.open("file:" + pathname2url(pathname)) + +def remove_exists(filename): + try: + os.remove(filename) + except FileNotFoundError: + pass + + +# clean docs config and html files, and rebuild everything +remove_exists('docs/flatland.rst') +remove_exists('docs/modules.rst') + +subprocess.call('sphinx-apidoc -o docs/ flatland') + +os.environ["SPHINXPROJ"] = "flatland" +os.chdir('docs') +subprocess.call('python -msphinx -M clean . _build') +subprocess.call('python -msphinx -M html . _build') + +browser(os.path.abspath('_build/html/index.html'))