Commit graph

76 commits

Author SHA1 Message Date
Lars Eggert 6eabd4a3a1
chore: Use codespell to fix typos in comments. (#4794)
First part of replacement of #4651
2022-11-28 10:36:36 -06:00
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 8b52d27b02
refactor: refactor timestamp handling so tests in meeting app pass (#4371)
* 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: add migration to change timestamps to UTC

* refactor: move tz instantiation/caching from TimeSlot to Meeting

* fix: assume utc if meeting.time_zone is blank

* chore: make datetime.combine() calls tz aware in the meeting app

* ci: correctly use meeting.tz in TimeSlotFactory

* chore: compute TimeSlot utc / local times assuming tz-aware times

* chore: use tzaware math for agenda editor timeslot layout

* chore: fill in Meeting.time_zone where it is blank

Nearly all interim meetings on or before 2016-07-01 have blank
time_zone values. This migration fills these in with PST8PDT.

* chore: disallow blank Meeting.time_zone value

* refactor: no need to handle blank time_zone case in TZ migration

* refactor: remove now-unnecessary checks that meeting has time_zone

* chore: fix timezone handling in agenda.ics and Meeting.updated()

* chore: fix tz handling in interim_request_details, exercise in tests

* chore: fix timezone handling for test_interim_send_announcement

* chore: fix timezone handling in agenda_json()

* chore: fix timezone handling in old agenda

* chore: fix timezone handling for EditTimeslotsTests

* refactor: refactor a few fixes for more consistent timezone handling

* chore: add timezone info to timestamps in fixtures

* chore: remove naive datetime warnings found in meetings.tests_views

* chore: fix a few more test failures in meetings.tests_views

All tests in meetings.tests_views now passing

* chore: remove unused import

* chore: fix timezone handling in test_schedule_generator.py

* chore: fix timezone handling affecting meeting.tests_js

* chore: fix timeslot test bug when local date != UTC date

* test: fix a few failing tests, all meetings tests now pass

(for me, anyway)

* chore: renumber migrations

* chore: update timestamp conversion migration

The django-celery-beat package introduces tables with timestamp
columns. These columns are stored in CELERY_TIMEZONE. Because we run with
this set to UTC, the migration ignores these columns.

* chore: fix pytz-related change in migration

* chore: remove duplicate migrations

* chore: remove CELERY_BEAT_TZ_AWARE setting now that USE_TZ is True

* test: avoid failure in test with bogus timezone
2022-08-26 16:53:19 -03:00
Robert Sparks 3697180cc1 Reverted merge of timezone-aware migration efforts.
- Legacy-Id: 18792
2021-01-12 16:54:20 +00:00
Henrik Levkowetz 59b49c846b Fixed a number of TimeSlot-related issues, in particular related to getting the correct date from a timeslot. Also fixed the displayed slot times in the new schedule editors to show local times, not UTC times.
- Legacy-Id: 18785
2020-12-19 22:55:11 +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 5d26af8e40 Merged in [18587] from rcross@amsl.com:
Fix section 5 of secretariat progress report. Fixes #3063.
 - Legacy-Id: 18594
Note: SVN reference [18587] has been migrated to Git commit c2a0bd613b
2020-10-11 14:56:30 +00:00
Ole Laursen c78ffbcd18 Introduce support for setting a base schedule on a schedule. All
assignments on the base schedule are shown in the pages for the
schedule, read-only.

This allows managing things like breaks and misc sessions separately
from the regular WG sessions.

Base schedules are not allowed to be the base of other base schedules
(the hierarchy can only be one level deep) to simplify the mental
model and the code.

Add link for creating new schedules instead of relying on copying
Empty-Schedule and change the meeting creation code to no longer
create the special Empty-Schedule. Instead a "base" schedule is
created and a first schedule with the name and permissions of the user
creating the meeting, using "base" as base.

Speed up a couple of the Secretariat/AD agenda views by adding
prefetches.
 - Legacy-Id: 18355
2020-08-11 17:34:32 +00:00
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz ab173cb2eb Removed further six usage: six.string_types, six.integer_types, six.moves.urllib instances.
- Legacy-Id: 17390
2020-03-05 20:46:58 +00:00
Ole Laursen 3957743b85 Move Session.status, .requested, and .requested_by to a new SchedulingEvent
- Legacy-Id: 17122
2019-12-05 12:41:09 +00:00
Ole Laursen 0555879777 Rename Meeting.agenda to Meeting.schedule together with a bunch of
related internal things
 - Legacy-Id: 17051
2019-11-18 17:22:19 +00:00
Henrik Levkowetz b2be7975c9 Merged in [16600] from rjsparks@nostrum.com:
Fixed a subtle bug in the code that converts slides to PDF that was writing back into settings.
 - Legacy-Id: 16645
Note: SVN reference [16600] has been migrated to Git commit b4714f95579efcb5051438239a5df002036c9975
2019-08-10 18:06:40 +00:00
Henrik Levkowetz 8c6eb3a30a Python2/3 compatibility: Changed the use of open() and StringIO to io.open() etc.
- Legacy-Id: 16458
2019-07-15 19:14:04 +00:00
Henrik Levkowetz d7f5c84182 Initial 2to3 patch with added copyright statement updates.
- Legacy-Id: 16309
2019-06-27 14:40:54 +00:00
Henrik Levkowetz 426870b766 Merged in the Document and DocAlias primary key change and m2m work in ^/personal/henrik/6.96.1-docalias.
- Legacy-Id: 16261
2019-06-15 12:00:48 +00:00
Henrik Levkowetz a2cafded25 Changed DocAlias to be many-to-many, in order to be able to handle STD aliases referring to multiple RFCs.
- Legacy-Id: 16249
2019-06-14 20:38:14 +00:00
Henrik Levkowetz 815602351f This is a series of 50 migrations that changes the Document and DocAlias
primary keys from character strings to integers, and makes corresponding code
changes.

This was prompted by database limitations discovered when trying to make
DocAlias use a m2m document field; with 255 long strings as primary keys for
Document and DocAlias this violated the MySQL database limitations.

Changing the primary keys to integers should also improve efficiency.  

Due to the data migrations which create the new integer primary keys and adds
corresponding integer foreign keys matching the previous string foreign keys
in all tables having foreign keys to Document and DocAlias, some of these
migrations take a long time.  The total set of migrations are expected to have
a runtime on the order of 2 hours.
 - Legacy-Id: 16237
2019-06-10 11:32:46 +00:00
Robert Sparks 25cc00f925 Refactored DocumentInfo to address overloading the external_url field with strings that are not URLs. Commit ready for merge.
- Legacy-Id: 15864
2019-01-02 22:55:00 +00:00
Henrik Levkowetz 5cba7fc8a8 Added exclusion of cancelled session when doing audio file import. Fixes an server 500 error when a cancelled session is shown in the same room and timeslot as an actual session.
- Legacy-Id: 15752
2018-11-11 14:33:45 +00:00
Henrik Levkowetz fcbbe08eba Removed video url import from youtube, which is not needed any more given the /api/meeting/session/video/url API endpoint. This also prevents duplicate video URLs.
- Legacy-Id: 15424
2018-08-10 12:54:27 +00:00
Henrik Levkowetz 0ef66ae9e2 Added optional arguments title and user to create_recording(), to make it possible to affect those attributes.
- Legacy-Id: 14966
2018-03-29 11:02:58 +00:00
Henrik Levkowetz f697d9ecb6 Merged in [14404] from rjsparks@nostrum.com:
Include an explicitly set Responsible ADs email addresses in generated aliases when a document has a group.
 - Legacy-Id: 14424
Note: SVN reference [14404] has been migrated to Git commit e36cad65ed
2017-12-15 23:57:41 +00:00
Henrik Levkowetz 3d5862a9d4 Changed get_timeslot_for_filename() to not blow up in the presence of duplicate timeslots.
- Legacy-Id: 13952
2017-07-20 12:43:38 +00:00
Ryan Cross 7d244c9a38 Remove legacy external interim meeting listing. Install redirect to /meeting/past. Fixes #2166. Commit ready for merge.
- Legacy-Id: 13727
2017-06-29 00:09:36 +00:00
Henrik Levkowetz d23650e382 Merged in [13492] from rcross@amsl.com:
Remove old proceedings generation code.  Fixes #2234.
 - Legacy-Id: 13510
Note: SVN reference [13492] has been migrated to Git commit 254e35fa56
2017-06-04 13:09:16 +00:00
Ryan Cross 254e35fa56 Remove old proceedings generation code. Fixes #2234. Commit ready for merge.
- Legacy-Id: 13492
2017-06-01 23:59:56 +00:00
Ryan Cross 7ee2a16967 Add import of YouTube session videos using YouTube Data API. Fixes #2249. Commit ready for merge.
- Legacy-Id: 13485
2017-06-01 18:36:46 +00:00
Henrik Levkowetz 0af1223b3c Merged in [12990] and [12991] from rcross@amsl.com:
Refactor session audio file import.  Add informative email.  Fixes #2164.
 - Legacy-Id: 12998
Note: SVN reference [12990] has been migrated to Git commit 084f8a7495

Note: SVN reference [12991] has been migrated to Git commit 6a5f180fb0
2017-03-12 12:15:37 +00:00
Ryan Cross 084f8a7495 Refactor session audio file import. Add informative email. Fixes #2164. Commit ready for merge
- Legacy-Id: 12990
2017-03-10 23:04:06 +00:00
Henrik Levkowetz 4daf66d11c Added DocEvent rev= parameter througout the code.
- Legacy-Id: 12978
2017-03-06 15:08:21 +00:00
Henrik Levkowetz 5f053ad21a Cleaned up the remaining explicit url names, using dotted-paths to view
functions instead.  In all almost 700 changes.
 - Legacy-Id: 12923
2017-02-26 23:21:49 +00:00
Henrik Levkowetz 7d71a24358 Added a save for a session presentation object before adding a reference to it.
- Legacy-Id: 12673
2017-01-19 16:11:37 +00:00
Henrik Levkowetz 216ed80529 Merged in code from rcross@amsl.com to bring back the automatic conversion of slides from powerpoint to pdf.
- Legacy-Id: 12379
2016-11-17 07:30:14 +00:00
Ryan Cross c3d4cc1aea Add meeting proceedings introduction pages: Progress Report and Attendees. Commit ready for merge.
- Legacy-Id: 12111
2016-10-10 21:21:02 +00:00
Ryan Cross 2e02011725 Changed check_audio_files() to only consider sessions on the official
schedule.  Fixes some 500 errors.  Commit ready to merge.
 - Legacy-Id: 11697
2016-07-17 14:24:01 +00:00
Henrik Levkowetz 61540ac4bb Carry patches to the production back to trunk.
- Legacy-Id: 11673
2016-07-16 13:33:16 +00:00
Ryan Cross 19f9b11032 Remove old interim proceedings location reference. Commit ready for merge.
- Legacy-Id: 11504
2016-06-30 17:02:33 +00:00
Henrik Levkowetz d298785fda Merged in ^/branch/amsl/interim@11230, which provides interim meeting management support. Also fixes issues #1961, #1962 and #1964.
- Legacy-Id: 11402
2016-06-17 14:16:27 +00:00
Henrik Levkowetz c83dae57fb Added setting for MEDIA_ROOT, and changed the setting for MEDIA_URL; introduced a setting for the IETF main site URL, for use where MEDIA_URL had been used (incorrectly) earlier.
- Legacy-Id: 11263
2016-06-02 19:17:38 +00:00
Ryan Cross c8f3760dbe refactor code dealing with interim materials path
- Legacy-Id: 11229
2016-05-23 22:58:45 +00:00
Ryan Cross 8fef55dc31 add approval and cancel notifications
- Legacy-Id: 11196
2016-05-16 22:48:43 +00:00
Ryan Cross 220e2587b8 Add ability to enter recording URLs for non working group sessions. Fixes #1885. Commit ready for merge.
- Legacy-Id: 11072
2016-04-02 18:50:20 +00:00
Robert Sparks ca6512e4fa Capture "Status update" summaries for groups that want to provide them. These updates show on the groups charter (or about) page, and in the group history. The most recent update provided before proceedings corrections closing date is included in the group's page in the meeting proceedings. This addresses the majority of #1773 (a ticket entered on behalf of the IESG). Commit ready for merge.
- Legacy-Id: 10969
2016-03-23 19:42:01 +00:00
Henrik Levkowetz 31b5c1f535 Merged in [10731] from rjsparks@nostrum.com:
Addresses issues uncovered by the test-crawler. Adds missing DocAlias records for several document types. Creates DocAlias objects when createing Document objects for those document types. Identifies places in code to touch when we are ready to expose the bluesheets and recording document types at /doc/. (The data rows and the content store need work before doing so).
 - Legacy-Id: 10746
Note: SVN reference [10731] has been migrated to Git commit 757397330c
2016-01-26 22:15:45 +00:00
Henrik Levkowetz bc9a85a075 Merged [10721] and [10724] from rcross@amsl.com:
Removed Test watermark from interim meeting index background.  Rewrote merge-person-records utility script to handle all related objects in a generic manner, remove old User records and handle email primary attribute.  Fixes #1627.
 - Legacy-Id: 10740
Note: SVN reference [10721] has been migrated to Git commit e97cd64bbb

Note: SVN reference [10724] has been migrated to Git commit 8efb9229f6
2016-01-26 21:31:46 +00:00
Robert Sparks 757397330c Addresses issues uncovered by the test-crawler. Adds missing DocAlias records for several document types. Creates DocAlias objects when createing Document objects for those document types. Identifies places in code to touch when we are ready to expose the bluesheets and recording document types at /doc/. (The data rows and the content store need work before doing so).
- Legacy-Id: 10731
2016-01-25 19:40:35 +00:00
Ryan Cross 8efb9229f6 Remove Test watermark from interim meeting index background. Commit ready for merge
- Legacy-Id: 10724
2016-01-22 20:52:43 +00:00
Ryan Cross e97cd64bbb Rewrite merge-person-records utility script to handle all related objects in a generic manner, remove old User records and handle email primary attribute. Fixes #1627. Commit ready for merge
- Legacy-Id: 10721
2016-01-22 20:37:29 +00:00
Henrik Levkowetz 71dec7a692 Moved forward to 6.7.2.dev0 the changes to rename class ScheduledSession to the more correct (but unfortunately also cumbersome) SchedTimeSessAssignment, and rename reverse relationships involving this class appropriately. Accompanying changes in javascript and templates. Migrations to match.
- Legacy-Id: 10297
2015-10-26 22:45:26 +00:00