Skip to content

Commit

Permalink
Merge pull request #57 from openownership/django-2.2
Browse files Browse the repository at this point in the history
requirements: Update Django to 2.2 LTS and lib-cove to latest
  • Loading branch information
Bjwebb authored Jun 26, 2020
2 parents 9ad1fea + 9a6bc3a commit 049f740
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='libcovebods',
version='0.6.0',
version='0.7.0',
author='Open Data Services',
author_email='[email protected]',
url='https://github.com/openownership/lib-cove-bods',
Expand All @@ -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']
Expand Down
6 changes: 3 additions & 3 deletions tests/test_api_0_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
({'message': "'exclusiveMinimum' should be a JSON boolean, 'true' or 'false'.", 'message_safe': '<code>exclusiveMinimum</code> should be a JSON boolean, <code>true</code> or <code>false</code>.', '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': '<code>interestedParty</code> 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': '<code>interests</code> 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': '<code>interests/0</code> 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': '<code>interests/[number]</code> 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': '&#39;missingPersonType&#39; is a dependency of &#39;missingPersonReason&#39;', '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': '<code>motivation</code> 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': '<code>birthDate</code> does not match the regex <code>^([\\+-]?\\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)?)?)?)?$</code>', 'message_type': 'pattern', 'path_no_number': 'birthDate'}, [{'path': '12/birthDate', 'value': 'not a date'}]), # noqa
Expand All @@ -23,8 +23,8 @@
({'message': "'statementType' contains an unrecognised value. Check the related codelist for allowed code values.", 'message_safe': '<code>statementType</code> 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': '<code>statementType</code> 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': '<code>subject</code> 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': '<code>replacesStatements/0</code> 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': '<code>replacesStatements/0</code> 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': '<code>replacesStatements/[number]</code> 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': '<code>replacesStatements/[number]</code> 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': '<code>statementID</code> 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': '<code>minimum</code> 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': '<code>maximum</code> 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
Expand Down

0 comments on commit 049f740

Please sign in to comment.