{"id":19866028,"url":"https://github.com/okpy/jassign","last_synced_at":"2026-03-08T21:38:03.619Z","repository":{"id":62572158,"uuid":"165753762","full_name":"okpy/jassign","owner":"okpy","description":"Author and distribute Jupyter notebook assignments","archived":false,"fork":false,"pushed_at":"2021-06-10T23:28:41.000Z","size":107,"stargazers_count":7,"open_issues_count":6,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-25T04:05:07.833Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/okpy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-14T23:53:32.000Z","updated_at":"2021-08-25T02:46:21.000Z","dependencies_parsed_at":"2022-11-03T18:26:17.654Z","dependency_job_id":null,"html_url":"https://github.com/okpy/jassign","commit_stats":null,"previous_names":["okpy/jupyter-assignment"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/okpy/jassign","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okpy%2Fjassign","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okpy%2Fjassign/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okpy%2Fjassign/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okpy%2Fjassign/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/okpy","download_url":"https://codeload.github.com/okpy/jassign/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/okpy%2Fjassign/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30274831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T20:45:49.896Z","status":"ssl_error","status_checked_at":"2026-03-08T20:45:49.525Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T15:24:48.744Z","updated_at":"2026-03-08T21:38:03.589Z","avatar_url":"https://github.com/okpy.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jassign: Jupyter Notebook Assignments\n\n**This project is DEPRECATED because its functionality now exists in [otter grader](https://github.com/ucbds-infra/otter-grader). Use that instead!**\n\nFormat and tools for authoring and distributing Jupyter notebook assignments\n\nRequires: **Python 3** (even if it's installed, check that it's your working version `python --version`)\n\n\n## Getting started\nCourse instructors author assignments as Jupyter notebooks by creating a\nnotebook that contains setup code, questions, solutions, and tests to validate\nthose solutions. This project prepares an assignment to be distributed to\nstudents and later scored automatically.\n\nThe [notebook format](docs/notebook-format.md) is not specific to a programming\nlanguage or autograding framework, but was designed to be used with\n[okpy](https://github.com/okpy/ok), which is Python based. Contributions to\nsupport other testing frameworks, such as [nbgrader[](), and other programming\nlanguages are welcome.\n\nAn example notebook appears in `tests/example.ipynb`, which uses the [notebook\nformat](docs/notebook-format.md). To convert it, run:\n\n```python\njassign tests/example.ipynb tests/output some/course\n```\n\n\n* `tests/example.ipynb`: an example notebook path that you'll need to replace with the _path to the master solution notebook_, which was augmented with the metadata and commands from the [notebook format](docs/notebook-format.md).\n* `tests/output`: _the path to where the output will be stored_ \n  * the output contains two directories `autograder` and `student`\n  * the `autograder` directory contains the full set of tests and a solution notebook (a solution notebook is different from the master notebook, because it is not formatted accordidng to the [notebook format](docs/notebook-format.md) but instead looks like the student notebook with solutions)\n  * the `student` directory contains an automatically created redacted version. \n  * **Note**: currently, the output directories will **not** contain the data files, e.g., csv or json files, that you used when creating the master notebook: make sure you add them to the `student` directory before releasing it to students\n* `some/course` is the endpoint/path of the assignment that's listed on okpy (typically starts with your university abbreviation and has a course name in it, ending with the assignment name).\n\n\nBefore you run the `jassign` command, make sure that you **run the entire notebook** top to bottom (`Cell -\u003e Run All`) to make sure that every cell has the correct output -- the output of the cells will be turned into the appropriate tests stored in the provided output directory (second argument of the `jassign` command). If you change the tests, you need to re-generate the files by re-running the notebook and the `jassign` command. **Note**: `jassign` will issue an error and quit if the output directory already exists.\n\n\n\n\nYou can then generate a PDF from the result:\n\n```python\njassign-pdf tests/output/autograder/example.ipynb tests/output/autograder/example.pdf\n```\n\n\n## Caution\n\n#### Test outside of a question\n\n```\nFile \"/opt/conda/lib/python3.6/site-packages/jassign/to_ok.py\", line 141, in gen_ok_cells\n    assert not is_test_cell(cell), 'Test outside of a question: ' + str(cell)\nAssertionError: Test outside of a question:\n```\n\nIf you get this error, this means that you have _more than one cell_ between the markdown cell that declared the question (i.e., the one that contains `#BEGIN QUESTION`) and the cell that contains the `# TEST`. \n\n\n**SOLUTION**: remove the extra code/markdown cell(s) either between the solution cell and the markdown cell with the `#BEGIN QUESTION` or between the solution cell and the `# TEST` cell.\n\n#### Test cell with a blank on the last line\n\nIf your test contains a blank/newline after the test, jassign seems to automatically add a semicolon at the end of the test, thus, supressing the output of the command.\n\nExample:\n\n```\n# TEST\nmovies.head(1)['plots'][0]=='Two imprisoned men bond over a number of years, finding solace and eventual redemption through acts of common decency.'\n\n```\n\nTurns into the following failed test in the students' notebook:\n\n```\n\u003e\u003e\u003e movies.head(1)['plots'][0]=='Two imprisoned men bond over a number of years, finding solace and eventual redemption through acts of common decency.';\n\u003e\u003e\u003e \n\n# Error: expected\n#     True\n# but got\n\n```\n\n**SOLUTION**: remove the blank line at the end of the `# TEST` cell.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokpy%2Fjassign","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fokpy%2Fjassign","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fokpy%2Fjassign/lists"}