sherlock.database_cleaner (class)

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

Clean and maintain the database helper tables used by sherlock

The helper tables list row counts for tables and views and provide the column maps that help sherlock know which catalogue columns relate to which parameters (e.g. RA, DEC etc)

Key Arguments:
  • dbConn – mysql database connection
  • log – logger
  • settings – the settings dictionary

Usage:

Todo

  • add an entry in the tutorial to clean database tables
from sherlock.database_cleaner import database_cleaner
db = database_cleaner(
    log=log,
    settings=settings
)
db.clean()

Todo

  • update key arguments values and definitions with defaults
  • update return values and definitions
  • update usage examples and text
  • update docstring text
  • check sublime snippet exists
  • clip any useful text to docs mindmap
  • regenerate the docs and check redendering of this docstring

Methods

clean() clean up and run some maintance tasks on the crossmatch catalogue helper tables
_clean_up_columns() clean up columns
_update_tcs_helper_catalogue_tables_info_with_new_tables() update tcs helper catalogue tables info with new tables
_update_tcs_helper_catalogue_views_info_with_new_views() update tcs helper catalogue tables info with new tables
_updated_row_counts_in_tcs_helper_catalogue_tables_info() updated row counts in tcs catalogue tables
clean()[source]

clean up and run some maintance tasks on the crossmatch catalogue helper tables

Todo

  • update key arguments values and definitions with defaults
  • update return values and definitions
  • update usage examples and text
  • update docstring text
  • check sublime snippet exists
  • clip any useful text to docs mindmap
  • regenerate the docs and check redendering of this docstring
_updated_row_counts_in_tcs_helper_catalogue_tables_info()[source]

updated row counts in tcs catalogue tables

Todo

  • update key arguments values and definitions with defaults
  • update return values and definitions
  • update usage examples and text
  • update docstring text
  • check sublime snippet exists
  • clip any useful text to docs mindmap
  • regenerate the docs and check redendering of this docstring
_update_tcs_helper_catalogue_tables_info_with_new_tables()[source]

update tcs helper catalogue tables info with new tables

Todo

  • update key arguments values and definitions with defaults
  • update return values and definitions
  • update usage examples and text
  • update docstring text
  • check sublime snippet exists
  • clip any useful text to docs mindmap
  • regenerate the docs and check redendering of this docstring
_clean_up_columns()[source]

clean up columns

Todo

  • update key arguments values and definitions with defaults
  • update return values and definitions
  • update usage examples and text
  • update docstring text
  • check sublime snippet exists
  • clip any useful text to docs mindmap
  • regenerate the docs and check redendering of this docstring
_update_tcs_helper_catalogue_views_info_with_new_views()[source]

update tcs helper catalogue tables info with new tables

Todo

  • update key arguments values and definitions with defaults
  • update return values and definitions
  • update usage examples and text
  • update docstring text
  • check sublime snippet exists
  • clip any useful text to docs mindmap
  • regenerate the docs and check redendering of this docstring