Name | tmc-course JSON |
Version |
1.0.0b6
JSON |
| download |
home_page | |
Summary | TMC course and assignment creation helper |
upload_time | 2023-03-13 11:19:44 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.9 |
license | Copyright (c) 2023 Leo Leppänen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
testmycode
tmc
helper
teacher
tool
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# TMC Course creation helper
![linux](https://github.com/ljleppan/tmc-course/actions/workflows/linux.yml/badge.svg?event=push)![windows](https://github.com/ljleppan/tmc-course/actions/workflows/windows.yml/badge.svg?event=push)
`tmc-course` helps with managing (python-based) TestMyCode courses by allowing you to initialize, update and test them.
# Installing
```
pip install tmc-course
```
# Usage
```
usage: tmc-course [-h] [--version] [--quiet | --debug] ACTION ...
Helper for building TestMyCode python programming courses
positional arguments:
ACTION
init Initialize a new course, part or assignment
test Test a new course, part or assignment
update Update TMC-python-runner embedded in assignments
options:
-h, --help show this help message and exit
--version show program's version number and exit
--quiet, -q Only output warning
--debug, -d Output debugging information
```
## `tmc-course init` - Initialize new courses, parts and assignments
Run the `init` command to initialize a new course, part of assignment from a project skeleton that contains the files required by TMC to function correctly.
### Initialize new course
```
usage: tmc-course init course [-h] path [path ...]
positional arguments:
path Path(s) of the new course(s)
options:
-h, --help show this help message and exit
```
### Initialize new part
Parts are collections of assignments
```
usage: tmc-course init part [-h] path [path ...]
positional arguments:
path Path(s) of the new part(s)
options:
-h, --help show this help message and exit
```
### Initialize new assignment
Assignments are initialized in either English (`-e`) or Finnish (`-f`). The freshly initialized assignments are built with a skeleton structure which showcases the use of tests and points, and contains the additional files required by TMC.
```
usage: tmc-course init assignment [-h] (-e | -f) path [path ...]
positional arguments:
path Path(s) of the new assignment(s)
options:
-h, --help show this help message and exit
-e, --english Use English language templates
-f, --finnish Use Finnish language templates
```
### `tmc-course update` Update TMC files
The `update` command updates the files required by TMC for all assignments
```
usage: tmc-course update [-h] path
positional arguments:
path Course root directory
options:
-h, --help show this help message and exit
```
### `tmc-course test` Run tests for the course
Use the `test` command to run the tests for a course, part or assignment the same way the TMC server would run them. This verifies your model solutions pass the tests.
```
usage: tmc-course test [-h] [--details] path [path ...]
positional arguments:
path Path(s) to test (course, part or assignment)
options:
-h, --help show this help message and exit
--details Show more details about test results
```
By default, detailed information is only shown about assignments that fail
their tests. Use `--details` to show additional help.
### As a `pre-commit` hook
`tmc-course` can be used as a [`pre-commit`](https://pre-commit.com/#filtering-files-with-types) hook. When set up correctly, `tmc-course test` is ran for the repository on commit.
To use `tmc-course` as a `pre-commit` hook, add the the following config:
```
- repo: https://github.com/ljleppan/tmc-course
rev: v1.0.0b6
hooks:
- id: tmc-course
```
## Development
### Installing
```
pip install .[dev]
pre-commit install
```
### Pre-commit hooks
The repo comes set up for a combination of `mypy`, `black`, `flake8` and `isort`. These are all set up as `pre-commit` hooks. Assuming you run `pre-commit install` as shown above, these will automatically run whenever you attempt to commit code into git. I suggest running `mypy` using `--strict`.
### Tox and tests
Run `tox` to manually run all pre-commit hooks and tests. Tests fail if test coverage goes below 80 %.
Raw data
{
"_id": null,
"home_page": "",
"name": "tmc-course",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "",
"keywords": "TestMyCode,TMC,helper,teacher,tool",
"author": "",
"author_email": "Leo Lepp\u00e4nen <leo.leppanen@helsinki.fi>",
"download_url": "https://files.pythonhosted.org/packages/44/51/51c0122b2178deace615aefb9f77834763ff03c6edf18bfa5969cbe3efdf/tmc-course-1.0.0b6.tar.gz",
"platform": null,
"description": "# TMC Course creation helper\n![linux](https://github.com/ljleppan/tmc-course/actions/workflows/linux.yml/badge.svg?event=push)![windows](https://github.com/ljleppan/tmc-course/actions/workflows/windows.yml/badge.svg?event=push)\n\n`tmc-course` helps with managing (python-based) TestMyCode courses by allowing you to initialize, update and test them.\n\n# Installing\n```\npip install tmc-course\n```\n\n# Usage\n\n```\nusage: tmc-course [-h] [--version] [--quiet | --debug] ACTION ...\n\nHelper for building TestMyCode python programming courses\n\npositional arguments:\n ACTION\n init Initialize a new course, part or assignment\n test Test a new course, part or assignment\n update Update TMC-python-runner embedded in assignments\n\noptions:\n -h, --help show this help message and exit\n --version show program's version number and exit\n --quiet, -q Only output warning\n --debug, -d Output debugging information\n```\n\n## `tmc-course init` - Initialize new courses, parts and assignments\n\nRun the `init` command to initialize a new course, part of assignment from a project skeleton that contains the files required by TMC to function correctly.\n\n### Initialize new course\n```\nusage: tmc-course init course [-h] path [path ...]\n\npositional arguments:\n path Path(s) of the new course(s)\n\noptions:\n -h, --help show this help message and exit\n```\n\n### Initialize new part\nParts are collections of assignments\n```\nusage: tmc-course init part [-h] path [path ...]\n\npositional arguments:\n path Path(s) of the new part(s)\n\noptions:\n -h, --help show this help message and exit\n```\n\n### Initialize new assignment\nAssignments are initialized in either English (`-e`) or Finnish (`-f`). The freshly initialized assignments are built with a skeleton structure which showcases the use of tests and points, and contains the additional files required by TMC.\n```\nusage: tmc-course init assignment [-h] (-e | -f) path [path ...]\n\npositional arguments:\n path Path(s) of the new assignment(s)\n\noptions:\n -h, --help show this help message and exit\n -e, --english Use English language templates\n -f, --finnish Use Finnish language templates\n```\n\n### `tmc-course update` Update TMC files\nThe `update` command updates the files required by TMC for all assignments\n```\nusage: tmc-course update [-h] path\n\npositional arguments:\n path Course root directory\n\noptions:\n -h, --help show this help message and exit\n```\n\n### `tmc-course test` Run tests for the course\nUse the `test` command to run the tests for a course, part or assignment the same way the TMC server would run them. This verifies your model solutions pass the tests.\n\n```\nusage: tmc-course test [-h] [--details] path [path ...]\n\npositional arguments:\n path Path(s) to test (course, part or assignment)\n\noptions:\n -h, --help show this help message and exit\n --details Show more details about test results\n```\n\nBy default, detailed information is only shown about assignments that fail\ntheir tests. Use `--details` to show additional help.\n\n### As a `pre-commit` hook\n`tmc-course` can be used as a [`pre-commit`](https://pre-commit.com/#filtering-files-with-types) hook. When set up correctly, `tmc-course test` is ran for the repository on commit.\n\nTo use `tmc-course` as a `pre-commit` hook, add the the following config:\n```\n - repo: https://github.com/ljleppan/tmc-course\n rev: v1.0.0b6\n hooks:\n - id: tmc-course\n```\n\n## Development\n### Installing\n```\npip install .[dev]\npre-commit install\n```\n\n### Pre-commit hooks\nThe repo comes set up for a combination of `mypy`, `black`, `flake8` and `isort`. These are all set up as `pre-commit` hooks. Assuming you run `pre-commit install` as shown above, these will automatically run whenever you attempt to commit code into git. I suggest running `mypy` using `--strict`.\n\n### Tox and tests\nRun `tox` to manually run all pre-commit hooks and tests. Tests fail if test coverage goes below 80 %.\n",
"bugtrack_url": null,
"license": "Copyright (c) 2023 Leo Lepp\u00e4nen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "TMC course and assignment creation helper",
"version": "1.0.0b6",
"split_keywords": [
"testmycode",
"tmc",
"helper",
"teacher",
"tool"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cb64ef65b55d18d6e0c205c378b85794aad68b3e065d54e3b54f25cf85098f80",
"md5": "4bf7747669def1ed4a9e052c04b0828c",
"sha256": "7899a1c8b322c3346325dd49cef13a46b95c8af3ee2e1fcf6d9ef022fc01139f"
},
"downloads": -1,
"filename": "tmc_course-1.0.0b6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4bf7747669def1ed4a9e052c04b0828c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 12852,
"upload_time": "2023-03-13T11:19:41",
"upload_time_iso_8601": "2023-03-13T11:19:41.355310Z",
"url": "https://files.pythonhosted.org/packages/cb/64/ef65b55d18d6e0c205c378b85794aad68b3e065d54e3b54f25cf85098f80/tmc_course-1.0.0b6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "445151c0122b2178deace615aefb9f77834763ff03c6edf18bfa5969cbe3efdf",
"md5": "6e51eb859530e48b22615d56155f361c",
"sha256": "28d5f6ac241d91a8062808974ef2000475f575f084e44b5703bceb75a76d3d2d"
},
"downloads": -1,
"filename": "tmc-course-1.0.0b6.tar.gz",
"has_sig": false,
"md5_digest": "6e51eb859530e48b22615d56155f361c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 138235,
"upload_time": "2023-03-13T11:19:44",
"upload_time_iso_8601": "2023-03-13T11:19:44.160278Z",
"url": "https://files.pythonhosted.org/packages/44/51/51c0122b2178deace615aefb9f77834763ff03c6edf18bfa5969cbe3efdf/tmc-course-1.0.0b6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-13 11:19:44",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "tmc-course"
}