-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New cases file format #38
Comments
YAML is quite unfriendly to beginners. |
Could you please explain in more details? @iceb0y |
TOML seems simpler and maybe better for this purpose. |
Closed
Looks like yaml supports inheritance by itself. The proposed config can be rewritten as: default: &default
time: 1s
memory: 16m
score: 10
default2: &default2
<<: *default
judge:
file: judge.cc
lang: cc
time: 5s
memory: 64m
data: ['data/state', 'data/transition']
score: 30
cases:
- <<: *default
input: input/input0.txt
output: output/output0.txt
- <<: *default
input: input/input1.txt
output: output/output1.txt
- <<: *default2
input: input/input2.txt
data: data/state
memory: 32m
- <<: *default2
input: input/input3.txt
data: data/state
score: 50
memory: 2048m Parse result: [{'input': 'input/input0.txt',
'memory': '16m',
'output': 'output/output0.txt',
'score': 10,
'time': '1s'},
{'input': 'input/input1.txt',
'memory': '16m',
'output': 'output/output1.txt',
'score': 10,
'time': '1s'},
{'data': 'data/state',
'input': 'input/input2.txt',
'judge': {'data': ['data/state', 'data/transition'],
'file': 'judge.cc',
'lang': 'cc',
'memory': '64m',
'time': '5s'},
'memory': '32m',
'score': 30,
'time': '1s'},
{'data': 'data/state',
'input': 'input/input3.txt',
'judge': {'data': ['data/state', 'data/transition'],
'file': 'judge.cc',
'lang': 'cc',
'memory': '64m',
'time': '5s'},
'memory': '2048m',
'score': 50,
'time': '1s'}] |
iceboy233
added a commit
that referenced
this issue
Nov 19, 2017
https://github.com/vstakhov/libucl is another option |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Initial thinking:
This is an extreme case. Normal config should be much simpler.
The text was updated successfully, but these errors were encountered: