Package gavo :: Package user :: Module initdachs
[frames] | no frames]

Module initdachs

source code

Initial setup for the file system hierarchy.

This module is supposed to create as much of the DaCHS file system environment as possible. Take care to give sensible error messages -- much can go wrong here, and it's nice if the user has a way to figure out what's wrong.

Classes
  DSN
a psycopg-style DSN, both parsed and unparsed.
Functions
 
bailOut(msg, hint=None) source code
 
unindentString(s) source code
 
makeRoot() source code
 
makeDirVerbose(path, setGroupTo, makeWritable) source code
 
makeDirForConfig(configKey, gavoGrpId) source code
 
makeDefaultMeta() source code
 
makeMatplotlibCfg() source code
 
prepareWeb(groupId) source code
 
makeProfiles(dsn, userPrefix='')
writes profiles with made-up passwords to DaCHS' config dir.
source code
 
createFSHierarchy(dsn, userPrefix='')
creates the directories required by DaCHS.
source code
 
initDB(dsn)
creates users and tables expected by DaCHS in the database described by the DSN dsn.
source code
 
parseCommandLine() source code
 
main()
initializes the DaCHS environment (where that's not already done).
source code
Variables
  __package__ = 'gavo.user'
Function Details

makeProfiles(dsn, userPrefix='')

source code 

writes profiles with made-up passwords to DaCHS' config dir.

This will mess everything up when the users already exist. We should probably provide an option to drop standard users.

userPrefix is mainly for the test infrastructure.

createFSHierarchy(dsn, userPrefix='')

source code 

creates the directories required by DaCHS.

userPrefix is for use of the test infrastructure.

initDB(dsn)

source code 

creates users and tables expected by DaCHS in the database described by the DSN dsn.

Connecting with dsn must give you superuser privileges.