Name | leetcodeDriverPY JSON |
Version |
1.1.1
JSON |
| download |
home_page | |
Summary | A simple library to help people run Leetcode testcases without the Leetcode online IDE. |
upload_time | 2023-01-03 00:09:14 |
maintainer | |
docs_url | None |
author | Duve3 |
requires_python | |
license | MIT |
keywords |
leetcode
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[![PyPI version](https://badge.fury.io/py/leetcodeDriverPY.svg)](https://badge.fury.io/py/leetcodeDriverPY) [![GitHub version](https://badge.fury.io/gh/Duve3%2FleetcodeDriverPY.svg)](https://badge.fury.io/gh/Duve3%2FleetcodeDriverPY)
# leetcodeDriverPY
A simple driver to allow you to use testcases in your own code :)
If you would like to use this in your project, its a simple as
just doing ```pip install leetcodeDriverPY```
Then once you have done that inside of your python file you will
want to do something like this:
###### top of the file:
```py
from leetcodeDriverPY import driver
```
###### inbetween these two segments of code should be your solution class with the solution function inside.
```py
testcases = { # create by doing: 'testcase': answer
'answer': 'correct_solution',
}
driver(solution, testcases)
# ^ solution should be your Solution class REFERENCE (no parentheses) NOT AN INSTANCE OF YOUR CLASS
# testcases should be the testcases that you want to use to test your program.
```
###### If you class has more than one function inside you may run into issues, for that reason I added a "optionalFunc" parameter.
###### This would be how you use it:
```py
# this code is just the code from above but changed to use optionalFunc
testcases = { # create by doing: 'testcase': answer
'answer': 'correct_solution',
}
driver(solution, testcases, optionalFunc=solution.IntToRoman)
# ^ optionalFunc should be your function REFERENCE! (ex: sol.IntToRoman)
# You shouldn't actually call the function.
```
###### If you are having issues with the colors, OR just do not like them you can disable them with the "colorless" parameter
```py
# this code is just the code from above but changed to use colorless
testcases = { # create by doing: 'testcase': answer
'answer': 'correct_solution',
}
driver(solution, testcases, optionalFunc=solution.IntToRoman, colorless=True)
# ^ colorless is False by default so if you want to disable colors you would set it to true.
```
Change Log
==========
0.0.1 (12/30/2022)
-------------------
- First Release
0.0.2 (12/30/2022)
-------------------
- I forgot to actually make it work
0.0.3 (12/31/2022)
-------------------
- I actually did stuff???
- Removed legacy code.
- Added verification to ensure that the correct parameters are filled.
- Separated the big ___init___ file into some smaller files.
- Changed the error text from FunctionNotFound.
- Added "optionalFunc" parameter, incase you needed to give a direct reference to your function.
- Updated the README.md to show how to use the optionalFunc parameter.
- Added a print statement to inform you of what function is being used.
- Added a NotEnoughTestcases Error.
- Added a check to confirm that len(testcases) > 1 if it fails then it raises NotEnoughTestcases.
1.0.0 (1/1/2022) (Happy New Year!)
-------------------
- I just wanted a reason to change the version number to 1.0.0
- Added new "colorless" optional parameter that if set to True will disable all color output.
- Updated README.md with colorless option and fixed some text errors.
1.0.1 (1/1/2022)
-------------------
- Quick patch (I made a few mistakes in the last update...)
- ^ Problem was related to parameter verification because of this, the "class" parameter is not verified anymore.
- Fixed some typos throughout the package.
1.0.2 (1/1/2022)
-------------------
- small update with minor bug fixes (typos, etc.)
- fixed some incorrect links on the pypi.org page
1.1.0 (1/2/2022)
-------------------
- Fixed bold adding extra lines for no reason.
- Changed how classes are now given, this allows a more streamlined process of testing.
- ^ More info in the README
- Removed useless declarations
- Changed the FAILED color to only show when over HALF of the testcases failed instead of just 2
- Added links to PyPI page
- + some minor changes.
1.1.1 (1/2/2022)
-------------------
- Fixed bugs
Raw data
{
"_id": null,
"home_page": "",
"name": "leetcodeDriverPY",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "leetcode",
"author": "Duve3",
"author_email": "Duv3tabest@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/c0/4e/5c318704bb5687bdeddf60a9f726f20d41b1431afe1ba7be25e839a21605/leetcodeDriverPY-1.1.1.tar.gz",
"platform": null,
"description": "[![PyPI version](https://badge.fury.io/py/leetcodeDriverPY.svg)](https://badge.fury.io/py/leetcodeDriverPY) [![GitHub version](https://badge.fury.io/gh/Duve3%2FleetcodeDriverPY.svg)](https://badge.fury.io/gh/Duve3%2FleetcodeDriverPY)\r\n# leetcodeDriverPY\r\nA simple driver to allow you to use testcases in your own code :)\r\n\r\nIf you would like to use this in your project, its a simple as\r\njust doing ```pip install leetcodeDriverPY```\r\n\r\nThen once you have done that inside of your python file you will\r\nwant to do something like this:\r\n\r\n###### top of the file:\r\n```py\r\nfrom leetcodeDriverPY import driver\r\n```\r\n###### inbetween these two segments of code should be your solution class with the solution function inside.\r\n```py\r\ntestcases = { # create by doing: 'testcase': answer\r\n 'answer': 'correct_solution',\r\n}\r\ndriver(solution, testcases)\r\n# ^ solution should be your Solution class REFERENCE (no parentheses) NOT AN INSTANCE OF YOUR CLASS\r\n# testcases should be the testcases that you want to use to test your program.\r\n```\r\n###### If you class has more than one function inside you may run into issues, for that reason I added a \"optionalFunc\" parameter.\r\n###### This would be how you use it:\r\n```py\r\n# this code is just the code from above but changed to use optionalFunc\r\ntestcases = { # create by doing: 'testcase': answer\r\n 'answer': 'correct_solution',\r\n}\r\ndriver(solution, testcases, optionalFunc=solution.IntToRoman)\r\n# ^ optionalFunc should be your function REFERENCE! (ex: sol.IntToRoman)\r\n# You shouldn't actually call the function.\r\n```\r\n###### If you are having issues with the colors, OR just do not like them you can disable them with the \"colorless\" parameter\r\n```py\r\n# this code is just the code from above but changed to use colorless\r\ntestcases = { # create by doing: 'testcase': answer\r\n 'answer': 'correct_solution',\r\n}\r\ndriver(solution, testcases, optionalFunc=solution.IntToRoman, colorless=True) \r\n# ^ colorless is False by default so if you want to disable colors you would set it to true.\r\n```\r\n\r\nChange Log\r\n==========\r\n\r\n0.0.1 (12/30/2022)\r\n-------------------\r\n- First Release\r\n\r\n0.0.2 (12/30/2022)\r\n-------------------\r\n- I forgot to actually make it work\r\n\r\n0.0.3 (12/31/2022)\r\n-------------------\r\n- I actually did stuff???\r\n- Removed legacy code.\r\n- Added verification to ensure that the correct parameters are filled.\r\n- Separated the big ___init___ file into some smaller files.\r\n- Changed the error text from FunctionNotFound.\r\n- Added \"optionalFunc\" parameter, incase you needed to give a direct reference to your function.\r\n- Updated the README.md to show how to use the optionalFunc parameter.\r\n- Added a print statement to inform you of what function is being used.\r\n- Added a NotEnoughTestcases Error.\r\n- Added a check to confirm that len(testcases) > 1 if it fails then it raises NotEnoughTestcases.\r\n\r\n1.0.0 (1/1/2022) (Happy New Year!)\r\n-------------------\r\n- I just wanted a reason to change the version number to 1.0.0\r\n- Added new \"colorless\" optional parameter that if set to True will disable all color output.\r\n- Updated README.md with colorless option and fixed some text errors.\r\n\r\n1.0.1 (1/1/2022)\r\n-------------------\r\n- Quick patch (I made a few mistakes in the last update...)\r\n- ^ Problem was related to parameter verification because of this, the \"class\" parameter is not verified anymore.\r\n- Fixed some typos throughout the package.\r\n\r\n1.0.2 (1/1/2022)\r\n-------------------\r\n- small update with minor bug fixes (typos, etc.)\r\n- fixed some incorrect links on the pypi.org page\r\n\r\n1.1.0 (1/2/2022)\r\n-------------------\r\n- Fixed bold adding extra lines for no reason.\r\n- Changed how classes are now given, this allows a more streamlined process of testing.\r\n- ^ More info in the README\r\n- Removed useless declarations\r\n- Changed the FAILED color to only show when over HALF of the testcases failed instead of just 2\r\n- Added links to PyPI page\r\n- + some minor changes.\r\n\r\n1.1.1 (1/2/2022)\r\n-------------------\r\n- Fixed bugs\r\n\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A simple library to help people run Leetcode testcases without the Leetcode online IDE.",
"version": "1.1.1",
"split_keywords": [
"leetcode"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c04e5c318704bb5687bdeddf60a9f726f20d41b1431afe1ba7be25e839a21605",
"md5": "82342c289bbc850fe881dc3aa5b92f8b",
"sha256": "12b30e5052df529637906e1b4fef323c5c78d8855f8c5a328ee8dbc33cc515a3"
},
"downloads": -1,
"filename": "leetcodeDriverPY-1.1.1.tar.gz",
"has_sig": false,
"md5_digest": "82342c289bbc850fe881dc3aa5b92f8b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5318,
"upload_time": "2023-01-03T00:09:14",
"upload_time_iso_8601": "2023-01-03T00:09:14.340761Z",
"url": "https://files.pythonhosted.org/packages/c0/4e/5c318704bb5687bdeddf60a9f726f20d41b1431afe1ba7be25e839a21605/leetcodeDriverPY-1.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-03 00:09:14",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "leetcodedriverpy"
}