Skip to content

Commit 36bd351

Browse files
committed
Turn corpus into files
1 parent 8b0e56c commit 36bd351

10 files changed

+481
-27
lines changed

src/valid/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ mod tests {
149149
env!("CARGO_MANIFEST_DIR"),
150150
"tests",
151151
"corpus",
152-
"v2",
152+
"v1",
153153
"valid.txt",
154154
]
155155
.iter()

tests/corpus/v2/invalid.txt

-1
This file was deleted.

tests/corpus/v2/minimal.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "pair",
3+
"abstract": "A key/value pair data type",
4+
"version": "0.1.8",
5+
"maintainers": [
6+
{
7+
"name": "David E. Wheeler",
8+
"email": "[email protected]"
9+
}
10+
],
11+
"license": "PostgreSQL",
12+
"contents": {
13+
"extensions": {
14+
"pair": {
15+
"sql": "sql/pair.sql",
16+
"control": "pair.control"
17+
}
18+
}
19+
},
20+
"meta-spec": { "version": "2.0.0" }
21+
}

tests/corpus/v2/pg_partman.json

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"name": "pg_partman",
3+
"abstract": "Extension to manage partitioned tables by time or ID",
4+
"version": "5.1.0",
5+
"maintainers": [
6+
{
7+
"name": "Keith Fiske",
8+
"email": "[email protected]"
9+
}
10+
],
11+
"license": "PostgreSQL",
12+
"contents": {
13+
"extensions": {
14+
"pg_partman": {
15+
"control": "pg_partman.control",
16+
"sql": "sql/types/types.sql",
17+
"doc": "doc/pg_partman.md",
18+
"abstract": "Extension to manage partitioned tables by time or ID"
19+
}
20+
},
21+
"modules": {
22+
"pg_partman_bgw": {
23+
"type": "bgw",
24+
"lib": "src/pg_partman_bgw",
25+
"preload": "server"
26+
}
27+
},
28+
"apps": {
29+
"check_unique_constraint": {
30+
"lang": "python",
31+
"bin": "bin/common/check_unique_constraint.py",
32+
"abstract": "Check that all rows in a partition set are unique for the given columns"
33+
},
34+
"dump_partition": {
35+
"lang": "python",
36+
"bin": "bin/common/dump_partition.py",
37+
"abstract": "Dump out and then drop all tables contained in a schema."
38+
},
39+
"vacuum_maintenance": {
40+
"lang": "python",
41+
"bin": "bin/common/vacuum_maintenance.py",
42+
"abstract": "Performing vacuum maintenance on to avoid excess vacuuming and transaction id wraparound issues"
43+
}
44+
}
45+
},
46+
"dependencies": {
47+
"postgres": {
48+
"version": "14.0"
49+
},
50+
"packages": {
51+
"run": {
52+
"requires": {
53+
"pkg:generic/python": "2.0",
54+
"pkg:pypi/psycopg2": 0
55+
},
56+
"recommends": {
57+
"pkg:pgxn/pg_jobmon": "1.4.1"
58+
}
59+
}
60+
}
61+
},
62+
"resources": {
63+
"issues": "https://github.com/theory/pg-envvar/issues/",
64+
"repository": "https://github.com/theory/pg-envvar/",
65+
"badges": [
66+
{
67+
"alt": "CI Status",
68+
"src": "https://github.com/theory/pg-envvar/actions/workflows/ci.yml/badge.svg",
69+
"url": "https://github.com/theory/pg-envvar/actions/workflows/ci.yml"
70+
}
71+
]
72+
},
73+
"producer": "David E. Wheeler",
74+
"meta-spec": {
75+
"version": "2.0.0",
76+
"url": "https://rfcs.pgxn.org/0003-meta-spec-v2.html"
77+
},
78+
"classifications": {
79+
"categories": ["Orchestration"],
80+
"tags": [
81+
"partition",
82+
"partitions",
83+
"partitioning",
84+
"table",
85+
"tables",
86+
"bgw",
87+
"background worker",
88+
"custom background worker"
89+
]
90+
}
91+
}

