Commit graph

161 commits

Author SHA1 Message Date
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
Jennifer Richards da70acfdff
Merge branch 'feat/tzaware' into jennifer/yet-more-tz-fixes
# Conflicts:
#	ietf/ietfauth/utils.py
#	ietf/meeting/tests_views.py
#	ietf/stats/tests.py
2022-10-17 16:39:45 -03:00
Jennifer Richards f3bdbf0ed4
Merge branch 'feat/tzaware' into jennifer/main-for-tzaware-merge
# Conflicts:
#	ietf/meeting/tests_js.py
#	ietf/meeting/tests_models.py
#	ietf/meeting/tests_views.py
#	ietf/meeting/views.py
#	ietf/name/fixtures/names.json
#	ietf/templates/meeting/agenda.html
#	ietf/templates/meeting/session_buttons_include.html
#	ietf/templates/meeting/timeslot_start_end.html
2022-10-14 16:35:57 -03:00
Robert Sparks 6dd6165444
fix: correct meeting attendance calculations (#4536)
* fix: correct meeting attendance calculations

* test: change meetingregistration factory defaults

* test: Setup stats tests to verify counts honor meeting.Attended

But the tests aren't actually looking to see what numbers get generated yet.

* test: add test for attendance cross-talk between meetings

* fix: limit attendance count query to single meeting

* refactor: rename attendance.online to .remote

* fix: only count a given person as onsite or remote, but never both

* test: align tests with cleanup

Co-authored-by: Jennifer Richards <jennifer@painless-security.com>
2022-10-13 10:55:57 -05:00
Jennifer Richards 7b1b7f5273
Merge branch 'feat/tzaware' into dev/tzaware-main-merge 2022-10-11 14:57:34 -03:00
Robert Sparks 97d21800d0
feat: include checkins at the registration desk in nomcom eligibility calculations (#4519)
* chore: rename utility functions to reflect rfc guiding them

* feat: include new checkedin flag in nomcom calculations

* fix: reflect history a bit more accurately.

* fix: address review comment on readability

* fix: finish what c44000d started
2022-10-07 16:17:28 -05:00
Jennifer Richards a653582cf7
fix: timezone fixes from last few comparisons with tzaware-obe 2022-09-28 13:21:50 -03:00
Jennifer Richards 1366b6de38
Merge branch 'feat/tzaware' into jennifer/main-to-tzaware-conflicts 2022-09-14 12:36:33 -03:00
Ryan Cross 5b6695a04c
fix: save MeetingRegistration.checkedin as boolean value (#4446) 2022-09-14 09:55:08 -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
Jennifer Richards ebebdbed3e
refactor: replace datetime.now and datetime.today with timezone.now (#4211)
* refactor: replace datetime.now with timezone.now

* refactor: migrate model fields to use timezone.now as default

* refactor: replace datetime.today with timezone.now

datetime.datetime.today() is equivalent to datetime.datetime.now(); both
return a naive datetime with the current local time.

* refactor: rephrase datetime.now(tz) as timezone.now().astimezone(tz)

This is effectively the same, but is less likely to encourage accidental
use of naive datetimes.

* refactor: revert datetime.today() change to old migrations

* refactor: change a missed datetime.now to timezone.now

* chore: renumber timezone_now migration

* chore: renumber migrations
2022-08-25 13:45:16 -03:00
Ryan Cross a94a87f336
fix: remove test so all deleted or swapped (onsite<->remote) registrations get removed from MeetingRegistrations (#4359) 2022-08-25 10:00:04 -05:00
Robert Sparks 9c236ea2a2
chore: remove unneeded logging and code marked unreachable that has not been reached. (#4305)
* chore: remove unneeded logging and code marked unreachable that has not been reached.

* fix: remove noop save override
2022-08-04 11:25:31 -05:00
Ryan Cross 2d48c84360
feat: Add tracking checked-in to MeetingRegistration and the registration API. (#4280)
* feat: add field MeetingRegistration.checkedin to track onsite checkin

* feat: add handling of ticket_type, checkedin to get_meeting_registation_data. Fixes #3672
2022-07-26 13:17:19 -05:00
Robert Sparks b988850985
fix: avoid mutables as defaults. Compute date default arguments at runtime rather than loadtime. (#4144) 2022-07-06 14:39:36 -05:00
rpcross 698f031b7f
feat: separate MeetingRegistration rows for each registration type. updates the registration API (#3641)
* Registration API Update

- change MeetingRegistration.reg_type field to hold only one type
- allow multiple MeetingRegistration records per person/meeting
  (one for each reg_type)

* Fix scope claims

* Add meeting 114 to MeetingRegistration migration

* fix: update stats views for MeetingRegistration model use changes

* refactor: remove unused imports
2022-06-16 15:39:34 -05:00
Lars Eggert 74f2a85d64
refactor: replace flot with highcharts (#4030)
* chore: Replace flot with highcharts

Since flot hasn't been updated since 2014 and was only used in one
place. Simplify how highcharts is initialized and used, and re-enable
pre-bs5 export functionality.

* Fix tests

* Remove some console.log statements
2022-05-31 17:05:27 -05:00
Jennifer Richards 6f3fb6930f Add timeouts to requests library calls. Fixes #3498. Commit ready for merge.
- Legacy-Id: 19839
2022-01-13 15:06:28 +00:00
Jennifer Richards cf62b46093 Find references from submitted XML instead of rendering to text and parsing. Fixes #3342. Commit ready for merge.
- Legacy-Id: 19825
2022-01-07 17:53:23 +00:00
Ryan Cross c09baf47a5 Fix slow fetch_meeting_attendance command. Fixes #3304. Commit ready for merge
- Legacy-Id: 19429
2021-10-15 22:39:50 +00:00
Robert Sparks b99eecc1ae Bring the factory-boy and Faker dependencies forward through some minor breaking changes. Stop using the deprecated fr_QC locale in Faker. Commit ready for merge.
- Legacy-Id: 19270
2021-08-03 22:22:35 +00:00
Robert Sparks fe82f4d696 connect the new calculations to the UI. Clean flakes.
- Legacy-Id: 18974
2021-05-06 19:00:58 +00:00
Robert Sparks e3476f5bdb wrap the repair and report utilities in management commands
- Legacy-Id: 18973
2021-05-06 16:03:32 +00:00
Robert Sparks 216ec499df Checkpointing. Remaining work: convert meetingregistation fixup to a migration and a mgmt comment. Flesh out testing of 8989 rule 2 and fix the known edge case bug. Remove old implementation and connect UI to the new implementation.
- Legacy-Id: 18971
2021-05-01 19:57:04 +00:00
Robert Sparks 3697180cc1 Reverted merge of timezone-aware migration efforts.
- Legacy-Id: 18792
2021-01-12 16:54:20 +00:00
Henrik Levkowetz a708bdf895 Refactored out a new test case DrafTestCase in order to re-use it to set up test directories with draft content, and updated the StatisticsTest to subclass it.
- Legacy-Id: 18783
2020-12-19 22:42:36 +00:00
Henrik Levkowetz 774e752a54 Snapshot of timezone-aware datatracker code. Tests pass, and the test-crawler shows only expected differences. Trunk changes merged in up to r18768.
- Legacy-Id: 18770
2020-12-16 23:53:37 +00:00
Henrik Levkowetz 536789517d Added a sort of author names for stability of some stats pages. Commit ready for merge.
- Legacy-Id: 18751
2020-12-11 16:57:29 +00:00
Henrik Levkowetz ac5e88b82b Added a context processor to make settings generally available in page templates. Split the SECRETARIAT_TICKET_EMAIL setting into SECRETARIAT_ACTION_EMAIL and SECRETARIAT_INFO_EMAIL, with different addresses. Updated places with hardcoded ietf-action@ietf.org addresses to use the settings value, and updated some places to use ietf-infor@ietf.org instead of the ietf-action address. Fixes issue #3081.
- Legacy-Id: 18501
2020-09-17 11:10:27 +00:00
Henrik Levkowetz 57938b039d Converted many cases of plain-text 403 messages to use a properly styled page instead, with a login link when appropriate. Also changed some API endpoint 400 responses to a more correct 403.
- Legacy-Id: 18339
2020-08-06 10:59:52 +00:00
Henrik Levkowetz 6a38234b0a Tweaked the MeetingRegistration admin.
- Legacy-Id: 18062
2020-06-25 16:22:41 +00:00
Henrik Levkowetz ae6b39459f Updated API resources for MeetingRegistration.
- Legacy-Id: 17961
2020-06-10 18:22:47 +00:00
Henrik Levkowetz 567449d3d2 Merged in [17908] from rjsparks@nostrum.com:
Add used_roles to Group and default_used_roles to GroupFeatures. Dynamically build the group edit form to provide a field for all used_roles. Fixes #2785 and #2572. Partially addresses #2160.
 - Legacy-Id: 17960
Note: SVN reference [17908] has been migrated to Git commit 2862727d02
2020-06-10 12:58:29 +00:00
Henrik Levkowetz 8a6026ce6e Added a MeetingRegistration.attended field, to keep apart meeting attendence and meeting registration before attendance.
- Legacy-Id: 17954
2020-06-09 20:58:35 +00:00
Henrik Levkowetz 59487f5627 Fixed an issue with multiple objects matching a registsration record fetched from the registration system (this has been caused by not correctly detecting changes in registration system details).
- Legacy-Id: 17953
2020-06-09 19:42:11 +00:00
Henrik Levkowetz 956ddaf3cf Fixed an incorrect admin site search field specification.
- Legacy-Id: 17951
2020-06-09 18:26:45 +00:00
Henrik Levkowetz ec5d159b4f Added a new API endpoint to be used by the registration system, to trigger account creation.
- Legacy-Id: 17941
2020-06-08 19:51:10 +00:00
Henrik Levkowetz 228f00287b Added migrations for model changes
- Legacy-Id: 17938
2020-06-08 19:28:15 +00:00
Henrik Levkowetz c01dcddea1 Added reg_type and ticket_type to the MeetingRegistration model.
- Legacy-Id: 17932
2020-06-08 19:14:21 +00:00
Henrik Levkowetz 9aeda11a29 Removed some Py2 compatibility decorators.
- Legacy-Id: 17673
2020-04-21 13:54:31 +00:00
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz 566971a6ae Removed further six usage.
- Legacy-Id: 17386
2020-03-05 15:10:33 +00:00
Henrik Levkowetz e9a37d8ac8 Removed six.text_type(), changed six.moves.urllib to plain urllib, and removed now unused six imports.
- Legacy-Id: 17385
2020-03-05 14:41:41 +00:00
Henrik Levkowetz 286ee2f961 Merged in [16852] from sasha@dashcare.nl:
Fix #2331 - Show stacked bar graph for in time and late reviews.
On the stats page, a single stacked bar graph is now shown which
combines in time and late reviews, replacing the separate graphs for
these statistics.
Tests for the charts are also expanded to validate the actual
graph content for both stacked and non-stacked charts.
 - Legacy-Id: 16898
Note: SVN reference [16852] has been migrated to Git commit f651320ef3
2019-10-22 11:49:39 +00:00
Sasha Romijn f651320ef3 Fix #2331 - Show stacked bar graph for in time and late reviews.
On the stats page, a single stacked bar graph is now shown which
combines in time and late reviews, replacing the separate graphs for
these statistics.

Tests for the charts are also expanded to validate the actual
graph content for both stacked and non-stacked charts.

Commit ready for merge.
 - Legacy-Id: 16852
2019-10-09 15:46:22 +00:00
Henrik Levkowetz 33e8733b91 Fixed up mypy issues or added type:ignore comments as needed for a clean mypy run.
- Legacy-Id: 16772
2019-09-30 15:42:18 +00:00
Henrik Levkowetz 8e313e4ed5 Adjusted migrations for Python2/3 compatibility.
- Legacy-Id: 16633
2019-08-08 17:11:14 +00:00
Henrik Levkowetz e03784132d Merged changes from current trunk to Py3 branch.
- Legacy-Id: 16468
2019-07-16 15:36:16 +00:00
Henrik Levkowetz ef4a41c14b Fixed a bytes/str issue with the arguments to syslog.openlog()
- Legacy-Id: 16460
2019-07-16 13:18:37 +00:00