From 722749dd9ce0641ba844ac4d6be28f74ca09d73b Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson <oscar.gustafsson@liu.se> Date: Thu, 23 Feb 2023 13:21:14 +0000 Subject: [PATCH] Add documentation for save_load_structure --- b_asic/save_load_structure.py | 6 +++--- docs_sphinx/api/index.rst | 1 + docs_sphinx/api/save_load_structure.rst | 6 ++++++ 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 docs_sphinx/api/save_load_structure.rst diff --git a/b_asic/save_load_structure.py b/b_asic/save_load_structure.py index 532489ff..2e41999f 100644 --- a/b_asic/save_load_structure.py +++ b/b_asic/save_load_structure.py @@ -1,8 +1,8 @@ """ B-ASIC Save/Load Structure Module. -Contains functions for saving/loading SFGs to/from strings that can be stored -as files. +Contains functions for saving/loading SFGs and Schedules to/from strings that can be +stored as files. """ from datetime import datetime @@ -158,7 +158,7 @@ def python_to_sfg(path: str) -> Tuple[SFG, Dict[str, Tuple[int, int]]]: ) -def schedule_to_python(schedule: Schedule): +def schedule_to_python(schedule: Schedule) -> str: """ Given a schedule structure try to serialize it for saving to a file. diff --git a/docs_sphinx/api/index.rst b/docs_sphinx/api/index.rst index c3480c10..f51f6ce2 100644 --- a/docs_sphinx/api/index.rst +++ b/docs_sphinx/api/index.rst @@ -11,6 +11,7 @@ API port.rst process.rst resources.rst + save_load_structure.rst schedule.rst sfg_generators.rst signal.rst diff --git a/docs_sphinx/api/save_load_structure.rst b/docs_sphinx/api/save_load_structure.rst new file mode 100644 index 00000000..81250dee --- /dev/null +++ b/docs_sphinx/api/save_load_structure.rst @@ -0,0 +1,6 @@ +****************************** +``b_asic.save_load_structure`` +****************************** + +.. automodule:: b_asic.save_load_structure + :members: -- GitLab