Commit graph

79 commits

Author SHA1 Message Date
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
Lars Eggert 64d2ba2558 Run tidy as part of tests, and fix HTML issues it finds.
- Legacy-Id: 19904
2022-02-01 16:11:34 +00:00
Jennifer Richards bcd37edfcd Merged from session_purpose_dev
Create dev branch for session purpose work (from revision [19414])
Snapshot of dev work to add session purpose annotation (from revision [19415])
Allow non-WG-like groups to request additional sessions/durations and bypass approval (from revision [19424])
Add 'closed' session purpose, assign purposes for nomcom groups, and update schedule editor to enforce timeslot type and allow blurring sessions by purpose (from revision [19427])
Add management command to set up timeslots/sessions for testing/demoing 'purpose' field (from revision [19430])
Update session purposes and group type -> purpose map to match notes page, change 'session' purpose to 'regular' (from revision [19433])
Redirect edit_schedule urls to edit_meeting_schedule view (from revision [19434])
Allow hiding/blurring sessions and timeslots based on TimeSlotType in the schedule editor (from revision [19438])
Disable session purpose/timeslot type hiding on schedule editor when only 0 or 1 options (from revision [19439])
Improvements to the timeslot and schedule editors (move new toggles to modals, handle overflowing session names, fix timeslot editor scrolling, add buttons to quickly create single timeslot, accept trailing slash on edit URL) (from revision [19449])
Update purpose/types after discussions, add on_agenda Session field, prevent session requests for groups with no allowed purpose, handle addition fields in session request, fix editing session requests, add session edit form/access from schedule editor, eliminate TimeSlotTypeName "private" field, add server-side timeslot type filtering to schedule editor (from revision [19549])
Eliminate the officehours timeslot type, update/renumber migrations, mark offagenda/reserved TimeSlotTypeNames as not used, add a 'none' SessionPurposeName and disallow null, update agenda filter keywords/filter helpers, fix broken tests and general debugging (from revision [19550])
Tear out old meeting schedule editor and related code (from revision [19551])
Fix merge errors in preceding commits (from revision [19556])
 - Legacy-Id: 19570
Note: SVN reference [19415] has been migrated to Git commit 1054f90873

Note: SVN reference [19424] has been migrated to Git commit 5318081608

Note: SVN reference [19427] has been migrated to Git commit 173e438aee

Note: SVN reference [19430] has been migrated to Git commit 7a2530a0a6

Note: SVN reference [19433] has been migrated to Git commit 3be50d6e39

Note: SVN reference [19434] has been migrated to Git commit 3e3d681e5f

Note: SVN reference [19438] has been migrated to Git commit b6ac3d4b1d

Note: SVN reference [19439] has been migrated to Git commit 446ac7a47e

Note: SVN reference [19449] has been migrated to Git commit 5cbe402036

Note: SVN reference [19549] has been migrated to Git commit 3dfce7b850

Note: SVN reference [19550] has been migrated to Git commit 7b35c09c40

Note: SVN reference [19551] has been migrated to Git commit d7f20342b6

Note: SVN reference [19556] has been migrated to Git commit 2b1864f5a0
2021-11-09 01:35:25 +00:00
Jennifer Richards 81d9234d54 Use temporary directories instead of "real" filesystem for tests. Fixes #3414. Commit ready for merge.
- Legacy-Id: 19555
2021-11-05 19:45:57 +00:00
Jennifer Richards 7b35c09c40 Eliminate the officehours timeslot type, update/renumber migrations, mark offagenda/reserved TimeSlotTypeNames as not used, add a 'none' SessionPurposeName and disallow null, update agenda filter keywords/filter helpers, fix broken tests and general debugging
- Legacy-Id: 19550
2021-11-04 17:06:06 +00:00
Jennifer Richards 336d762123 Allow configuration of group conflict types used for each meeting Fixes #2770. Commit ready for merge.
- Legacy-Id: 19266
2021-07-30 17:50:24 +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 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 227f83b0da Changed the autogeneration of schedule names to use slugified user (person) name, rather than login. Logins are mostly email addresses, and may contain characters not permitted in the URL pattern for schedule names, and are less readable in the contexts where schedule names are used.
- Legacy-Id: 18567
2020-10-08 12:01:42 +00:00
Ole Laursen a39fa7f967 New branch from trunk @ r18382 for meeting improvements, with iola/meeting-improvement-r17835 merged in
- Legacy-Id: 18385
2020-08-20 09:36:41 +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 129d62e666 Added 'remote_instructions' as an editable field for misc. sessions in the secretariat app, in order to be able to set remote access URLs.
- Legacy-Id: 18118
2020-07-01 14:14:05 +00:00
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Ole Laursen 568670c060 Turn sessions into regular sessions and non-sessions into misc.
sessions in the UI and code to avoid ambiguity.

