This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
Astrodbkit v0.6
Pre-release
Pre-release
A significant update on how the database is loaded and used in astrodbkit:
astrodb.Database() now takes either a .db or .sql file (assumes .db if the filename does not end in either). If an .sql file, the database is generating from ascii tables stored in the specified directory (default: tabledata/). This changes the workflow to allow version-controlling the individual ascii tables rather than the binary .db file. A variety of new methods exist to utilize this new workflow.
- there is a new save() method to output the .sql file along with all the data in the database to the specified directory
- there is a modified close() method that closes the connection and asks to save the database and delete the .db file
In addition, this release includes the following changes and bug fixes:
- query() method now has a fmt='pandas' option to return the results in pandas DataFrame format
- the new info() method displays basic information on the loaded database (ie, the tables present and the number of entries in each)
- the new snapshot() method produces a snapshot of the database, useful for extracting published versions of the database
- a new help() method provides a brief summary of how to use astrodb.Database
- SQL TEXT fields are treated as numpy.dtype objects rather than strings to avoid truncation