Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b51f117

Browse files
authoredJan 18, 2022
v0.16.1
version 0.16.1
2 parents b51bded + 5885347 commit b51f117

File tree

9 files changed

+234
-13
lines changed

9 files changed

+234
-13
lines changed
 

‎docs/Makefile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
SPHINXPROJ = pyobs
8+
SOURCEDIR = source
9+
BUILDDIR = ../.doc-build
10+
11+
#.EXPORT_ALL_VARIABLES:
12+
13+
#PYTHONPATH:=../pyobs-core/:../pyobs-sbig/:../pyobs-fli:../pyobs-weather:../pyobs-archive:${PYTHONPATH}
14+
15+
# Put it first so that "make" without argument is like "make help".
16+
help:
17+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
18+
19+
.PHONY: help Makefile
20+
21+
html:
22+
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
23+
24+
livehtml:
25+
sphinx-autobuild -b html --watch ../pyobs_sbig $(ALLSPHINXOPTS) "$(SOURCEDIR)/" "$(BUILDDIR)/html/"
26+
27+
# Catch-all target: route all unknown targets to Sphinx using the new
28+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
29+
%: Makefile
30+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
31+

‎docs/make.bat

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
set SPHINXPROJ=pyobs
13+
14+
if "%1" == "" goto help
15+
16+
%SPHINXBUILD% >NUL 2>NUL
17+
if errorlevel 9009 (
18+
echo.
19+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
20+
echo.installed, then set the SPHINXBUILD environment variable to point
21+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
22+
echo.may add the Sphinx directory to PATH.
23+
echo.
24+
echo.If you don't have Sphinx installed, grab it from
25+
echo.http://sphinx-doc.org/
26+
exit /b 1
27+
)
28+
29+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
30+
goto end
31+
32+
:help
33+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
34+
35+
:end
36+
popd

‎docs/source/_static/pyobs.gif

1.75 KB
Loading

‎docs/source/conf.py

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Configuration file for the Sphinx documentation builder.
4+
#
5+
# This file does only contain a selection of the most common options. For a
6+
# full list see the documentation:
7+
# http://www.sphinx-doc.org/en/stable/config
8+
9+
# -- Path setup --------------------------------------------------------------
10+
11+
# If extensions (or modules to document with autodoc) are in another directory,
12+
# add these directories to sys.path here. If the directory is relative to the
13+
# documentation root, use os.path.abspath to make it absolute, like shown here.
14+
#
15+
import os
16+
import sys
17+
18+
sys.path.insert(0, os.path.abspath("../../"))
19+
20+
21+
# -- Project information -----------------------------------------------------
22+
23+
project = "pyobs-alpaca"
24+
copyright = "2022, Tim-Oliver Husser"
25+
author = "Tim-Oliver Husser"
26+
27+
# The short X.Y version
28+
# version = "0.16"
29+
# The full version, including alpha/beta/rc tags
30+
# release = "0.16.0"
31+
32+
33+
# -- General configuration ---------------------------------------------------
34+
35+
add_module_names = False
36+
37+
# If your documentation needs a minimal Sphinx version, state it here.
38+
#
39+
# needs_sphinx = '1.0'
40+
41+
# Add any Sphinx extension module names here, as strings. They can be
42+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
43+
# ones.
44+
extensions = [
45+
"sphinx.ext.autodoc",
46+
"sphinx.ext.githubpages",
47+
"sphinx.ext.napoleon",
48+
"sphinx.ext.viewcode",
49+
"sphinx.ext.autosectionlabel",
50+
"sphinx.ext.intersphinx",
51+
#'sphinx_autodoc_typehints'
52+
]
53+
54+
intersphinx_mapping = {"http://docs.python.org/3": None}
55+
56+
# napoleon settings
57+
napoleon_google_docstring = True
58+
napoleon_numpy_docstring = False
59+
napoleon_use_param = False
60+
napoleon_use_ivar = True
61+
62+
# typehints
63+
# set_type_checking_flag = True
64+
# autodoc_typehints = "description"
65+
66+
# show c'tor parameters in class only
67+
autoclass_content = "both"
68+
69+
# Add any paths that contain templates here, relative to this directory.
70+
templates_path = ["_templates"]
71+
72+
# The suffix(es) of source filenames.
73+
# You can specify multiple suffix as a list of string:
74+
#
75+
source_suffix = ".rst"
76+
77+
# The master toctree document.
78+
master_doc = "index"
79+
80+
# The language for content autogenerated by Sphinx. Refer to documentation
81+
# for a list of supported languages.
82+
#
83+
# This is also used if you do content translation via gettext catalogs.
84+
# Usually you set "language" from the command line for these cases.
85+
language = "en"
86+
87+
# List of patterns, relative to source directory, that match files and
88+
# directories to ignore when looking for source files.
89+
# This pattern also affects html_static_path and html_extra_path .
90+
exclude_patterns = []
91+
92+
# The name of the Pygments (syntax highlighting) style to use.
93+
pygments_style = "sphinx"
94+
95+
# Be a little nitpicky
96+
nitpicky = True
97+
nitpick_ignore = []
98+
99+
# intersphinx
100+
intersphinx_mapping = {
101+
"pyobs": ("https://pyobs-core.readthedocs.io/en/latest/", None),
102+
}
103+
104+
# -- Options for HTML output -------------------------------------------------
105+
106+
# The theme to use for HTML and HTML Help pages. See the documentation for
107+
# a list of builtin themes.
108+
html_theme = "sphinx_rtd_theme"
109+
html_theme_options = {
110+
"collapse_navigation": False,
111+
"sticky_navigation": True,
112+
"navigation_depth": 4,
113+
"display_version": False,
114+
"logo_only": False,
115+
"prev_next_buttons_location": "bottom",
116+
"titles_only": False,
117+
"style_nav_header_background": "#cccccc",
118+
}
119+
html_logo = "_static/pyobs.gif"

