Skip to content

Commit b87ba31

Browse files
committed
Bulk generator: Get rid of the hardcoded project list and move it into a configuration file.
1 parent 40d937a commit b87ba31

File tree

2 files changed

+69
-70
lines changed

2 files changed

+69
-70
lines changed

misc/scripts/models-as-data/rust_bulk_generate_mad.py

Lines changed: 0 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -47,76 +47,6 @@ class Project(TypedDict):
4747
git_tag: NotRequired[str]
4848

4949

50-
# List of Rust projects to generate models for.
51-
projects: List[Project] = [
52-
{
53-
"name": "libc",
54-
"git_repo": "https://github.com/rust-lang/libc",
55-
"git_tag": "0.2.172",
56-
},
57-
{
58-
"name": "log",
59-
"git_repo": "https://github.com/rust-lang/log",
60-
"git_tag": "0.4.27",
61-
},
62-
{
63-
"name": "memchr",
64-
"git_repo": "https://github.com/BurntSushi/memchr",
65-
"git_tag": "2.7.4",
66-
},
67-
{
68-
"name": "once_cell",
69-
"git_repo": "https://github.com/matklad/once_cell",
70-
"git_tag": "v1.21.3",
71-
},
72-
{
73-
"name": "rand",
74-
"git_repo": "https://github.com/rust-random/rand",
75-
"git_tag": "0.9.1",
76-
},
77-
{
78-
"name": "smallvec",
79-
"git_repo": "https://github.com/servo/rust-smallvec",
80-
"git_tag": "v1.15.0",
81-
},
82-
{
83-
"name": "serde",
84-
"git_repo": "https://github.com/serde-rs/serde",
85-
"git_tag": "v1.0.219",
86-
},
87-
{
88-
"name": "tokio",
89-
"git_repo": "https://github.com/tokio-rs/tokio",
90-
"git_tag": "tokio-1.45.0",
91-
},
92-
{
93-
"name": "reqwest",
94-
"git_repo": "https://github.com/seanmonstar/reqwest",
95-
"git_tag": "v0.12.15",
96-
},
97-
{
98-
"name": "rocket",
99-
"git_repo": "https://github.com/SergioBenitez/Rocket",
100-
"git_tag": "v0.5.1",
101-
},
102-
{
103-
"name": "actix-web",
104-
"git_repo": "https://github.com/actix/actix-web",
105-
"git_tag": "web-v4.11.0",
106-
},
107-
{
108-
"name": "hyper",
109-
"git_repo": "https://github.com/hyperium/hyper",
110-
"git_tag": "v1.6.0",
111-
},
112-
{
113-
"name": "clap",
114-
"git_repo": "https://github.com/clap-rs/clap",
115-
"git_tag": "v4.5.38",
116-
},
117-
]
118-
119-
12050
def clone_project(project: Project) -> str:
12151
"""
12252
Shallow clone a project into the build directory.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"targets": [
3+
{
4+
"name": "libc",
5+
"git_repo": "https://github.com/rust-lang/libc",
6+
"git_tag": "0.2.172"
7+
},
8+
{
9+
"name": "log",
10+
"git_repo": "https://github.com/rust-lang/log",
11+
"git_tag": "0.4.27"
12+
},
13+
{
14+
"name": "memchr",
15+
"git_repo": "https://github.com/BurntSushi/memchr",
16+
"git_tag": "2.7.4"
17+
},
18+
{
19+
"name": "once_cell",
20+
"git_repo": "https://github.com/matklad/once_cell",
21+
"git_tag": "v1.21.3"
22+
},
23+
{
24+
"name": "rand",
25+
"git_repo": "https://github.com/rust-random/rand",
26+
"git_tag": "0.9.1"
27+
},
28+
{
29+
"name": "smallvec",
30+
"git_repo": "https://github.com/servo/rust-smallvec",
31+
"git_tag": "v1.15.0"
32+
},
33+
{
34+
"name": "serde",
35+
"git_repo": "https://github.com/serde-rs/serde",
36+
"git_tag": "v1.0.219"
37+
},
38+
{
39+
"name": "tokio",
40+
"git_repo": "https://github.com/tokio-rs/tokio",
41+
"git_tag": "tokio-1.45.0"
42+
},
43+
{
44+
"name": "reqwest",
45+
"git_repo": "https://github.com/seanmonstar/reqwest",
46+
"git_tag": "v0.12.15"
47+
},
48+
{
49+
"name": "rocket",
50+
"git_repo": "https://github.com/SergioBenitez/Rocket",
51+
"git_tag": "v0.5.1"
52+
},
53+
{
54+
"name": "actix-web",
55+
"git_repo": "https://github.com/actix/actix-web",
56+
"git_tag": "web-v4.11.0"
57+
},
58+
{
59+
"name": "hyper",
60+
"git_repo": "https://github.com/hyperium/hyper",
61+
"git_tag": "v1.6.0"
62+
},
63+
{
64+
"name": "clap",
65+
"git_repo": "https://github.com/clap-rs/clap",
66+
"git_tag": "v4.5.38"
67+
}
68+
]
69+
}

0 commit comments

Comments
 (0)