ccs-digitalmarketplace-frameworks 3.13.9 → 3.13.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/frameworks/digital-outcomes-and-specialists-7/manifests/edit_service.yml +1 -0
- package/frameworks/digital-outcomes-and-specialists-7/manifests/edit_service_as_admin.yml +1 -0
- package/frameworks/digital-outcomes-and-specialists-7/manifests/edit_submission.yml +1 -0
- package/frameworks/digital-outcomes-and-specialists-7/questions/declaration/confirmationConfirmation.yml +3 -1
- package/frameworks/digital-outcomes-and-specialists-7/questions/declaration/confirmationPostalAddressBuilding.yml +1 -1
- package/frameworks/digital-outcomes-and-specialists-7/questions/services/physicalStudioBookingCost.yml +1 -3
- package/frameworks/digital-outcomes-and-specialists-7/questions/services/pricePerHead.yml +29 -0
- package/frameworks/digital-outcomes-and-specialists-7/questions/services/virtualStudioBookingCost.yml +1 -3
- package/frameworks/digital-outcomes-and-specialists-7/questions/services/whatUserResearchServices.yml +2 -0
- package/package.json +1 -1
- package/schema_generator/validation.py +2 -10
- package/tests/test_generate_validation_schema.py +0 -20
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
name: Confirmation
|
|
2
2
|
|
|
3
3
|
question: |
|
|
4
|
-
|
|
4
|
+
<p class="govuk-body">
|
|
5
|
+
I confirm that:
|
|
6
|
+
</p>
|
|
5
7
|
<ul class="govuk-list govuk-list--bullet">
|
|
6
8
|
<li>to the best of my knowledge the answers submitted and information contained in this document are complete, accurate and not misleading</li>
|
|
7
9
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Price per head
|
|
2
|
+
question: What is the price per head (pounds sterling, excluding VAT) to recruit a member of the public from the UK population?
|
|
3
|
+
hint: For example, £199.99
|
|
4
|
+
|
|
5
|
+
depends:
|
|
6
|
+
- "on": lot
|
|
7
|
+
being:
|
|
8
|
+
- user-research-studios-and-participants
|
|
9
|
+
|
|
10
|
+
type: pricing
|
|
11
|
+
|
|
12
|
+
fields:
|
|
13
|
+
price: perHeadPrice
|
|
14
|
+
|
|
15
|
+
decimal_place_restriction: true
|
|
16
|
+
digit_limits:
|
|
17
|
+
price: 4
|
|
18
|
+
|
|
19
|
+
depends_on_follow_up:
|
|
20
|
+
whatUserResearchServices:
|
|
21
|
+
- user-research-participants
|
|
22
|
+
|
|
23
|
+
validations:
|
|
24
|
+
- name: answer_required
|
|
25
|
+
field: perHeadPrice
|
|
26
|
+
message: Enter the amount you will charge per head to recruit
|
|
27
|
+
- name: not_money_format
|
|
28
|
+
field: perHeadPrice
|
|
29
|
+
message: Maximum price must be a number less than 10,000, without units, like 99.95
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ccs-digitalmarketplace-frameworks",
|
|
3
|
-
"version": "3.13.
|
|
3
|
+
"version": "3.13.10",
|
|
4
4
|
"description": "Data files for Digital Marketplace’s procurement frameworks",
|
|
5
5
|
"repository": "git@github.com:Crown-Commercial-Service/ccs-digitalmarketplace-frameworks",
|
|
6
6
|
"author": "enquiries@digitalmarketplace.service.gov.uk"
|
|
@@ -491,7 +491,7 @@ def boolean_list_property(question, _dependent_follow_up_map):
|
|
|
491
491
|
}}
|
|
492
492
|
|
|
493
493
|
|
|
494
|
-
def price_string(optional, decimal_place_restriction=False, digit_limit=None
|
|
494
|
+
def price_string(optional, decimal_place_restriction=False, digit_limit=None):
|
|
495
495
|
if digit_limit is None:
|
|
496
496
|
digit_limit = 15
|
|
497
497
|
|
|
@@ -504,10 +504,7 @@ def price_string(optional, decimal_place_restriction=False, digit_limit=None, li
|
|
|
504
504
|
pattern = restricted_pattern
|
|
505
505
|
if optional:
|
|
506
506
|
pattern = r"^$|" + pattern
|
|
507
|
-
|
|
508
|
-
for limit in limits:
|
|
509
|
-
if limit == 'greater_than_zero':
|
|
510
|
-
pattern = '^(?!0(?:\\.0+)?$)' + pattern.split('^')[1]
|
|
507
|
+
|
|
511
508
|
return {
|
|
512
509
|
"type": "string",
|
|
513
510
|
"pattern": pattern,
|
|
@@ -519,19 +516,14 @@ def pricing_property(question, _dependent_follow_up_map):
|
|
|
519
516
|
for price_key in ['price', 'minimum_price', 'maximum_price']:
|
|
520
517
|
if price_key in question.fields:
|
|
521
518
|
digit_limit = None
|
|
522
|
-
limits = []
|
|
523
519
|
|
|
524
520
|
if 'digit_limits' in question:
|
|
525
521
|
digit_limit = question['digit_limits'].get(price_key)
|
|
526
522
|
|
|
527
|
-
if 'limits' in question:
|
|
528
|
-
limits = question['limits'].get(price_key)
|
|
529
|
-
|
|
530
523
|
pricing[question.fields[price_key]] = price_string(
|
|
531
524
|
price_key in question.get('optional_fields', []),
|
|
532
525
|
question.decimal_place_restriction,
|
|
533
526
|
digit_limit=digit_limit,
|
|
534
|
-
limits=limits,
|
|
535
527
|
)
|
|
536
528
|
|
|
537
529
|
if 'price_unit' in question.fields:
|
|
@@ -785,26 +785,6 @@ def test_pricing_property_custom_intervals():
|
|
|
785
785
|
]
|
|
786
786
|
|
|
787
787
|
|
|
788
|
-
def test_pricing_property_limits_greater_than_zero():
|
|
789
|
-
manifest = {
|
|
790
|
-
"id": "Test",
|
|
791
|
-
"type": "pricing",
|
|
792
|
-
"fields": {
|
|
793
|
-
"price": "price",
|
|
794
|
-
},
|
|
795
|
-
"limits": {
|
|
796
|
-
"price": [
|
|
797
|
-
"greater_than_zero"
|
|
798
|
-
]
|
|
799
|
-
}
|
|
800
|
-
}
|
|
801
|
-
|
|
802
|
-
cq = ContentQuestion(manifest)
|
|
803
|
-
result = pricing_property(cq, {})
|
|
804
|
-
|
|
805
|
-
assert '(?!0(?:\\.0+)?$)' in result['price']['pattern']
|
|
806
|
-
|
|
807
|
-
|
|
808
788
|
@given(st.text())
|
|
809
789
|
def test_number_property(id):
|
|
810
790
|
actual = number_property({'id': id, 'type': 'number'}, {})
|