sherlock.database_cleaner module

Clean up the database tables used by sherlock - maintainance tools

Author

David Young

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

Bases: object

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

```python from sherlock.database_cleaner import database_cleaner db = database_cleaner(

log=log, settings=settings

) db.clean() ```

- 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()[source]

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

- 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

- 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

- 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

- 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

- 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
_create_tcs_help_tables()[source]
  • create tcs help tables*

Key Arguments

=

Return

  • None

Usage

usage code

Todo

  • add usage info

  • create a sublime snippet for usage

  • write a command-line tool for this method

  • update package tutorial with command-line tool info if needed