Right now, to generate test-case files, one needs to run tc_gen.py and follow the prompt to choose the language and platform. The input generation is written in the source code of the program itself, in the 'input area' which needs to be modified to generate test-cases for each new question. This process makes the code vulnerable to accidental changes and can also be a little overwhelming to new users. It also restricts the user to generate the input files in Python only.
Expected Behaviour
This Testcase Generator can be made into a PyPI package that works something like this:
tc_gen -n{num} --platform <link_to_input_generation_file> <link_to_output_logic_file>
This works as:
tc_gen is the name of the program
-n{num} specifies the number of test-case files to generate. -n5 will generate 5 files, -n1 will generate one file. If not passed, -n1 would be the default.
--platform flag would tell the format in which test-cases are to be zipped. --hr, --he and --cc can be the respective flags for Hackerrank, HackerEarth and CodeChef. If not passed --hr would be the default
<link_to_input_generation_file> gives the link to the file that writes the input sequence to stdout. The extension of the file can be used to compile and run it in its respective language. This gives the user more control and independence to input generation.
<link_to_output_logic_file> gives the link to the logic file that writes the answer to stdout. The extension of the file can be used to compile and run it in its respective language.
This would make the source code independent and would be more user-friendly.
The above is just a rough plan of making it work as a package. There are many more details that need to be discussed and planned and more features that can be added which we can discuss here.
Actual Behaviour
Right now, to generate test-case files, one needs to run
tc_gen.py
and follow the prompt to choose the language and platform. The input generation is written in the source code of the program itself, in the 'input area' which needs to be modified to generate test-cases for each new question. This process makes the code vulnerable to accidental changes and can also be a little overwhelming to new users. It also restricts the user to generate the input files in Python only.Expected Behaviour
This Testcase Generator can be made into a PyPI package that works something like this:
tc_gen -n{num} --platform <link_to_input_generation_file> <link_to_output_logic_file>
This works as:
tc_gen
is the name of the program-n{num}
specifies the number of test-case files to generate.-n5
will generate 5 files,-n1
will generate one file. If not passed,-n1
would be the default.--platform
flag would tell the format in which test-cases are to be zipped.--hr
,--he
and--cc
can be the respective flags for Hackerrank, HackerEarth and CodeChef. If not passed--hr
would be the default<link_to_input_generation_file>
gives the link to the file that writes the input sequence to stdout. The extension of the file can be used to compile and run it in its respective language. This gives the user more control and independence to input generation.<link_to_output_logic_file>
gives the link to the logic file that writes the answer to stdout. The extension of the file can be used to compile and run it in its respective language.This would make the source code independent and would be more user-friendly.
The above is just a rough plan of making it work as a package. There are many more details that need to be discussed and planned and more features that can be added which we can discuss here.
Would you like to work on the issue?
Yes