‎docs/source/index.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
pyobs-alpaca
2+
############
3+
4+
This is a `pyobs <https://www.pyobs.org>`_ (`documentation <https://docs.pyobs.org>`_) module for ALPACA, which is
5+
a HTTP proxy for ASCOM.
6+
7+
8+
Example configuration
9+
*********************
10+
11+
12+
Available classes
13+
*****************
14+
15+
These classes are meant more as a means of an example for own implementations. :ref:`AlpacaTelescope` is an
16+
implementation for telescopes, while :ref:`AlpacaFocuser` works for focusing devices and :ref:`AlpacaDome` can
17+
operate a dome.
18+
19+
AlpacaTelescope
20+
===============
21+
.. autoclass:: pyobs_alpaca.AlpacaTelescope
22+
:members:
23+
:show-inheritance:
24+
25+
AlpacaFocuser
26+
=============
27+
.. autoclass:: pyobs_alpaca.AlpacaFocuser
28+
:members:
29+
:show-inheritance:
30+
31+
AlpacaDome
32+
==========
33+
.. autoclass:: pyobs_alpaca.AlpacaDome
34+
:members:
35+
:show-inheritance:

‎pyobs_alpaca/dome.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ async def init(self, **kwargs: Any) -> None:
6868
"""Open dome.
6969
7070
Raises:
71-
InitError: If dome cannot be opened.
71+
pyobs.utils.exceptions.InitError: If dome cannot be opened.
7272
"""
7373

7474
# if already opening, ignore
@@ -115,7 +115,7 @@ async def park(self, **kwargs: Any) -> None:
115115
"""Close dome.
116116
117117
Raises:
118-
ParkError: If dome cannot be opened.
118+
pyobs.utils.exceptions.ParkError: If dome cannot be opened.
119119
"""
120120

121121
# if already closing, ignore
@@ -166,7 +166,7 @@ async def _move(self, az: float, abort: asyncio.Event) -> None:
166166
abort: Abort event.
167167
168168
Raises:
169-
MoveError: If dome cannot be moved.
169+
pyobs.utils.exceptions.MoveError: If dome cannot be moved.
170170
"""
171171

172172
# execute command
@@ -210,7 +210,7 @@ async def move_altaz(self, alt: float, az: float, **kwargs: Any) -> None:
210210
az: Az in deg to move to.
211211
212212
Raises:
213-
MoveError: If device could not be moved.
213+
pyobs.utils.exceptions.MoveError: If device could not be moved.
214214
"""
215215

216216
# do nothing, if not ready

‎pyobs_alpaca/focuser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ async def init(self, **kwargs: Any) -> None:
5050
"""Initialize device.
5151
5252
Raises:
53-
InitError: If device could not be initialized.
53+
pyobs.utils.exceptions.InitError: If device could not be initialized.
5454
"""
5555
pass
5656

5757
async def park(self, **kwargs: Any) -> None:
5858
"""Park device.
5959
6060
Raises:
61-
ParkError: If device could not be parked.
61+
pyobs.utils.exceptions.ParkError: If device could not be parked.
6262
"""
6363
pass
6464

@@ -92,7 +92,7 @@ async def set_focus(self, focus: float, **kwargs: Any) -> None:
9292
"""Sets new focus.
9393
9494
Raises:
95-
MoveError: If telescope cannot be moved.
95+
pyobs.utils.exceptions.MoveError: If telescope cannot be moved.
9696
"""
9797

9898
# set focus + offset

‎pyobs_alpaca/telescope.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ async def init(self, **kwargs: Any) -> None:
8787
"""Initialize telescope.
8888
8989
Raises:
90-
InitError: If telescope could not be initialized.
90+
pyobs.utils.exceptions.InitError: If telescope could not be initialized.
9191
"""
9292

9393
# if already initializing, ignore
@@ -119,7 +119,7 @@ async def park(self, **kwargs: Any) -> None:
119119
"""Park telescope.
120120
121121
Raises:
122-
ParkError: If telescope could not be parked.
122+
pyobs.utils.exceptions.ParkError: If telescope could not be parked.
123123
"""
124124

125125
# if already parking, ignore
@@ -156,7 +156,7 @@ async def _move_altaz(self, alt: float, az: float, abort_event: asyncio.Event) -
156156
abort_event: Event that gets triggered when movement should be aborted.
157157
158158
Raises:
159-
Exception: On error.
159+
pyobs.utils.exceptions.MoveError: If telescope cannot be moved.
160160
"""
161161

162162
# reset offsets
@@ -191,7 +191,7 @@ async def _move_radec(self, ra: float, dec: float, abort_event: asyncio.Event) -
191191
abort_event: Event that gets triggered when movement should be aborted.
192192
193193
Raises:
194-
Exception: On any error.
194+
pyobs.utils.exceptions.MoveError: If telescope cannot be moved.
195195
"""
196196

197197
# reset offsets
@@ -225,7 +225,7 @@ async def set_offsets_radec(self, dra: float, ddec: float, **kwargs: Any) -> Non
225225
ddec: Dec offset in degrees.
226226
227227
Raises:
228-
MoveError: If offset could not be set.
228+
pyobs.utils.exceptions.MoveError: If offset could not be set.
229229
"""
230230

231231
# acquire lock

‎pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "pyobs-alpaca"
3-
version = "0.16.0"
3+
version = "0.16.1"
44
description = "pyobs module for ASCOM Alpaca"
55
authors = ["Tim-Oliver Husser <thusser@uni-goettingen.de>"]
66
license = "MIT"

0 commit comments

Comments
 (0)
Please sign in to comment.