-
Notifications
You must be signed in to change notification settings - Fork 7
configuration
There are some environmental variables that peyotl is sensitive to.
But, for the most part, configuration is done using config files.
The default location for the config file is ~/.peyotl/config
, however
you can override that by have a variable in your environment
called PEYOTL_CONFIG_FILE
which holds the full path to the
config file that you'd like to use.
The syntax for the config file is the standard INI file format.
The easiest way to get a framework for a config file is to copy the example dot_peyotl
directory
to the default location:
$ cp extras/dot_peyotl ~/.peyotl
and then edit ~/.peyotl/config
in your text editor to reflect the paths to
the parent directory of the phylesystem, then the peyotl library can find
your local copy of phylesystem repos.
If PEYOTL_LOGGING_LEVEL
is in the environment, then the behavior of
the log is determined by environmental variables:
-
PEYOTL_LOG_FILE_PATH
filepath of log file (StreamHandler if omitted) -
PEYOTL_LOGGING_LEVEL
(NotSet, debug, info, warning, error, or critical) -
PEYOTL_LOGGING_FORMAT
"rich", "simple" or "None" (None is default)
Otherwise, these logger settings are now controlled by a
~/.peyotl/config
or the peyotl/default.conf
file (packaged inside
the peyotl
package.
The content to configure
the logger looks like:
[logging]
level = debug
filepath = /absolute/path/to/log/file/here
formatter = rich
You probably want to replace the default behavior by specifying
PEYOTL_LOGGING_LEVEL
or having a ~/.peyotl/config
file.
Peyotl has wrappers to make it easier to communicate with Open Tree of Life web services. Because we use peyotl in testing the services as we deploy, the domains where the APIs are configurable:
phylesystem_api = http://api.opentreeoflife.org
oti = http://api.opentreeoflife.org
taxomachine = http://api.opentreeoflife.org
treemachine = http://api.opentreeoflife.org
If you are performing operations that use a local version of the phylesystem
git document store, you need to tell peyotl where to find the phylsystem repo.
If the environmental variable PHYLESYSTEM_PARENT
is not set
then the config file will be used:
[phylesystem]
parent = /home/username/phylesystem/shards
Peyotl will treat any git directory in this parent that has a study
subdirectory as if it was
a shard of phyleystem.