Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyasbapat committed Jul 31, 2018
1 parent 560c65a commit eeb14e2
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 33 deletions.
87 changes: 62 additions & 25 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,30 @@

import sys
import os

from datetime import datetime
import alabaster
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))

html_static_path = ["_static"]
html_context = {
'css_files': [
'_static/custom.css', # overrides for wide tables in RTD theme
],
}
def setup(app):
app.add_stylesheet('custom.css')
# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = '1.3'
# needs_sphinx = '1.3'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'alabaster',
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.todo',
Expand Down Expand Up @@ -59,8 +68,8 @@

# General information about the project.
project = 'poliastro'
copyright = u'2013-2017, Juan Luis Cano Rodríguez and the poliastro development team'

year = datetime.now().year
copyright = "2013 - %d, Juan Luis Cano Rodríguez and the poliastro development team" % year
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
Expand Down Expand Up @@ -130,23 +139,51 @@

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
import sphinx_rtd_theme
html_theme = "sphinx_rtd_theme"
html_theme = 'alabaster'
html_theme_path = [alabaster.get_path()]

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}

# html_sidebars = {
# '**': [
# 'about.html',
# 'navigation.html',
# 'relations.html',
# 'searchbox.html',
# # 'donate.html',
# ]
# }
html_favicon = 'favicon.ico'

html_theme_options = {
'logo': 'logo_trans.png',
'logo_name': True,
'logo_text_align': 'center',
'travis_button' : True,
'description':'Astrodynamics in Python',
'body_text_align': 'left',
'github_user': 'poliastro',
'github_repo': 'poliastro',
'show_relbars': True,
'show_powered_by': False,
'page_width': '80%',
'github_banner': True,
'extra_nav_links' : { 'Benchmarks': 'https://blog.poliastro.space/poliastro-benchmarks/',
'Blog': 'https://blog.poliastro.space/',
},

}
# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None

# HTML style
html_style = os.path.join("css", "custom.css")
# html_style = os.path.join("css", "custom.css")

# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
Expand All @@ -163,12 +200,12 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']


# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []
# html_extra_path = []

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
Expand Down Expand Up @@ -212,7 +249,7 @@
#html_file_suffix = None

# Output file base name for HTML help builder.
htmlhelp_basename = 'poliastrodoc'
# htmlhelp_basename = 'poliastrodoc'


# -- Options for LaTeX output ---------------------------------------------
Expand All @@ -231,10 +268,10 @@
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'poliastro.tex', 'poliastro Documentation',
'Juan Luis Cano Rodríguez', 'manual'),
]
# latex_documents = [
# ('index', 'poliastro.tex', 'poliastro Documentation',
# 'Juan Luis Cano Rodríguez', 'manual'),
# ]

# The name of an image file (relative to this directory) to place at the top of
# the title page.
Expand All @@ -261,10 +298,10 @@

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'poliastro', 'poliastro Documentation',
['Juan Luis Cano Rodríguez'], 1)
]
# man_pages = [
# ('index', 'poliastro', 'poliastro Documentation',
# ['Juan Luis Cano Rodríguez'], 1)
# ]

# If true, show URL addresses after external links.
#man_show_urls = False
Expand All @@ -275,11 +312,11 @@
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'poliastro', 'poliastro Documentation',
'Juan Luis Cano Rodríguez', 'poliastro', 'One line description of project.',
'Miscellaneous'),
]
# texinfo_documents = [
# ('index', 'poliastro', 'poliastro Documentation',
# 'Juan Luis Cano Rodríguez', 'poliastro', 'One line description of project.',
# 'Miscellaneous'),
# ]

# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
Expand Down
19 changes: 18 additions & 1 deletion docs/source/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,23 @@ you find any, please open an issue in the `issue tracker`_.
.. _`virtualenv`: http://pypi.python.org/pypi/virtualenv
.. _`local installations`: http://stackoverflow.com/a/4325047/554319

Using poliastro with latest JupyterLab
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

For using poliastro on JupyterLab, you must have NodeJS and npm installed in your system.

plotly 3.0 has provided an amazing support for JupyterLab and for using it properly,
you must first install all the extensions required (two).

plotly extension for JupyterLab (needs NodeJS and npm to be present locally):

$ jupyter labextension install @jupyterlab/plotly-extension

and

$ jupyter labextension install @jupyter-widgets/jupyterlab-manager


Testing
-------

Expand All @@ -81,7 +98,7 @@ If installed correctly, the tests can be run using pytest::
Running unit tests for poliastro
[...]
OK
$
$

If for some reason any test fails, please report it in the `issue tracker`_.

Expand Down
9 changes: 3 additions & 6 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ poliastro - Astrodynamics in Python
===================================

.. image:: _static/logo_text.png
:width: 675px
:width: 90%
:align: center

**poliastro** is an open source (MIT) collection of Python functions useful
Expand Down Expand Up @@ -33,7 +33,7 @@ and `chat`_.

.. figure:: _static/molniya.png
:align: right
:figwidth: 300
:figwidth: 50%
:alt: Molniya orbit

Plot of a `Molniya orbit`_ around the Earth
Expand All @@ -56,12 +56,9 @@ the MIT license, hence allowing commercial use of the library.

.. code-block:: python
import matplotlib.pyplot as plt
plt.ion()
from poliastro.examples import molniya
from poliastro.plotting import plot
plot(molniya)
.. include:: success.rst
Expand Down
2 changes: 1 addition & 1 deletion docs/source/jupyter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ Jupyter notebooks
/examples/Propagation using Cowell's formulation.ipynb
/examples/Revisiting Lambert's problem in Python.ipynb
/examples/Studying Hohmann transfers.ipynb
/examples/Using NEOS package.ipynb
/examples/Visualizing the SpaceX Tesla Roadster trip to Mars.ipynb
/examples/Using NEOS package.ipynb

0 comments on commit eeb14e2

Please sign in to comment.