Commit graph

39 commits

Author SHA1 Message Date
Jennifer Richards 07e26dd52e
refactor: Replace deprecated force_text with force_str 2023-05-09 15:21:50 -03:00
Lars Eggert d59c64943d
fix: Fix spurious author extraction errors (#4799)
* Handle single-word author names

* Some i18n names, e.g., "शिला के.सी." have a dot at the end that is
also part of the ASCII, e.g., "Shilaa Kesii." That trailing dot breaks
extract_authors(). Avoid this issue by stripping the dot from the
ASCII.

* Honorifics need to be part of the extracted ASCII name (e.g., "Lady Garcia")

* feat: stop supporting pre-tzaware migration database dumps. (#4782)

* feat: stop supporting pre-tzaware migration database dumps.

* chore: remove unnecessary env variable

* chore: Use `codespell` to fix typos in comments. (#4794)

First part of replacement of #4651

* feat: Only show IPR search form when not showing search results  (#4793)

* feat: Only show IPR search form when not showing search results

Put it into a collapsible that is only expanded by default when not
showing search results.

Fixes #4569

* Don't use example target name

* fix: Don't show reorder UI fixtures unless user can reorder (#4785)

Fixes #4773

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>

* chore: Update deps and fix resulting HTML validation issues (#4790)

* ci: add missing build matrix config for test-playwright-legacy step

* Single-letter last names exist (e.g., "Carolina de la O")

* Align regex with others

* Fix extraction of very long author names

* Need to be more general

* Add comment

* Also handle i18n names with trailing semicolons

* Name suffixes need to be part of the extracted author names

* Handle i18n names with embedded commas

Co-authored-by: Robert Sparks <rjsparks@nostrum.com>
Co-authored-by: Nicolas Giard <github@ngpixel.com>
2022-12-02 15:41:21 -06:00
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
Lars Eggert d16a9e77a7
fix: Fix transient test failures due to i18n names (#4695)
* Search for escaped name in HTML output

* Need to check for `plain_name()` in sent emails

* Normalize i18n Unicode names in the same way the database does
2022-11-06 12:29:49 +00:00
Robert Sparks 86923dfe96
chore: update dependency requirements (#3904)
* chore: cleanup requirements.txt. Unpin factory-boy, ignoring resulting mypy complaints.

* chore: remove the upper limit as many dependencies as possible

* chore: remove unintended bookmark

* chore: normalize spaces before comments

* chore: improve comment explaining pinned Tastypie

* chore: shift dependencies minimum version requirements forward
2022-04-28 11:06:17 -05: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 48fef02aab revert unintended commit of person/factories.py
- Legacy-Id: 19012
2021-05-20 17:38:31 +00:00
Robert Sparks 7cbaad721a Move adjustments to PHOTO_DIR forward from settings_sqlitetest to settings_releastetest
- Legacy-Id: 19011
2021-05-20 17:37:08 +00:00
Jennifer Richards 475fb37c29 Add purge_old_personal_api_key_events management command. Fixes #3144. Commit ready for merge.
- Legacy-Id: 18941
2021-04-09 18:40:28 +00:00
Henrik Levkowetz 0f17e03121 Merged in [18020] from rjsparks@nostrum.com:
Construct Faker objects used for person name generation only once. Results in a roughly 20% speedup of the test-suite.
 - Legacy-Id: 18023
Note: SVN reference [18020] has been migrated to Git commit c60cc1b1a0
2020-06-22 12:58:44 +00:00
Robert Sparks c60cc1b1a0 Construct Faker objects used for person name generation only once. Results in a roughly 20% speedup of the test-suite. Commit ready for merge.
- Legacy-Id: 18020
2020-06-19 19:54:50 +00:00
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Henrik Levkowetz bdc73e771a Python2/3 compatibility: replaced six.ensure_text() with either six.text_type or django's force_text(), depending on the case, and fixed a variable scope issue.
- Legacy-Id: 16461
2019-07-16 13:20:05 +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 5abcec4441 Added a bit of name normalization for test factory person names.
- Legacy-Id: 15888
2019-01-14 20:50:52 +00:00
Henrik Levkowetz d6caf615e0 Added testing of test_unidecode() and another name_parts() test case, and removed some debug.statements.
- Legacy-Id: 15771
2018-11-13 19:31:18 +00:00
Henrik Levkowetz 2522082979 Changed the email origin field during test to hold user.username in order to exercise more of the code. Changed the EmailFactory to also use user.username as origin.
- Legacy-Id: 15172
2018-05-26 08:32:20 +00:00
Henrik Levkowetz 5f37a71889 Added origin information to all places where we create email address entries.
- Legacy-Id: 15127
2018-05-05 12:40:30 +00:00
Henrik Levkowetz 87f4997bf5 Fixed unbalanced parentheses.
- Legacy-Id: 14520
2018-01-14 19:20:24 +00:00
Henrik Levkowetz 4431c3eac3 Exluded another locale from author name generation during testing, due to problematic romanization.
- Legacy-Id: 14519
2018-01-14 18:55:22 +00:00
Henrik Levkowetz b48996f383 Exclude arabic names from PersonFactory due to difficulties with the romanization of the names in connection with draft author extraction.
- Legacy-Id: 14500
2018-01-10 15:20:16 +00:00
Henrik Levkowetz 2c1438c240 Moved unidecode_name from utils.text to person.name.
Modified UserFactory to use a new locale for each new user, instead of the
same locale for a whole test run.  This (almost) ensures the exercise of
code to deal with non-ascii names, something which would not happen if a
locale with ascii names was chosen at the start of a run.

Modified name.initials() to not use non-word characters as initials.

Modified unidecode_name() to do more normalization, to conform to the
conventions used in internet-drafts.

Added saving of the factory-boy random state in order to be able to re-run
a test suite with the same pseudo-random sequence as in a previous failed
run.

Fixed an issue with email formatting in test_api_submit_ok().

Modified the draft author extraction code to deal better with names with
embedded apostrophes.
 - Legacy-Id: 14141
2017-09-20 15:36:30 +00:00
Henrik Levkowetz 33b275b04f Added ietf.utils.text.unidecode_name() and replaced various uses of unidecode() with it, in order to normalize the generation of ascii versions of names, to avoid different practices in space stripping and space normalization in different parts of the code.
- Legacy-Id: 14128
2017-09-17 15:12:18 +00:00
Henrik Levkowetz 0d120fb46a Tweaked the EmailFactory to return an email address not longer than the Email.address field.
- Legacy-Id: 13738
2017-06-30 11:47:12 +00:00
Henrik Levkowetz c4954e13b1 Added more test objects in test_merge_users(), and fixed an issue with merge_users() uncovered by the added testing.
- Legacy-Id: 13730
2017-06-29 14:53:00 +00:00
Ryan Cross e9b7c5753e Refactor ietf/bin/merge-person-records to facilitate testing. Add tests. Fixes #2162. Commit ready for merge.
- Legacy-Id: 13567
2017-06-08 23:28:43 +00:00
Robert Sparks 0088273f5a Adds scripts to create/delete a dummy nomcom to use in development environments. Commit ready for merge. Fixes #2283.
- Legacy-Id: 13230
2017-04-18 16:13:14 +00:00
Henrik Levkowetz ce9f879500 Create all appropriate aliases when a Person record is created, both in ietfauth and in PersonFactory.
- Legacy-Id: 12958
2017-03-03 19:42:16 +00:00
Henrik Levkowetz 8930d29a8e Merged in Django-1.10 upgrade work from ^/personal/henrik/6.43.1-django-1.10
- Legacy-Id: 12881
2017-02-19 18:18:00 +00:00
Henrik Levkowetz cf4a4b02a7 Reworked the email address handling in order to be able to support non-ascii names as part of email address fields. Reworked the generation of user names in the test suite to generate names from multiple non-ascii locales. Fixes issue #2080.
- Legacy-Id: 12872
2017-02-18 21:50:18 +00:00
Henrik Levkowetz f2c31f242b Changed the 1id_index generation to use a new Person method .plain_ascii(). Added tests for some Person name methods.
- Legacy-Id: 11993
2016-09-15 17:29:08 +00:00
Henrik Levkowetz ec684e1b4e Added a pylint rc-file, and fixed or silenced a number of issues found by pylint using the settings .pylintrc (which enable only error checking).
- Legacy-Id: 11941
2016-09-08 14:48:59 +00:00
Henrik Levkowetz 4537f91424 Modified the alias factory to work around the problem with the backend collapsing aliases with accented and unaccented versions of the same name.
- Legacy-Id: 11580
2016-07-09 19:57:37 +00:00
Henrik Levkowetz f4d2f19ffb Tweaked the person factory to provide bio and photo on request.
- Legacy-Id: 11300
2016-06-09 21:51:46 +00:00
Robert Sparks a9abd3c2cd Tweak factories to not randomly create keys that violate constraints. Commit ready for merge
- Legacy-Id: 10756
2016-01-28 20:12:00 +00:00
Robert Sparks dc5ae398f2 Improved SearchablePersonField to show the primary email address for any search results where a name appears more than once.
Simplified the edit nominee form.
Replaced the merge nominee form with a request to the secretariat to merge Person records. Fixes #1847.
Added merging nominees to the secretariat's person merging script.
Restructured the person merging script to make it testable.
Updated some tests to match changes to the mailtriggers that hadn't made it to the fixtures.
 - Legacy-Id: 10625
2015-12-22 21:42:55 +00:00
Robert Sparks 6bf4227974 Checkpoint: main nomination forms use SearchableEmailField
- Legacy-Id: 10609
2015-12-18 20:38:17 +00:00
Robert Sparks e81b473282 Expose views for concluded nomcoms. Close feedback and nomination. Initial work on factory-boy based testing. Partially addresses #1856
- Legacy-Id: 10520
2015-11-25 22:17:41 +00:00