Configuration¶
Pepys-import can be configured by the use of a configuration file.
A default configuration file is provided in the root of the repository
with the name default_config.ini
. Rather than editing this directly,
it should be copied to a new location, and the environment variable
PEPYS_CONFIG_FILE
should be set to the full path to the new
configuration file. If the configuration file needs to be set differently
on a specific computer, and network configuration (for example, a Group Policy)
forces PEPYS_CONFIG_FILE
to a specific value, then the PEPYS_CONFIG_FILE_USER
variable can be set to the path to the configuration file instead, and this will override
the PEPYS_CONFIG_FILE
variable.
Configuration file format¶
An example configuration file is shown below:
[database]
database_username =
database_password =
database_host =
database_port = 0
database_name = pepys_test.sqlite
database_type = sqlite
[archive]
user = pepys_admin
password = 123456
path = archive
[local]
parsers =
basic_tests =
enhanced_tests =
[network]
master_install_path =
It consists of a number of sections, specified in square brackets, such as
[database]
and inside these sections are a number of individual variable
settings specified as <variable> = <value>
. Unneeded entries can be left
blank and will be filled with a default value.
Configuration file variables¶
[database]
section¶
These settings control how pepys-import connects to the database. The specific variables are:
database_username
: Username used to connect to the database server (default:postgres
). Only used for PostgreSQL connections. Can be encrypted.
database_password
: Password used to connect to the database server (default:postgres
). Only used for PostgreSQL connections. Can be encrypted.
database_host
: Host (name or IP address) on which the database server is running (default:localhost
). Only used for PostgreSQL connections.
database_port
: Port on which the database server is accepting connections (default:5432
). Only used for PostgreSQL connections.
database_name
: Name of the database on the server (for PostgreSQL) or name of the database file to be used for SQLite (default:pepys
). Can be set to:memory:
for an in-memory SQLite database.
database_type
: Type of database to use: must be set to eithersqlite
orpostgres
(default:postgres
)
[archive]
section¶
These settings control how pepys-import archives files after importing them. The specific variables are:
user
: Username used to connect to the archiving location (default: none). Can be encrypted.
password
: Password used to connect to the archiving location (default: none). Can be encrypted.
path
: Full path to folder used to archive input files and store output logs (default: none)
[local]
section¶
These settings control how pepys-import finds custom locally-installed parsers and validation tests. The specific variables are:
parsers
: Path to a folder containing custom parsers to be loaded by pepys-import (default: none)
basic_tests
: Path to a folder containing custom basic validation tests to be loaded by pepys-import (default: none)
enhanced_tests
: Path to a folder containing custom enhanced validation tests to be loaded by pepys-import (default: none)
[network]
section¶
These settings control which paths Pepys looks for on the network. The specific variables are:
master_install_location
: Path to a folder containing the ‘master’ install of Pepys. The current Pepys version will be checked against this install, and an error will be given if the master version is newer.
Encryption¶
Various fields can be specified in an encrypted form (see notes above). To do this,
encrypt the value and add a _
to the beginning and end of the encrypted string. For
example, _aghiejf_
. Then use this as the value of the configuration option.