Skip to content

Updating the documentation sphinx environment #3281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/_static/astroquery.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

.sd-card .sd-card-img-top {
height: 52px;
width: 52px;
margin-left: auto;
margin-right: auto;
margin-top: 10px;
}

Binary file added docs/_static/astroquery_banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
197 changes: 197 additions & 0 deletions docs/_static/astroquery_banner.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/astroquery_logo.ico
Binary file not shown.
Binary file added docs/_static/astroquery_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
163 changes: 163 additions & 0 deletions docs/_static/astroquery_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions docs/_static/index_images/alphabetical-order-svgrepo-com.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions docs/_static/index_images/installation.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions docs/_static/index_images/license-svgrepo-com.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/_static/index_images/list-ul-alt-svgrepo-com.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/_static/index_images/readme-svgrepo-com.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/_static/index_images/user-plus-svgrepo-com.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 28 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

# Load all of the global Astropy configuration
try:
from sphinx_astropy.conf.v1 import * # noqa
from sphinx_astropy.conf.v2 import * # noqa
except ImportError:
print('ERROR: the documentation requires the sphinx-astropy package to '
'be installed')
Expand Down Expand Up @@ -72,6 +72,10 @@
'pyvo': ('https://pyvo.readthedocs.io/en/stable', None),
})

extensions += [
"sphinx_design",
]

# -- Project information ------------------------------------------------------

# This does not *have* to match the package name, but typically does
Expand Down Expand Up @@ -102,11 +106,26 @@
# variables set in the global configuration. The variables set in the
# global configuration are listed below, commented out.

html_theme_options = {
'logotext1': 'astro', # white, semi-bold
'logotext2': 'query', # orange, light
'logotext3': ':docs', # white, light
}


html_theme_options.update(
{
"logo": {
"image_light": "_static/astroquery_banner.png",
"image_dark": "_static/astroquery_banner.png",
},
# https://github.com/pydata/pydata-sphinx-theme/issues/1492
"navigation_with_keys": False,
"navbar_align": "right"
}
)



html_favicon = "_static/astroquery_logo.ico"
html_static_path = ["_static"]
html_css_files = ["astroquery.css"]
html_copy_source = False

# Add any paths that contain custom themes here, relative to this directory.
# To use a different custom theme, add the directory containing the theme.
Expand Down Expand Up @@ -175,9 +194,9 @@ def __getattr__(cls, name):
return Mock()


MOCK_MODULES = ['atpy', 'beautifulsoup4', 'vo', 'lxml', 'keyring', 'bs4']
for mod_name in MOCK_MODULES:
sys.modules[mod_name] = Mock()
#MOCK_MODULES = ['atpy', 'beautifulsoup4', 'vo', 'lxml', 'keyring', 'bs4']
#for mod_name in MOCK_MODULES:
# sys.modules[mod_name] = Mock()

# -- Options for the edit_on_github extension ----------------------------------------
#
Expand Down
38 changes: 38 additions & 0 deletions docs/developer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Developer documentation
-----------------------

The modules and their maintainers are listed on the
`Maintainers <https://github.com/astropy/astroquery/wiki/Maintainers>`_
wiki page.


The :doc:`api` is intended to be kept as consistent as possible, such
that any web service can be used with a minimal learning curve imposed on the
user.

.. toctree::
:maxdepth: 1

api.rst
template.rst
testing.rst

The following Astroquery modules are mostly meant for internal use of
services in Astroquery, you can use them for your scripts, but we don't guarantee API stability.

.. toctree::
:maxdepth: 1

utils.rst
query.rst
utils/tap.rst

To debug astroquery, logging level can be configured with the following:

.. doctest-skip::

>>> from astroquery import log
>>> log.setLevel(level)

If ``level`` is set to ``"DEBUG"``, then HTTP requests are logged.
If ``level`` is set to ``"TRACE"``, then HTTP requests and responses are logged.
4 changes: 4 additions & 0 deletions docs/genindex.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. This file is a placeholder and will be replaced

Index
#####
Loading
Loading