Commit graph

256 commits

Author SHA1 Message Date
Jennifer Richards c848a5a00b
feat: async investigate_fragment task; celery results backend (#8428)
* feat: investigate docs asynchronously

* refactor: move script to its own js file

* fix: adjust polling interval/duration

* test: test new task

* fix: extra tag/fix whitespace

* style: restore whitespace (I hope)

* style: black/standard styling

* test: fix test of investigate view

* test: improve/delint tests
2025-01-17 09:16:15 -06:00
Jennifer Richards 9b372a31b4
chore: update import for python-json-logger (#8330)
The "jsonlogger" module became "json" in 3.1.0
2024-12-12 11:40:49 -06:00
Robert Sparks 8e325829a3
chore: pin django-oidc-provider until we can adapt to changes in 0.8.3 (#8320) 2024-12-10 09:57:08 -06:00
Jennifer Richards c58490bb36
feat: django-rest-framework + Person/Email API (#8256)
* feat: django-rest-framework + Person/Email API (#8233)

* chore: djangorestframework -> requirements.txt

* chore: auth/perm/schema classes for drf

* chore: settings for drf and friends

* chore: comment that api/serializer.py is not DRF

* feat: URL router for DRF

* feat: simple api/v3/person/{id} endpoint

* fix: actually working demo endpoint

* chore: no auth for PersonViewSet

* ci: params in ci-run-tests.yml

* Revert "ci: params in ci-run-tests.yml"

This reverts commit 03808ddf94afe42b7382ddd3730959987389612b.

* feat: email addresses for person API

* feat: email update api (WIP)

* fix: working Email API endpoint

* chore: annotate address format in api schema

* chore: api adjustments

* feat: expose SpectacularAPIView

At least for now...

* chore: better schema_path_prefix

* feat: permissions for DRF API

* refactor: use permissions classes

* refactor: extract NewEmailForm validation for reuse

* refactor: ietfauth.validators module

* refactor: send new email conf req via helper

* feat: API call to issue new address request

* chore: move datatracker DRF api to /api/core/

* fix: unused import

* fix: lint

* test: drf URL names + API tests (#8248)

* refactor: better drf URL naming

* test: test person-detail view

* test: permissions

* test: add_email tests + stubs

* test: test email update

* test: test 404 vs 403

* fix: fix permissions

* test: test email partial update

* test: assert we have a nonexistent PK

* chore: disable DRF api for now

* chore: fix git inanity

* fix: lint

* test: disable tests of disabled code

* test: more lint
2024-11-27 14:54:28 -06:00
Robert Sparks 35e3433c2a
fix: use lxml 5 (#8279) 2024-11-26 19:15:50 -06:00
Jennifer Richards d09d17c338
chore(deps): pin django-tastypie version (#8252) 2024-11-21 10:06:09 -06:00
Robert Sparks d7be91f784
fix: pin pydyf until weasyprint adjusts for its deprecations (#7945) 2024-09-16 10:28:13 -05:00
Jennifer Richards 13aa072a1e
chore(deps): pin importlib-metadata (#7927) 2024-09-12 11:46:03 -05:00
Kesara Rathnayake 9b4671c076
fix: Install weasyprint as xml2rfc extra (#7845)
Since xml2rfc v3.23.0, WeasyPrint version is pinned.
2024-08-22 09:25:03 -05:00
Jennifer Richards 48e0aa23f5
refactor: clean up logging (#7419)
* fix: log to stdout/stderr in json format

* chore: remove UTILS_LOGGER_LEVELS

This is not used (there _is_ a setting for the
django.security logger in settings_local.py on
production, but it is redundant with the
settings.LOGGING configuration and is not doing
anything).

* chore: revert to debug_console django logging

* chore: log.log to syslog via datatracker logger

* chore: remove unused imports

---------

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2024-05-14 18:47:40 -05:00
Jennifer Richards c0a12fa8b2
chore(deps): fix requirements.txt versions (#7414)
* not ready for django-stubs==5
 * pin types-pytz to match existing pytz pin
2024-05-14 09:08:18 -05:00
Sangho Na 10cd14f174
refactor: Drop dependency on decorator package (cont) (#7219) 2024-03-18 02:51:42 -05:00
Robert Sparks e6138ca126
feat: session apis (#7173)
* feat: Show bluesheets using Attended tables (#7094)

* feat: Show bluesheets using Attended tables (#6898)

* feat: Allow users to add themselves to session attendance (#6454)

* chore: Correct copyright year

* fix: Address review comments

* fix: Don't try to generate empty bluesheets

* refactor: Complete rewrite of bluesheet.html

* refactor: Fill in a few gaps, close a few holes

- Rename the live "bluesheet" to "attendance", add some explanatory text.
- Add attendance links in materials view and pre-finalized proceedings view.
- Don't allow users to add themselves after the corrections cutoff date.

* fix: Report file-save errors to caller

* fix: Address review comments

* fix: typo

* refactor: if instead of except; refactor gently

* refactor: Rearrange logic a little, add comment

* style: Black

* refactor: auto_now_add->default to allow override

* refactor: jsonschema to validate API payload

* feat: Handle new API data format

Not yet tested except that it falls back when the old
format is used.

* test: Split test into deprecated/new version

Have not yet touched the new version

* style: Black

* test: Test new add_session_attendees API

* fix: Fix bug uncovered by test

* refactor: Refactor affiliation lookup a bit

* fix: Order bluesheet by Attended.time

* refactor: Move helpers from views.py to utils.py

* test: Test that finalize calls generate_bluesheets

* test: test_bluesheet_data()

* fix: Clean up merge

* fix: Remove debug statement

* chore: comments

* refactor: Renumber migrations

---------

Co-authored-by: Paul Selkirk <paul@painless-security.com>

* chore: Remove unused import

* style: Black

* feat: Stub session update notify API

* feat: Add order & rev to slides JSON

* style: Black

* feat: Stub actual Meetecho slide deck mgmt API

* refactor: Limit reordering to type="slides"

* chore: Remove repository from meetecho API

(API changed on their end)

* feat: update Meetecho on slide reorder

* refactor: drop pytz from meetecho.py

* chore: Remove more repository refs

* refactor: Eliminate more pytz

* test: Test add_slide_deck api

* fix: Allow 202 status code / absent Content-Type

* test: Test delete_slide_deck api

* test: Test update_slide_decks api

* refactor: sessionpresentation_set -> presentations

* test: Test send_update()

* fix: Debug send_update()

* test: ajax_reorder_slides calls Meetecho API

* test: Test SldesManager.add()

* feat: Implement SlidesManager.add()

* test: Test that ajax_add_slides... calls API

* feat: Call Meetecho API when slides added to session

* test: Test SlidesManager.delete()

* feat: Implement SlidesManager.delete()

* test: ajax_remove_slides... calls Meetecho API

* feat: Call Meetecho API when slides removed

* chore: Update docstring

* feat: rudimentary debug mode for Meetecho API

* test: remove_sessionpresentation() calls Meetecho API

* feat: Call Meetecho API from remove_sessionpresentation()

* test: upload_slides() calls Meetecho API

* style: Black

* fix: Refactor/debug upload_session_slides

Avoids double-save of a SessionPresentation for the session
being updated and updates other sessions when apply_to_all
is set (previously it only created ones that did not exist,
so rev would never be updated).

* test: Fix test bug

* feat: Call Meetecho API when uploading session slides

* fix: Only replace slides actually linked to session

* fix: Delint

Removed some type checking rather than debugging it

* fix: Send get_versionless_href() as url for slides

* test: TZ-aware timestamps, please

* chore: Add comments

* feat: Call Meetecho API in edit_sessionpresentation

* feat: Call Meetecho API in remove_sessionpresentation

* feat: Call Meetecho API from add_sessionpresentation

* fix: Set order in add_sessionpresentation

* fix: Restrict API calls to "slides" docs

* feat: Call Meetecho API on title changes

* test: Check meetecho API calls in test_revise()

* fix: better Meetecho API "order" management

* fix: no PUT if there are no slides after DELETE

* feat: Catch exceptions from SlidesManager

Don't let errors in the MeetEcho slides API interfere with
the ability to modify slides for a session.

* feat: Limit which sessions we send notifications for

* fix: handle absence of request_timeout in api config

* test: always send slide notifications in tests

* fix: save slides before sending notification (#7172)

* fix: save slides before sending notification

* style: fix indentation

It's not a bug, it's a flourish!

---------

Co-authored-by: Jennifer Richards <jennifer@staff.ietf.org>
Co-authored-by: Paul Selkirk <paul@painless-security.com>
2024-03-12 10:22:24 -05: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 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