[PATCH v2 0/5] Convert Series-Patch relationship to 1:N
Stephen Finucane
stephen at that.guru
Tue Sep 11 08:37:07 AEST 2018
This is mostly a tech debt reduction exercise. As noted in the main
patch, the M:N relationship between series and patches was, in
hindsight, a design decision made for the wrong reasons. It's one of the
things holding us back on the improved tagging series and it makes a lot
of things more difficult to do than they should be. Time to fix it, IMO.
Changes since v1:
- Rebase on master. This results in a patch ("models: Remove
'SeriesMixin'") being dropped and the migrations being renumbered.
Stephen Finucane (5):
tests: Add more tests for series-ified mbox views
tests: Hardcode expected values
models: Convert Series-Patch relationship to 1:N
tests: Remove 'create_series_patch'
views: Add support for boolean 'series' parameters
patchwork/admin.py | 2 +-
patchwork/api/cover.py | 19 +++--
patchwork/api/patch.py | 20 ++++--
.../0031_add_patch_series_fields.py | 32 +++++++++
...migrate_data_from_series_patch_to_patch.py | 35 ++++++++++
.../0033_remove_patch_series_model.py | 58 ++++++++++++++++
patchwork/models.py | 60 ++++++----------
patchwork/parser.py | 6 +-
patchwork/signals.py | 40 +++++------
.../templates/patchwork/download_buttons.html | 17 +----
patchwork/templates/patchwork/patch-list.html | 12 ++--
patchwork/templates/patchwork/submission.html | 26 ++-----
patchwork/tests/api/test_series.py | 12 ++--
patchwork/tests/test_detail.py | 16 -----
patchwork/tests/test_events.py | 39 +++++++----
patchwork/tests/test_mboxviews.py | 69 +++++++++++++++++--
patchwork/tests/test_series.py | 38 +++++-----
patchwork/tests/utils.py | 45 +++++++-----
patchwork/views/cover.py | 1 -
patchwork/views/patch.py | 5 +-
patchwork/views/utils.py | 17 ++---
21 files changed, 360 insertions(+), 209 deletions(-)
create mode 100644 patchwork/migrations/0031_add_patch_series_fields.py
create mode 100644 patchwork/migrations/0032_migrate_data_from_series_patch_to_patch.py
create mode 100644 patchwork/migrations/0033_remove_patch_series_model.py
--
2.17.1
More information about the Patchwork
mailing list