Skip to content

Commit 6580e19

Browse files
authored
Merge branch 'main' into 591-complete-migration-to-docs-files
2 parents 66d231a + 0a884d2 commit 6580e19

File tree

9 files changed

+18
-34
lines changed

9 files changed

+18
-34
lines changed

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]]):

tests/types/conan-test.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@
240240
"test_group": "base",
241241
"test_type": "roundtrip",
242242
"input": "pkg:conan/openssl.org/[email protected]?user=bincrafters&channel=stable",
243-
"expected_output": "pkg:conan/openssl.org/[email protected]?user=bincrafters&channel=stable",
243+
"expected_output": "pkg:conan/openssl.org/[email protected]?channel=stable&user=bincrafters",
244244
"expected_failure": false,
245245
"expected_failure_reason": null
246246
},
@@ -259,7 +259,7 @@
259259
},
260260
"subpath": null
261261
},
262-
"expected_output": "pkg:conan/openssl.org/[email protected]?user=bincrafters&channel=stable",
262+
"expected_output": "pkg:conan/openssl.org/[email protected]?channel=stable&user=bincrafters",
263263
"expected_failure": false,
264264
"expected_failure_reason": null
265265
},
@@ -294,7 +294,7 @@
294294
"test_group": "base",
295295
"test_type": "roundtrip",
296296
"input": "pkg:conan/openssl.org/[email protected]?arch=x86_64&build_type=Debug&compiler=Visual%20Studio&compiler.runtime=MDd&compiler.version=16&os=Windows&shared=True&rrev=93a82349c31917d2d674d22065c7a9ef9f380c8e&prev=b429db8a0e324114c25ec387bfd8281f330d7c5c",
297-
"expected_output": "pkg:conan/openssl.org/[email protected]?arch=x86_64&build_type=Debug&compiler=Visual%20Studio&compiler.runtime=MDd&compiler.version=16&os=Windows&shared=True&rrev=93a82349c31917d2d674d22065c7a9ef9f380c8e&prev=b429db8a0e324114c25ec387bfd8281f330d7c5c",
297+
"expected_output": "pkg:conan/openssl.org/[email protected]?arch=x86_64&build_type=Debug&compiler=Visual%20Studio&compiler.runtime=MDd&compiler.version=16&os=Windows&prev=b429db8a0e324114c25ec387bfd8281f330d7c5c&rrev=93a82349c31917d2d674d22065c7a9ef9f380c8e&shared=True",
298298
"expected_failure": false,
299299
"expected_failure_reason": null
300300
},
@@ -320,7 +320,7 @@
320320
},
321321
"subpath": null
322322
},
323-
"expected_output": "pkg:conan/openssl.org/[email protected]?arch=x86_64&build_type=Debug&compiler=Visual%20Studio&compiler.runtime=MDd&compiler.version=16&os=Windows&shared=True&rrev=93a82349c31917d2d674d22065c7a9ef9f380c8e&prev=b429db8a0e324114c25ec387bfd8281f330d7c5c",
323+
"expected_output": "pkg:conan/openssl.org/[email protected]?arch=x86_64&build_type=Debug&compiler=Visual%20Studio&compiler.runtime=MDd&compiler.version=16&os=Windows&prev=b429db8a0e324114c25ec387bfd8281f330d7c5c&rrev=93a82349c31917d2d674d22065c7a9ef9f380c8e&shared=True",
324324
"expected_failure": false,
325325
"expected_failure_reason": null
326326
}

tests/types/generic-test.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"test_group": "base",
6767
"test_type": "roundtrip",
6868
"input": "pkg:generic/[email protected]?download_url=https://openssl.org/source/openssl-1.1.0g.tar.gz&checksum=sha256:de4d501267da",
69-
"expected_output": "pkg:generic/[email protected]?download_url=https://openssl.org/source/openssl-1.1.0g.tar.gz&checksum=sha256:de4d501267da",
69+
"expected_output": "pkg:generic/[email protected]?checksum=sha256:de4d501267da&download_url=https://openssl.org/source/openssl-1.1.0g.tar.gz",
7070
"expected_failure": false,
7171
"expected_failure_reason": null
7272
},
@@ -85,7 +85,7 @@
8585
},
8686
"subpath": null
8787
},
88-
"expected_output": "pkg:generic/[email protected]?download_url=https://openssl.org/source/openssl-1.1.0g.tar.gz&checksum=sha256:de4d501267da",
88+
"expected_output": "pkg:generic/[email protected]?checksum=sha256:de4d501267da&download_url=https://openssl.org/source/openssl-1.1.0g.tar.gz",
8989
"expected_failure": false,
9090
"expected_failure_reason": null
9191
},

