mirror of
https://codeberg.org/fediverse/fep.git
synced 2026-08-05 03:35:52 +00:00
e4683fbcda
### Preview version https://helge.codeberg.page/fep/ click there to judge ### Tasks done - [x] Add a proper index.md instead of final.md .... needs me to filter the readme.md - [x] search is broken --> will resolve itself when all feps are part of it - [x] Update https://codeberg.org/fediverse/fep/src/branch/main/fep/7d8c/fep-7d8c.md - [x] The admonition format (according to copilot I can blame this format on Microsoft https://learn.microsoft.com/en-us/contribute/content/markdown-reference#alerts-note-important-tip-warning-caution) ``` >[!NOTE] >ActivityPub [requires][ActivityPub-Collections] ordered collections to be presented in reverse chronological order. However, an [erratum][ActivityPub-Errata] was proposed to relax this requirement. ``` is not the one supported by python, see https://python-markdown.github.io/extensions/admonition/ . One can probably resolve this by adapting the code https://github.com/Python-Markdown/markdown/blob/f39cf84a24124526c1a0efbe52219fa9950774f6/markdown/extensions/admonition.py - [x] FEPs miss meta information .... - [x] Meta information for tracking issue and discussion to link should be formatted - [x] copy script has problems with contained directories - [x] add codeberg link to meta, e.g. https://helge.codeberg.page/fep/fep/1b12/ - [x] include implementation counts -> https://codeberg.org/fediverse/fep/issues/686 Co-authored-by: silverpill <silverpill@firemail.cc> Reviewed-on: https://codeberg.org/fediverse/fep/pulls/673 Reviewed-by: silverpill <silverpill@noreply.codeberg.org> Co-authored-by: Helge <helge.krueger@gmail.com> Co-committed-by: Helge <helge.krueger@gmail.com>
44 lines
1.1 KiB
Python
44 lines
1.1 KiB
Python
from datetime import date, timedelta
|
|
|
|
from .issue import parse_and_update_date_received, create_body
|
|
|
|
|
|
def test_parse_and_update_date_received():
|
|
today = date.today()
|
|
result = parse_and_update_date_received(today.isoformat())
|
|
|
|
assert result == today
|
|
|
|
|
|
def test_parse_and_update_date_received_parse_error():
|
|
today = date.today()
|
|
result = parse_and_update_date_received("incorrect")
|
|
|
|
assert result == today
|
|
|
|
|
|
def test_parse_and_update_date_received_outdated():
|
|
today = date.today()
|
|
result = parse_and_update_date_received((today - timedelta(days=60)).isoformat())
|
|
|
|
assert result == today
|
|
|
|
|
|
def test_create_body():
|
|
result = create_body("fep-0000.md", date(2025, 2, 8))
|
|
|
|
assert (
|
|
result
|
|
== """
|
|
The [proposal](https://codeberg.org/fediverse/fep/src/branch/main/fep-0000.md) has been received. Thank you!
|
|
|
|
This issue tracks discussions and updates to the proposal during the `DRAFT` period.
|
|
|
|
Please post links to relevant discussions as comments to this issue.
|
|
|
|
`dateReceived`: 2025-02-08
|
|
|
|
If no further actions are taken, the proposal will be set by the facilitators to `WITHDRAWN` on 2027-02-08 (in 2 years).
|
|
"""
|
|
)
|