Skip to content

Commit ba7e0d8

Browse files
authored
Merge branch 'main' into fix/spec-parse-order
2 parents ae2b0a0 + 555bdf5 commit ba7e0d8

File tree

11 files changed

+452
-471
lines changed

11 files changed

+452
-471
lines changed

etc/scripts/doc-generation.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2025-08-13 Wednesday 18:18:27 -- [email protected] -- The current process
2+
for generating (and regenerating as needed) the purl-standard.md and
3+
purl-specification.md files is a combination of manual and scripted steps.
4+
5+
- Start with the set of .md files created from the former PURL-SPECIFICATION.rst
6+
file.
7+
- Update one or more of those .md files as needed in a Visual Studio Code
8+
instance running locally in a branch of a clone of the purl-spec repo.
9+
- Manually copy the full set of .md files to a separate VSCode instance for a
10+
local repo running pypandoc. See, e.g., https://pypi.org/project/pypandoc/.
11+
- Configure the code we've written to choose which compiled .md output we want
12+
(purl-specification.md or purl-standard.md), the input .md files, and any
13+
changes needed for heading names and numbers.
14+
- Run the code, vet the output .md, fix what needs fixing, and manually copy
15+
the output .md back into the local purl-spec VSCode instance.
16+
- After careful vetting etc., commit, push, open a new PR if not already opened,
17+
advise reviewers that the PR is ready for review, and wait for feedback.
18+
- Repeat when needed.
19+
20+
The process is currently run on Windows using WSL2/Ubuntu-20.04.

etc/scripts/generate_index_and_docs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def generate_documentation(definition) -> str:
161161
mddoc.write_text(md, newline="\n")
162162
print(f"PURL Type Documentation generated for {mddoc}")
163163

164-
idxdoc = Path("purl-types-index.json")
164+
idxdoc = Path("purl-types-index.json")
165165
idx = json.dumps(sorted(types), indent=2) + "\n"
166166
idxdoc.write_text(idx, newline="\n")
167167
print(f"PURL Types Index generated at {idxdoc}")

etc/scripts/purl_test.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,8 @@
2222

2323

2424
from __future__ import annotations
25-
26-
from typing import Any
27-
from typing import Literal
28-
from typing import Optional
29-
30-
from pydantic import BaseModel
31-
from pydantic import ConfigDict
32-
from pydantic import Field
25+
from typing import Any, Literal, Optional
26+
from pydantic import BaseModel, ConfigDict, Field
3327

3428

3529
class PurlComponents(BaseModel):

etc/scripts/purl_type_definition.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,8 @@
2222

2323

2424
from __future__ import annotations
25-
26-
from typing import Any
27-
from typing import Literal
28-
from typing import Optional
29-
30-
from pydantic import AnyUrl
31-
from pydantic import BaseModel
32-
from pydantic import ConfigDict
33-
from pydantic import Field
34-
from pydantic import RootModel
25+
from pydantic import AnyUrl, BaseModel, ConfigDict, Field, RootModel
26+
from typing import Any, Literal, Optional
3527

3628

3729
class Example(RootModel[str]):

etc/scripts/purl_types_index.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222

2323

2424
from __future__ import annotations
25-
26-
from pydantic import Field
27-
from pydantic import RootModel
25+
from pydantic import Field, RootModel
2826

2927

3028
class PackageUrlTypesList(RootModel[list[str]]):

0 commit comments

Comments
 (0)