datatracker/ietf/utils
Jennifer Richards fa56223939
feat: API to replace email alias generation commands (#7012)
* feat: DraftAliasGenerator class

Encapsulates logic from generate_draft_aliases.py

* refactor: Avoid circular imports

* feat: Add draft_aliases API endpoint

* feat: Add @requires_api_token decorator

Stolen from feat/rpc-api

* feat: Add token auth to draft_aliases endpoint

* feat: draft-aliases-from-json.py script

Parses output from the draft_aliases API call

* chore: Remove unused cruft

* refactor: Avoid shadowing "draft" name

* fix: Suppress empty lists from DraftAliasGenerator

* refactor: Use a GET instead of POST

* feat: GroupAliasGenerator class

* feat: group aliases API view

* fix: Handle domains array correctly

* fix: Suppress empty group aliases

* refactor: Generalize aliases-from-json.py script

* refactor: Same output fmt for draft and group alias apis

* feat: Sort addresses for stability

* fix: Add "anything" virtual alias

* test: Test requires_api_token decorator

* feat: Harden is_valid_token against misconfig

* test: Test is_valid_token

* test: Test draft_aliases view

* test: Test group_aliases view

* test: Test DraftAliasGenerator

* fix: ise group is type "ise" in test data

* test: Fix logic in testManagementCommand

The test was incorrect - and fails when fixed. :-(

* test: Test GroupAliasGenerator

Test currently fails

* fix: Suppress empty -ads alias

* test: Fix group acronym copy/paste error

I *think* this must be what had been intended. The
code does not look like it ever dealt with GroupHistory,
so I'm pretty sure it wasn't meant to have the same
acronym used by two different Groups at different
times.

* test: Check draft .notify alias generation

* test: Cover get_draft_notify_emails()
2024-02-07 10:15:50 -06:00
..
management feat: celery tasks to replace ietf/bin scripts (#6971) 2024-01-31 15:24:20 -06:00
migrations chore: Add type annotations to satisfy linter (#5435) 2023-03-29 09:06:14 +09:00
templatetags Fix: meeting important dates can have markdown links (#6594) 2023-11-10 09:24:13 +01:00
__init__.py Cleaned out some (arbitrary) submodule name imports into ietf.utils, and made the corresponding import statements import the names directly from the correct submodules. 2014-03-16 07:09:38 +00:00
accesstoken.py refactor: Replace deprecated force_text with force_str 2023-05-09 15:21:50 -03:00
admin.py refactor: Replace deprecated force_text with force_str 2023-05-09 15:21:50 -03:00
aliases.py Log Unicode exception instead of printing them to the console when they occur building the email alias files. 2021-03-09 21:19:11 +00:00
bootstrap.py And more fixes. 2022-02-01 07:47:25 +00:00
cache.py fix: Import DEFAULT_TIMEOUT correctly (#5803) 2023-06-12 13:50:14 -05:00
db.py Guard against absent 'form_class' kwarg in IETFJSONField.formfield(). Commit ready for merge. 2021-11-18 15:54:46 +00:00
decorators.py feat: import IAB minutes from the IAB wordpress site (#5689) 2023-06-09 17:07:31 -05:00
draft.py fix: Handle missing date fields in XML submissions (#5744) 2023-06-02 14:40:52 -05:00
draft_search.py Removed all __future__ imports. 2020-03-05 23:53:42 +00:00
fields.py chore: remove a stray space that crashes black (#5185) 2023-02-23 08:50:24 -06:00
hedgedoc.py feat: improve notes imports by using de-gfm -4. Related to #3851. (#3930) 2022-05-03 18:04:48 -05:00
history.py Removed all __future__ imports. 2020-03-05 23:53:42 +00:00
html.py fix: Fix removetags (#4226) 2022-07-18 09:39:11 -05:00
http.py refactor: Replace deprecated request.is_ajax() 2023-05-12 18:26:56 -03:00
jstest.py ci: Switch to using geckodriver (#6541) 2023-11-21 15:30:50 -06:00
log.py Updated log.assertion() to provide an exception object (under Py3, it seems that logging.Logger instances ignore the traceback if there isn't also an exception object). Added a check for unset draft-iesg state to Document.set_state(). 2020-09-18 14:15:02 +00:00
mail.py refactor: Replace deprecated force_text with force_str 2023-05-09 15:21:50 -03:00
markdown.py fix: Need to linkify during Markdown rendering (#5066) 2023-02-11 10:13:20 -06:00
markup_txt.py Revert "chore: Replace markup_txt with rfc2html (#6632)" (#6909) 2024-01-11 13:08:24 -06:00
meetecho.py Use correct UTC time when creating Meetecho conferences. Fixes #3565. Commit ready for merge. 2022-02-23 20:51:18 +00:00
mime.py Merged in ^/trunk@17617. 2020-04-14 17:11:51 +00:00
models.py Added a utility function to convert objects to dictionaries (for comparison, for instance) 2020-03-19 22:42:43 +00:00
ordereddict.py Removed all __future__ imports. 2020-03-05 23:53:42 +00:00
patch.py chore: Use codespell to fix typos in comments. (#4794) 2022-11-28 10:36:36 -06:00
pdf.py Removed all __future__ imports. 2020-03-05 23:53:42 +00:00
pipe.py fix: close open things (#5593) 2023-05-10 11:19:34 -05:00
resources.py Added 'from __future__' imports all over the place, to bring code behaviour into closer alignment between python2 and python3 2019-07-15 15:40:51 +00:00
response.py test: Validate HTML rendered during tests (#3782) 2022-04-07 13:30:38 -03:00
serialize.py fix: fix failing tests and eliminate naive datetime warnings (#4402) 2022-09-01 13:07:28 -03:00
storage.py 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). 2016-09-08 14:48:59 +00:00
test_data.py feat: API to replace email alias generation commands (#7012) 2024-02-07 10:15:50 -06:00
test_draft_with_references_v2.xml Find references from submitted XML instead of rendering to text and parsing. Fixes #3342. Commit ready for merge. 2022-01-07 17:53:23 +00:00
test_draft_with_references_v3.xml fix: Also extract document names from XML seriesInfo attributes and XInclude URLs (#5037) 2023-02-14 17:07:54 -06:00
test_runner.py chore(deps): bump the yarn group with 15 updates (#6924) 2024-01-16 11:00:23 -06:00
test_smtpserver.py fix: avoid mutables as defaults. Compute date default arguments at runtime rather than loadtime. (#4144) 2022-07-06 14:39:36 -05:00
test_textupload.py Removed all __future__ imports. 2020-03-05 23:53:42 +00:00
test_utils.py feat: Can we provide a better review assignment email subject. #3760 (#5415) 2023-05-17 12:23:20 -05:00
tests.py fix: Better match xml2rfc date parsing (#5914) 2023-07-05 08:23:37 -05:00
tests_hedgedoc.py Add ability to import session minutes from notes.ietf.org. Mock out calls to the requests library in tests. Call markdown library through a util method. Fixes #3489. Commit ready for merge. 2021-12-09 17:16:19 +00:00
tests_markdown.py fix: Need to linkify during Markdown rendering (#5066) 2023-02-11 10:13:20 -06:00
tests_meetecho.py refactor: replace datetime.now and datetime.today with timezone.now (#4211) 2022-08-25 13:45:16 -03:00
tests_restapi.py Removed all __future__ imports. 2020-03-05 23:53:42 +00:00
texescape.py Removed all __future__ imports. 2020-03-05 23:53:42 +00:00
text.py chore: Upgrade to bleach v6 (#5021) 2023-01-23 13:29:45 -06:00
textupload.py Removed all __future__ imports. 2020-03-05 23:53:42 +00:00
timezone.py test: increase number of tries to find tz not near midnight (#4756) 2022-11-15 07:53:21 -06:00
urls.py refactor: Implement require_api_key with functools.wraps 2023-05-17 09:45:07 -03:00
validators.py test: Suppress mypy error on import of _lazy_re_compile() 2023-05-15 11:04:29 -03:00
xmldraft.py refactor: Drop submission validation via libmagic (#6500) 2023-10-23 10:00:04 -05:00