tests/corpus/v2/postgresml.json

+147
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
{
2+
"name": "pgml",
3+
"version": "2.8.2",
4+
"abstract": "pgml: Created by the PostgresML team",
5+
"maintainers": [
6+
{
7+
"name": "the PostgresML team",
8+
"url": "https://github.com/postgresml/postgresml/"
9+
}
10+
],
11+
"license": "MIT",
12+
"contents": {
13+
"extensions": {
14+
"pgml": {
15+
"sql": "target/release/**/pgml--2.7.13.sql",
16+
"control": "target/release/**/pgml.control"
17+
}
18+
},
19+
"modules": {
20+
"pgml": {
21+
"type": "extension",
22+
"lib": "target/release/pgml",
23+
"preload": "server"
24+
}
25+
}
26+
},
27+
"dependencies": {
28+
"postgres": {
29+
"version": "9.1.0"
30+
},
31+
"pipeline": "pgrx",
32+
"packages": {
33+
"configure": {
34+
"requires": {
35+
"pkg:generic/cmake": 0,
36+
"pkg:cargo/cargo-pgrx": "0.11.2"
37+
}
38+
},
39+
"build": {
40+
"requires": {
41+
"pkg:generic/cargo": 0,
42+
"pkg:generic/bison": 0,
43+
"pkg:generic/flex": 0,
44+
"pkg:generic/clang": 0,
45+
"pkg:generic/openblas": 0,
46+
"pkg:generic/python3": "3.7",
47+
"pkg:generic/readline": 0,
48+
"pkg:generic/openssl": 0,
49+
"pkg:generic/pkg-config": 0
50+
}
51+
},
52+
"run": {
53+
"requires": {
54+
"pkg:generic/openblas": 0,
55+
"pkg:generic/python3": "3.7",
56+
"pkg:generic/readline": 0,
57+
"pkg:generic/openssl": 0
58+
},
59+
"recommends": {
60+
"pkg:pypi/pyarrow": "11.0.0",
61+
"pkg:pypi/catboost": 0,
62+
"pkg:pypi/lightgbm": 0,
63+
"pkg:pypi/torch": 0,
64+
"pkg:pypi/torchaudio": 0,
65+
"pkg:pypi/torchvision": 0,
66+
"pkg:pypi/xgboost": 0,
67+
"pkg:pypi/accelerate": 0,
68+
"pkg:pypi/bitsandbytes": 0,
69+
"pkg:pypi/ctransformers": 0,
70+
"pkg:pypi/huggingface-hub": 0,
71+
"pkg:pypi/deepspeed": 0,
72+
"pkg:pypi/einops": 0,
73+
"pkg:pypi/optimum": 0,
74+
"pkg:pypi/peft": 0,
75+
"pkg:pypi/tokenizers": 0,
76+
"pkg:pypi/transformers": 0,
77+
"pkg:pypi/transformers-stream-generator": 0,
78+
"pkg:pypi/InstructorEmbedding": 0,
79+
"pkg:pypi/sentence-transformers": 0,
80+
"pkg:pypi/rouge": 0,
81+
"pkg:pypi/sacrebleu": 0,
82+
"pkg:pypi/sacremoses": 0,
83+
"pkg:pypi/datasets": 0,
84+
"pkg:pypi/orjson": 0,
85+
"pkg:pypi/langchain": 0
86+
}
87+
}
88+
},
89+
"variations": [
90+
{
91+
"where": {
92+
"platforms": ["linux"]
93+
},
94+
"dependencies": {
95+
"packages": {
96+
"run": {
97+
"recommends": {
98+
"pkg:pypi/auto-gptq": 0,
99+
"pkg:pypi/xformers": 0
100+
}
101+
}
102+
}
103+
}
104+
}
105+
]
106+
},
107+
"resources": {
108+
"homepage": "https://postgresml.org/",
109+
"issues": "https://github.com/postgresml/postgresml/issues",
110+
"docs": "https://postgresml.org/docs/",
111+
"support": "https://discord.com/invite/DmyJP3qJ7U",
112+
"repository": "https://github.com/postgresml/postgresml",
113+
"badges": [
114+
{
115+
"alt": "Tests Passing",
116+
"src": "https://github.com/postgresml/postgresml/actions/workflows/ci.yml/badge.svg",
117+
"url": "https://github.com/postgresml/postgresml/actions/workflows/ci.yml"
118+
},
119+
{
120+
"alt": "Chat Activity",
121+
"src": "https://img.shields.io/discord/1013868243036930099",
122+
"url": "https://discord.gg/DmyJP3qJ7U"
123+
}
124+
]
125+
},
126+
"producer": "David E. Wheeler",
127+
"meta-spec": {
128+
"version": "2.0.0",
129+
"url": "https://rfcs.pgxn.org/0003-meta-spec-v2.html"
130+
},
131+
"classifications": {
132+
"tags": ["machine learning", "ml", "transformers"],
133+
"categories": ["Machine Learning"]
134+
},
135+
"artifacts": [
136+
{
137+
"type": "source",
138+
"url": "https://github.com/postgresml/postgresml/archive/refs/tags/v2.8.2.zip",
139+
"sha256": "2b9d2416096d2930be51e5332b70bcd97846947777a93e4a3d65fe1b5fd7b004"
140+
},
141+
{
142+
"type": "source",
143+
"url": "https://github.com/postgresml/postgresml/archive/refs/tags/v2.8.2.tar.gz",
144+
"sha256": "845f28339c6159ac32daccea1cd17b386ea083c3e60bb8d58fb737725afe7eb5"
145+
}
146+
]
147+
}

