diff --git a/CHANGELOG.md b/CHANGELOG.md index b0ce067..3033345 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [0.7.0] - 2020-06-26 + +### Changed + +- requirements: Update Django to 2.2 LTS and lib-cove to latest + ## [0.6.0] - 2020-02-18 Changes to packaging only; diff --git a/setup.py b/setup.py index 938d2aa..0a0dd3f 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='libcovebods', - version='0.6.0', + version='0.7.0', author='Open Data Services', author_email='code@opendataservices.coop', url='https://github.com/openownership/lib-cove-bods', @@ -11,9 +11,9 @@ long_description='A data review library', install_requires=[ 'python-dateutil', - 'Django>1.11.23,<1.12', + 'Django>2.2,<2.3', 'flattentool>=0.5.0', - 'libcove>=0.14.0' + 'libcove>=0.17.0' ], extras_require={ 'dev': ['pytest', 'flake8'] diff --git a/tests/test_api_0_1.py b/tests/test_api_0_1.py index e0d3cec..2e16e4f 100644 --- a/tests/test_api_0_1.py +++ b/tests/test_api_0_1.py @@ -12,7 +12,7 @@ ({'message': "'exclusiveMinimum' should be a JSON boolean, 'true' or 'false'.", 'message_safe': 'exclusiveMinimum should be a JSON boolean, true or false.', 'message_type': 'boolean', 'path_no_number': 'interests/share/exclusiveMinimum'}, [{'path': '19/interests/0/share/exclusiveMinimum', 'value': 'not a bool'}]), # noqa ({'message': "'interestedParty' is missing but required. Check that the field is included and correctly spelled.", 'message_safe': 'interestedParty is missing but required. Check that the field is included and correctly spelled.', 'message_type': 'required', 'path_no_number': ''}, [{'path': '16'}, {'path': '17'}, {'path': '18'}, {'path': '19'}, {'path': '20'}]), # noqa ({'message': "'interests' should be a JSON array. Check that value(s) appear within square brackets, [...]", 'message_safe': 'interests should be a JSON array. Check that value(s) appear within square brackets, [...]', 'message_type': 'array', 'path_no_number': 'interests'}, [{'path': '17/interests'}]), # noqa - ({'message': "'interests/0' should be a JSON object", 'message_safe': 'interests/0 should be a JSON object', 'message_type': 'object', 'path_no_number': 'interests'}, [{'path': '18/interests/0', 'value': 'not an object'}]), # noqa + ({'message': "'interests/[number]' should be a JSON object", 'message_safe': 'interests/[number] should be a JSON object', 'message_type': 'object', 'path_no_number': 'interests'}, [{'path': '18/interests/0', 'value': 'not an object'}]), # noqa ({'message': "'missingPersonType' is a dependency of 'missingPersonReason'", 'message_safe': ''missingPersonType' is a dependency of 'missingPersonReason'', 'message_type': 'dependencies', 'path_no_number': ''}, [{'path': '14'}]), # noqa ({'message': "'motivation' contains an unrecognised value. Check the related codelist for allowed code values.", 'message_safe': 'motivation contains an unrecognised value. Check the related codelist for allowed code values.', 'message_type': 'enum', 'path_no_number': 'annotations/motivation'}, [{'path': '20/annotations/0/motivation', 'value': 'not on open list'}]), # noqa ({'message': "'not a date' does not match '^([\\\\+-]?\\\\d{4}(?!\\\\d{2}\\x08))((-?)((0[1-9]|1[0-2])(\\\\3([12]\\\\d|0[1-9]|3[01]))?|W([0-4]\\\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\\\d|[12]\\\\d{2}|3([0-5]\\\\d|6[1-6])))([T\\\\s]((([01]\\\\d|2[0-3])((:?)[0-5]\\\\d)?|24\\\\:?00)([\\\\.,]\\\\d+(?!:))?)?(\\\\17[0-5]\\\\d([\\\\.,]\\\\d+)?)?([zZ]|([\\\\+-])([01]\\\\d|2[0-3]):?([0-5]\\\\d)?)?)?)?$'", 'message_safe': 'birthDate does not match the regex ^([\\+-]?\\d{4}(?!\\d{2}\x08))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$', 'message_type': 'pattern', 'path_no_number': 'birthDate'}, [{'path': '12/birthDate', 'value': 'not a date'}]), # noqa @@ -23,8 +23,8 @@ ({'message': "'statementType' contains an unrecognised value. Check the related codelist for allowed code values.", 'message_safe': 'statementType contains an unrecognised value. Check the related codelist for allowed code values.', 'message_type': 'enum', 'path_no_number': 'statementType'}, [{'path': '1/statementType', 'value': 'bad statement type'}, {'path': '3/statementType'}]), # noqa ({'message': "'statementType' is missing but required. Check that the field is included and correctly spelled.", 'message_safe': 'statementType is missing but required. Check that the field is included and correctly spelled.', 'message_type': 'required', 'path_no_number': ''}, [{'path': '0'}]), # noqa ({'message': "'subject' is missing but required. Check that the field is included and correctly spelled.", 'message_safe': 'subject is missing but required. Check that the field is included and correctly spelled.', 'message_type': 'required', 'path_no_number': ''}, [{'path': '16'}, {'path': '17'}, {'path': '18'}, {'path': '19'}, {'path': '20'}]), # noqa - ({'message': "'too long long long long long long long long long long long long long long long long' is too long", 'message_safe': 'replacesStatements/0 is too long. It should not exceed 64 characters.', 'message_type': 'maxLength', 'path_no_number': 'replacesStatements'}, [{'path': '8/replacesStatements/0', 'value': 'too long long long long long long long long long long long long long long long long'}]), # noqa - ({'message': "'tooshort' is too short", 'message_safe': 'replacesStatements/0 is too short. It should be at least 32 characters.', 'message_type': 'minLength', 'path_no_number': 'replacesStatements'}, [{'path': '7/replacesStatements/0', 'value': 'tooshort'}]), # noqa + ({'message': "'too long long long long long long long long long long long long long long long long' is too long", 'message_safe': 'replacesStatements/[number] is too long. It should not exceed 64 characters.', 'message_type': 'maxLength', 'path_no_number': 'replacesStatements'}, [{'path': '8/replacesStatements/0', 'value': 'too long long long long long long long long long long long long long long long long'}]), # noqa + ({'message': "'tooshort' is too short", 'message_safe': 'replacesStatements/[number] is too short. It should be at least 32 characters.', 'message_type': 'minLength', 'path_no_number': 'replacesStatements'}, [{'path': '7/replacesStatements/0', 'value': 'tooshort'}]), # noqa ({'message': "'tooshort' is too short", 'message_safe': 'statementID is too short. It should be at least 32 characters.', 'message_type': 'minLength', 'path_no_number': 'statementID'}, [{'path': '5/statementID', 'value': 'tooshort'}]), # noqa ({'message': '-1 is less than the minimum of 0', 'message_safe': 'minimum is too small. The minimum allowed value is 0.', 'message_type': 'minimum', 'path_no_number': 'interests/share/minimum'}, [{'path': '16/interests/0/share/minimum', 'value': -1}]), # noqa ({'message': '101 is greater than the maximum of 100', 'message_safe': 'maximum is too large. The maximum allowed value is 100.', 'message_type': 'maximum', 'path_no_number': 'interests/share/maximum'}, [{'path': '16/interests/0/share/maximum', 'value': 101}]), # noqa