Context … for projects and MyDB Kapteyn Astronomical Institute, Wednesday, 19 April 2006
Context Handling large amounts of data Work together Work in a consistent way Experiment with source code Know what data and code was used Keep data private Make data public Throw away data
Context Organize in Projects, that have A name and description Users Default privileges Responsible - privileged – users New objects are automatically part of the currently active context Tools to safely delete or publish data Be aware of dependencies for history tracking
Setting and getting projects from astro.database.Context import context context.set_project('WORKSHOP2005') context.set_project('OCAM ILT') context.get_projects() context.get_current_project().name CALL AWOPER.AWSECURITY.SET_PROJECT('OCAM ILT')
Migrating MyDB to other Project Everything Toolbox/dbmigrateall.py AWMJACKSON KIDS Single object, including dependencies sl = SourceList.name.like('*TEST*')[0] context.migrate(sl, 'VESUVIO')
Deleting MyDB Delete ALL objects that belong to MyDB project Toolbox/dbdeleteall.py AWMJACKSON Includes files, which take up most space No dependency check required
Projects Like MyDB, but for more users. Delete all data that is private to KIDS Toolbox/dbdeleteall.py KIDS Making data public, i.e. update privileges context.update_privileges(obj, 3)