Skip to content

Commit

Permalink
Add new additional fields to ocds template.
Browse files Browse the repository at this point in the history
  • Loading branch information
kindly committed Jun 12, 2019
1 parent ce7bc56 commit ff12103
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
"file_type": "json",
"releases_aggregates": {},
"additional_fields": [],
"all_additional_fields": [],
"additional_open_codelist_values": {},
"deprecated_fields": [],
"common_error_types": [],
Expand Down
2 changes: 1 addition & 1 deletion cove_ocds/templates/cove_ocds/explore_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ <h4 class="panel-title">
<div class="panel-body">
<p>{% blocktrans %}This data includes the following fields which are not part of the OCDS schema. You should check whether the data in these fields could be provided by using a field in the OCDS schema or by using an existing <a href="http://standard.open-contracting.org/latest/en/extensions/">extension</a> to the schema.{% endblocktrans %}</p>
<div id="additionalFieldTable" class="collapse in">
{% include "additional_fields_table.html" %}
{% include "additional_fields_table_all.html" %}
</div>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions cove_ocds/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,7 @@ def test_context_api_transform_validation_additional_fields():
'data_only': [['path_to_d', 'field_d', 1],
['path_to_e', 'field_e', 2],
['path_to_f', 'field_f', 3]],
'additional_fields': {},
'additional_fields_count': 6,
'validation_errors_count': 3
}
Expand All @@ -797,6 +798,7 @@ def test_context_api_transform_validation_additional_fields():
{'field': 'field_f', 'path': 'path_to_f', 'usage_count': 3}],
'deprecated_fields': [],
'extensions': {},
'all_additional_fields': {},
'validation_errors': [{'description': 'description_a', 'field': 'field_a', 'path': 'path_to_a', 'type': 'type_a', 'value': 'a_value'},
{'description': 'description_b', 'field': 'field_b', 'path': 'path_to_b', 'type': 'type_b', 'value': ''},
{'description': 'description_c', 'field': 'field_c', 'path': 'path_to_c', 'type': 'type_c', 'value': ''}]
Expand Down Expand Up @@ -857,6 +859,7 @@ def test_context_api_transform_extensions():
'validation_errors_count': 0,
'additional_fields_count': 0,
'data_only': [],
'additional_fields': {},
'deprecated_fields': []
}

Expand Down Expand Up @@ -894,6 +897,7 @@ def test_context_api_transform_deprecations():
'validation_errors_count': 0,
'data_only': [],
'additional_fields_count': 0,
'additional_fields': {},
'extensions': {},
}

Expand Down
4 changes: 2 additions & 2 deletions get_secret_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ wget http://travis:$TRAVIS_SECRET_FILES_PASSWORD@travis-secret-files.live3.defau
unzip ocdstestdata.zip
wget http://travis:$TRAVIS_SECRET_FILES_PASSWORD@travis-secret-files.live3.default.opendataservices.uk0.bigv.io/360testdata.zip
unzip 360testdata.zip
wget http://travis:$TRAVIS_SECRET_FILES_PASSWORD@travis-secret-files.live3.default.opendataservices.uk0.bigv.io/secret_data_test_archive_10.zip
unzip secret_data_test_archive_10.zip
wget http://travis:$TRAVIS_SECRET_FILES_PASSWORD@travis-secret-files.live3.default.opendataservices.uk0.bigv.io/secret_data_test_archive_11.zip
unzip secret_data_test_archive_11.zip
6 changes: 3 additions & 3 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ pip
Django<1.12
#^^ rq.filter: <1.12
-e git+https://github.com/OpenDataServices/flatten-tool.git@v0.7.0#egg=flattentool
-e git+https://github.com/open-contracting/lib-cove-ocds.git@v0.5.0#egg=libcoveocds
-e git+https://github.com/OpenDataServices/lib-cove-web.git@v0.8.0#egg=libcoveweb
-e git+https://github.com/OpenDataServices/lib-cove.git@v0.6.0#egg=libcove
-e git+https://github.com/open-contracting/lib-cove-ocds.git@v0.6.0#egg=libcoveocds
-e git+https://github.com/OpenDataServices/lib-cove-web.git@v0.9.0#egg=libcoveweb
-e git+https://github.com/OpenDataServices/lib-cove.git@v0.7.0#egg=libcove
django-bootstrap3
django-debug-toolbar
requests
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
pip==19.0.3
Django==1.11.20 # rq.filter: <1.12
-e git+https://github.com/OpenDataServices/flatten-tool.git@524f437abe48d7f9b8a2d6a1cf6fa9a49d002b0f#egg=flattentool
-e git+https://github.com/open-contracting/lib-cove-ocds.git@v0.5.0#egg=libcoveocds
-e git+https://github.com/OpenDataServices/lib-cove-web.git@v0.8.0#egg=libcoveweb
-e git+https://github.com/OpenDataServices/lib-cove.git@52acb2f0dcd296b9d952ff2adbae61dc4f8dd296#egg=libcove
-e git+https://github.com/open-contracting/lib-cove-ocds.git@v0.6.0#egg=libcoveocds
-e git+https://github.com/OpenDataServices/lib-cove-web.git@v0.9.0#egg=libcoveweb
-e git+https://github.com/OpenDataServices/lib-cove.git@v0.7.0#egg=libcove
django-bootstrap3==11.0.0
django-debug-toolbar==1.11
requests==2.21.0
Expand Down
6 changes: 3 additions & 3 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
pip==19.0.3
Django==1.11.20 # rq.filter: <1.12
-e git+https://github.com/OpenDataServices/flatten-tool.git@524f437abe48d7f9b8a2d6a1cf6fa9a49d002b0f#egg=flattentool
-e git+https://github.com/open-contracting/lib-cove-ocds.git@v0.5.0#egg=libcoveocds
-e git+https://github.com/OpenDataServices/lib-cove-web.git@v0.8.0#egg=libcoveweb
-e git+https://github.com/OpenDataServices/lib-cove.git@52acb2f0dcd296b9d952ff2adbae61dc4f8dd296#egg=libcove
-e git+https://github.com/open-contracting/lib-cove-ocds.git@v0.6.0#egg=libcoveocds
-e git+https://github.com/OpenDataServices/lib-cove-web.git@v0.9.0#egg=libcoveweb
-e git+https://github.com/OpenDataServices/lib-cove.git@v0.7.0#egg=libcove
django-bootstrap3==11.0.0
django-debug-toolbar==1.11
requests==2.21.0
Expand Down

0 comments on commit ff12103

Please sign in to comment.