tests/corpus/v2/typical-c.json

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"name": "envvar",
3+
"abstract": "Get the value of a server environment variable",
4+
"description": "Provides a function that returns the value of an environment variable set on the Postgres server.",
5+
"version": "1.0.0",
6+
"maintainers": [
7+
{
8+
"name": "David E. Wheeler",
9+
"email": "[email protected]"
10+
}
11+
],
12+
"license": "PostgreSQL",
13+
"contents": {
14+
"extensions": {
15+
"envvar": {
16+
"abstract": "Get the value of a server environment variable",
17+
"control": "envvar.control",
18+
"sql": "sql/envvar.sql",
19+
"doc": "doc/envvar.md"
20+
}
21+
},
22+
"modules": {
23+
"envvar": {
24+
"type": "extension",
25+
"lib": "src/envvar"
26+
}
27+
}
28+
},
29+
"dependencies": {
30+
"postgres": {
31+
"version": "9.1.0"
32+
}
33+
},
34+
"resources": {
35+
"issues": "https://github.com/theory/pg-envvar/issues/",
36+
"repository": "https://github.com/theory/pg-envvar/",
37+
"badges": [
38+
{
39+
"alt": "CI Status",
40+
"src": "https://github.com/theory/pg-envvar/actions/workflows/ci.yml/badge.svg",
41+
"url": "https://github.com/theory/pg-envvar/actions/workflows/ci.yml"
42+
}
43+
]
44+
},
45+
"producer": "David E. Wheeler",
46+
"meta-spec": {
47+
"version": "2.0.0",
48+
"url": "https://rfcs.pgxn.org/0003-meta-spec-v2.html"
49+
},
50+
"classifications": {
51+
"categories": ["Data and Transformations"],
52+
"tags": ["environment variable", "environment", "server"]
53+
},
54+
"artifacts": [
55+
{
56+
"type": "source",
57+
"url": "https://github.com/theory/pg-envvar/releases/download/v1.0.0/envvar-1.0.0.zip",
58+
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
59+
}
60+
]
61+
}

0 commit comments

Comments
 (0)