feat: support case_batch_dependencies when using regex test case format - #1238
feat: support case_batch_dependencies when using regex test case format#1238Rishiii57 wants to merge 14 commits into
Conversation
|
Can one of the admins verify this patch? |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1238 +/- ##
==========================================
- Coverage 83.00% 82.58% -0.43%
==========================================
Files 151 151
Lines 5732 5741 +9
==========================================
- Hits 4758 4741 -17
- Misses 974 1000 +26 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Can you add a test for this to the testsuite? You can base it off of https://github.com/DMOJ/judge-server/blob/master/testsuite/batch_dependencies/init.yml. |
|
Hey I've looked at the testsuite structure. Could you give me some guidance on how to add a regex-based test there? I'm on a Mac so I can't run the full judge environment locally to verify, since cptbox requires Linux. |
|
You probably want to make test_cases:
input_format: (?P<case>\d)\.txt
output_format: (?P<case>\d)\.txt
case_batch_dependencies: [[], [], [1, 2], []]and the rest can presumably be copied over without modification. |
|
Yeah thats what I thought. |
|
Hey @kiritofeng I tried doing what you said but seems like some checks are failing. Could you please guide me what to do? |
|
You also need to handle the case where the test case is not in a batch: https://github.com/DMOJ/judge-server/blob/master/dmoj/problem.py#L159 I also think that calling them |
|
Hey @kiritofeng , I have updated the PR based on your suggestions :) |
|
The code is failing because the dependencies are not being correctly assigned; you should output the generated config and see why it's failing. |
|
It's failing because the cases aren't being generated as batches but rather as individual test cases (and |
- Rename case_batch_dependencies to case_dependencies - Inject dependencies for standalone (non-batched) test cases - Update type hints
647d5ac to
2245984
Compare
Fixes #1232
Adds support for case_batch_dependencies when using regex test case format specifiers.
The key accepts an array of arrays, where each index corresponds to a batch:
test_cases:
case_batch_dependencies: [[], [1], [1], [], [1,2,3,4]]
Changes: