Commit graph

226 commits

Author SHA1 Message Date
Seonghyeon Cho 061c89f3b5
fix: Missing button text for PostScript in RFC (#7889)
Resolves #7879

Signed-off-by: Seonghyeon Cho <seonghyeoncho96@gmail.com>
2024-09-03 10:46:34 -05:00
Russ Housley 1de41965be
fix: add celery tasks for idnits2 and bibxml file generation (#7204)
* Add celery tasks for idnits2 and bibxml file generation

* Update tests_tasks.py

Fix typo: bad_vakue -> bad_value

* Update utils.py

Don't raise error inbibxml_for_all_drafts

* chore: fixup merge

* chore: more merge cleanup

* chore: one last merge cleanup

---------

Co-authored-by: Jennifer Richards <jennifer@staff.ietf.org>
2024-08-07 09:18:13 -05:00
Jennifer Richards b2a858c880
fix: prevent dups in DraftAliasGenerator (#7650) 2024-07-10 15:34:04 -05:00
Jennifer Richards f78b050263
refactor: Streamline draft aliases api (#7607)
* chore: update add-django-cprofile-filter.patch

* fix: only use "draft" state when making aliases

* refactor: eliminate repeated get_state_slug()

On dev, reduces time for a draft-aliases api
call by by 10-15%

* refactor: only annotate inactive drafts

* refactor: de-lint

* refactor: speed up get_draft_authors_emails

Another 20% or so improvement in response time

* fix: guard against null person
2024-06-28 12:01:26 -05:00
Jennifer Richards 6338f4594f
refactor: don't use filesystem for draft aliases (#7555)
* refactor: compute draft aliases on demand

n.b., very slow for full set of aliases

* refactor: simplify and cache email_aliases

The name != "" case is, as far as I can see, unused.

* chore: remove draft alias checks

* chore: remove draft alias/virtual settings

* chore: remove lint

* test: update tests

* test: better mocking

* refactor: move utility to utils

* test: add tests
2024-06-18 08:13:10 -05:00
Jennifer Richards ffb9eb12ff
refactor: generate I-D bibxml files via celery (#7426)
* refactor: task to generate_draft_bibxml_files

* test: test task/utility methods

* chore: add periodic task

* chore: remove generate_draft_bibxml_files.py

* chore: further prune /bin/hourly
2024-05-16 11:37:29 -05:00
Robert Sparks bd25bc6034
fix: improve file investigation results (#7376) 2024-05-06 07:45:36 -05:00
Robert Sparks 6b11291216
feat: investigate file authenticity (#7331)
* feat: investigate file authenticity

* fix: use django-provided validation
2024-04-23 11:43:48 -05:00
Eric Vyncke faa3efd136
fix: Missing button text for PostScript (#7200)
* ci: Update build-base-app.yml workflow

* Do not list PS in build_file_urls

* Update ietf/doc/utils.py

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>

---------

Co-authored-by: Nicolas Giard <github@ngpixel.com>
Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2024-03-20 18:09:47 -05:00
Jennifer Richards fa56223939
feat: API to replace email alias generation commands (#7012)
* feat: DraftAliasGenerator class

Encapsulates logic from generate_draft_aliases.py

* refactor: Avoid circular imports

* feat: Add draft_aliases API endpoint

* feat: Add @requires_api_token decorator

Stolen from feat/rpc-api

* feat: Add token auth to draft_aliases endpoint

* feat: draft-aliases-from-json.py script

Parses output from the draft_aliases API call

* chore: Remove unused cruft

* refactor: Avoid shadowing "draft" name

* fix: Suppress empty lists from DraftAliasGenerator

* refactor: Use a GET instead of POST

* feat: GroupAliasGenerator class

* feat: group aliases API view

* fix: Handle domains array correctly

* fix: Suppress empty group aliases

* refactor: Generalize aliases-from-json.py script

* refactor: Same output fmt for draft and group alias apis

* feat: Sort addresses for stability

* fix: Add "anything" virtual alias

* test: Test requires_api_token decorator

* feat: Harden is_valid_token against misconfig

* test: Test is_valid_token

* test: Test draft_aliases view

* test: Test group_aliases view

* test: Test DraftAliasGenerator

* fix: ise group is type "ise" in test data

* test: Fix logic in testManagementCommand

The test was incorrect - and fails when fixed. :-(

* test: Test GroupAliasGenerator

Test currently fails

* fix: Suppress empty -ads alias

* test: Fix group acronym copy/paste error

I *think* this must be what had been intended. The
code does not look like it ever dealt with GroupHistory,
so I'm pretty sure it wasn't meant to have the same
acronym used by two different Groups at different
times.

* test: Check draft .notify alias generation

* test: Cover get_draft_notify_emails()
2024-02-07 10:15:50 -06:00
Robert Sparks d9cc26be96
feat: replace references to User with references to Person (#6024)
* refactor: change references from User to Person (#5821)

* refactor: Change CommunityList reference from User to Person

* refactor: Convert more user references to person

* refactor: Change augment_docs_and_user_with_user_info to person

* refactor: Change Nomination and Feedback references from User to Person

* refactor: Change a few test case function signatures to be more pythonic

* refactor: Harmonize how profile and photo views look up email_or_name

* refactor: Rework community views to operate on Person instead of User (#5859)

* test: Update tests to try all of the person's emails and aliases

* fix: Recode a test case to avoid an exception if there's Unicode in the URL

This only happens using the form-filling and submission feature of
WebTest, which is only used in this one test case, so just it rip out.

* test: Add duplicate-person tests

* fix: If there are multiple matching users, prefer the logged-in one.

* chore: We no longer use WebTest, so don't include it.

* fix: Address review comments

* fix: case-insensitive person name or email matching (#6096)

* chore: Renumber migrations

* fix: Update merged code so tests pass (#6887)

* fix: Use refactored method

* fix: Don't assume user has person

* fix: Use new view param name

* chore: Drop community lists w/o person; cleanup (#6896)

* fix: Don't assume user has person

* fix: user->person in update_community_list_index.py

* feat: Remove CommunityLists without Person

* refactor: Speed up nomcom migrations

---------

Co-authored-by: Paul Selkirk <paul@painless-security.com>
Co-authored-by: Jennifer Richards <jennifer@staff.ietf.org>
2024-01-24 11:00:19 -06:00
Robert Sparks d74d5ed233
fix: ignore attempts to look for versions of rfcs, but find the rfc. 2023-12-13 11:54:22 -06:00
Robert Sparks 0051aa9844
fix: search correct doc type/states, switch rfc correctly in html_body, remove dead code. (#6640)
* fix: search correct doc type/states, switch rfc correctly in html_body, remove dead code

* chore: Add unreachable() marker

---------

Co-authored-by: Jennifer Richards <jennifer@staff.ietf.org>
2023-11-16 13:05:58 -06:00
Robert Sparks 9fedce005f
fix: restore rfcs on document graph when looking at rfc predecesors (#6646) 2023-11-16 12:49:50 -04:00
Robert Sparks 621528ad03
ci: Merge branch 'main' into feat/rfc 2023-09-15 11:48:44 -05:00
Jennifer Richards 8bc4507def
feat: Give AD the action in ad-f-up doc state (#6272)
* refactor: Add helper class to compare tag changes

* feat: Give AD the action in ad-f-up state

* refactor: Remove unnecessary check

* refactor: Reorganize update_action_holders()

* refactor: Remove unnecessary guard

* test: Update test for new AD handling

* test: Update another test

* test: Test ad-f-up effect on action holders

---------

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2023-09-12 09:44:33 -05:00
Robert Sparks 0c85c4169d
fix: repairs to the timeline graphic 2023-09-12 09:23:01 -05:00
Robert Sparks 823281ba6c
chore: first pass at clearing out canonical_name 2023-08-18 10:59:55 -05:00
Robert Sparks 383899c5c4
chore: checkpoint: docalias mostly removed 2023-08-15 16:49:17 -05:00
Robert Sparks 4946430159
chore: checkpoint: halfway through removing docalias 2023-08-15 09:11:53 -05:00
Robert Sparks c8684f727a
Merge branch 'main' into related_no_alias 2023-07-20 09:31:52 -05:00
Robert Sparks cf3a270cd2
Merge branch 'feat/rfc' into related_no_alias 2023-07-19 17:48:22 -05:00
Robert Sparks 6eeffb116f
fix: become agnostic about RFC states until we care 2023-07-07 10:33:29 -05:00
Paul Selkirk bae204862d
feat: Add bibxml button to document info page (#5921)
* feat: Add bibxml button to document info page (#5908)

* fix: No bibxml for RFCs
2023-07-07 08:23:15 -05:00
Robert Sparks f53a849660
fix: various corrections to rfc main document view and tests (#5931) 2023-07-06 17:24:35 -03:00
Jennifer Richards 877bc02d77
refactor: Refactor build_file_urls() (#5886) 2023-06-27 11:14:19 -03:00
Robert Sparks e910836ad4
fix: teach build_file_urls about rfc type documents. (#5880) 2023-06-26 21:33:02 -03:00
Robert Sparks ad0071fd7d
chore: merge feat/rfc 2023-06-26 13:12:15 -05:00
Robert Sparks 69f882d833
chore: tweaks for rebuild_reference_relations 2023-06-26 13:03:59 -05:00
Jennifer Richards f2c2957925
refactor: Represent RFCs as their own DocType (#5835)
* feat: Add RFC DocTypeName, StateType, and States

* refactor: Rename rfc_number() to deprecated_rfc_number()

* feat: Add rfc_number field to DocInfo

* feat: Add DocRelationshipName "became-rfc"

* chore: First-pass migration to create rfc Documents

* chore: create_rfc_documents migration depends on new names

* refactor: Rename variable

* fix: Fix revname / downcase name for "became-rfc" DocRelationshipName

* chore: Remove debugging print statements

* feat: Point rfc aliases at rfc Documents

* test: Refactor RFC factories

* refactor: Rewrite is_rfc() in terms of type_id

* test: Use RfcFactory as base for IndividualRfcFactory

* refactor: Replace calls to deprecated_rfc_number()

* refactor: Remove deprecated_rfc_number() method

* test: Import WgRfcFactory
2023-06-20 15:28:16 -03:00
Robert Sparks 8ff14419c2
chore: continued refactoring 2023-06-16 16:59:20 -05:00
Robert Sparks 769d85a6c4
chore: explore architecture change in RelatedDocument 2023-06-16 14:58:42 -05:00
Jennifer Richards 3015359323
test: Use QuerySetAny alias for QuerySet type checks 2023-05-31 11:09:08 -03:00
Robert Sparks 6178519d43
fix: optimize queries for DocumentChangesFeed (#5675) 2023-05-23 10:14:13 -05:00
Robert Sparks 9ea8523e85
feat: add target to bibxml-ids (#5148) 2023-02-15 11:37:56 -06:00
Lars Eggert 182158b5c0
fix: Also extract document names from XML seriesInfo attributes and XInclude URLs (#5037)
* fix: Also extract document names from XML seriesInfo attributes

The old code only looked in the anchor string for the document names of
references, which doesn't work if the anchor uses a mnemonic. This caused lots
of missed references for many documents.

* No need to import lxml anymore

* Add tests

* Handle xinclude to bibxml URLs

* Wrap line

* Apply suggestion from @rjsparks

* Undo erroneous additions

* Address suggestion from @rjsparks
2023-02-14 17:07:54 -06:00
Lars Eggert 1ffe661f6c
fix: add_links_in_new_revision_events wasn't doing anything, remove (#5103)
* fix: `add_links_in_new_revision_events` wasn't doing anything, remove

Whatever `add_links_in_new_revision_events` was supposed to do, it didn't do it.
The linkification of things has been happening via the `format_history_text`
template tag.

* Remove import
2023-02-11 10:31:05 -06:00
Lars Eggert f8b48f4c43
fix: use Internet-Draft more consistently across the UI (#5104)
* s/Internet Draft/Internet-Draft/i

* s/draft/Internet-Draft/i or s/draft/I-D/i

* s/ID/I-D/

* Fix tests

* a -> an

* Undo case-change to ASCII

* Address code review comments

* Add migrations

* Add merged migration

* fix: straighten out migrations

* fix: finish straightening out migrations

---------

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2023-02-11 10:09:28 -06:00
Robert Sparks afac1f8f19
feat: enable editorial stream adoption and balloting (#5011)
* feat: enable editorial stream adoption and balloting

* fix: bring tests into line with refactor

* feat: force intended_std_level to Informational when adopting into a non-ietf stream.

* fix: improve blocking position labels and email content

* fix: simplify pointer to group on doc main page for rswg docs

* fix: recover from merge typos

* fix: correct defer and clear ballot behavior

* fix: improve publication request access logic

* fix: clean up broken editorial state

* fix: adjust test to match migrations
2023-01-31 13:50:51 -06:00
Jennifer Richards 38748cb10b
refactor: add guards/type hints to build_file_urls() (#4896)
* refactor: add guards/type hints to build_file_urls()

* fix: compare doc.type_id, not doc.type, with string value

* test: add cursory test of build_file_urls()
2022-12-14 17:22:26 -06:00
Robert Sparks ded650286d
fix: don't use rfc names in bibxml-id elements (#4823) 2022-12-06 08:49:14 -06:00
Robert Sparks 9457e2b1e1
feat: better htmlization views (#4825)
* feat: Use bs5 for htmlized doc (#4082)

Co-authored-by: Martin Thomson <mt@lowentropy.net>

* fix: Various fixes to HTMLized document view (#4501)

* fix: Pref labels were switched

* fix: Fix ToC for htmlized docs

* Replace datatracker button with document name link to datatracker

* ui: Make fonts even larger on larger window widths

* fix: Document format buttons open new tabs

* fix: Various suggestions from Jay

* fix: Don't show "htmlized" self-link under formats

* ui: Font size fix for iOS

* ui: More little tweaks

* feat/htmlize fixes and improvements (#4506)

* fix: Don't open htmlized view in new tab

* fix: Tests were failing

* feat: Add pref settings to cap max font size

* feat: Add ability to hide side panel

* fix: And more `feat/htmlize` fixes (#4511)

* fix: Remove superfluous scrollbars

* fix: Show email links for authors

* fix: Only show "email authors" button for latest reversion

* fix: Remove duplicate code, fix nav scrolling

* feat: Add RFCs to revision lists

* feat: Add pref option to control dependency inlining

* fix: Add analytical tags

* feat: Notify user of rendering inconsistencies

* feat: Split out bootstrap-icons when not inlining dependencies

* fix: Revision list and minor other fixes

* feat: Show stream logo when possible (#4516)

* fix: Remove superfluous scrollbars

* fix: Show email links for authors

* fix: Only show "email authors" button for latest reversion

* fix: Remove duplicate code, fix nav scrolling

* feat: Add RFCs to revision lists

* feat: Add pref option to control dependency inlining

* fix: Add analytical tags

* feat: Notify user of rendering inconsistencies

* feat: Split out bootstrap-icons when not inlining dependencies

* fix: Revision list and minor other fixes

* feat: Show stream logos when possible

* fix: Pick up CSS changes from https://github.com/martinthomson/rfc-txt-html (#4520)

* fix: Remove superfluous scrollbars

* fix: Show email links for authors

* fix: Only show "email authors" button for latest reversion

* fix: Remove duplicate code, fix nav scrolling

* feat: Add RFCs to revision lists

* feat: Add pref option to control dependency inlining

* fix: Add analytical tags

* feat: Notify user of rendering inconsistencies

* feat: Split out bootstrap-icons when not inlining dependencies

* fix: Revision list and minor other fixes

* feat: Show stream logos when possible

* fix: Pick up CSS changes from https://github.com/martinthomson/rfc-txt-html

* chore: add debug script to replicate GitHub Actions test environment

* chore: cleanup from merge of main

* fix: Fix PDFixation crash due to referencing renamed CSS asset (#4665)

* fix: Rename some CSS classes to handle recent xml2rfc changes (#4791)

* Merge main

* fix: Rename some CSS classes to handle recent xml2rfc changes

Fixes #4784.

* chore: repair merge damage

* chore: more merge corrections

* chore: one more merge correction

* fix: npm dependencies

* fix: Change default font size (#4817)

* Fix dependency issues

* Cap fontsize at 12pt by default

Co-authored-by: Nicolas Giard <github@ngpixel.com>

Co-authored-by: Lars Eggert <lars@eggert.org>
Co-authored-by: Martin Thomson <mt@lowentropy.net>
Co-authored-by: Nicolas Giard <github@ngpixel.com>
2022-12-02 15:17:14 -06:00
Lars Eggert 6eabd4a3a1
chore: Use codespell to fix typos in comments. (#4794)
First part of replacement of #4651
2022-11-28 10:36:36 -06:00
Robert Sparks eb4b523e66
chore: merge main (#4714) 2022-11-06 12:36:14 -06:00
Jennifer Richards 3220bf3c40
chore: replace last few datetime.date.today() calls with date_today() 2022-10-18 12:45:47 -03:00
Jennifer Richards 00cf7cf8ca
fix: use settings.TIME_ZONE for draft date in bibxml_for_draft() (#4487) 2022-09-21 11:49:35 -03:00
Jennifer Richards cbb639cd58
Merge branch 'feat/tzaware' into dev/jennifer/main-merge 2022-09-20 10:19:31 -03:00
Robert Sparks 7bc6f2b6b2
fix: return same bibxml for versioned and versionless references (#4470)
* fix: return same bibxml for versioned and versionless references

Fixes #4384.

Refactors bibxml production to remove repeated logic.

Abandons the half-implemented idea that returning information
from the Submission object might be better than the Document or
DocHistory objects.

* fix: test for None with `is not` and simplify choice from multiple qs objects

Addresses review comments.
2022-09-19 10:38:57 -05:00
Jennifer Richards 4084d7d557
fix: record and interpret RFC pub dates in correct timezone (#4421)
* fix: use PST8PDT for published_rfc event timestamps

* fix: find RFCs by PST8PDT year in RfcFeed

* refactor: add const RPC_TZINFO to represent RFC publication timezone

* chore: remove (rather than fix) unused template tags

* fix: always return RPC_TZINFO-local date from Document.pub_date()

* refactor: convert 'published' flag to a Boolean to reflect its usage

* fix: display doc publication dates in correct time zones

* fix: fix various small issues breaking tests
2022-09-08 14:51:19 -03:00
Jennifer Richards 32054111df
fix: fix failing tests and eliminate naive datetime warnings (#4402)
* test: fix timestamp construction in several doc tests

* refactor: rename date2datetime to datetime_from_date and clarify code

* chore: helper to get tzinfo for PRODUCTION_TIMEZONE

* fix: fix timezone handling in make_last_call()

* test: fix datetime generation in doc.tests_charter

* refactor: remove PRODUCTION_TIMEZONE setting

Replaces the PRODUCTION_TIMEZONE setting with a constant,
DEADLINE_TZINFO, in ietf.utils.timezone.

* test: be more careful about timezone in tests_charter.py

* test: be more careful about timezone in doc/tests.py

* fix: fix timezone handling affecting doc.tests_draft

* fix: fix timezone handling affecting tests_irsg_ballot.py

* fix: fix timezone handling affecting tests_review.py

* fix: fix timezone handling affecting last ietf.doc tests

* fix: fix timezone handling affecting last ietf.group tests

* fix: fix timezone handling affecting ietf.iesg tests

* fix: handle timezones in get_8989_eligibility_querysets

* fix: handle timezones affecting ietfauth tests

* fix: return tz-aware datetime from utc_from_string

* fix: specify timezone for constants in ipr_rfc_number()

* fix: specify tz for ipr deadlines

* fix: handle timezones affecting liaisons tests

* fix: treat leap day in get_8989_eligibility_querysets()

Manual cherry-pick of 248d6474

* test: treat leap day properly in nomcom tests

* fix: fix timezone handling affecting nomcom tests

* test: fix timezone handling in review tests

* fix: fix timezone handling affecting secr.meetings tests

* fix: handle both pytz and zoneinfo timezones in ietf.utils.timezone

* fix: fix timezone handling affecting secr.proceedings tests

* refactor: use make_aware() helper in secr.meetings tests

* test: fix timezone handling in secr.telechat tests

* fix: fix timezone handling affecting stats tests

* fix: eliminate tz-naive helpers affecting sync email parsing

* fix: include timezone data when serializing DeletedEvent data

* fix: fix timezone handling affecting sync tests

* style: remove unused import
2022-09-01 13:07:28 -03:00