Commit graph

243 commits

Author SHA1 Message Date
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 287cf0fe46
chore: update requests min version (#6905) 2024-01-10 11:37:00 -06:00
Jennifer Richards 81dc5554a8
test: unpin django-stubs and update mypy (#6901)
* chore: Unpin django-stubs / update mypy

* test: Use "app.model" for ManyToManyField

django-stubs requires "app.model" instead of just "model" for
ManyToManyField lazy model references.

See https://github.com/typeddjango/django-stubs/issues/1802
2024-01-10 09:53:43 -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
Nicolas Giard 522443a5d5
fix: pin django_vite to <3 in requirements.txt 2023-11-15 18:06:38 -05:00
Jennifer Richards 1efb19c8ec
chore: Update django-oidc-provider patch (#6526)
* chore: Fix line numbers in patch

File changed with django-oidc-provider v0.8.1

* chore: Limit django-oidc-provider version
2023-10-23 14:13:20 -05:00
Jennifer Richards bea4459d0c
chore: Pin django-stubs to working version (#6503) 2023-10-20 08:43:44 -05:00
Jennifer Richards 21997b1cdf
chore: Pin urllib3 to <2 (#6321) 2023-09-15 10:40:24 -05:00
Robert Sparks 3c1fc3c0f9
chore: use factory-boy 3.3 (#6269) 2023-09-05 09:54:30 -05:00
Robert Sparks 38d5860fc7
chore: pin factory-boy until we address the deprecated post_generation save issue (#5999)
* chore: pin factory-boy until we address the deprecated post_generation save issue

* chore: restore lower bound on factory-boy version
2023-07-20 08:53:11 -05:00
Jennifer Richards 09f347727b
chore: Remove temporary pin on pydantic (#5911)
* chore: Remove temporary pin on pydantic

* test: Guarantee ordering of sessions in test

Should fix an intermittent test failure.
2023-07-05 08:50:50 -05:00
Robert Sparks 653772ac10
fix: pin pydantic until inflect catches up (#5901) 2023-06-30 14:06:52 -05:00
Robert Sparks 67370952d9
fix: adjust weasyprint requirements to match api change (#5792) 2023-06-09 12:54:46 -05:00
Jennifer Richards 0c3ff8be59
chore: Unpin google-i18n-address version (#5779) 2023-06-07 11:00:25 -05:00
Jennifer Richards 4051ac8c85
chore: Pin google-i18n-address version (#5762) 2023-06-05 13:05:59 -05:00
Jennifer Richards 171a5bec73
chore: Update setuptools version and suppress warnings
pkg_resources warning is caused by a few packages
(django-simple-history. django-widget-tweaks, etc). The datetime_safe
warning is in tastypie, as indicated. The others are deprecated
settings we already have tickets for.
2023-05-18 18:00:45 -03:00
Jennifer Richards d81a092574
chore: Update requirements.txt for Django 4.2 2023-05-18 18:00:45 -03:00
Jennifer Richards c26c9c71e4
chore: Switch to PyMemcacheCache backend 2023-05-18 15:18:01 -03:00
Jennifer Richards e7cc287836
chore: Update requirements.txt for Django 4.1 2023-05-18 15:18:01 -03:00
Jennifer Richards 869562e914
chore: Update requirements.txt to Django 4.0 2023-05-16 13:14:48 -03:00
Jennifer Richards 329fa26ee0
chore: Remove abandoned django-password-strength package 2023-05-15 15:29:00 -03:00
Jennifer Richards 587bc4d730
test: Remove outdated mypy test exceptions 2023-05-12 20:00:14 -03:00
Jennifer Richards 828071a582
chore: Unpin oidc-provider, update its patch 2023-05-12 17:09:32 -03:00
Jennifer Richards 87fdfaa713
chore: Update django-tastypie requirement 2023-05-12 17:09:32 -03:00
Jennifer Richards 00118f7807
chore: Update requirements.txt for Django 3.2 2023-05-12 17:09:31 -03:00
Jennifer Richards c4f99d0b1d
chore: Update django-stubs and mypy requirements for Django 3.1 2023-05-12 15:47:36 -03:00
Jennifer Richards b2534fdf32
chore: Update requirements.txt for Django 3.1 2023-05-12 15:47:36 -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 9fa54270e6
chore: Remove mysqlclient dependency (#5589) 2023-05-09 15:24:17 -05:00
Jennifer Richards dcb211fbb3
Merge remote-tracking branch 'origin/main' into django4 2023-05-09 14:26:47 -03:00
Jennifer Richards 9fde845719
chore: Revert psycopg2 dependency
Try again with Django 3.2
2023-05-09 11:05:43 -03:00
Jennifer Richards e1b783ead9
chore: Update requirements.txt for Django 3.0 2023-05-08 15:03:10 -03:00
Robert Sparks f919184e14
chore: pin django-oidc-provider (#5588) 2023-05-08 09:15:36 -05:00
Robert Sparks 4b4e876305
Merge branch 'main' into feat/postgres 2023-03-09 11:43:38 -06:00
Lars Eggert 98c24d1bb0
fix: Use correct group type in session request email response (#5275)
* fix: Use correct group type in session request email response

Fixes #2120

* Address review comments

* Address review comments
2023-03-07 10:15:47 -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 15569771ff
Merge remote-tracking branch 'upstream/main' into feat/postgres 2022-12-12 09:54:49 -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
Robert Sparks 27fccc6ba0
feat: move to postgresql (#4744)
* feat: move to postgresql

* fix: repair fractional replace statement

* fix: use pathlib to manipulate settings_local

Co-authored-by: Jennifer Richards <jennifer@painless-security.com>

* fix: do two string replacements, not one followed by another that throws away the first.

Co-authored-by: Jennifer Richards <jennifer@painless-security.com>

* fix: use pathlib again to manipulate settings_local

Co-authored-by: Jennifer Richards <jennifer@painless-security.com>

* fix: properly use assert (1/2)

Co-authored-by: Jennifer Richards <jennifer@painless-security.com>

* fix: properly use assert (2/2)

Co-authored-by: Jennifer Richards <jennifer@painless-security.com>

Co-authored-by: Jennifer Richards <jennifer@painless-security.com>
2022-11-11 11:01:01 +00:00
Jennifer Richards 6cc2fb94a3
fix: update DraftYangChecker for xym 0.6 changes (#4546)
* fix: update DraftYangChecker for xym 0.6 changes

* chore: update xym requirements to >=0.6
2022-10-06 18:03:18 -05:00
Jennifer Richards 3705bedfcd
feat: Celery support and asynchronous draft submission API (#4037)
* ci: add Dockerfile and action to build celery worker image

* ci: build celery worker on push to jennifer/celery branch

* ci: also build celery worker for main branch

* ci: Add comment to celery Dockerfile

* chore: first stab at a celery/rabbitmq docker-compose

* feat: add celery configuration and test task / endpoint

* chore: run mq/celery containers for dev work

* chore: point to ghcr.io image for celery worker

* refactor: move XML parsing duties into XMLDraft

Move some PlaintextDraft methods into the Draft base class and
implement for the XMLDraft class. Use xml2rfc code from ietf.submit
as a model for the parsing.

This leaves some mismatch between the PlaintextDraft and the Draft
class spec for the get_author_list() method to be resolved.

* feat: add api_upload endpoint and beginnings of async processing

This adds an api_upload() that behaves analogously to the api_submit()
endpoint. Celery tasks to handle asynchronous processing are added but
are not yet functional enough to be useful.

* perf: index Submission table on submission_date

This substantially speeds up submission rate threshold checks.

* feat: remove existing files when accepting a new submission

After checking that a submission is not in progress, remove any files
in staging that have the same name/rev with any extension. This should
guard against stale files confusing the submission process if the
usual cleanup fails or is skipped for some reason.

* refactor: make clear that deduce_group() uses only the draft name

* refactor: extract only draft name/revision in clean() method

Minimizing the amount of validation done when accepting a file. The
data extraction will be moved to asynchronous processing.

* refactor: minimize checks and data extraction in api_upload() view

* ci: fix dockerfiles to match sandbox testing

* ci: tweak celery container docker-compose settings

* refactor: clean up Draft parsing API and usage

  * remove get_draftname() from Draft api; set filename during init
  * further XMLDraft work
    - remember xml_version after parsing
    - extract filename/revision during init
    - comment out long broken get_abstract() method
  * adjust form clean() method to use changed API

* feat: flesh out async submission processing

First basically working pass!

* feat: add state name for submission being validated asynchronously

* feat: cancel submissions that async processing can't handle

* refactor: simplify/consolidate async tasks and improve error handling

* feat: add api_submission_status endpoint

* refactor: return JSON from submission api endpoints

* refactor: reuse cancel_submission method

* refactor: clean up error reporting a bit

* feat: guard against cancellation of a submission while validating

Not bulletproof but should prevent

* feat: indicate that a submission is still being validated

* fix: do not delete submission files after creating them

* chore: remove debug statement

* test: add tests of the api_upload and api_submission_status endpoints

* test: add tests and stubs for async side of submission handling

* fix: gracefully handle (ignore) invalid IDs in async submit task

* test: test process_uploaded_submission method

* fix: fix failures of new tests

* refactor: fix type checker complaints

* test: test submission_status view of submission in "validating" state

* fix: fix up migrations

* fix: use the streamlined SubmissionBaseUploadForm for api_upload

* feat: show submission history event timestamp as mouse-over text

* fix: remove 'manual' as next state for 'validating' submission state

* refactor: share SubmissionBaseUploadForm code with Deprecated version

* fix: validate text submission title, update a couple comments

* chore: disable requirements updating when celery dev container starts

* feat: log traceback on unexpected error during submission processing

* feat: allow secretariat to cancel "validating" submission

* feat: indicate time since submission on the status page

* perf: check submission rate thresholds earlier when possible

No sense parsing details of a draft that is going to be dropped regardless
of those details!

* fix: create Submission before saving to reduce race condition window

* fix: call deduce_group() with filename

* refactor: remove code lint

* refactor: change the api_upload URL to api/submission

* docs: update submission API documentation

* test: add tests of api_submission's text draft consistency checks

* refactor: rename api_upload to api_submission to agree with new URL

* test: test API documentation and submission thresholds

* fix: fix a couple api_submission view renames missed in templates

* chore: use base image + add arm64 support

* ci: try to fix workflow_dispatch for celery worker

* ci: another attempt to fix workflow_dispatch

* ci: build celery image for submit-async branch

* ci: fix typo

* ci: publish celery worker to ghcr.io/painless-security

* ci: install python requirements in celery image

* ci: fix up requirements install on celery image

* chore: remove XML_LIBRARY references that crept back in

* feat: accept 'replaces' field in api_submission

* docs: update api_submission documentation

* fix: remove unused import

* test: test "replaces" validation for submission API

* test: test that "replaces" is set by api_submission

* feat: trap TERM to gracefully stop celery container

* chore: tweak celery/mq settings

* docs: update installation instructions

* ci: adjust paths that trigger celery worker image  build

* ci: fix branches/repo names left over from dev

* ci: run manage.py check when initializing celery container

Driver here is applying the patches. Starting the celery workers
also invokes the check task, but this should cause a clearer failure
if something fails.

* docs: revise INSTALL instructions

* ci: pass filename to pip update in celery container

* docs: update INSTALL to include freezing pip versions

Will be used to coordinate package versions with the celery
container in production.

* docs: add explanation of frozen-requirements.txt

* ci: build image for sandbox deployment

* ci: add additional build trigger path

* docs: tweak INSTALL

* fix: change INSTALL process to stop datatracker before running migrations

* chore: use ietf.settings for manage.py check in celery container

* chore: set uid/gid for celery worker

* chore: create user/group in celery container if needed

* chore: tweak docker compose/init so celery container works in dev

* ci: build mq docker image

* fix: move rabbitmq.pid to writeable location

* fix: clear password when CELERY_PASSWORD is empty

Setting to an empty password is really not a good plan!

* chore: add shutdown debugging option to celery image

* chore: add django-celery-beat package

* chore: run "celery beat" in datatracker-celery image

* chore: fix docker image name

* feat: add task to cancel stale submissions

* test: test the cancel_stale_submissions task

* chore: make f-string with no interpolation a plain string

Co-authored-by: Nicolas Giard <github@ngpixel.com>
Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2022-08-22 13:29:31 -05:00
Robert Sparks c0f1fd2395
chore: update to pytz 2022.2.1 (#4342) 2022-08-18 11:40:51 -05:00
Robert Sparks aa2f843725
chore: track updates to pytz (#4319) 2022-08-12 15:14:46 -05:00
Nicolas Giard aa9490faf6
feat(ui): new dynamic agenda view (#4086)
* feat: agenda page in vue (wip)

* feat: scroll to agenda day

* fix: vue 3 composition api + eslint settings

* fix: agenda day scroll match indicator

* fix: convert vite deps to yarn

* fix: missing lodash + legacy build step

* fix: agenda - move calendar into drawer

* fix: improve agenda filter UI

* fix: download ics + move agenda into own component

* feat: use fullcalendar for agenda calendar view (wip)

* feat: add events to agenda calendar

* feat: agenda filter UI improvements

* feat: agenda add to calendar dropdown

* feat: agenda calendar filter + timezone + event coloring

* feat: agenda calendar color improvements

* chore: exclude dist-neue from git

* feat: agenda calendar event modal

* fix: rebuild yarn deps

* chore: add run migration task to vscode

* fix: agenda buttons display flag

* feat: agenda event modal component

* feat: show calendar event quick info on hover

* fix: clear calendar quick info on timezone change

* feat: agenda list view improvements

* feat: agenda list row coloring

* feat: agenda list note

* feat: agenda list icons for office hours + hackathon

* fix: agenda top links

* refactor: use pinia as store for agenda components

* feat: agenda jump to now

* fix: agenda mobile improvements

* feat: agenda search

* feat: agenda search improvements

* feat: agenda event recordings buttons for post-meeting

* fix: agenda switch to meeting timezone on load

* feat: agenda pre & live session buttons

* fix: remove agenda utc + personalize links in top menu

* feat: add pre-vue loading state on page load

* feat: filter from agenda picker mode

* fix: agenda UI improvements

* fix: django-vite non-dev mode

* chore: update yarn dependencies for vue + vite

* feat: agenda settings panel + UI improvements

* feat: agenda settings colors + import/export feature

* feat: agenda color assignments + responsive UI improvements

* feat: agenda realtime red line + debug datetime offset

* feat: agenda add aria labels for settings

* feat: add new agenda path + pages/menu

* fix: bring base/menu.html up to main

* fix: agenda various fixes

* test: add new agenda item to meetings menu for item count

* chore: restore devcontainer extensions list

* fix: agenda UI improvements + montserrat default font

* feat: agenda bolder text + hide event icons options

* feat: agenda warning badge

* fix: agenda various UI improvements + intersectionObserver fix

* feat: agenda floorplan page + various UI improvements

* feat: agenda floor plan pin

* feat: view floor plan room from agenda

* feat: agenda floor plan mobile optimization

* feat: adjust calendar options + default calendar view in settings

* feat: agenda persist picked events + change base font only on new agenda page

* feat: agenda mobile view optimizations

* fix: add .vite to cached volumes

* fix: mobile view for filters, calendar, settings panels

* test: upgrade cypress existing tests to work on bs5 + update dependencies

* fix: use named url patterns to avoid hardcoded URLs. Add rudimentary test coverage for the neue views.

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2022-07-13 16:20:23 -05:00
Lars Eggert 495df36a77
chore: Make newer bibtexparser versions work with the tests (#4205)
* chore: Make newer bibtexparser versions work with the tests

* Fix test
2022-07-12 11:18:52 -05:00
Lars Eggert 159f89ebf3
chore: Remove six and pathlib2 from deps (#4031)
Fixes: #3895 and #3892
2022-05-31 09:12:45 -05:00
Robert Sparks 55d7629e4d
chore: use and expect python39 (#3908) 2022-04-29 09:45:41 -05:00
Robert Sparks 86923dfe96
chore: update dependency requirements (#3904)
* chore: cleanup requirements.txt. Unpin factory-boy, ignoring resulting mypy complaints.

* chore: remove the upper limit as many dependencies as possible

* chore: remove unintended bookmark

* chore: normalize spaces before comments

* chore: improve comment explaining pinned Tastypie

* chore: shift dependencies minimum version requirements forward
2022-04-28 11:06:17 -05:00
Lars Eggert 9db1d48258
fix: Correctly linkify all current TLDs (#3868)
* fix: Correctly linkify all current TLDs

* Pass a list to the build_*_re functions, not a string

* Need to sort TLDs by length to force longer ones to match first

* chore: silence incorrect mypy complaint.

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
Co-authored-by: Nicolas Giard <github@ngpixel.com>
2022-04-26 12:25:18 -05:00