Skip to content

Conversation

@jennifer-richards
Copy link
Member

No description provided.

jennifer-richards and others added 30 commits September 26, 2023 10:44
feat: api endpoint for docs submitted to the rpc
* feat: adding rev to demo doc creation

* fix: remove attempt to control required
* feat: Add @requires_api_token decorator

* refactor: Use @requires_api_token

* refactor: Tweak api token endpoints

This might be drifting from the design intent, but at least
uses the defined endpoint values. Further cleanup may well
be needed.
chore: Merge main into feat/rpc-api
* feat: subject_id -> Person api call

* doc: Add error responses to openapi spec
chore: Merge main into feat/rpc-api
chore: Merge main into feat/rpc-api
chore: Merge main into feat/rpc-api
# Conflicts:
#	ietf/doc/models.py
jennifer-richards and others added 13 commits July 7, 2025 13:46
chore: merge main into feat/rpc-api
* refactor: rpc_person -> PersonViewSet

* refactor: rpc_subject_person -> SubjectPersonView

* refactor: rpc_persons -> RpcPersonsView

* refactor: move get_persons into PersonViewSet

Changes the interface to return a list of Persons instead of a map from ID to name.

* refactor: rpc_draft -> DraftViewSet

* refactor: drafts_by_names -> DraftsByNameView

* refactor: submitted_to_rpc -> DraftViewSet

* refactor: rfc_original_stream -> RfcViewSet

* refactor: rpc demo APIs -> viewset

* refactor: get_draft_refs -> DraftViewSet

* refactor: persons_by_email -> PersonViewSet

* refactor: rfc_authors -> RfcViewSet

* refactor: draft_authors -> DraftViewSet

* refactor: avoid \x00 in regex validator

Gets turned into a literal nul somewhere in the process of generating a schema and building a Python client for purple. This has the same effect but avoids the nul.

* fix: missing arg on references() action

* style: ruff, remove unused imports

* style: ruff ruff

* chore: remove rpcapi.yaml

* refactor: move API to /api/purple

Side effect is that the purple API client is named PurpleApi instead of RpcApi.

* fix: get_draft_authors returns DraftWithAuthors

* fix: distinguish CharField flavors

* fix: no serializer validators for draft name/title

This prevents at least one existing draft from being looked up.

* fix: get_draft_authors works with str, not int

* Revert "refactor: avoid \x00 in regex validator"

This reverts commit 63f40cf

