mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-21 19:25:35 -05:00
refactor py-config to use json (#754)
* refactor py-config to use toml * switch from toml to json and add unit tests * fix test for py-config * fix integration test * use flat structure for JSON * allow merging configs * replace arrays instead of concatenating them * remove extra keys from inline config of integration test * simplify array replacement logic * allow config from src to be partial as well * add comments to unit tests * add unit test for setting config from both inline and src * handle parse errors + validate config supplied * separate functions for src and inline * suggested improvements * show error message in red on parser error * fix eslint * use resolveJsonModule as true * use default config defined as a variable without import * remove disable eslint comment * remove import for covfefe.json as well * metadata injection * add support for schema + extra keys * use schema_version
This commit is contained in:
@@ -55,10 +55,13 @@ class TestRuntimeConfig(PyScriptTest):
|
||||
""",
|
||||
extra_head="""
|
||||
<py-config>
|
||||
runtimes:
|
||||
- src: "/pyodide/pyodide.js"
|
||||
name: pyodide-0.20.0
|
||||
lang: python
|
||||
{
|
||||
"runtimes": [{
|
||||
"src": "/pyodide/pyodide.js",
|
||||
"name": "pyodide-0.20.0",
|
||||
"lang": "python"
|
||||
}]
|
||||
}
|
||||
</py-config>
|
||||
""",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user