Commit graph

35 commits

Author SHA1 Message Date
Robert Sparks 83f5fc8d1a
fix: add exception to last<->first name swap (#8043) 2024-10-11 12:24:35 -05:00
Henrik Levkowetz a284bcefee Added 'De' as a surname particle, in addition to 'de' (for author Luca De Cicco). Commit ready to merge.
- Legacy-Id: 18765
2020-12-15 14:24:41 +00:00
Henrik Levkowetz d6efe1fcb5 Fixed a bug in the name_parts() function when dealing with names listing uppercased surname first, followed by given name.
- Legacy-Id: 18596
2020-10-11 15:07:37 +00:00
Henrik Levkowetz 726fcbf27d Removed all __future__ imports.
- Legacy-Id: 17391
2020-03-05 23:53:42 +00:00
Russ Housley dd07878bb0 Turn text names into links on the stats pages. Fixes #2854
- Legacy-Id: 17178
2020-01-03 21:50:24 +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 0589d0b313 Changed a bunch of regexes to use r strings; also miscellaneous smaller fixes.
- Legacy-Id: 16376
2019-07-04 15:51:05 +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 0735021d2b Added a test for various name part combinations, and fixed a couple of issues with utils.name.name_parts().
- Legacy-Id: 15753
2018-11-11 15:12:20 +00:00
Henrik Levkowetz 4fba531e9e Merged in the latest GDPR changes. This refines the handling of the consent checkbox on the account page; refines the Consent Needed warning given on login if consent is needed; tweaks several models to set the on_deletion fields for FK to User and Person appropriately; adds a Person.needs_consent() method to capture the logic of which fields require consent; refines the Person.plain_name() method and the user.log.log() function; and adds 2 management commands to send out consent requests and delete non-consent information, respectively.
- Legacy-Id: 15464
2018-09-16 23:12:43 +00:00
Henrik Levkowetz 74359e9538 Refined Person.plain_name() to avoid leading or trailing spaces when only one name component is present.
- Legacy-Id: 15456
2018-09-16 13:44:27 +00:00
Henrik Levkowetz 6dacd694bc More name normalization
- Legacy-Id: 15452
2018-09-13 18:58:30 +00:00
Henrik Levkowetz 0df2c0dee8 Tweaked unidecode_name() to avoid double-quotes in the ascii string.
- Legacy-Id: 15256
2018-06-14 15:06:08 +00:00
Henrik Levkowetz dbe9211963 Tweaked unidecode_name() to not produce single-letter ascii surnames from non-ascii codepoints. The unidecode transliteration is in any case somewhat arbitrary, and in most cases a real person will tweak the ascii name of his account. When running tests, however, this tweak avoids some false test failures. And no, it's not simple to fix the draft author-extraction heuristics to deal well with single-letter surnames.
- Legacy-Id: 15239
2018-06-10 14:48:13 +00:00
Henrik Levkowetz 2354cc74d4 Tweaked person factory ascii name generation to not include periods inside names.
- Legacy-Id: 14875
2018-03-20 15:24:20 +00:00
Henrik Levkowetz f2f21c4ef3 Improved cleaning of unidecode results in ascii name conversion.
- Legacy-Id: 14405
2017-12-08 12:36:23 +00:00
Henrik Levkowetz 999cd502e2 Tweaked ascii name normalization.
- Legacy-Id: 14381
2017-11-30 16:09:06 +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 f0317b3cff Added another surname particle.
- Legacy-Id: 13823
2017-07-10 20:08:33 +00:00
Henrik Levkowetz 7e68623c90 Additional tweaks to the surname particle handling.
- Legacy-Id: 13670
2017-06-18 03:22:52 +00:00
Henrik Levkowetz f1f32b41ae Additional tweaks to the surname particle handling.
- Legacy-Id: 13669
2017-06-18 03:20:49 +00:00
Henrik Levkowetz bb089c182d Improved the handling of surname particles, (prompted by failure to handle the name of Niels ten Oever correctly)
- Legacy-Id: 13663
2017-06-17 15:12:54 +00:00
Ole Laursen 5b677dc6ba Merge author stats branch into new branch from trunk
- Legacy-Id: 13159
2017-03-28 14:36:40 +00:00
Ole Laursen c61babb418 Add citation and h-index statistics
- Legacy-Id: 12869
2017-02-17 17:43:14 +00:00
Henrik Levkowetz 761ed8a723 Extended name_parts to consider military rank prefixes.
- Legacy-Id: 12816
2017-02-10 21:58:39 +00:00
Ole Laursen 9a3996a286 Make sure that name_parts doesn't accidentally turn Unicode strings
into plain strings
 - Legacy-Id: 12146
2016-10-14 09:41:21 +00:00
Henrik Levkowetz ab20d0002d Added some guards against bad data in name_parts().
- Legacy-Id: 11285
2016-06-06 16:30:30 +00:00
Henrik Levkowetz ed583bcc5f Used a more sophisticated algorithm for separation of person name parts in the photo_name() method. Added support for 'Dr' (without dot) as a titular prefix.
- Legacy-Id: 11275
2016-06-05 09:54:13 +00:00
Henrik Levkowetz 4610381eb2 Add an name utility function to return a name's initials. Handle names with an uppercase surname to the left of the given name correctly.
- Legacy-Id: 4951
2012-10-25 21:10:30 +00:00
Henrik Levkowetz 794bbad413 Refine the splitting of flat names into constituent parts. Fixes #769.
- Legacy-Id: 4065
2012-03-07 10:34:45 +00:00
Ole Laursen 95fc209f6b Catch Ph.D. as suffix in name parser, fixes "Dr. Bernard D. Aboba Ph.D."
- Legacy-Id: 3984
2012-02-27 17:59:23 +00:00
Ole Laursen b9853c707c Add main handler so name_parts can be invoked from the command line,
incorporate fix from Henrik to get rid of (Foo Bar) ending
 - Legacy-Id: 3978
2012-02-25 22:16:33 +00:00
Ole Laursen 980d4e6444 Move new schema models from redesign/ to ietf/
- Legacy-Id: 3855
2012-01-24 17:17:24 +00:00
Renamed from redesign/person/name.py (Browse further)