Skip to content

Commit dbb4725

Browse files
committed
test fixes
1 parent 88ad762 commit dbb4725

14 files changed

+657
-327
lines changed

populus/assets/config.v1.schema.json

+1-88
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@
1111
"compilation": {
1212
"$ref": "#/definitions/CompilationConfig"
1313
},
14-
"contracts": {
15-
"$ref": "#/definitions/ContractsConfig"
16-
},
17-
"packaging": {
18-
"$ref": "#/definitions/PackagingConfig"
19-
},
2014
"chains": {
2115
"$ref": "#/definitions/ProjectChainsConfig"
2216
},
@@ -70,61 +64,11 @@
7064
}
7165
}
7266
},
73-
"ContractBackendConfig": {
74-
"title": "Configuration for a contract backend",
75-
"type": "object",
76-
"required": ["class", "priority"],
77-
"properties": {
78-
"class": {
79-
"$ref": "#/definitions/PythonImportPath"
80-
},
81-
"priority": {
82-
"title": "The priority of this backend",
83-
"type": "integer"
84-
},
85-
"settings": {
86-
"title": "Backend specific settings",
87-
"type": "object"
88-
}
89-
}
90-
},
9167
"PythonImportPath": {
9268
"title": "The string representation of an import path for a python module or object",
9369
"type": "string",
9470
"pattern": "^[a-zA-Z][_a-zA-Z0-9]*(?:\\.[a-zA-Z][_a-zA-Z0-9]*)*$"
9571
},
96-
"PackagingConfig": {
97-
"title": "Configuration for package installation and management",
98-
"type": "object",
99-
"properties": {
100-
"backends": {
101-
"title": "Global configurations for project backends which can be used by project chains",
102-
"additionalProperties": false,
103-
"patternProperties": {
104-
"^[a-zA-Z0-9][-_a-zA-Z0-9]*$": {
105-
"$ref": "#/definitions/PackageBackendConfig"
106-
}
107-
}
108-
}
109-
}
110-
},
111-
"PackageBackendConfig": {
112-
"title": "Configuration for a package backend",
113-
"type": "object",
114-
"properties": {
115-
"class": {
116-
"$ref": "#/definitions/PythonImportPath"
117-
},
118-
"priority": {
119-
"title": "The priority of this backend",
120-
"type": "integer"
121-
},
122-
"settings": {
123-
"title": "Backend specific settings",
124-
"type": "object"
125-
}
126-
}
127-
},
12872
"ProjectChainsConfig": {
12973
"title": "The configuration for each chain declared by this project",
13074
"type": "object",
@@ -138,45 +82,14 @@
13882
"ChainConfig": {
13983
"title": "Configuration for a single project chain",
14084
"type": "object",
141-
"required": ["chain", "web3", "contracts"],
85+
"required": ["chain", "web3"],
14286
"properties": {
14387
"chain": {"$ref": "#/definitions/ChainClassConfig"},
14488
"web3": {
14589
"anyOf": [
14690
{"$ref": "#/definitions/Reference"},
14791
{"$ref": "#/definitions/Web3Config"}
14892
]
149-
},
150-
"contracts": {
151-
"title": "Configuration for the contract backends this chain will use",
152-
"type": "object",
153-
"required": ["backends"],
154-
"properties": {
155-
"backends": {
156-
"patternProperties": {
157-
"^[a-zA-Z0-9][-_a-zA-Z0-9]*$": {
158-
"anyOf": [
159-
{"$ref": "#/definitions/Reference"},
160-
{"$ref": "#/definitions/ContractBackendConfig"}
161-
]
162-
}
163-
}
164-
}
165-
}
166-
}
167-
}
168-
},
169-
"ChainClassConfig": {
170-
"title": "Configuration for a chain class",
171-
"type": "object",
172-
"required": ["class"],
173-
"properties": {
174-
"class": {
175-
"$ref": "#/definitions/PythonImportPath"
176-
},
177-
"settings": {
178-
"title": "Additional configuration for the chain class",
179-
"type": "object"
18093
}
18194
}
18295
},

populus/assets/config.v3.schema.json

+260
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,260 @@
1+
{
2+
"title": "Populus configuration file schema",
3+
"type": "object",
4+
"version": "3",
5+
"required": ["version"],
6+
"properties": {
7+
"chains": {
8+
"$ref": "#/definitions/ProjectChainsConfig"
9+
},
10+
"compilation": {
11+
"$ref": "#/definitions/CompilationConfig"
12+
},
13+
"contracts": {
14+
"$ref": "#/definitions/ContractsConfig"
15+
},
16+
"packaging": {
17+
"$ref": "#/definitions/PackagingConfig"
18+
},
19+
"web3": {
20+
"$ref": "#/definitions/ProjectWeb3Config"
21+
},
22+
"version": {
23+
"type": "string",
24+
"enum": ["3"]
25+
}
26+
},
27+
"definitions": {
28+
"ChainClassConfig": {
29+
"title": "Configuration for a chain class",
30+
"type": "object",
31+
"required": ["class"],
32+
"properties": {
33+
"class": {
34+
"$ref": "#/definitions/PythonImportPath"
35+
},
36+
"settings": {
37+
"title": "Additional configuration for the chain class",
38+
"type": "object"
39+
}
40+
}
41+
},
42+
"ChainClassConfig": {
43+
"title": "Configuration for a chain class",
44+
"type": "object",
45+
"required": ["class"],
46+
"properties": {
47+
"class": {
48+
"$ref": "#/definitions/PythonImportPath"
49+
},
50+
"settings": {
51+
"title": "Additional configuration for the chain class",
52+
"type": "object"
53+
}
54+
}
55+
},
56+
"ChainConfig": {
57+
"title": "Configuration for a single project chain",
58+
"type": "object",
59+
"required": ["chain", "web3", "contracts"],
60+
"properties": {
61+
"chain": {"$ref": "#/definitions/ChainClassConfig"},
62+
"web3": {
63+
"anyOf": [
64+
{"$ref": "#/definitions/Reference"},
65+
{"$ref": "#/definitions/Web3Config"}
66+
]
67+
},
68+
"contracts": {
69+
"title": "Configuration for the contract backends this chain will use",
70+
"type": "object",
71+
"required": ["backends"],
72+
"properties": {
73+
"backends": {
74+
"patternProperties": {
75+
"^[a-zA-Z0-9][-_a-zA-Z0-9]*$": {
76+
"anyOf": [
77+
{"$ref": "#/definitions/Reference"},
78+
{"$ref": "#/definitions/ContractBackendConfig"}
79+
]
80+
}
81+
}
82+
}
83+
}
84+
}
85+
}
86+
},
87+
"CompilationConfig": {
88+
"title": "Configuration for how populus compiles source files",
89+
"type": "object",
90+
"properties": {
91+
"contracts_source_dir": {
92+
"title": "The root filesystem path under which the projects source files can be found",
93+
"type": "string"
94+
},
95+
"settings": {
96+
"anyOf": [
97+
{"$ref": "#/definitions/SolcCompilerSettings"}
98+
]
99+
}
100+
}
101+
},
102+
"ContractBackendConfig": {
103+
"title": "Configuration for a contract backend",
104+
"type": "object",
105+
"required": ["class", "priority"],
106+
"properties": {
107+
"class": {
108+
"$ref": "#/definitions/PythonImportPath"
109+
},
110+
"priority": {
111+
"title": "The priority of this backend",
112+
"type": "integer"
113+
},
114+
"settings": {
115+
"title": "Backend specific settings",
116+
"type": "object"
117+
}
118+
}
119+
},
120+
"ContractsConfig": {
121+
"title": "Configuration for the contract store",
122+
"properties": {
123+
"backends": {
124+
"title": "The contract backends used by this project",
125+
"additionalProperties": false,
126+
"patternProperties": {
127+
"^[a-zA-Z0-9][-_a-zA-Z0-9]*$": {
128+
"$ref": "#/definitions/ContractBackendConfig"
129+
}
130+
}
131+
}
132+
}
133+
},
134+
"EthereumAddress": {
135+
"title": "An Ethereum address",
136+
"type": "string",
137+
"pattern": "^0x[0-9a-fA-F]{40}$"
138+
},
139+
"PackagingConfig": {
140+
"title": "Configuration for package installation and management",
141+
"type": "object",
142+
"properties": {
143+
"backends": {
144+
"title": "Global configurations for project backends which can be used by project chains",
145+
"additionalProperties": false,
146+
"patternProperties": {
147+
"^[a-zA-Z0-9][-_a-zA-Z0-9]*$": {
148+
"$ref": "#/definitions/PackageBackendConfig"
149+
}
150+
}
151+
}
152+
}
153+
},
154+
"PackageBackendConfig": {
155+
"title": "Configuration for a package backend",
156+
"type": "object",
157+
"properties": {
158+
"class": {
159+
"$ref": "#/definitions/PythonImportPath"
160+
},
161+
"priority": {
162+
"title": "The priority of this backend",
163+
"type": "integer"
164+
},
165+
"settings": {
166+
"title": "Backend specific settings",
167+
"type": "object"
168+
}
169+
}
170+
},
171+
"ProjectChainsConfig": {
172+
"title": "The configuration for each chain declared by this project",
173+
"type": "object",
174+
"additionalProperties": false,
175+
"patternProperties": {
176+
"^[a-zA-Z0-9][-_a-zA-Z0-9]*$": {
177+
"$ref": "#/definitions/ChainConfig"
178+
}
179+
}
180+
},
181+
"ProjectWeb3Config": {
182+
"title": "Project level web3 configurations",
183+
"type": "object",
184+
"additionalProperties": false,
185+
"patternProperties": {
186+
"^[a-zA-Z0-9][-_a-zA-Z0-9]*$": {
187+
"$ref": "#/definitions/Web3Config"
188+
}
189+
}
190+
},
191+
"PythonImportPath": {
192+
"title": "The string representation of an import path for a python module or object",
193+
"type": "string",
194+
"pattern": "^[a-zA-Z][_a-zA-Z0-9]*(?:\\.[a-zA-Z][_a-zA-Z0-9]*)*$"
195+
},
196+
"Reference": {
197+
"title": "A reference to another section in the configuration file",
198+
"type": "object",
199+
"additionalProperties": false,
200+
"properties": {
201+
"$ref": {
202+
"title": "Dotted path from the root of the config file to the referenced configuration",
203+
"type": "string",
204+
"pattern": "^[a-zA-Z][_a-zA-Z0-9]*(?:\\.[a-zA-Z][_a-zA-Z0-9]*)*$"
205+
}
206+
}
207+
},
208+
"SolcCompilerSettings": {
209+
"title": "Settings for the solc command line compiler",
210+
"type": "object",
211+
"properties": {
212+
"optimize": {
213+
"type": "boolean"
214+
},
215+
"output_values": {
216+
"title": "Determines which compiler values will be output by the solc compiler",
217+
"type": "array",
218+
"items": {
219+
"type": "string"
220+
}
221+
}
222+
}
223+
},
224+
"Web3Config": {
225+
"title": "Configuration for a web instance",
226+
"type": "object",
227+
"properties": {
228+
"provider": {
229+
"$ref": "#/definitions/ProviderConfig"
230+
},
231+
"eth": {
232+
"$ref": "#/definitions/Web3EthConfig"
233+
}
234+
}
235+
},
236+
"ProviderConfig": {
237+
"title": "Configuration for the provider of a web3 instance",
238+
"type": "object",
239+
"required": ["class"],
240+
"properties": {
241+
"class": {
242+
"$ref": "#/definitions/PythonImportPath"
243+
},
244+
"settings": {
245+
"title": "Provider specific settings",
246+
"type": "object"
247+
}
248+
}
249+
},
250+
"Web3EthConfig": {
251+
"title": "Configuration for the eth module of a web3 instance",
252+
"type": "object",
253+
"properties": {
254+
"default_account": {
255+
"$ref": "#/definitions/EthereumAddress"
256+
}
257+
}
258+
}
259+
}
260+
}

0 commit comments

Comments
 (0)