Skip to content

Commit 07f5534

Browse files
committed
Add doc workflow
1 parent 95aa11e commit 07f5534

File tree

10 files changed

+18
-6
lines changed

10 files changed

+18
-6
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: sphinx
2+
3+
on: [push, pull_request, workflow_call]
4+
5+
jobs:
6+
call_sphinx_builder:
7+
uses: ISISComputingGroup/reusable-workflows/.github/workflows/sphinx.yml@main
8+
secrets: inherit

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,5 @@ cython_debug/
160160
# and can be added to the global gitignore or merged into this file. For a more nuclear
161161
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
162162
.idea/
163+
164+
_build/
File renamed without changes.

docs/conf.py renamed to doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# If extensions (or modules to document with autodoc) are in another directory,
2121
# add these directories to sys.path here. If the directory is relative to the
2222
# documentation root, use os.path.abspath to make it absolute, like shown here.
23-
sys.path.insert(0, os.path.abspath("../Lib/site-packages/genie_python/"))
23+
sys.path.insert(0, os.path.abspath("../src/genie_python/"))
2424

2525
# -- General configuration ------------------------------------------------
2626

File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/genie_python/genie.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,10 +1079,9 @@ def get_time_since_begin(get_timedelta: bool = False) -> float | datetime.timede
10791079
otherwise return seconds (defaults to false)
10801080
10811081
Returns
1082-
integer: the time since start in seconds if get_datetime is False
1083-
timedelta: the time since begin as a datetime.timedelta object
1084-
(Year-Month-Day Hour:Minute:Second)
1085-
if get_datetime is True
1082+
integer: the time since start in seconds if get_datetime is False,
1083+
or timedelta, the time since begin as a datetime.timedelta object
1084+
(Year-Month-Day Hour:Minute:Second) if get_datetime is True
10861085
"""
10871086

10881087
return _genie_api.dae.get_time_since_begin(get_timedelta)
@@ -2392,6 +2391,7 @@ def get_version() -> str:
23922391
def set_dae_simulation_mode(mode: bool, skip_required_runstates: bool = False) -> None:
23932392
"""
23942393
Sets the DAE into simulation mode.
2394+
23952395
Args:
23962396
mode: True to set the DAE into simulated mode, False to set the DAE into
23972397
non-simulated (hardware) mode

src/genie_python/genie_api_setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import print_function
22

33
import ctypes
4+
import functools
45
import glob
56
import inspect
67
import os
@@ -363,6 +364,7 @@ def log_command_and_handle_exception(f: Callable[P, T]) -> Callable[P, T]:
363364
accidentally put into a genie function
364365
"""
365366

367+
@functools.wraps(f)
366368
def decorator(*args: P.args, **kwargs: P.kwargs) -> T:
367369
log_args = {"kwargs": kwargs}
368370
arg_names = getfullargspec(f).args
@@ -380,6 +382,7 @@ def decorator(*args: P.args, **kwargs: P.kwargs) -> T:
380382
except Exception as e:
381383
command_exception = traceback.format_exc()
382384
_handle_exception(e)
385+
return None # type: ignore
383386
finally:
384387
end = time.time()
385388
time_taken = end - start

0 commit comments

Comments
 (0)