gavo.user.initdachs module

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.

class gavo.user.initdachs.DSN(dsn)[source]

Bases: object

a psycopg-style DSN, both parsed and unparsed.

gavo.user.initdachs.bailOut(msg, hint=None)[source]
gavo.user.initdachs.createFSHierarchy(dsn, userPrefix='')[source]

creates the directories required by DaCHS.

userPrefix is for use of the test infrastructure.

gavo.user.initdachs.initDB(dsn)[source]

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

Connecting with dsn must give you superuser privileges.

gavo.user.initdachs.main()[source]

initializes the DaCHS environment (where that’s not already done).

gavo.user.initdachs.makeDefaultMeta()[source]
gavo.user.initdachs.makeDirForConfig(configKey, gavoGrpId)[source]
gavo.user.initdachs.makeDirVerbose(path, setGroupTo, makeWritable)[source]
gavo.user.initdachs.makeMatplotlibCfg()[source]
gavo.user.initdachs.makeProfiles(dsn, userPrefix='')[source]

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.

gavo.user.initdachs.makeRoot()[source]
gavo.user.initdachs.parseCommandLine()[source]
gavo.user.initdachs.prepareWeb(groupId)[source]
gavo.user.initdachs.unindentString(s)[source]