1
0
mirror of https://codeberg.org/fediverse/fep.git synced 2026-08-08 21:45:52 +00:00

Housekeeping for the scripts (#413)

Cleanup:

- Removed pointless reversed when creating issue list (it is sorted
  afterwards)
- Removed create_topic as no longer needed see https://codeberg.org/fediverse/fep/issues/274
- Made scripts executable

Reviewed-on: https://codeberg.org/fediverse/fep/pulls/413
Reviewed-by: silverpill <silverpill@noreply.codeberg.org>
Co-authored-by: Helge <helge.krueger@gmail.com>
Co-committed-by: Helge <helge.krueger@gmail.com>
This commit is contained in:
Helge
2024-11-15 11:22:01 +00:00
committed by silverpill
parent 53b41a65e2
commit dc4eaf7cbb
5 changed files with 5 additions and 51 deletions
+2 -13
View File
@@ -8,31 +8,20 @@ Merge the Pull Request in [https://codeberg.org/fediverse/fep/pulls](https://cod
and note the slug.
```bash
python scripts/create_issue.py $SLUG
./scripts/create_issue.py $SLUG
```
creates the tracking issue and updates the FEP with the information.
Then run
```bash
python scripts/create_readme.py
./scripts/create_readme.py
```
to update the table in `README.md`. You are now ready to commit the
changes to the FEP (added `trackingIssue` to frontmatter) and README.md,
added the new FEP.
Run
```bash
python scripts/create_topic.py $SLUG
```
and following the instructions to create a topic on SocialHub to discuss
the FEP.
Finally, add the link to the SocialHub topic to the tracking issue, created above.
## Configuration
Add a file `config.json` to the directory `scripts` with content
Regular → Executable
+2
View File
@@ -1,3 +1,5 @@
#!/usr/bin/env python
from argparse import ArgumentParser
from datetime import date, timedelta
from tools import FepFile
+1 -1
View File
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
from tools import Readme
-36
View File
@@ -1,36 +0,0 @@
from argparse import ArgumentParser
from tools import FepFile
parser = ArgumentParser("Create topic for FEP")
parser.add_argument("fep", help="slug of the FEP")
args = parser.parse_args()
fep_file = FepFile(args.fep)
fep_file.write()
url = f"https://codeberg.org/fediverse/fep/src/branch/main/fep/{args.fep}/fep-{args.fep}.md"
body = f"""
Hello!
This is a discussion thread for the proposed [FEP-{args.fep}: {fep_file.title}]({url}).
Please use this thread to discuss the proposed FEP and any potential problems
or improvements that can be addressed.
__Summary__
{fep_file.summary}
"""
print("Create a new topic on https://socialhub.activitypub.rocks/c/standards/fep/54")
print("with title")
print(f" FEP-{args.fep}: {fep_file.title}")
print("and tags")
print(f" fep, fep-{args.fep}, draft")
print("and body")
print(body)
print("")
discussionsTo = fep_file.parsed_frontmatter["discussionsTo"]
print(f"After creating the issue add a link to the tracking issue {discussionsTo}")
-1
View File
@@ -36,7 +36,6 @@ class Readme:
@property
def table(self):
fep_files = [FepFile(fep) for fep in get_fep_ids()]
fep_files = reversed(fep_files)
fep_files = sorted(
fep_files,
key=lambda x: (x.parsed_frontmatter["dateReceived"], x.parsed_frontmatter["slug"]),