* Revert "Revert "refactor: avoid \x00 in regex validator"" (#9111)

This reverts commit d8656f4.
chore: merge main into feat/rpc-api
# Conflicts:
#	requirements.txt
* refactor: central def of subseries doc types

* feat: subseries doc API

* refactor: optimize queries via prefetch

Reduced 4500 to 18 queries

* chore: remove debug

* fix: fix serialization of draft field

* refactor: clean up prefetch a bit

* feat: filter by subseries type

* fix: restore max_limit for RFC pagination
* feat: add subseries to RfcMetadataSerializer

* feat: titlepage_name for RfcAuthorSerializer

Always blank for now

* chore: update copyrights

* refactor: use py3.12 typing syntax
Copy link
Member

@rjsparks rjsparks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass inspecting "can this safely come into main".
I haven't done the "are the apis all sufficiently access guarded" read yet.

APP_API_TOKENS = {
"ietf.api.views.ingest_email_test": ["ingestion-test-token"]
"ietf.api.views.ingest_email_test": ["ingestion-test-token"], # Not a real secret
"ietf.api.views_rpc" : ["devtoken"], # For RPC dev work only, remove before merging to main!!!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace this with "not a real secret"?

}

APP_API_TOKENS = {
"ietf.api.views_rpc" : ["devtoken"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a real secret?

]

# add routers at the end so individual routes can steal parts of their address
# space (specifically, ^person/ routes so far)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

verify that this is current?

@@ -0,0 +1,98 @@
# Copyright The IETF Trust 2023-2025, All Rights Reserved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this capability come to main? I'm thinking it shouldn't.

def part_of(self):
return self.related_that("contains")

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace

return self.docevent_set.filter(type="iesg_approved").order_by("-time").first()
elif self.stream_id in ["iab", "irtf", "ise"]:
return self.docevent_set.filter(type="requested_publication").order_by("-time").first()
#elif self.stream_id == "editorial": #TODO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have one now to look at and then add this branch to the logic

jennifer-richards and others added 12 commits October 1, 2025 11:57
feat: add consensus on FullDraftSerializer
feat: add type field in group serializer
* feat: tag subseries API endpoints for purple

* ruff
* change slugs/names

* change slug names

* fix: update RfcStatusSlugT
This was meant to include the API call in both purple and red API clients.
It seems this does not work, at least with some generators.
Need to investigate further, but we should be able to work around it.
* feat: rfc authors

* fix: distinct rfc search results

* fix: include titlepage_name in author name searches

* fix: add is_editor to rfcauthor model. Adjust FK on_delete. Tweak admin.

* fix: renumber migration

* refactor: realistic titlepage_name in factory

* refactor: comment + rename iteration var

* chore: bump copyright year

* chore: remove country from RfcAuthor

Not planning to track this

* refactor: make blank=False explicit

* chore: remove country from admin

* fix: author_list() for type=rfc

* fix: blankable RfcAuthor.person

* feat: RfcAuthor-aware document_json()

* feat: limit docs to rfcs for RfcAuthor admin

* test: document_json authors

* fix: use author_names() for get_document_emails()

* feat: suggest affiliation based on RfcAuthor

* chore: revert "remove country from RfcAuthor"

This reverts commit 3044d10.

* chore: revert "remove country from admin"

This reverts commit 2088793.

* feat: use rfcauthors for nomcom eligibility (#9629)

* refactor: author-based eligibility cleanup

* feat: use rfcauthor recs for nomcom eligbility

* chore: remove commented code

* refactor: factor out helper for testing

* test: test_get_qualified_author_queryset

* fix: restore a necessary import

* test: fix test_elig_by_author

* test: fix test_decorate_volunteers_with_qualifications

* test: add comment

* fix: drop test for draft-rfceditor state

Attempted to limit to drafts literally in the queue, but was not a
valid check when looking back in time. As a practical matter, the test
is not necessary.

* fix: exclude double counting, not rfc pub state

* test: update test

---------

Co-authored-by: Robert Sparks <[email protected]>
* refactor: move get_rfc_authors API URL

* refactor: drop format_suffixes from router

Creates a bunch of API endpoints we have no intention of ever using

* feat: RfcAuthor API (WIP)

* fix: remove debug code

* style: remove stray whitespace
* fix: partial implementation of rfc authors()

Does not handle RfcAuthor instances where person is None yet.

* refactor: authors -> bulk_authors for URL consistency
* fix: add OpenApi param definition doc_id

* add schema def for person_id
* feat: API to publish RFC (WIP)

Incomplete and in need of refactoring, but publishes an RFC.

* feat: group / formal_languages from draft

* feat: allow optional formal_languages via API

Could do the same with group, but not clear it would ever be used.

* feat: fill in overrides/updates

* feat: subseries membership

* fix: tolerate race to create related docs

* fix: wrap pub in a transaction

* feat: prevent re-publishing draft as RFC

* chore: remove stale code

* chore: remove debug

* feat: RFC file upload API (WIP)

Checkpointing progress before going further.

* feat: specify RFC, validate file exts

* feat: move uploaded files into place

* feat: add replace option

* fix: add rest of replace option

* feat: handle ad/group more consistently

* chore: remove inadvertent change

* chore: drop external_url, get note from draft

* refactor: clarify default value logic

* refactor: ID obsoletes/updates by number

* fix: handle draft-stream-editorial
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants