Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2831,7 +2831,7 @@ def get_siblings(id):
status = status.lower()
if status not in SchemaConstants.ALLOWED_DATASET_STATUSES:
abort_bad_req(
"Invalid Dataset Status. Must be 'new', 'qa', or 'published' Case-Insensitive"
"Invalid Dataset Status. Must be 'new', 'qa', 'approval' or 'published' Case-Insensitive"
)
if property_key is not None:
property_key = property_key.lower()
Expand Down Expand Up @@ -4115,7 +4115,7 @@ def get_associated_sources_from_dataset(id):
an sample that contain rui info will be returned. If false, only datasets that are NOT connected to samples
containing rui info will be returned. By default, no filtering is performed.
dataset_status : string
Filters results by dataset status. Accepted values are "Published", "QA", and "NEW". If a user only has access
Filters results by dataset status. Accepted values are "Published", "QA", "Approval" and "NEW". If a user only has access
to published datasets and enters QA or New, an error will be raised. By default, no filtering is performed

Returns
Expand Down Expand Up @@ -4245,9 +4245,9 @@ def get_prov_info():
param_dict["has_rui_info"] = has_rui_info
dataset_status = request.args.get("dataset_status")
if dataset_status is not None:
if dataset_status.lower() not in ["new", "qa", "published"]:
if dataset_status.lower() not in ["new", "qa", "approval", "published"]:
abort_bad_req(
"Invalid Dataset Status. Must be 'new', 'qa', or 'published' Case-Insensitive"
"Invalid Dataset Status. Must be 'new', 'qa', 'approval' or 'published' Case-Insensitive"
)
if published_only and dataset_status.lower() != "published":
abort_bad_req(
Expand Down
2 changes: 1 addition & 1 deletion src/requirements.dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
black>=26.3.1,<27.0

# For unit test
pytest>=7.4.4,<8.0
pytest>=9.0.3,<10.0
2 changes: 1 addition & 1 deletion src/schema/provenance_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ ENTITIES:
- validate_status_changed
- validate_dataset_not_component
generated: true
description: "One of: New|Processing|QA|Published|Error|Hold|Invalid|Incomplete"
description: "One of: New|Processing|QA|Approval|Published|Error|Hold|Invalid|Incomplete"
before_create_trigger: set_dataset_status_new
after_create_trigger: set_status_history
after_update_trigger: update_status
Expand Down
1 change: 1 addition & 0 deletions src/schema/schema_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class SchemaConstants(object):
"processing",
"published",
"qa",
'approval',
"error",
"hold",
"invalid",
Expand Down
2 changes: 1 addition & 1 deletion src/schema/schema_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -2001,7 +2001,7 @@ def normalize_status(status):
Parameters
----------
status : str
One of the status types: New|Processing|QA|Published|Error|Hold|Invalid
One of the status types: New|Processing|QA|Approval|Published|Error|Hold|Invalid

Returns
-------
Expand Down
8 changes: 4 additions & 4 deletions src/schema/schema_triggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -4409,7 +4409,7 @@ def get_has_visualization(
if user_token is None:
valid_statuses = ["Published"]
else:
valid_statuses = ["QA", "Published"]
valid_statuses = ["QA", "Approval", "Published"]

_, dataset_category = get_dataset_category(
property_key,
Expand Down Expand Up @@ -4480,7 +4480,7 @@ def get_has_visualization(
def get_has_qa_published_derived_dataset(
property_key, normalized_type, user_token, existing_data_dict, new_data_dict
):
"""Trigger event method that determines if a primary dataset a processed/derived dataset with a status of 'QA' and 'Published'.
"""Trigger event method that determines if a primary dataset a processed/derived dataset with a status of 'QA'/'Approval' and 'Published'.

Parameters
----------
Expand All @@ -4499,13 +4499,13 @@ def get_has_qa_published_derived_dataset(
-------
Tuple[str, str]
str: The target property key
str: Whether a primary dataset has at least one processed dataset with a status of 'QA', 'True' or 'False'
str: Whether a primary dataset has at least one processed dataset with a status of 'QA'/'Approval', 'True' or 'False'
"""
_, dataset_category = get_dataset_category(
property_key, normalized_type, user_token, existing_data_dict, new_data_dict
)
if equals(dataset_category, "primary"):
match_case = "AND s.status IN ['QA', 'Published']"
match_case = "AND s.status IN ['QA', 'Approval', 'Published']"
descendants = schema_neo4j_queries.get_dataset_direct_descendants(
schema_manager.get_neo4j_driver_instance(),
existing_data_dict["uuid"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -650,11 +650,12 @@ x-ref-components:
- New
- Processing
- QA
- Approval
- Published
- Error
- Hold
- Invalid
description: "One of: New|Processing|QA|Published|Error|Hold|Invalid"
description: "One of: New|Processing|QA|Approval|Published|Error|Hold|Invalid"
title:
type: string
description: "The dataset title."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,12 @@ Dataset:
- New
- Processing
- QA
- Approval
- Published
- Error
- Hold
- Invalid
description: "One of: New|Processing|QA|Published|Error|Hold|Invalid"
description: "One of: New|Processing|QA|Approval|Published|Error|Hold|Invalid"
title:
type: string
description: "The dataset title."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -575,11 +575,12 @@ components:
- New
- Processing
- QA
- Approval
- Published
- Error
- Hold
- Invalid
description: "One of: New|Processing|QA|Published|Error|Hold|Invalid"
description: "One of: New|Processing|QA|Approval|Published|Error|Hold|Invalid"
title:
type: string
description: "The dataset title."
Expand Down
Loading