Commit graph

1179 commits

Author SHA1 Message Date
Jennifer Richards 3ddd8c9cce
fix: Fix/adjust periodic_tasks management command (#7108)
* fix: Skip midnight partial rfced sync

* fix: call iana protocols update task correctly
2024-02-28 08:15:04 -06:00
Jennifer Richards ecc823eae5
feat: Give better errors when docName is missing (#7083)
* feat: Give better error when docName is missing

* refactor: Make method static for easier testing

* test: Add test of XMLDraft.parse_docname()
2024-02-21 11:59:07 -06:00
Robert Sparks 8cb7f3dcae
feat: Import IESG artifacts into the datatracker (#6908)
* chore: remove unused setting

* feat: initial import of iesg minutes

* fix: let the meetings view show older iesg meetings

* feat: iesg narrative minutes

* feat: import bof coordination call minutes

* wip: import commands for iesg appeals and statements

* feat: import iesg statements.

* feat: import iesg artifacts

* feat: many fewer n+1 queries for the group meetings view

* fix: restore chain of elifs in views_doc

* fix: use self.stdout.write vs print in mgmt commands

* fix: use replace instead of astimezone when appropriate

* chore: refactor new migrations into one

* fix: transcode some old files into utf8

* fix: repair overzealous replace

* chore: black

* fix: address minro review comments

* fix: actually capture transcoding work

* fix: handle multiple iesg statements on the same day

* fix: better titles

* feat: pill badge replaced statements

* fix: consolodate source repos to one

* feat: liberal markdown for secretariat controlled content

* fix: handle (and clean) html narrative minutes

* feat: scrub harder

* fix: simplify and improve a scrubber

* chore: reorder migrations
2024-02-20 16:35:08 -06:00
Jennifer Richards 547c515c07
chore: Fix incorrect docstring 2024-02-12 20:29:34 -04:00
Jennifer Richards 3157cf65d1
fix: Accept&ignore group_type for some views 2024-02-12 17:38:36 -04: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
Jennifer Richards b4cf04a09d
feat: celery tasks to replace ietf/bin scripts (#6971)
* refactor: Change import style for clarity

* feat: Add iana_changes_updates_task()

* chore: Squelch lint warning

My linter does not like variables defined outside
of __init__()

* feat: Add PeriodicTask for iana_changes_updates_task

* refactor: tasks instead of scripts on sync.views.notify()

* test: Test iana_changes_updates_task

* refactor: rename task for consistency

* feat: Add iana_protocols_update_task

* feat: Add PeriodicTask for iana protocols sync

* refactor: Use protocol sync task instead of script in view

* refactor: itertools.batched() not available until py312

* test: test iana_protocols_update_task

* feat: Add idindex_update_task()

Calls idindex generation functions and does the file
update dance to put them in place.

* chore: Add comments to bin/hourly

* fix: annotate types and fix bug

* feat: Create PeriodicTask for idindex_update_task

* refactor: Move helpers into a class

More testable this way

* refactor: Make TempFileManager a context mgr

* test: Test idindex_update_task

* test: Test TempFileManager

* fix: Fix bug in TestFileManager

yay testing

* feat: Add expire_ids_task()

* feat: Create PeriodicTask for expire_ids_task

* test: Test expire_ids_task

* test: Test request timeout in iana_protocols_update_task

* refactor: do not re-raise timeout exception

Not sure this is the right thing to do, but it's the
same as rfc_editor_index_update_task

* feat: Add notify_expirations_task

* feat: Add "weekly" celery beat crontab

* refactor: Reorder crontab fields

This matches the crontab file field order

* feat: Add PeriodicTask for notify_expirations

* test: Test notify_expirations_task

* test: Add annotation to satisfy mypy
2024-01-31 15:24:20 -06:00
Jennifer Richards 0dadeb2af8
fix: Fix task specs in periodic_tasks.py (#6965) 2024-01-24 11:31:34 -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
Jennifer Richards 36c43c8520
chore: add task tests; move message task to message app (#6964)
* test: Test send_review_reminders_task

* refactor: Move send_scheduled_mail_task to message app

* chore: Remove unused import

* test: Add Message/SendQueue factories

* test: Test send_scheduled_mail_task

* test: Reset mocks before reuse

* test: Cover error conditions

* test: Return non-empty change set

* test: Test SMTPException handling

* test: Test fetch_attendance_from_meetings()

* test: Test RuntimeError handling

* test: RFC index sync should populate authors
2024-01-24 08:53:42 -06:00
Jennifer Richards 7dbb7e36d3
fix: Add testing, fix bug in fetch_meeting_attendance_task (#6961)
* test: Test rfc_editor_index_update_task

* chore: Add docstring to test

* fix: Reuse stats instead of fetching twice

* test: Test fetch_meeting_attendance_task

* chore: Remove outdated tasks

* Revert "chore: Add docstring to test"

This reverts commit 0395410d665c0d310248fd151386f013357c5d13.

* Revert "test: Test rfc_editor_index_update_task"

This reverts commit 4dd9dd131723497db3d2aa76166169fd32c42fdd.

* test: Test rfc_editor_index_update_task

This time without reformatting the entire file...

* chore: Remove accidentally committed fragment

* test: Annotate function to satisfy mypy

* chore: Remove unused imports
2024-01-23 16:14:37 -06:00
Jennifer Richards 7de8feca83
chore: Remove unused import (#6958) 2024-01-23 08:41:23 -06:00
Jennifer Richards 8d12071bf5
refactor: Move cron jobs to celery tasks (#6926)
* refactor: Factor out helper from fetch_meeting_attendance.py

* feat: Define fetch_meeting_attendance_task task

Equivalent to the fetch_meeting_attendance management command

* chore: Disable fetch_meeting_attendance in bin/daily

* feat: Log errors in fetch_meeting_attendance_task

* feat: Enable a result backend for celery

Ignore results by default, but enable the backend so we
can manage tasks

* feat: Define daily task in ietf.utils.tasks

* refactor: Make bin/send-review-reminders into a task

* refactor: Make bin/send-scheduled-mail into a task

* chore: Update copyright years

* refactor: Make bin/rfc-editor-index-updates into a task

* refactor: Accept date type in rfc index update fn

* chore: Update comment

* fix: Annotate param as Optional

* fix: Revert treating skip_older_than_date as str

Misunderstood the comment, "fixed" a non-bug. Oops.

* feat: mgmt command to create periodic tasks

* feat: add summary of tasks to mgmt cmd

* style: black

* fix: Remove debug statements

* feat: Enable/disable tasks

* chore: Disable periodic tasks by default

* chore: Revert changes to daily and every15m

* fix: Call intended function

* chore: Add task descriptions
2024-01-22 12:04:16 -06:00
dependabot[bot] 1bcee8b506
chore(deps): bump the yarn group with 15 updates (#6924)
* chore(deps): bump the yarn group with 15 updates

Bumps the yarn group with 15 updates:

| Package | From | To |
| --- | --- | --- |
| [caniuse-lite](https://github.com/browserslist/caniuse-lite) | `1.0.30001572` | `1.0.30001576` |
| [highcharts](https://github.com/highcharts/highcharts-dist) | `11.2.0` | `11.3.0` |
| [naive-ui](https://github.com/tusen-ai/naive-ui) | `2.36.0` | `2.37.3` |
| [sortablejs](https://github.com/SortableJS/Sortable) | `1.15.1` | `1.15.2` |
| [vue](https://github.com/vuejs/core) | `3.4.4` | `3.4.13` |
| [@parcel/optimizer-data-url](https://github.com/parcel-bundler/parcel) | `2.10.3` | `2.11.0` |
| [@parcel/transformer-inline-string](https://github.com/parcel-bundler/parcel) | `2.10.3` | `2.11.0` |
| [@parcel/transformer-sass](https://github.com/parcel-bundler/parcel) | `2.10.3` | `2.11.0` |
| [@vitejs/plugin-vue](https://github.com/vitejs/vite-plugin-vue/tree/HEAD/packages/plugin-vue) | `4.5.0` | `4.6.2` |
| [c8](https://github.com/bcoe/c8) | `9.0.0` | `9.1.0` |
| [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) | `16.6.1` | `16.6.2` |
| [eslint-plugin-vue](https://github.com/vuejs/eslint-plugin-vue) | `9.19.2` | `9.20.1` |
| [html-validate](https://gitlab.com/html-validate/html-validate) | `8.8.0` | `8.9.1` |
| [parcel](https://github.com/parcel-bundler/parcel) | `2.10.3` | `2.11.0` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) | `4.5.0` | `4.5.1` |


Updates `caniuse-lite` from 1.0.30001572 to 1.0.30001576
- [Commits](https://github.com/browserslist/caniuse-lite/compare/1.0.30001572...1.0.30001576)

Updates `highcharts` from 11.2.0 to 11.3.0
- [Commits](https://github.com/highcharts/highcharts-dist/compare/v11.2.0...v11.3.0)

Updates `naive-ui` from 2.36.0 to 2.37.3
- [Changelog](https://github.com/tusen-ai/naive-ui/blob/main/CHANGELOG.en-US.md)
- [Commits](https://github.com/tusen-ai/naive-ui/compare/v2.36.0...v2.37.3)

Updates `sortablejs` from 1.15.1 to 1.15.2
- [Release notes](https://github.com/SortableJS/Sortable/releases)
- [Commits](https://github.com/SortableJS/Sortable/compare/1.15.1...1.15.2)

Updates `vue` from 3.4.4 to 3.4.13
- [Release notes](https://github.com/vuejs/core/releases)
- [Changelog](https://github.com/vuejs/core/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vuejs/core/compare/v3.4.4...v3.4.13)

Updates `@parcel/optimizer-data-url` from 2.10.3 to 2.11.0
- [Release notes](https://github.com/parcel-bundler/parcel/releases)
- [Changelog](https://github.com/parcel-bundler/parcel/blob/v2/CHANGELOG.md)
- [Commits](https://github.com/parcel-bundler/parcel/compare/v2.10.3...v2.11.0)

Updates `@parcel/transformer-inline-string` from 2.10.3 to 2.11.0
- [Release notes](https://github.com/parcel-bundler/parcel/releases)
- [Changelog](https://github.com/parcel-bundler/parcel/blob/v2/CHANGELOG.md)
- [Commits](https://github.com/parcel-bundler/parcel/compare/v2.10.3...v2.11.0)

Updates `@parcel/transformer-sass` from 2.10.3 to 2.11.0
- [Release notes](https://github.com/parcel-bundler/parcel/releases)
- [Changelog](https://github.com/parcel-bundler/parcel/blob/v2/CHANGELOG.md)
- [Commits](https://github.com/parcel-bundler/parcel/compare/v2.10.3...v2.11.0)

Updates `@vitejs/plugin-vue` from 4.5.0 to 4.6.2
- [Release notes](https://github.com/vitejs/vite-plugin-vue/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-vue/blob/plugin-vue@4.6.2/packages/plugin-vue/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-vue/commits/plugin-vue@4.6.2/packages/plugin-vue)

Updates `c8` from 9.0.0 to 9.1.0
- [Release notes](https://github.com/bcoe/c8/releases)
- [Changelog](https://github.com/bcoe/c8/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bcoe/c8/compare/v9.0.0...v9.1.0)

Updates `eslint-plugin-n` from 16.6.1 to 16.6.2
- [Release notes](https://github.com/eslint-community/eslint-plugin-n/releases)
- [Commits](https://github.com/eslint-community/eslint-plugin-n/compare/16.6.1...16.6.2)

Updates `eslint-plugin-vue` from 9.19.2 to 9.20.1
- [Release notes](https://github.com/vuejs/eslint-plugin-vue/releases)
- [Commits](https://github.com/vuejs/eslint-plugin-vue/compare/v9.19.2...v9.20.1)

Updates `html-validate` from 8.8.0 to 8.9.1
- [Release notes](https://gitlab.com/html-validate/html-validate/tags)
- [Commits](https://gitlab.com/html-validate/html-validate/compare/v8.8.0...v8.9.1)

Updates `parcel` from 2.10.3 to 2.11.0
- [Release notes](https://github.com/parcel-bundler/parcel/releases)
- [Changelog](https://github.com/parcel-bundler/parcel/blob/v2/CHANGELOG.md)
- [Commits](https://github.com/parcel-bundler/parcel/compare/v2.10.3...v2.11.0)

Updates `vite` from 4.5.0 to 4.5.1
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v4.5.1/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.5.1/packages/vite)

---
updated-dependencies:
- dependency-name: caniuse-lite
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: yarn
- dependency-name: highcharts
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: yarn
- dependency-name: naive-ui
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: yarn
- dependency-name: sortablejs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: yarn
- dependency-name: vue
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: yarn
- dependency-name: "@parcel/optimizer-data-url"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: yarn
- dependency-name: "@parcel/transformer-inline-string"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: yarn
- dependency-name: "@parcel/transformer-sass"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: yarn
- dependency-name: "@vitejs/plugin-vue"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: yarn
- dependency-name: c8
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: yarn
- dependency-name: eslint-plugin-n
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: yarn
- dependency-name: eslint-plugin-vue
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: yarn
- dependency-name: html-validate
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: yarn
- dependency-name: parcel
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: yarn
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: yarn
...

Signed-off-by: dependabot[bot] <support@github.com>

* test: Disable hidden-focusable and unique-landmark validations

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jennifer Richards <jennifer@staff.ietf.org>
2024-01-16 11:00:23 -06:00
Jennifer Richards c7ca0b7d8e
Revert "chore: Replace markup_txt with rfc2html (#6632)" (#6909)
This reverts commit e24fb601db.
2024-01-11 13:08:24 -06:00
Lars Eggert e24fb601db
chore: Replace markup_txt with rfc2html (#6632)
* chore: Replace markup_txt with rfc2html

* Suppress HTML issues

* Remove comment

* Suppress harder

* Suppress even more

* Fix test

* Ignore vnu "duplicate ID" errors

* Undo accidental commit

* Fix RFCs

---------

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2024-01-05 12:29:28 -06:00
Robert Sparks 03e161bae9
chore: merge branch 'main' into feat/rfc 2023-12-05 09:12:11 -06:00
Lars Eggert 3d44825333
ci: Switch to using geckodriver (#6541)
* Switch to using geckodriver

* Switch to selenium 4

* Undo

* Remove comment

* Fixes

* Restore non-standard line endings to minimize diff

* Undo

* Remove comment

* test: Fix test_upcoming_view_time_zone_selection

The inputs are hidden and managed by JS, so click
the visible elements instead.

* test: Clumsy fix to test_upcoming_materials_modal

Waiting for the button to be clickable does not
work because the modal is still fading in, so does
not actually close. Would be better to check for it
responding, but I haven't found the right way to do
that yet.

* test: Fix test_add_author_forms

Sending '\n' does not seem to work as it did before,
so click the option instead.

Also reverted some fixme hacks that seem to be obe.

* ci: Update base.Dockerfile

* test: add resource limits to dev/tests/debug.sh env

* ci: add upload of geckodriver.log on failure

* ci: run tests as user 1001

* ci: run app-create-dirs as sudo

* ci: set home folder to root to run tests

---------

Co-authored-by: Jennifer Richards <jennifer@staff.ietf.org>
Co-authored-by: Nicolas Giard <github@ngpixel.com>
Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2023-11-21 15:30:50 -06:00
Robert Sparks b89c44f443
chore: merge main and fix new views 2023-11-16 15:58:22 -06:00
Robert Sparks 925e22006b
ci: change test coverage fudge factor (#6649) 2023-11-16 12:46:36 -06:00
Eric Vyncke 639043e890
Fix: meeting important dates can have markdown links (#6594)
* Fix #3911 by adding a markdown filter for template

* fix: move the new markdown filter to utils

* fix: linkify after markdown

---------

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
Co-authored-by: Jennifer Richards <jennifer@staff.ietf.org>
2023-11-10 09:24:13 +01:00
Robert Sparks 28c3e1bd5d
chore: merge branch 'main' into feat/rfc 2023-11-01 10:54:29 -05:00
Jennifer Richards dc14308700
refactor: Drop submission validation via libmagic (#6500)
* refactor: Update parsers/base.py for Python3

* style: Black

* refactor: Remove mime type check from FileParser

* refactor: Validate that submission is UTF-8

The mime check distinguished us-ascii from UTF-8,
but as far as I can tell the code relying on it
treated both as equally valid.

* feat: Clear error when file is not valid XML

* chore: Remove unused import

* test: Update tests to match changes

* fix: Count bytes starting from 1

* test: Add tests of FileParser validations

* fix: Fix / simplify regexp

* test: Test error caused by bad XML submission

---------

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2023-10-23 10:00:04 -05:00
Robert Sparks ab931f0510
chore: merge main into feat/rfc 2023-10-12 15:11:02 -05:00
Lars Eggert 7dbfc0208a
feat: Remove document notes from the datatracker (#6387)
* Remove doc.note

* Address comments from @rjsparks

* Consistently display doc notes
2023-10-09 12:15:18 -05:00
Lars Eggert 8abbaae0c0
Update ietf/utils/test_runner.py 2023-09-28 11:34:03 +03:00
Lars Eggert abe93a42b2
feat: Add the ability to rerun a test suite until a failure occurs
More quickly than looping in the shell around a non-zero error code.
This only incurs all the setup and scaffolding overheads once.
2023-09-28 11:31:16 +03:00
Robert Sparks 621528ad03
ci: Merge branch 'main' into feat/rfc 2023-09-15 11:48:44 -05:00
Jennifer Richards 69fd3a059e
fix: Validate string before calling int() (#6268) 2023-09-13 15:29:16 -05:00
Robert Sparks e0f27b9d52
ci: merge branch 'main' into feat/rfc 2023-09-05 12:02:07 -05:00
Robert Sparks f2dc32a310
chore: remove unused scipts from ietf/bin (#6259) 2023-09-01 14:31:23 -05:00
Robert Sparks c8c1ebdf12
chore: remove unnecessary .gitignore files (#6262) 2023-08-31 17:12:01 -05:00
Robert Sparks 383899c5c4
chore: checkpoint: docalias mostly removed 2023-08-15 16:49:17 -05:00
Jennifer Richards f4070ef975
chore: Remove unused imports 2023-07-28 14:29:58 -07:00
Robert Sparks c8684f727a
Merge branch 'main' into related_no_alias 2023-07-20 09:31:52 -05:00
Robert Sparks 81734443a5
fix: continued repair of code/tests re: RelatedDocument model change 2023-07-20 09:25:14 -05:00
Robert Sparks cf3a270cd2
Merge branch 'feat/rfc' into related_no_alias 2023-07-19 17:48:22 -05:00
Jennifer Richards 8f0b459050
refactor: Replace is_rfc() tests (#5925)
* refactor: Remove is_rfc() - test type_id instead

* fix: Guard against unknown pub_date

This should not ever come up - we have a published_rfc event for
every rfc. Should investigate fixing pub_date() to always return a val.
2023-07-06 12:07:53 -03:00
Jennifer Richards 60dc60234d
fix: Better match xml2rfc date parsing (#5914)
* refactor: Split up get_creation_date to ease testing

* test: Add tests of parse_creation_date()

Note change in expected output when date_elt is None:
instead of returning None, this expects today's date.

* fix: Return today instead of None when date is absent

* fix: Handle empty string for day attribute

* test: Check a couple more parse_creation_date cases

* fix: Revert to returning None when date elt is absent

* style: black
2023-07-05 08:23:37 -05:00
Robert Sparks db670dadc5
chore: continued refactor 2023-06-30 17:27:27 -05:00
Jennifer Richards 2bf7e8250c
fix: Import DEFAULT_TIMEOUT correctly (#5803) 2023-06-12 13:50:14 -05:00
Jennifer Richards 12f1ac10ad
fix: Fix signature for LenientMemcacheCache.set() (#5800) 2023-06-12 12:48:32 -05:00
Robert Sparks b75b560dea
feat: import IAB minutes from the IAB wordpress site (#5689)
* feat: import IAB minutes from the IAB wordpress site

Work in Progress

* fix: refactor as management commands

* fix: use datetime.timezone.utc for comparisons

* fix: coerce an argument. Command now runs

* chore: extend queryset in a better way

* fix: fetch kesara's repo and move files into place.

* fix: add a DocEvent explaining where the Documents came from

* fix: small optimizations and typo fixes

* fix: performance compromise for very old meetings

* fix: ensure variable is initialized

* fix: avoid operating on null by changing method signature - address review comments

* fix: repair html typo and address pyflake complaint

* chore: run black on a new and changed things
2023-06-09 17:07:31 -05:00
Jennifer Richards edd72826e6
fix: Prevent errors when memcached object size is exceeded (#5769)
* feat: Subclass PyMemcacheCache to tolerate too-large object errors

* fix: Use LenientMemcacheCache to prevent search errors

* fix: Re-raise errors other than "object too large"
2023-06-06 14:35:41 -05:00
Robert Sparks 4a062f5250
Merge pull request #5757 from ietf-tools/release
ci: merge release commit and patch back into main
2023-06-05 08:14:03 -05:00
Jennifer Richards d33a6f3c0c
fix: Handle missing date fields in XML submissions (#5744)
* refactor: Eliminate _construct_creation_date helper

* fix: Use xml2rfc method for filling in missing date fields

* fix: Set options.date for xml2rfc writers

* test: Test handling of missing date element/fields
2023-06-02 14:40:52 -05:00
Jennifer Richards c8f9739604
Merge pull request #5738 from ietf-tools/main
chore: Merge main into feat/django4
2023-06-01 17:32:27 -03:00
Jennifer Richards 5a2708283b
feat: Extract document creation date from XML draft (#5733)
* fix: Extract document creation date from XML draft

* test: Fix test
2023-06-01 09:58:55 -05:00
Jennifer Richards 8d4780d304
fix: Ignore failure to extract text draft title unless it is needed (#5730)
* fix: Accept a Path as source for a PlaintextDraft

* fix: Guard against failure to extract PlaintextDraft title

* fix: Ignore failure to extract text draft title unless it is needed
2023-06-01 09:39:59 -05:00
Jennifer Richards 58182fd7f6
test: Fix selectors in selenium tests 2023-05-19 17:54:24 -03:00
Jennifer Richards 19abdfe5e7
refactor: Inject tests without using deprecated extra_tests 2023-05-19 11:09:05 -03:00
Jennifer Richards 55fb502179
test: Iterate over template.nodelist in apply_template_test 2023-05-18 15:18:02 -03:00
Jennifer Richards cdec6cc0aa
Merge pull request #5655 from ietf-tools/main
chore: Merge main into feat/django4
2023-05-18 15:15:42 -03:00
Jennifer Richards cbabb864c2
test: Use issubclass, not isinstance, to ID view_class 2023-05-17 16:09:56 -03:00
Jennifer Richards d519bca12c
test: Fix ignore_pattern so Redirect/TemplateViews are ignored again 2023-05-17 15:59:28 -03:00
Eric Vyncke 2a27a2bffc
feat: Can we provide a better review assignment email subject. #3760 (#5415)
* Specific email subject + requester/secretary in cc

* Send the deadline in the subject

* Use unicode rather than ASCII for reviewer's name

* More log info in the test

* Fix the closing parenthesis

* Fix the email test  when review is assigned

* chore: address review comment

---------

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2023-05-17 12:23:20 -05:00
Jennifer Richards 8cf609bfa9
refactor: Implement require_api_key with functools.wraps
The @decorator mechanism does not seem to work with @method_decorator
in Django 4.0, have not tracked down why.
2023-05-17 09:45:07 -03:00
Jennifer Richards c840d53cb2
test: Suppress mypy error on import of _lazy_re_compile() 2023-05-15 11:04:29 -03:00
Jennifer Richards 7ad74c99e4
refactor: import from django.urls instead of django.conf.urls 2023-05-12 20:29:11 -03:00
Jennifer Richards 075aed7e9a
refactor: Replace deprecated request.is_ajax() 2023-05-12 18:26:56 -03:00
Jennifer Richards aa4c04126c
chore: Use re_path() instead of url(), its deprecated synonym, 2023-05-12 17:09:32 -03:00
Jennifer Richards 264ff60cd2
Merge pull request #5601 from jennifer-richards/django4
chore: Upgrade to Django 3.0
2023-05-11 11:04:36 -04:00
Jennifer Richards 69eb6340fd
test: Do not misuse django.conf.settings for HTML validation params 2023-05-10 15:41:36 -03:00
Robert Sparks f8113cb862
fix: close open things (#5593)
* fix: close open things

* fix: clean up test created files

* fix: remove one close too many
2023-05-10 11:19:34 -05:00
Jennifer Richards da168395fc
refactor: Replace deprecated smart_text with smart_str 2023-05-09 15:23:33 -03:00
Jennifer Richards 07e26dd52e
refactor: Replace deprecated force_text with force_str 2023-05-09 15:21:50 -03:00
Robert Sparks 400a830661
chore: add bibxml-ids dir to container build. (#5590) 2023-05-08 15:16:31 -05:00
Robert Sparks 01b4a91bfe
Merge remote-tracking branch 'ietf-tools/main' into feat/postgres 2023-03-29 10:41:47 +09:00
Jennifer Richards 72954c24fc
chore: Add type annotations to satisfy linter (#5435) 2023-03-29 09:06:14 +09:00
Jennifer Richards 6b826fd985
refactor: Purge old migrations and update ci to build on a clean schema (#5431)
* refactor: Remove all existing migrations

* refactor: Create clean set of migrations

* chore: Skip check_statetype_slugs when DB is not yet populated

* fix: Do not cache active_groups_menu on module import

* fix: Do not patch timezone awareness out of oidc-provider

* refactor: Migrate to create postgres schema, only use pgloader for data

* ci: Use migration scripts from feat/pg-migrations branch

* Revert "ci: Use migration scripts from feat/pg-migrations branch"

This reverts commit c82f64c614241ccede4865a50d494725c8a47c15.

* ci: Run check before migrate

* fix: Remove redundant migration caused by merge error

* chore: Add casts/ALTER TABLEs to eliminate pgloader errors/warnings

* chore: Change schema name to match docker image assumptions

* chore: Clear out schema so we get a clean start in case of a retry
2023-03-28 18:06:07 +09:00
Jennifer Richards bc9c74ef50
fix: Render complete iCalendar event when show_location is False (#5394)
* test: More carefully test event syntax in ical file

* test: Test agenda.ics view with all meeting sessions

* fix: Render complete iCalendar event when show_location is False

* chore: Fix confusing comment
2023-03-26 14:13:58 +09:00
Lars Eggert c3bb142c98
Rebase (#5416) 2023-03-25 17:37:33 +09:00
Robert Sparks f010766654
Merge remote-tracking branch 'ietf-tools/main' into feat/postgres 2023-02-27 12:55:47 -06:00
Robert Sparks b9baa6270e
chore: remove a stray space that crashes black (#5185) 2023-02-23 08:50:24 -06:00
Robert Sparks c38ade6e1b
feat: treat django auth username as case insensitive throughout the datatracker (#5165)
* feat: insensitive username matching at django authentication

* feat: use iexact when using the User object manager

* fix: more places to ignore username case

* fix: remove unused management command

* fix: avoid get when probing for object existance

* fix: force lowercase new usernames in secr/rolodex

* fix: use explicit arguments when creating user
2023-02-21 10:01:03 -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
Jennifer Richards a10464a250
chore: Fix reference to misspelled migration
The migration with the misspelled name already ran on production, so
we have to recreate the typo in the reference to it.
2023-02-14 12:58:45 -04:00
Robert Sparks 7a86a1c2cb
chore: tighten migration dependencies 2023-02-13 17:25:54 -06:00
Jennifer Richards 5abfcd4d71
chore: Update migration numberings/deps 2023-02-13 16:26:25 -04:00
Robert Sparks e1206fa91e
Merge remote-tracking branch 'upstream/main' into feat/postgres 2023-02-13 09:17:05 -06:00
Lars Eggert ac0b9ae5e5
fix: Need to linkify during Markdown rendering (#5066)
* fix: Need to linkify during Markdown rendering

* Don't depend on mdx_linkify

* Also linkify IETF docs as part of the Markdown conversion

* Add test case

* Disable automatic links via angle brackets for email addresses

* Inline the markdown test files
2023-02-11 10:13:20 -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 6bbad15b3d
fix: restore generation of rswg/rsab chair aliases (#5121) 2023-02-09 16:57:42 -06:00
Lars Eggert c5562fbbea
chore: Update deps (#5084)
* chore: Update deps

* Deal with html-validate changes

* Update fullcalendar

* Delete things
2023-02-08 11:18:54 -06:00
Robert Sparks 2a1602d9bb
Merge remote-tracking branch 'origin/main' into feat/postgres 2023-01-31 16:57:03 -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
Robert Sparks c04feb5765
Merge remote-tracking branch 'origin/main' into feat/postgres 2023-01-26 10:37:50 -06:00
Jennifer Richards ec7c7b3701
chore: Upgrade to bleach v6 (#5021)
* build: Bump bleach requirement to 6.0.0

* fix: Update bleach configuration for compatibility with v6 changes
2023-01-23 13:29:45 -06:00
Robert Sparks 2351629fcc
Merge remote-tracking branch 'origin/main' into feat/postgres 2023-01-23 10:28:14 -06:00
Lars Eggert a9e3b926f7
fix: rfc2html creates a "a" tag without href for references, handle that (#4975) 2023-01-17 10:20:13 -06:00
Lars Eggert 715b1d1934
Update deps (#4969)
* Update deps

* Disable warning

* Fix typo
2023-01-12 09:21:54 -06:00
Jennifer Richards 250692997e
test: SearchableField.has_changed() should handle non-list initial val (#4965) 2023-01-10 15:13:37 -06:00
Robert Sparks ec2b7d0d04
Merge remote-tracking branch 'upstream/main' into feat/postgres 2023-01-06 17:29:49 -06:00
Jennifer Richards 2993322958
fix: Listify initial field value when SearchableField.max_entries == 1 (#4951)
* fix: Listify initial field value when SearchableField.max_entries == 1

* fix: Don't convert initial=None to initial=[None] in has_changed()
2023-01-06 16:06:00 -06:00
Robert Sparks 912c7b5ee3
fix: simplify migrations when building postgres db image (#4889)
* chore: remove the effectively unused DATABASE_TEST_OPTIONS setting

* fix: simplify default settings_local so that db-include-fix.py is not needed in CI

* fix: simplify migrations in db-pg-migrate.sh
2022-12-13 17:37:24 -05:00
Robert Sparks 15569771ff
Merge remote-tracking branch 'upstream/main' into feat/postgres 2022-12-12 09:54:49 -06:00
Lars Eggert 220be21998
chore: Use codespell to fix typos in code. (#4797)
* chore: Use codespell to fix typos in code.

Second part of replacement of #4651

@rjsparks, I probably need to revert some things here, and I also
still need to add that new migration - how do I do that?

* Revert migrations

* Migrate "Whitelisted" to "Allowlisted"

* TEST_COVERAGE_MASTER_FILE -> TEST_COVERAGE_MAIN_FILE

* Fix permissions

* Add suggestions from @jennifer-richards
2022-12-07 15:10:35 -06:00
Lars Eggert d59c64943d
fix: Fix spurious author extraction errors (#4799)
* Handle single-word author names

* Some i18n names, e.g., "शिला के.सी." have a dot at the end that is
also part of the ASCII, e.g., "Shilaa Kesii." That trailing dot breaks
extract_authors(). Avoid this issue by stripping the dot from the
ASCII.

* Honorifics need to be part of the extracted ASCII name (e.g., "Lady Garcia")

* feat: stop supporting pre-tzaware migration database dumps. (#4782)

* feat: stop supporting pre-tzaware migration database dumps.

* chore: remove unnecessary env variable

* chore: Use `codespell` to fix typos in comments. (#4794)

First part of replacement of #4651

* feat: Only show IPR search form when not showing search results  (#4793)

* feat: Only show IPR search form when not showing search results

Put it into a collapsible that is only expanded by default when not
showing search results.

Fixes #4569

* Don't use example target name

* fix: Don't show reorder UI fixtures unless user can reorder (#4785)

Fixes #4773

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

* chore: Update deps and fix resulting HTML validation issues (#4790)

* ci: add missing build matrix config for test-playwright-legacy step

* Single-letter last names exist (e.g., "Carolina de la O")

* Align regex with others

* Fix extraction of very long author names

* Need to be more general

* Add comment

* Also handle i18n names with trailing semicolons

* Name suffixes need to be part of the extracted author names

* Handle i18n names with embedded commas

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
Co-authored-by: Nicolas Giard <github@ngpixel.com>
2022-12-02 15:41:21 -06:00
Jennifer Richards 3af68b6fbb
fix: avoid readonly attribute on select element (#4819)
* fix: avoid readonly attribute on select element

* chore: remove now-unused CSS for select2

* test: don't ignore `readonly` on `select`

* refactor: simplify OutgoingLiaisonForm base class overrides
2022-12-02 15:39:21 -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