[GrandComicsDatabase/gcd-django] Add API v2 supporting resources (PR #733)

4 views
Skip to first unread message

Adam Hernandez

unread,
Jul 31, 2026, 2:07:53 PM (9 days ago) Jul 31
to GrandComicsDatabase/gcd-django, Subscribed

Summary

  • add public API v2 list/detail endpoints for Indicia Publishers, Indicia
    Printers, Brand Groups, Brands, Features, Awards, and Series Bonds
  • expose active publisher-family relationships, normalized directional Feature
    relations, and a paginated typed Award recipient action
  • add persistent Series Bond timestamps with approved-revision backfill when
    available and a documented migration-time baseline otherwise
  • keep every Phase 4 route on the public surface only, with no v1 or MyComics
    route changes

API additions

  • /api/v2/indicia-publishers/
  • /api/v2/indicia-printers/
  • /api/v2/brand-groups/
  • /api/v2/brands/
  • /api/v2/features/
  • /api/v2/awards/
  • /api/v2/awards/{id}/recipients/
  • /api/v2/series-bonds/

Each root endpoint includes list/detail serializers, representative filters,
pagination, anonymous read access, conditional request support, OpenAPI schema
coverage, active-only behavior where the model supports soft deletion, and
fixed query-count regression tests.

Data migration

gcd.0074_series_bond_timestamps adds persistent created and indexed
modified timestamps to Series Bonds. Existing rows use their earliest and
latest approved revision timestamps when those revisions exist. Rows without
approved history receive one shared migration-time value that marks the start
of reliable timestamp tracking.

The local production-copy database had no Series Bond revision rows, so all
6,556 legacy rows received the documented baseline
2026-07-27T20:34:17.981447Z. The migration completed with zero null values.

Validation

  • ruff check apps/api_v2/
  • ruff format --check apps/api_v2/
  • python manage.py check
  • python manage.py migrate --check
  • python -m pytest apps/api_v2/tests/ -v --tb=short
    (313 passed, 24 existing warnings)
  • public/MyComics routing and OpenAPI schema regression coverage
  • Series Bond migration history and no-history fallback regression coverage

Production-copy manual baseline

  • all 60 focused JSON requests returned 200
  • all 56 focused conditional replays returned 304
  • all 25 combined browsable/API-documentation requests returned 200
  • all 21 combined conditional replays returned 304
  • all seven active row counts and the high-cardinality relationship payloads
    matched direct production-copy database measurements
  • focused maximum response times were about 17 ms for the publisher family,
    111 ms for Features, 24 ms for Awards, and 23 ms for Series Bonds

Final EXPLAIN review found the Brand relationship filters, Award recipient
queries, and Series Bond relationship filters using existing indexes. Feature
broad and icontains scans remained acceptable at the observed 47,648-row
scale, so no additional performance migration is included.


You can view, comment on, or merge this pull request online at:

  https://github.com/GrandComicsDatabase/gcd-django/pull/733

Commit Summary

  • 100544f feat(api-v2): add indicia publisher endpoints
  • 21828d6 feat(api-v2): add indicia printer endpoints
  • ec2261c feat(api-v2): add brand group endpoints
  • 6fdc837 feat(api-v2): add brand endpoints
  • c3fdfb0 feat(api-v2): add feature endpoints
  • 56f143e feat(api-v2): add award endpoints
  • 7edf34b feat(api-v2): add series bond endpoints

File Changes

(55 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/pull/733@github.com>

gemini-code-assist[bot]

unread,
Jul 31, 2026, 2:11:17 PM (9 days ago) Jul 31
to GrandComicsDatabase/gcd-django, Subscribed

@gemini-code-assist[bot] commented on this pull request.

Code Review

This pull request implements Sprint 4 endpoints for the public v2 API, adding read-only viewsets, serializers, filters, and comprehensive tests for Awards, Brand Groups, Brands, Features, Indicia Printers, Indicia Publishers, and Series Bonds. It also introduces a database migration to add and backfill persistent created and modified timestamps for the SeriesBond model. Feedback on the changes suggests utilizing self.get_serializer in AwardViewSet.recipients rather than instantiating AwardRecipientSerializer directly to ensure the serializer receives the proper context.


In apps/api_v2/views/awards.py:

> +        page = self.paginate_queryset(filterset.qs)
+        serializer = AwardRecipientSerializer(page, many=True)
+        return self.get_paginated_response(serializer.data)

medium

It is recommended to use self.get_serializer instead of instantiating AwardRecipientSerializer directly. Using self.get_serializer ensures that the serializer is initialized with the correct context (such as the request and view), which is important for features like generating absolute URLs or accessing request data within serializer fields.

⬇️ Suggested change
-        page = self.paginate_queryset(filterset.qs)
-        serializer = AwardRecipientSerializer(page, many=True)
-        return self.get_paginated_response(serializer.data)
+        page = self.paginate_queryset(filterset.qs)
+        serializer = self.get_serializer(page, many=True)
+        return self.get_paginated_response(serializer.data)


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/pull/733/review/4831072918@github.com>

Adam Hernandez

unread,
Jul 31, 2026, 2:17:51 PM (9 days ago) Jul 31
to GrandComicsDatabase/gcd-django, Push

@DeusExTaco pushed 1 commit.

  • a76fae6 fix(api-v2): preserve award recipient serializer context


View it on GitHub or unsubscribe.


Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/pull/733/before/7edf34b8884b4019118ff2c59d26e570e836b890/after/a76fae6f4bfc4bc0cc862b9be92d1500d74e9fe5@github.com>

JochenGCD

unread,
Aug 3, 2026, 4:59:38 PM (6 days ago) Aug 3
to GrandComicsDatabase/gcd-django, Subscribed
jochengcd left a comment (GrandComicsDatabase/gcd-django#733)

features will be changed to use feature names, is on beta and in a different branch. I intend to merge that branch to beta soon, then we can see what effect it has one the API ?


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/pull/733/c5171649227@github.com>

Adam Hernandez

unread,
Aug 3, 2026, 5:36:56 PM (6 days ago) Aug 3
to GrandComicsDatabase/gcd-django, Subscribed
DeusExTaco left a comment (GrandComicsDatabase/gcd-django#733)

features will be changed to use feature names, is on beta and in a different branch. I intend to merge that branch to beta soon, then we can see what effect it has one the API ?

@jochengcd

Go ahead and merge it into beta. Once it’s there, I’ll sync the latest beta into PR #733 locally, resolve any conflicts, and run the API tests to see what effect the feature-name changes have. I’ll then push the beta sync to the PR, which should rerun CI without needing an extra change. If everything stays green, the API should be ready to merge into beta. Sound good?


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/pull/733/c5171999172@github.com>

JochenGCD

unread,
Aug 7, 2026, 5:51:57 PM (2 days ago) Aug 7
to GrandComicsDatabase/gcd-django, Subscribed

@jochengcd approved this pull request.

features needs to be touched once we deploy the feature name change


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/pull/733/review/4886806977@github.com>

JochenGCD

unread,
Aug 7, 2026, 5:52:05 PM (2 days ago) Aug 7
to GrandComicsDatabase/gcd-django, Subscribed

Merged #733 into api-v2.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/pull/733/issue_event/29142241482@github.com>

Reply all
Reply to author
Forward
0 new messages