Script to test Quixote moulinettes locally
Project description
Dulcinea
Script allowing to test Quixote moulinettes locally.
Install
pip install -r requirements.txt
How to use dulcinea
usage: dulcinea [-h] [-c CONFIG_FILE] [-i INFO_FILE | --auto-info]
[-r ROOT_DIR] [--docker-bridge-ip DOCKER_BRIDGE_IP]
[--override-deliveries OVERRIDE_DELIVERIES]
moulinette_directory
positional arguments:
moulinette_directory
optional arguments:
-h, --help show this help message and exit
-c CONFIG_FILE, --config-file CONFIG_FILE json file containing the user informations
-i INFO_FILE, --info-file INFO_FILE json file containing the information of the jobs to execute
-r ROOT_DIR, --root-dir ROOT_DIR directory where the jobs will be executed
--override-deliveries DELIVERIES directory containing the deliveries to use
--auto-info when using --override-deliveries, deduce the group IDs
Conf file example
The conf file can be given using the -c
option and contains useful meta-data to insert in the context such as the user's information.
{
"intra_user": "login_z",
"intra_password": "superPassSecure",
"gitlab_token": "superCuteToken"
}
Blueprint
In order to test the moulinette locally, the script must be able to fetch some dummy deliveries to test.
Typically, it can be achieved by replacing the fetching step with a "local" fetch using the fetch.copy
built-in:
import quixote.fetch.copy as fetch
@quixote.fetcher
def fetch_by_copying():
fetch.copy(path_to_the_dummy_delivery_folder)
The dummy delivery folder must contain a directory for each
group_id
specified in the info file, which will act as dummy delivery for the specific job. See the documentation forfetch.copy
.
However, the --override-deliveries
can be used to provide a directory containing the dummy deliveries, and ask
Dulcinea to automatically override the existing fetchers with data from the given directory.
This solution is preferred as it is easier to use when testing simple blueprints.
Info file example
The info file must be given using the -i
option and should contain the meta-data of all dummy deliveries.
[
{
"module_id": 1,
"activity_id": 1,
"group_id": 1,
"leader": "login_x"
},
{
"module_id": 1,
"activity_id": 1,
"group_id": 2,
"leader": "login_y"
}
]
The only mandatory value is
group_id
, which must match the directory name inside the dummy delivery folder. If any other value is missing, Dulcinea will use a default value instead.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for etna_dulcinea-1.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0032d0af4743453eac98ce5f3d96e9a5c5a3d8c53c208122edba9194a832cec |
|
MD5 | 72e0fd357e0d7b371c67d2bb7bc22793 |
|
BLAKE2b-256 | 5ae4e88a5761df3632bbed9f1cde707d13d671a7ccded4dd50ba41db23378fd2 |