[PATCH 0/4] Add submission relations
Mete Polat
metepolat2000 at gmail.com
Sun Dec 8 03:46:17 AEDT 2019
This patch introduces the ability to view relations between submissions by
creating and updating them via the REST API.
Changes since v3:
- Redesign relations part in submissions view
- Add missing fixes tag in 'docs: Add missing series index schema'
- Show more than just the submission ids in the REST API (by Daniel Axtens)
- Add a "by" column to SubmissionRelation to identify who is doing what
- Restrict relation changes to submissions that are already part of another
relation (returns HTTP code 409 CONFLICT)
- Add test for conflicting submissions in relations
- Clarify MaintainerPermission with some comments
- Optimize db access in submission.html and in the relations REST API
- Remove submission_count ordering for relations
- Remove RelationError openAPI schema (formerly used for bulk operations)
Note:
- Kept one-to-many instead of many-to-many for submissions in relations.
- Kept all tests in test_relation. They are not that comprehensive. They just
test the same thing for different users (maintainer/non-maintainer/anonymous).
I had to write all combinations manually as not every python version we
support allows generating test cases automatically. They also helped me a lot
in finding permission issues.
Mete Polat (4):
ui, templates: Combine series and related row
models, templates: Add submission relations
docs: Add missing series index schema
REST: Add submission relations
docs/api/schemas/latest/patchwork.yaml | 278 +++++++++++++++++
docs/api/schemas/patchwork.j2 | 290 ++++++++++++++++++
docs/api/schemas/v1.0/patchwork.yaml | 5 +
docs/api/schemas/v1.1/patchwork.yaml | 5 +
docs/api/schemas/v1.2/patchwork.yaml | 278 +++++++++++++++++
htdocs/css/style.css | 2 +-
patchwork/api/embedded.py | 39 +++
patchwork/api/index.py | 1 +
patchwork/api/relation.py | 121 ++++++++
.../migrations/0038_submission_relations.py | 30 ++
patchwork/models.py | 16 +
patchwork/templates/patchwork/submission.html | 94 ++++--
patchwork/tests/api/test_relation.py | 181 +++++++++++
patchwork/tests/utils.py | 15 +
patchwork/urls.py | 11 +
patchwork/views/patch.py | 7 +
...submission-relations-c96bb6c567b416d8.yaml | 10 +
17 files changed, 1351 insertions(+), 32 deletions(-)
create mode 100644 patchwork/api/relation.py
create mode 100644 patchwork/migrations/0038_submission_relations.py
create mode 100644 patchwork/tests/api/test_relation.py
create mode 100644 releasenotes/notes/add-submission-relations-c96bb6c567b416d8.yaml
--
2.24.0
More information about the Patchwork
mailing list