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.


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

Connecting with dsn must give you superuser privileges.


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

gavo.user.initdachs.makeDirForConfig(configKey, gavoGrpId)[source]
gavo.user.initdachs.makeDirVerbose(path, setGroupTo, makeWritable)[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.