tests/types/maven-test.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@
737737
"test_group": "base",
738738
"test_type": "roundtrip",
739739
"input": "pkg:maven/org.apache.xmlgraphics/[email protected]?type=zip&classifier=dist",
740-
"expected_output": "pkg:maven/org.apache.xmlgraphics/[email protected]?type=zip&classifier=dist",
740+
"expected_output": "pkg:maven/org.apache.xmlgraphics/[email protected]?classifier=dist&type=zip",
741741
"expected_failure": false,
742742
"expected_failure_reason": null
743743
},
@@ -756,7 +756,7 @@
756756
},
757757
"subpath": null
758758
},
759-
"expected_output": "pkg:maven/org.apache.xmlgraphics/[email protected]?type=zip&classifier=dist",
759+
"expected_output": "pkg:maven/org.apache.xmlgraphics/[email protected]?classifier=dist&type=zip",
760760
"expected_failure": false,
761761
"expected_failure_reason": null
762762
},

tests/types/mlflow-test.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
"test_group": "base",
238238
"test_type": "roundtrip",
239239
"input": "pkg:mlflow/trafficsigns@10?model_uuid=36233173b22f4c89b451f1228d700d49&run_id=410a3121-2709-4f88-98dd-dba0ef056b0a&repository_url=https://adb-5245952564735461.0.azuredatabricks.net/api/2.0/mlflow",
240-
"expected_output": "pkg:mlflow/trafficsigns@10?model_uuid=36233173b22f4c89b451f1228d700d49&run_id=410a3121-2709-4f88-98dd-dba0ef056b0a&repository_url=https://adb-5245952564735461.0.azuredatabricks.net/api/2.0/mlflow",
240+
"expected_output": "pkg:mlflow/trafficsigns@10?model_uuid=36233173b22f4c89b451f1228d700d49&repository_url=https://adb-5245952564735461.0.azuredatabricks.net/api/2.0/mlflow&run_id=410a3121-2709-4f88-98dd-dba0ef056b0a",
241241
"expected_failure": false,
242242
"expected_failure_reason": null
243243
},
@@ -257,7 +257,7 @@
257257
},
258258
"subpath": null
259259
},
260-
"expected_output": "pkg:mlflow/trafficsigns@10?model_uuid=36233173b22f4c89b451f1228d700d49&run_id=410a3121-2709-4f88-98dd-dba0ef056b0a&repository_url=https://adb-5245952564735461.0.azuredatabricks.net/api/2.0/mlflow",
260+
"expected_output": "pkg:mlflow/trafficsigns@10?model_uuid=36233173b22f4c89b451f1228d700d49&repository_url=https://adb-5245952564735461.0.azuredatabricks.net/api/2.0/mlflow&run_id=410a3121-2709-4f88-98dd-dba0ef056b0a",
261261
"expected_failure": false,
262262
"expected_failure_reason": null
263263
}

tests/types/rpm-test.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
"test_group": "base",
130130
"test_type": "roundtrip",
131131
"input": "pkg:rpm/[email protected]?arch=i686&epoch=1&distro=fedora-25",
132-
"expected_output": "pkg:rpm/[email protected]?arch=i686&epoch=1&distro=fedora-25",
132+
"expected_output": "pkg:rpm/[email protected]?arch=i686&distro=fedora-25&epoch=1",
133133
"expected_failure": false,
134134
"expected_failure_reason": null
135135
},
@@ -149,7 +149,7 @@
149149
},
150150
"subpath": null
151151
},
152-
"expected_output": "pkg:rpm/[email protected]?arch=i686&epoch=1&distro=fedora-25",
152+
"expected_output": "pkg:rpm/[email protected]?arch=i686&distro=fedora-25&epoch=1",
153153
"expected_failure": false,
154154
"expected_failure_reason": null
155155
}

0 commit comments

Comments
 (0)