This doesn't change the data in the DB except for uses of
TimeSlotTypeName where 'session' is now 'regular'.
 - Legacy-Id: 17128
2019-12-06 20:02:26 +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 9d4ca615d3 Merged in [16607] from rcross@amsl.com:
Fix issue where third session requests, which rerequire AD approval, get left with approved status, instead of scheduled, after Secretraiat sends out notifications of official schedule.  Fixes #2765.
 - Legacy-Id: 16817
Note: SVN reference [16607] has been migrated to Git commit 9a82586e1b
2019-10-02 20:55:54 +00:00
Henrik Levkowetz bee8d13a57 Removed some test assertions which are incorrect after the previous commit
- Legacy-Id: 16806
2019-10-01 22:13:20 +00:00
Ryan Cross f950f1b8ea Remove temporary print statements. Commit ready for merge.
- Legacy-Id: 16702
2019-09-03 21:16:10 +00:00
Ryan Cross 9a82586e1b Fix issue where third session requests, which rerequire AD approval, get left with approved status, instead of scheduled, after Secretraiat sends out notifications of official schedule. Fixes #2765. Commit ready for merge.
- Legacy-Id: 16607
2019-07-31 23:02:20 +00:00
Henrik Levkowetz 2d7c9629aa Added 'from __future__' imports all over the place, to bring code behaviour into closer alignment between python2 and python3
- Legacy-Id: 16446
2019-07-15 15:40:51 +00:00
Henrik Levkowetz f33ecaa1a4 Fixed a test that compared an int with a meeting number string. Changed meeting test data to use meeting number 72 instead of 42, because proceedings code gives 404 for meetings before 65. Changed a number of StringIO() to BytesIO().
- Legacy-Id: 16378
2019-07-04 16:01:32 +00:00
Henrik Levkowetz f5ae2541ad Replaced multiple asserts with assertContains().
- Legacy-Id: 16353
2019-07-01 14:09:12 +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 e55a079591 Merged in [15787] from rcross@amsl.com:
Rework page flow and forms of secr/meetings app.  Fixes #2609.
 - Legacy-Id: 15794
Note: SVN reference [15787] has been migrated to Git commit e634dc2488
2018-11-30 20:48:40 +00:00
Ryan Cross e634dc2488 Rework page flow and forms of secr/meetings app. Fixes #2609. Commit ready for merge.
- Legacy-Id: 15787
2018-11-21 22:43:04 +00:00
Henrik Levkowetz d284c56ed5 Removed a print statement from a test.
- Legacy-Id: 15758
2018-11-12 14:11:34 +00:00
Henrik Levkowetz e471386cf2 Merged in [15715] from rcross@amsl.com:
Fix issue where new non-session location field value isn't saved.  Fixes #2625.
 - Legacy-Id: 15756
Note: SVN reference [15715] has been migrated to Git commit a47fba833f
2018-11-12 13:35:17 +00:00
Ryan Cross a47fba833f Fix issue where new non-session location field value isn't saved. Fixes #2625. Commit ready for merge.
- Legacy-Id: 15715
2018-11-05 04:25:20 +00:00
Ryan Cross ec279682d2 Give secretariat the ability to cancel non-working group sessions. Fixes #2537. Commit ready for merge.
- Legacy-Id: 15328
2018-07-14 16:14:35 +00:00
Henrik Levkowetz c8ebcf1f88 Merged in [14879] from kivinen@iki.fi:
Backfilled IETF meetings starting from 1 and backfilled the attendee numbers for them. Modified the overview attendee statistics page to use different colors for different venue continents.
 - Legacy-Id: 14898
