sherlock.commonutils.update_wiki_pages (class)

class sherlock.commonutils.update_wiki_pages(log, settings=False)[source]

Update sherlock’s github wiki pages with some useful info regarding the crossmatch database catalogue tables

Key Arguments:
  • log – logger
  • settings – the settings dictionary

Usage:

To trigger an update of sherlock’s wiki pages to give an overview of the crossmatch table database tables run the following:

from sherlock.commonutils import update_wiki_pages
wiki = update_wiki_pages(
    log=log,
    settings=settings
)
wiki.update() 

Todo

  • create a new script for updating sherlock wiki with the snippet above, remove wiki command from cl-utils and add stand alone scripts to the sherlock repo (cleans up the usage and docs for sherlock)
  • harvest text from wiki pages and then delete them: https://github.com/thespacedoctor/sherlock/wiki

Methods

update() Update wiki pages
_create_md_tables(tableData, viewData, …) generate markdown format tables from the database query results
_get_stream_view_infos([trimmed]) query the sherlock-catalogues database streamed data tables’ metadata
_get_table_infos([trimmed]) query the sherlock-catalogues database table metadata
_get_view_infos([trimmed]) query the sherlock-catalogues database view metadata
_update_github() commit the changes and push them to github
_write_wiki_pages() write the markdown formated content of the database tables’ metadata to local wiki pages
update()[source]

Update wiki pages

See class docstring for usage

_get_table_infos(trimmed=False)[source]

query the sherlock-catalogues database table metadata

_get_view_infos(trimmed=False)[source]

query the sherlock-catalogues database view metadata

_get_stream_view_infos(trimmed=False)[source]

query the sherlock-catalogues database streamed data tables’ metadata

_create_md_tables(tableData, viewData, streamData)[source]

generate markdown format tables from the database query results

Key Arguments:
  • tableData – the sherlock-catalogues database table metadata.
  • viewData – the sherlock-catalogues database view metadata.
  • streamData – the sherlock-catalogues database streamed data tables’ metadata.
Return:
  • None
_write_wiki_pages()[source]

write the markdown formated content of the database tables’ metadata to local wiki pages

_update_github()[source]

commit the changes and push them to github