Skip to content

Commit 734cd7c

Browse files
authored
Merge pull request #10 from jokiefer/feature/release-v0.4.0
document changes
2 parents e9e2494 + 64215a3 commit 734cd7c

File tree

7 files changed

+28
-19
lines changed

7 files changed

+28
-19
lines changed

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
],
1313
"editor.formatOnSave": true,
1414
"editor.codeActionsOnSave": {
15-
"source.fixAll": true,
16-
"source.organizeImports": true
15+
"source.fixAll": "explicit",
16+
"source.organizeImports": "explicit"
1717
},
1818
"[python]": {
1919
"editor.defaultFormatter": "ms-python.autopep8"

CHANGELOG.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
77
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

99

10+
[0.4.0] - 2024-11-07
11+
--------------------
12+
13+
Added
14+
~~~~~
15+
16+
* local identity (lid) handling
17+
18+
1019
[0.3.2] - 2024-10-25
1120
--------------------
1221

README.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ Implemented Features
2323
* `Updating To-One Relationships <https://jsonapi.org/ext/atomic/#auto-id-updating-to-one-relationships>`_
2424
* `Updating To-Many Relationships <https://jsonapi.org/ext/atomic/#auto-id-updating-to-many-relationships>`_
2525
* error reporting with json pointer to the concrete operation and the wrong attributes
26-
26+
* `local identity (lid) <https://jsonapi.org/ext/atomic/#operation-objects>`_ handling
2727

2828
ToDo
2929
~~~~
3030

31+
Only one major feature need to be implemented for first major version v1.0.0:
32+
3133
* permission handling
32-
* `local identity (lid) <https://jsonapi.org/ext/atomic/#operation-objects>`_ handling

atomic_operations/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = "0.3.2"
1+
__version__ = "0.4.0"
22
VERSION = __version__ # synonym

tests/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22

3+
34
SECRET_KEY = "SOME_SUPER_SECRET"
45

56
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

tests/test_parsers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ def test_primary_data_with_id_and_lid(self):
436436
"title": "JSON API paints my bikeshed!"
437437
}
438438
},
439-
{
439+
{
440440
"op": "update",
441441
"data": {
442442
"lid": "1",
@@ -456,4 +456,4 @@ def test_primary_data_with_id_and_lid(self):
456456
"stream": stream,
457457
"parser_context": self.parser_context
458458
}
459-
)
459+
)

tests/test_views.py

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ def setUp(self):
2323

2424
def test_content_type_extension(self):
2525
"""Test that the correct content type is accepted
26-
26+
2727
The media type and parameters are defined at https://jsonapi.org/ext/atomic. This tests
2828
hardcodes the value to separate the test from the library's constants.
29-
29+
3030
"""
3131
operations = []
3232

@@ -538,7 +538,7 @@ def test_view_processing_with_lid_substitution(self):
538538
"text": "JSON API paints my bikeshed!"
539539
}
540540
}
541-
},
541+
},
542542
{
543543
"op": "add",
544544
"data": {
@@ -548,7 +548,7 @@ def test_view_processing_with_lid_substitution(self):
548548
"text": "JSON API paints my bikeshed!"
549549
}
550550
}
551-
},{
551+
}, {
552552
"op": "update",
553553
"data": {
554554
"lid": "valid-lid-1",
@@ -675,7 +675,6 @@ def test_view_processing_with_lid_substitution(self):
675675

676676
self.assertDictEqual(expected_result,
677677
json.loads(response.content))
678-
679678

680679
# check db content
681680
self.assertEqual(1, BasicModel.objects.count())
@@ -693,7 +692,6 @@ def test_view_processing_with_lid_substitution(self):
693692
# with django 4.2 TransactionTestCase.assertQuerysetEqual() is deprecated in favor of assertQuerySetEqual().
694693
self.assertQuerySetEqual(RelatedModelTwo.objects.filter(pk__in=[1, 2]),
695694
BasicModel.objects.get(pk=2).to_many.all())
696-
697695

698696
def test_view_processing_with_invalid_lid(self):
699697
operations = [
@@ -735,7 +733,7 @@ def test_view_processing_with_invalid_lid(self):
735733
error = json.loads(response.content)
736734
expected_error = {
737735
"errors": [
738-
{
736+
{
739737
"id": "unknown-lid",
740738
"detail": f'Object with lid `invalid-lid-test-2` received for operation with index `1` does not exist',
741739
"source": {
@@ -797,7 +795,7 @@ def test_view_processing_with_lid_type_mismatch(self):
797795
error = json.loads(response.content)
798796
expected_error = {
799797
"errors": [
800-
{
798+
{
801799
"id": "unknown-lid",
802800
"detail": f'Object with lid `lid-type-mismatch-1` received for operation with index `2` does not exist',
803801
"source": {
@@ -821,7 +819,7 @@ def test_adding_resource_with_lid_relationship(self):
821819
"text": "JSON API paints my bikeshed!"
822820
}
823821
},
824-
},
822+
},
825823
{
826824
"op": "add",
827825
"data": {
@@ -841,7 +839,7 @@ def test_adding_resource_with_lid_relationship(self):
841839
"text": "JSON API paints my bikeshed!"
842840
}
843841
},
844-
},{
842+
}, {
845843
"op": "add",
846844
"data": {
847845
"type": "BasicModel",
@@ -869,7 +867,7 @@ def test_adding_resource_with_lid_relationship(self):
869867
}
870868
}
871869
}
872-
},
870+
},
873871
]
874872

875873
data = {
@@ -948,4 +946,4 @@ def test_adding_resource_with_lid_relationship(self):
948946
}
949947

950948
self.assertDictEqual(expected_result,
951-
json.loads(response.content))
949+
json.loads(response.content))

0 commit comments

Comments
 (0)