Note: SVN reference [14879] has been migrated to Git commit 75dbe017a6
2018-03-22 00:01:57 +00:00
Tero Kivinen 75dbe017a6 Backfilled IETF meetings starting from 1 and backfilled the attendee numbers for them. Modified the overview attendee statistics page to use different colors for different venue continents. Commit ready for merge.
- Legacy-Id: 14879
2018-03-20 17:28:48 +00:00
Henrik Levkowetz 4f83548b49 Added a new field Meeting.days to capture the length of a meeting. This is necessary now that we have previous meetings officially starting Sunday, lasting to Friday, and future meetings starting Saturday, Lasting to Friday. We use Meeting.days to calculate Meeting.end_date(). Meeting.get_ietf_monday() and two cut_off() methods have also been updated to be instance methods instead of class methods, and to not assume that a meeting starts on Sunday.
- Legacy-Id: 14225
2017-10-25 13:38:15 +00:00
Ryan Cross 9ac9493a70 Refactor session edit page. Add button to cancel a session, which sets the status. Fixes #2296. Commit ready for merge.
- Legacy-Id: 13775
2017-07-05 20:23:10 +00:00
Ryan Cross 3ccb550888 Change views that use GET requests to delete objects to use POST. Fixes #1796. Commit ready for merge.
- Legacy-Id: 13615
2017-06-13 23:33:31 +00:00
Ryan Cross 8a98ba2516 Initialize Empty-Schedule with special sessions from previous meeting on creation. Fixes #1500. Commit ready for merge.
- Legacy-Id: 13588
2017-06-12 21:39:52 +00:00
Ryan Cross 930aaccc87 Add full edit capability for non-sessions. Fixes #2235. Commit ready for merge.
- Legacy-Id: 13418
2017-05-24 21:08:41 +00:00
Ryan Cross 4d9bdcad6a Add group field to Roles add form validation. Fixes #2292. Commit ready for merge.
- Legacy-Id: 13276
2017-05-09 00:33:55 +00:00
Henrik Levkowetz 14c748df98 Changed the creation of temporary test dirs to use names which include the test class name, in order to make it possible to run test cases in parallel. Disabled coverage testing when running in parallel (those classes cannot be pickled and distributed to the test runner threads, and also won't pass coverage data back). Tweaked the TestCase.tempdir() method.
- Legacy-Id: 13157
2017-03-27 21:41:18 +00:00
Lars Eggert 8a70e9773d Fix various "RemovedInDjango20Warning" warnings. Commit ready for merge.
- Legacy-Id: 13112
2017-03-25 19:16:45 +00:00
Ryan Cross 4f5933ae20 Add placeholders and validations to secretariat non-session time input fields. Fixes #2208. Commit ready for merge.
- Legacy-Id: 13017
2017-03-16 23:10:14 +00:00
Henrik Levkowetz 74af0f5658 Replaced another bunch of explicit url names with dotted-path to the view function.
- Legacy-Id: 12849
2017-02-15 22:11:20 +00:00
Henrik Levkowetz 3d6b370c59 Upgraded custom TimedeltaFields to use the builtin DurationField from Django 1.8, and adjusted forms and initialization values accordingly.
- Legacy-Id: 12597
2016-12-20 22:56:34 +00:00
Ryan Cross 743ec4d7ff Refactor Proceedings Introduction pages tests and implementation. Commit ready for merge
- Legacy-Id: 12140
2016-10-13 23:31:03 +00:00
Henrik Levkowetz 7e6ed23f70 Merged in [11858] from rjsparks@nostrum.com:
Merge forward Ryan's IETF Overview pages.
 - Legacy-Id: 11874
Note: SVN reference [11858] has been migrated to Git commit cb3af1a2d9
2016-08-25 13:36:48 +00:00
Robert Sparks cb3af1a2d9 Merge forward Ryan's IETF Overview pages. Commit ready for merge.
- Legacy-Id: 11858
2016-08-24 17:20:54 +00:00
Henrik Levkowetz 4b0a9360f0 Merged in ^/branch/iola/event-saving-refactor-r10291, which refactors document saving to always use doc.save_with_history(events), and requires accompanying events. This branch also provides refactoring of recurring regexes in url patterns into a dictionary. As part of the merge, also refactored new code which didn't use the save_with_history() method.
- Legacy-Id: 11840
2016-08-23 10:52:08 +00:00
Robert Sparks 44cd9e0920 Moved the materials start, cutoff, and revision dates into the Meeting object
- Legacy-Id: 11760
2016-08-05 20:44:05 +00:00
Robert Sparks b3883b6ac4 Allow non-official schedules to be viewed in the same ways the official schedule for a meeting can be viewed. Fixes #1959. Commit ready for merge.
- Legacy-Id: 11500
2016-06-29 20:56:08 +00:00