Coverage for /usr/local/lib/python3.11/dist-packages/pyrocko/squirrel/tool/commands/init.py: 70%
10 statements
« prev ^ index » next coverage.py v6.5.0, created at 2023-10-06 06:59 +0000
« prev ^ index » next coverage.py v6.5.0, created at 2023-10-06 06:59 +0000
1# http://pyrocko.org - GPLv3
2#
3# The Pyrocko Developers, 21st Century
4# ---|P------/S----------~Lg----------
6'''
7Implementation of :app:`squirrel init`.
8'''
10from pyrocko import squirrel as sq
13headline = 'Create local environment.'
15description = headline + '''
17Squirrel based applications can either use the user’s global Squirrel
18environment or a project specific local environment. Running this command in a
19project's top level directory creates a local environment. Any Squirrel
20application started thereafter in this directory or any of its subdirectories,
21will use the local enviroment instead of the global one.
23The local enviroment consists of a directory ```.squirrel``` which contains
24the Squirrel's database and a cache directory.
26A local environment can be removed by removing its ```.squirrel``` directory.
28The user's global enviroment database resides in Pyrocko’s global cache
29directory, by default in ```$HOME/.pyrocko/cache/squirrel```.
30'''
33def make_subparser(subparsers):
34 return subparsers.add_parser(
35 'init',
36 help=headline,
37 description=description)
40def setup(parser):
41 pass
44def run(parser, args):
45 sq.init_environment()