Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2023-12-23 | MAIN --> PROD | DEV (a660153) --> STAGING #3080

Merged
merged 2 commits into from
Dec 23, 2023
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
Binary file not shown.
7 changes: 3 additions & 4 deletions backend/audit/intakelib/checks/check_cluster_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
from django.conf import settings
from audit.intakelib.intermediate_representation import get_range_by_name
from audit.intakelib.common import get_message, build_cell_error_tuple
from .check_cluster_total import NOT_APPLICABLE, OTHER_CLUSTER, STATE_CLUSTER

logger = logging.getLogger(__name__)

STATE_CLUSTER = "STATE CLUSTER"
OTHER_CLUSTER = "OTHER CLUSTER NOT LISTED ABOVE"


def check_cluster_names(ir):
"""Check that cluster names are valid when present."""
Expand All @@ -29,7 +27,8 @@ def check_cluster_names(ir):

for index, value in enumerate(range_data["values"]):
if value and value not in (
valid_json["cluster_names"] + [STATE_CLUSTER, OTHER_CLUSTER]
valid_json["cluster_names"]
+ [STATE_CLUSTER, OTHER_CLUSTER, NOT_APPLICABLE]
):
errors.append(
build_cell_error_tuple(
Expand Down
1 change: 1 addition & 0 deletions backend/audit/intakelib/checks/check_cluster_total.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

logger = logging.getLogger(__name__)

# A copy of theses constants exists in schema/source/base/Base.libsonnet
STATE_CLUSTER = "STATE CLUSTER"
OTHER_CLUSTER = "OTHER CLUSTER NOT LISTED ABOVE"
NOT_APPLICABLE = "N/A"
Expand Down
3 changes: 1 addition & 2 deletions backend/audit/intakelib/checks/check_other_cluster_names.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import logging
from audit.intakelib.intermediate_representation import get_range_by_name
from audit.intakelib.common import get_message, build_cell_error_tuple
from .check_cluster_total import OTHER_CLUSTER

logger = logging.getLogger(__name__)

OTHER_CLUSTER = "OTHER CLUSTER NOT LISTED ABOVE"


def other_cluster_names(ir):
cluster_name = get_range_by_name(ir, "cluster_name")
Expand Down
3 changes: 1 addition & 2 deletions backend/audit/intakelib/checks/check_state_cluster_names.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import logging
from audit.intakelib.intermediate_representation import get_range_by_name
from audit.intakelib.common import get_message, build_cell_error_tuple
from .check_cluster_total import STATE_CLUSTER

logger = logging.getLogger(__name__)

STATE_CLUSTER = "STATE CLUSTER"


def state_cluster_names(ir):
cluster_name = get_range_by_name(ir, "cluster_name")
Expand Down
1 change: 1 addition & 0 deletions backend/dissemination/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def get(self, request, *args, **kwargs):
{
"form": form,
"state_abbrevs": STATE_ABBREVS,
"summary_report_download_limit": SUMMARY_REPORT_DOWNLOAD_LIMIT,
},
)

Expand Down
Loading