Skip to content

Commit

Permalink
FS-4361-remove-short-fund-name-hsra-from-the-form-name-for-qa-formatt…
Browse files Browse the repository at this point in the history
…ing (#136)

* remove hsra text from the form name title for qa formatting

* Update version to 2.0.46

* flake8 version bumped

---------

Co-authored-by: FSD Github Actions <[email protected]>
  • Loading branch information
ramsharma-prog and FSD Github Actions authored Apr 30, 2024
1 parent 65446a7 commit f418ade
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repos:
- id: black
language_version: python3
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
rev: 7.0.0
hooks:
- id: flake8
args:
Expand Down
4 changes: 3 additions & 1 deletion fsd_utils/mapping/application/application_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ def generate_text_of_application(q_and_a: dict, fund_name: str, language=EN) ->
output.write(f"********* {fund_name} **********\n")

for section_name, values in q_and_a.items():
title = simplify_title(section_name, remove_text=["cof", "ns", "cyp", "dpi"])
title = simplify_title(
section_name, remove_text=["cof", "ns", "cyp", "dpi", "hsra"]
)
output.write(f"\n* {' '.join(title).capitalize()}\n\n")
for questions, answers in values.items():
output.write(f" Q) {questions}\n")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "funding-service-design-utils"

version = "2.0.45"
version = "2.0.46"

authors = [
{ name="DLUHC", email="[email protected]" },
Expand Down
5 changes: 5 additions & 0 deletions tests/test_mapping_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ def test_format_answer(input_data, expected_response):
["cof", "cyp"],
["organisation", "name"],
),
(
"total-expected-cost-hsra",
["cof", "cyp", "hsra"],
["total", "expected", "cost"],
),
("organisation-address", ["cof", "ns"], ["organisation", "address"]),
],
)
Expand Down

0 comments on commit f418ade

Please sign in to comment.