import dbnl
dbnl.login()
project = dbnl.create_project(
name="My Project",
description="This is a very important project."
)import dbnl
dbnl.login()
# Export
project_1 = dbnl.get_or_create_project(name="Existing Project")
export_json = dbnl.export_project_as_json(project=proj1)
# Adjust the project values as you'd like. You will need to change the name.
# An example of the JSON structure is in the collapsible section below
export_json["project"]["name"] = "New Project"
# Import
project_2 = dbnl.import_project_from_json(params=export_json){
"project": {
"name": "My Project",
"description": "This is my project."
},
"notification_rules": [
{
"conditions": [
{
"assertion_name": "less_than",
"assertion_params": { "other": 0.85 },
"query_name": "test_status_percentage_query",
"query_params": {
"exclude_tag_ids": [],
"include_tag_ids": [],
"require_tag_ids": [],
"statuses": ["PASSED"]
}
}
],
"name": "Alert if passed tests are less than 85%",
"notification_integration_names": ["Notification channel"],
"status": "ENABLED",
"trigger": "test_session.failed"
}
],
"tags": [
{
"name": "my-tag",
"description" :"This is my tag."
}
],
"test_specs": [
{
"assertion": { "name": "less_than", "params": { "other": 0.5 } },
"description": "Testing the difference in the example statistic",
"name": "Gr.0: Non Parametric Difference: Example_Statistic",
"statistic_inputs": [
{
"select_query_template": {
"filter": null,
"select": "{EXPERIMENT}.Example_Statistic"
}
},
{
"select_query_template": {
"filter": null,
"select": "{BASELINE}.Example_Statistic"
}
}
],
"statistic_name": "my_stat",
"statistic_params": {},
"tag_names": ["my-tag"]
}
]
}import dbnl
dbnl.login()
project_1 = dbnl.get_or_create_project(name="Existing Project")
project_2 = dbnl.copy_project(project=project_1, name="New Project")