This refactor mainly aims to simplify and restructure utils.py, which currently handles almost all rendering and helper code for most of the tab content (this is very unwieldy and difficult to read). The new structure is:
All top-level functions which render tab content (documents & annotations) are now in render.py, and are simplified for better readability
All helper functions (e.g. url2posix/get_abstract_view_type) are now in utils.py, and are only referenced by functions in render.py.
Additionally, if a tab causes an error to be thrown it no longer halts website creation entirely, but instead renders the error in the tab content.
This refactor mainly aims to simplify and restructure
utils.py
, which currently handles almost all rendering and helper code for most of the tab content (this is very unwieldy and difficult to read). The new structure is:render.py
, and are simplified for better readabilityurl2posix
/get_abstract_view_type
) are now inutils.py
, and are only referenced by functions inrender.py
.Additionally, if a tab causes an error to be thrown it no longer halts website creation entirely, but instead renders the error in the tab content.