Skip to content
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

Make this into pip package #172

Open
thepushkarp opened this issue Apr 23, 2020 · 1 comment
Open

Make this into pip package #172

thepushkarp opened this issue Apr 23, 2020 · 1 comment

Comments

@thepushkarp
Copy link
Collaborator

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

@thepushkarp
Copy link
Collaborator Author

Would need some major major refactors and will bring several breaking changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants