Commit graph

154 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 0c458ef048
fix: make a few datetime manipulations timezone-aware (#4755)
* fix: set tz when passing a date to timesince_days filter

* fix: fill in tz for a constructed datetime in idindex/index.py

* test: simplify double-negatives in test assertions

* test: fix I-D expiration test cases to be tz aware

* fix: use tz-aware comparisons for in_draft_expire_freeze method

* test: fix tz used for timesince_days filter test case
2022-11-15 07:55:13 -06:00
Russ Housley 612f33e014
fix: Don't send I-D expiration warning if it will happen within 12 hours. (#4700)
* fix: 4635

* fix: use timezone.now rather than datetime.datetime.now

* chore: fix merge error

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
2022-11-08 16:06:42 +00:00
Jennifer Richards 69447d0ba0
Merge branch 'feat/tzaware' into jennifer/main-for-tzaware-merge
# Conflicts:
#	ietf/name/fixtures/names.json
#	ietf/utils/management/commands/send_gdpr_consent_request.py
2022-10-18 16:57:42 -03:00
Robert Sparks cbb8da73c8
fix: regenerate correct shepherd template. Fixes #4558 (#4595)
* fix: regenerate correct shepherd template

* chore: remove unnecessary extra whitespace

* fix: improve readability of code per review comments
2022-10-18 07:57:08 -05:00
Jennifer Richards 56505147e0
fix: handle timezones in a bunch of places 2022-09-23 16:11:49 -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
Robert Sparks 0f703a695e
fix: correctly render wg shepherd writeups and test it. (#4316) 2022-08-11 16:21:52 -05:00
Lars Eggert 1ba87890ba
feat: Render the document shepherd writeup templates at two new URLs (#4225)
* feat: Render the document shepherd writeup templates at two new URL.

Those being `/doc/shepherdwriteuptemplate/group` and
`/doc/shepherdwriteuptemplate/individual`.

* Address review comments from @jennifer-richards

* Fixes

* Remove debug statement

* Make bleach sanitizer not strip the `start` attribute of `ol` tags

Also rearrange the code a bit

* Don't sanitize the `python_markdown` output, it destroys wanted formatting

* Restore bleach

* Don't bleach tag `id`s.
2022-07-22 13:43:02 -05:00
Lars Eggert 21452b7ecc
fix: Update document shepherd writeup template based on community review (#4042)
* fix: Update document shepherd writeup template based on community review

* Point to the new "content guidelines" page @JayDaley added

* Suggestion from Jane Coffin

* Also extend this to contributors

* Fix grammar nits

* Revise question 5 based on suggestions from @cabo

* fix: Update document shepherd writeup template based on community review

* Point to the new "content guidelines" page @JayDaley added

* Suggestion from Jane Coffin

* Also extend this to contributors

* Fix grammar nits

* Revise question 5 based on suggestions from @cabo

* Apply suggestions from code review

By @richsalz

* Update ietf/templates/doc/shepherd_writeup.txt

* Update ietf/templates/doc/shepherd_writeup.txt

* Update ietf/templates/doc/shepherd_writeup.txt

* Update ietf/templates/doc/shepherd_writeup.txt

* Apply suggestions from code review

* Question 12 from Brad

* Update ietf/templates/doc/shepherd_writeup.txt

* Rewrap

* Fix test
2022-07-07 11:44:49 -05:00
Robert Sparks 87fac4e12a
test: align tests with new shepherd writeup template. (#3838) 2022-04-19 11:44:59 -05:00
Lars Eggert 3234f1a121
test: Validate HTML rendered during tests (#3782) 2022-04-07 13:30:38 -03:00
Lars Eggert a5cbf5307e More fixes
- Legacy-Id: 19835
2022-01-12 11:54:00 +00:00
Lars Eggert 5132661b06 More test fixes
- Legacy-Id: 19803
2022-01-05 11:25:25 +00:00
Lars Eggert e9fd78128c Interim commit
- Legacy-Id: 19765
2021-12-09 18:26:53 +00:00
Lars Eggert f974fd3c04 Fix more things
- Legacy-Id: 19762
2021-12-09 06:41:00 +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 fc9864114b Allow pre-ADs to be assigned as responsible for document. Fixes #3229. Commit ready for merge.
- Legacy-Id: 19383
2021-09-22 18:42:00 +00:00
Robert Sparks f3b72e4bc1 Improve tests that look person names in responses. Commit ready for merge.
- Legacy-Id: 19271
2021-08-04 14:46:11 +00:00
Robert Sparks 47082fe4c5 Allow submit and expire_drafts to succeed when there is no "next" IETF meeting in the database. Fixes #3370. Commit ready for merge.
- Legacy-Id: 19269
2021-08-01 17:50:35 +00:00
Jennifer Richards e11583a87f Allow assignment of Person as "action holder" for a Doc, plus rudimentary automation of assignment. Fixes #3146. Commit ready for merge.
- Legacy-Id: 18829
2021-02-12 20:31:00 +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
Robert Sparks ba29ab845a Merged in [18723] from mrcullen42@gmail.com:
Fixes #3032: Only send expiration warnings for drafts with a 'draft' state of 'active', to match the drafts that we will actually expire.
 - Legacy-Id: 18755
Note: SVN reference [18723] has been migrated to Git commit dbeb0e8d2d
2020-12-11 20:17:55 +00:00
Margaret Cullen dbeb0e8d2d Fixes #3032: Only send expiration warnings for drafts with a "draft" state of "active", to match the drafts that we will actually expire. Commit ready for merge.
- Legacy-Id: 18723
2020-12-01 17:05:34 +00:00
Robert Sparks 7e384a8aea Send email to new mailtrigger controlled destinations when iana expert review state changes. Fixes #3121. Commit ready for merge.
- Legacy-Id: 18714
2020-11-18 21:32:48 +00:00
Robert Sparks 2b70735fd2 Improved the classification of some github related external resources. Tightened validation of new resource values. Commit ready to merge.
- Legacy-Id: 18378
2020-08-17 23:50:22 +00:00
Russ Housley e0ca07e65d Send email to AD when an IETF Last Call expires that contains downrefs. Fixes #2472
- Legacy-Id: 18276
2020-07-25 21:09:50 +00:00
Robert Sparks 6227162e53 Updated mgmt command to find github repos to back up. Improved test coverage of branch changes. Branch ready for merge.
- Legacy-Id: 18163
2020-07-13 17:36:34 +00:00
Robert Sparks 99df95d542 Cleaned up created names. Improved validation during migration. Cleaned up migration output. Cleaned the last of the awp includes from secr views. Removed now unused secr templates. Build extresource urls correctly during submission and when creating group wikis.
- Legacy-Id: 18158
2020-07-13 16:03:39 +00:00
Robert Sparks 066ee27505 preparing to merge forward
- Legacy-Id: 18143
2020-07-09 20:29:45 +00:00
Robert Sparks 7e57be2bd3 merged forward ^/personal/rjs/explore-extref
- Legacy-Id: 17840
2020-05-19 18:47:47 +00:00
Henrik Levkowetz bc05e7a8d0 Refactored many instances of msg.get_payload(decode=True).decode('utf-8') and similar to get_payload_text(msg), which uses msg.get_charset() to get the actual charset to do the decoding, in a consistent manner. Also removed some instances of force_str, but more remain.
- Legacy-Id: 17807
2020-05-16 20:20:05 +00:00
Robert Sparks fa492c3947 Remove "point raised - writup needed" from the set of substates the IESG can use with a document. Fixes #2968. Commit ready for merge.
- Legacy-Id: 17708
2020-04-29 20:32:31 +00:00
Robert Sparks 7587d564d4 Added GroupExtResources to the group about page, and added the ability to edit them.
- Legacy-Id: 17685
2020-04-24 21:47:24 +00:00
Robert Sparks 2de9eb93b5 Added validation to the migrations. Added external resources to the draft display page. Built an editor for DocExternalResources.
- Legacy-Id: 17683
2020-04-24 16:14:43 +00:00
Henrik Levkowetz f10ddadc0e Merged in changes from trunk up to r17584.
- Legacy-Id: 17593
2020-04-07 16:02:52 +00:00
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz a14e38a1a1 Replaced most cases of using of urlopen(), instead using the higher-level 'requests' module where it simplifies the code.
- Legacy-Id: 17380
2020-03-03 17:34:42 +00:00
Henrik Levkowetz 07747b26c3 Fixed an issue with tests mocking urlopen() responses, and tweaked error messages on bad results in sync/rfceditor.py
- Legacy-Id: 17356
2020-02-27 15:05:27 +00:00
Henrik Levkowetz 32e9692f54 Fixed a py2/py3 issue in sync.rfceditor.post_approved_draft(), and enhanced tests to execute the failing code (with Mock functions) instead of skipping the code.
- Legacy-Id: 17265
2020-01-28 22:37:50 +00:00
Ryan Cross 9882d7fda8 Fix issue where draft resurrect feature does not move most recent draft file from the archive directory back to the current draft directory. Fixes #2646. Commit ready for merge
- Legacy-Id: 17027
2019-11-16 05:15:03 +00:00
Henrik Levkowetz 1edc863969 Merged in [16763] from rjsparks@nostrum.com:
Allow responsible AD to be None for documents in iesg states idexists and dead. Fixes #2803 and #993.
 - Legacy-Id: 16838
Note: SVN reference [16763] has been migrated to Git commit 9f54af355d4e2b17404caa1755be74d22b5edad1
2019-10-07 19:54:56 +00:00
Robert Sparks e45a32e49f Add IANA expert review tracking. Commit ready for merge.
- Legacy-Id: 16656
2019-08-15 20:36:07 +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 0679eaa8d4 Removed unused imports.
- Legacy-Id: 16402
2019-07-04 21:06:57 +00:00
Henrik Levkowetz f480799af9 Undid unintentional bulk commit
- Legacy-Id: 16401
2019-07-04 21:04:46 +00:00
Henrik Levkowetz fc09a59950 Added decode() of command pipe output.
- Legacy-Id: 16400
2019-07-04 21:01:39 +00:00
Henrik Levkowetz 15e74e89cb Converted instances of assertTrue(text in response.content) to the recommended assertContains(response, text), and similar for assertFalse(... in ...)
- Legacy-Id: 16336
2019-06-29 13:43:31 +00:00