Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jupyter/nbgrader
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0fc9858827120c6c1c727c40b5531e664427d083
Choose a base ref
..
head repository: jupyter/nbgrader
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b995709cc103d8ff3fe7d5cc9c60032eac7f417d
Choose a head ref
5 changes: 1 addition & 4 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
@@ -17,12 +17,9 @@ jobs:
uses: actions/checkout@v2
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Install Dependencies
run: |
pip install -e ".[dev]"
- name: Check Release
if: ${{ matrix.group == 'check_release' }}
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v1
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Link Check
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
network-timeout 300000
52 changes: 50 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,56 @@ A summary of changes to nbgrader.

<!-- <START NEW CHANGELOG ENTRY> -->

## 0.8.2

([Full Changelog](https://github.com/jupyter/nbgrader/compare/v0.8.1...f262e3b37b30af59ab2fcc31a245cec6360c2271))

### Enhancements made

- Make execute preprocessor traits configurable [#1690](https://github.com/jupyter/nbgrader/pull/1690) ([@tmetzl](https://github.com/tmetzl))

### Bugs fixed

- Fix validation for failed cells with zero points [#1731](https://github.com/jupyter/nbgrader/pull/1731) ([@tuncbkose](https://github.com/tuncbkose))
- Changed quickstart example [#1725](https://github.com/jupyter/nbgrader/pull/1725) ([@tuncbkose](https://github.com/tuncbkose))
- Fix view feedback link when root_dir is set [#1675](https://github.com/jupyter/nbgrader/pull/1675) ([@brichet](https://github.com/brichet))
- Fix Docker image for demo [#1674](https://github.com/jupyter/nbgrader/pull/1674) ([@brichet](https://github.com/brichet))
- Debug installation methods [#1671](https://github.com/jupyter/nbgrader/pull/1671) ([@blink1073](https://github.com/blink1073))

### Maintenance and upkeep improvements

- Update to Jupyter Releaser v2 [#1766](https://github.com/jupyter/nbgrader/pull/1766) ([@jtpio](https://github.com/jtpio))
- Updates yarn network timeout [#1765](https://github.com/jupyter/nbgrader/pull/1765) ([@brichet](https://github.com/brichet))
- Removes dependency to MarkupSafe\<2.2.0 [#1764](https://github.com/jupyter/nbgrader/pull/1764) ([@brichet](https://github.com/brichet))
- Unpin nbclassic [#1763](https://github.com/jupyter/nbgrader/pull/1763) ([@brichet](https://github.com/brichet))
- Loosen the traitlets version requirement [#1760](https://github.com/jupyter/nbgrader/pull/1760) ([@shreve](https://github.com/shreve))
- Bump webpack from 5.73.0 to 5.76.1 [#1754](https://github.com/jupyter/nbgrader/pull/1754) ([@dependabot](https://github.com/dependabot))
- Bump vega from 5.22.1 to 5.24.0 [#1752](https://github.com/jupyter/nbgrader/pull/1752) ([@dependabot](https://github.com/dependabot))
- Upgrade python requirement [#1750](https://github.com/jupyter/nbgrader/pull/1750) ([@brichet](https://github.com/brichet))
- Unpin dependency on pytest and pytest-xdist [#1748](https://github.com/jupyter/nbgrader/pull/1748) ([@brichet](https://github.com/brichet))
- Adapts timeout in tests to avoid cancelled nbextension tests [#1745](https://github.com/jupyter/nbgrader/pull/1745) ([@brichet](https://github.com/brichet))
- Remove the notification during UI tests, to fix a failing test [#1743](https://github.com/jupyter/nbgrader/pull/1743) ([@brichet](https://github.com/brichet))
- Remove codecov badge [#1741](https://github.com/jupyter/nbgrader/pull/1741) ([@brichet](https://github.com/brichet))
- Fixes for testing CI [#1737](https://github.com/jupyter/nbgrader/pull/1737) ([@tuncbkose](https://github.com/tuncbkose))
- Bump http-cache-semantics from 4.1.0 to 4.1.1 [#1732](https://github.com/jupyter/nbgrader/pull/1732) ([@dependabot](https://github.com/dependabot))
- Bump json5 from 1.0.1 to 1.0.2 [#1720](https://github.com/jupyter/nbgrader/pull/1720) ([@dependabot](https://github.com/dependabot))
- Pin jupyter_server\<2 [#1719](https://github.com/jupyter/nbgrader/pull/1719) ([@brichet](https://github.com/brichet))
- Update traitlets requirement from \<5.2.0 to \<5.7.0 [#1704](https://github.com/jupyter/nbgrader/pull/1704) ([@dependabot](https://github.com/dependabot))
- Bump loader-utils from 1.4.0 to 1.4.2 [#1702](https://github.com/jupyter/nbgrader/pull/1702) ([@dependabot](https://github.com/dependabot))
- Allow current working directory for nbgrader config file only [#1698](https://github.com/jupyter/nbgrader/pull/1698) ([@brichet](https://github.com/brichet))
- Bump pytest-xdist from 2.5.0 to 3.0.2 [#1695](https://github.com/jupyter/nbgrader/pull/1695) ([@dependabot](https://github.com/dependabot))
- Bump pytest from 7.1.2 to 7.2.0 [#1694](https://github.com/jupyter/nbgrader/pull/1694) ([@dependabot](https://github.com/dependabot))
- Update nbclassic requirement from \<0.4.0 to \<0.5.0 [#1693](https://github.com/jupyter/nbgrader/pull/1693) ([@dependabot](https://github.com/dependabot))
- Fixes selenium tests [#1677](https://github.com/jupyter/nbgrader/pull/1677) ([@brichet](https://github.com/brichet))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/jupyter/nbgrader/graphs/contributors?from=2022-09-27&to=2023-03-28&type=c))

[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fnbgrader+involves%3Ablink1073+updated%3A2022-09-27..2023-03-28&type=Issues) | [@brichet](https://github.com/search?q=repo%3Ajupyter%2Fnbgrader+involves%3Abrichet+updated%3A2022-09-27..2023-03-28&type=Issues) | [@dependabot](https://github.com/search?q=repo%3Ajupyter%2Fnbgrader+involves%3Adependabot+updated%3A2022-09-27..2023-03-28&type=Issues) | [@github-actions](https://github.com/search?q=repo%3Ajupyter%2Fnbgrader+involves%3Agithub-actions+updated%3A2022-09-27..2023-03-28&type=Issues) | [@jtpio](https://github.com/search?q=repo%3Ajupyter%2Fnbgrader+involves%3Ajtpio+updated%3A2022-09-27..2023-03-28&type=Issues) | [@meeseeksmachine](https://github.com/search?q=repo%3Ajupyter%2Fnbgrader+involves%3Ameeseeksmachine+updated%3A2022-09-27..2023-03-28&type=Issues) | [@perllaghu](https://github.com/search?q=repo%3Ajupyter%2Fnbgrader+involves%3Aperllaghu+updated%3A2022-09-27..2023-03-28&type=Issues) | [@shreve](https://github.com/search?q=repo%3Ajupyter%2Fnbgrader+involves%3Ashreve+updated%3A2022-09-27..2023-03-28&type=Issues) | [@tmetzl](https://github.com/search?q=repo%3Ajupyter%2Fnbgrader+involves%3Atmetzl+updated%3A2022-09-27..2023-03-28&type=Issues) | [@tuncbkose](https://github.com/search?q=repo%3Ajupyter%2Fnbgrader+involves%3Atuncbkose+updated%3A2022-09-27..2023-03-28&type=Issues)

<!-- <END NEW CHANGELOG ENTRY> -->

## 0.8.1

([Full Changelog](https://github.com/jupyter/nbgrader/compare/v0.8.0...9a85dc1fb76c2f39cd50ea1a3c2619c660905300))
@@ -18,8 +68,6 @@ A summary of changes to nbgrader.

[@blink1073](https://github.com/search?q=repo%3Ajupyter%2Fnbgrader+involves%3Ablink1073+updated%3A2022-08-22..2022-09-26&type=Issues) | [@github-actions](https://github.com/search?q=repo%3Ajupyter%2Fnbgrader+involves%3Agithub-actions+updated%3A2022-08-22..2022-09-26&type=Issues)

<!-- <END NEW CHANGELOG ENTRY> -->

## 0.8.0

([Full Changelog](https://github.com/jupyter/nbgrader/compare/v0.7.0...16d53c511b10ea2fa7802bd74c4c0ca79c3e68c4))
1 change: 0 additions & 1 deletion demos/restart_demo.sh
Original file line number Diff line number Diff line change
@@ -43,7 +43,6 @@ install_dependencies () {
apt install -y npm
npm install -g configurable-http-proxy
apt install -y python3-pip
pip3 install -U nbclassic==0.3.7
pip3 install -U jupyterlab
pip3 install -U jupyterhub
}
2 changes: 1 addition & 1 deletion nbgrader/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version_info = (0, 8, 1, "", "")
version_info = (0, 8, 2, "", "")
__version__ = ".".join(map(str, version_info[:3])) + "".join(version_info[3:])
9 changes: 7 additions & 2 deletions nbgrader/exchange/default/list.py
Original file line number Diff line number Diff line change
@@ -172,8 +172,13 @@ def parse_assignments(self):
info['has_exchange_feedback'] = has_exchange_feedback
info['feedback_updated'] = feedback_updated
if has_local_feedback:
info['local_feedback_path'] = os.path.join(
assignment_dir, 'feedback', info['timestamp'])
full_path_assignment_dir = os.path.abspath(assignment_dir)
if os.path.exists(full_path_assignment_dir):
info['local_feedback_path'] = os.path.join(
full_path_assignment_dir, 'feedback', info['timestamp'])
else:
info['local_feedback_path'] = os.path.join(
assignment_dir, 'feedback', info['timestamp'])
else:
info['local_feedback_path'] = None

2 changes: 1 addition & 1 deletion nbgrader/nbextensions/assignment_list/main.js
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ define([
], function(Jupyter, $, utils, AssignmentList) {
"use strict";

var nbgrader_version = "0.8.1";
var nbgrader_version = "0.8.2";

var ajax = utils.ajax || $.ajax;
// Notebook v4.3.1 enabled xsrf so use notebooks ajax that includes the
2 changes: 1 addition & 1 deletion nbgrader/nbextensions/course_list/main.js
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ define([
], function(Jupyter, $, utils, CourseList) {
"use strict";

var nbgrader_version = "0.8.1";
var nbgrader_version = "0.8.2";

var ajax = utils.ajax || $.ajax;
// Notebook v4.3.1 enabled xsrf so use notebooks ajax that includes the
2 changes: 1 addition & 1 deletion nbgrader/nbextensions/validate_assignment/main.js
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ define([
], function ($, Jupyter, dialog, utils) {
"use strict";

var nbgrader_version = "0.8.1";
var nbgrader_version = "0.8.2";

var ajax = utils.ajax || $.ajax;
// Notebook v4.3.1 enabled xsrf so use notebooks ajax that includes the
34 changes: 27 additions & 7 deletions nbgrader/preprocessors/execute.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from nbconvert.preprocessors import ExecutePreprocessor, CellExecutionError
from traitlets import Bool, List, Integer
from traitlets import Bool, List, Integer, validate, TraitError
from textwrap import dedent

from . import NbGraderPreprocessor
@@ -14,10 +14,32 @@ class UnresponsiveKernelError(Exception):

class Execute(NbGraderPreprocessor, ExecutePreprocessor):

interrupt_on_timeout = Bool(True)
allow_errors = Bool(True)
raise_on_iopub_timeout = Bool(True)
timeout = Integer(30)
timeout = Integer(
30,
help=ExecutePreprocessor.timeout.help,
allow_none=True,
).tag(config=True)

interrupt_on_timeout = Bool(
True,
help=ExecutePreprocessor.interrupt_on_timeout.help
).tag(config=True)

allow_errors = Bool(
True,
help=dedent(
"""
When a cell execution results in an error, continue executing the rest of
the notebook. If False, the thrown nbclient exception would break aspects of
output rendering.
"""
),
)

raise_on_iopub_timeout = Bool(
True,
help=ExecutePreprocessor.raise_on_iopub_timeout.help
).tag(config=True)

error_on_timeout = {
"ename": "CellTimeoutError",
@@ -42,9 +64,7 @@ class Execute(NbGraderPreprocessor, ExecutePreprocessor):
).tag(config=True)

def on_cell_executed(self, **kwargs):

cell = kwargs['cell']
cell_index = kwargs['cell_index']
reply = kwargs['execute_reply']
if reply['content']['status'] == 'error':
error_recorded = False
6 changes: 6 additions & 0 deletions nbgrader/server_extensions/assignment_list/handlers.py
Original file line number Diff line number Diff line change
@@ -148,6 +148,12 @@ def list_submitted_assignments(self, course_id=None):
}
else:
for assignment in assignments:
for submission in assignment["submissions"]:
if submission['local_feedback_path'] \
and os.path.exists(submission['local_feedback_path']):
submission['local_feedback_path'] = \
os.path.relpath(submission['local_feedback_path'],
self._root_dir)
assignment["submissions"] = sorted(
assignment["submissions"],
key=lambda x: x["timestamp"])
7 changes: 6 additions & 1 deletion nbgrader/tests/apps/test_nbgrader_autograde.py
Original file line number Diff line number Diff line change
@@ -105,6 +105,11 @@ def test_showtraceback_exploit(self, db, course_dir):
self._copy_file(join("files", "submitted-unchanged.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
run_nbgrader(["generate_assignment", "ps1", "--db", db])

# This exploit previously caused cell executions that would indefinitely hang.
# See: https://github.com/ipython/ipython/commit/fd34cf5
with open("nbgrader_config.py", "a") as fh:
fh.write("""c.Execute.timeout = None""")

self._copy_file(join("files", "submitted-unchanged.ipynb"), join(course_dir, "submitted", "foo", "ps1", "p1.ipynb"))
self._copy_file(join("files", "submitted-changed.ipynb"), join(course_dir, "submitted", "bar", "ps1", "p1.ipynb"))
self._copy_file(join("files", "submitted-cheat-attempt.ipynb"), join(course_dir, "submitted", "spam", "ps1", "p1.ipynb"))
@@ -995,7 +1000,7 @@ def test_infinite_loop(self, db, course_dir):
run_nbgrader(["db", "student", "add", "foo", "--db", db])
run_nbgrader(["db", "student", "add", "bar", "--db", db])
with open("nbgrader_config.py", "a") as fh:
fh.write("""c.ExecutePreprocessor.timeout = 1""")
fh.write("""c.Execute.timeout = 1""")

self._copy_file(join("files", "infinite-loop.ipynb"), join(course_dir, "source", "ps1", "p1.ipynb"))
run_nbgrader(["generate_assignment", "ps1", "--db", db])
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nbgrader",
"version": "0.8.1",
"version": "0.8.2",
"description": "nbgrader nodejs dependencies",
"keywords": [
"jupyter",
17 changes: 10 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -32,25 +32,24 @@ classifiers = [
]
dependencies = [
"alembic>=1.7",
"ipython>=8.10.0",
"ipywidgets>=7.6",
"Jinja2>=3",
"jsonschema>=3",
"jupyter_client<8",
"jupyter_server>=1.12,<2",
"jupyterlab<4",
"jupyterlab_server",
"MarkupSafe<2.2.0",
"nbclassic<0.5.0",
"nbclient>=0.6.1",
"nbconvert>=6",
"notebook>=6.4,<7",
"python-dateutil>=2.8",
"rapidfuzz>=1.8",
"requests>=2.26",
"sqlalchemy>=1.4,<2",
"traitlets<5.7.0",
"traitlets>5.0,<6",
]
version = "0.8.1"
version = "0.8.2"

[project.license]
file = "LICENSE"
@@ -74,8 +73,8 @@ tests = [
"pytest-cov",
"pytest-rerunfailures",
"pytest-tornasync",
"pytest-xdist==3.0.2",
"pytest==7.2.0",
"pytest-xdist",
"pytest",
"requests-mock",
"selenium>=4.3",
"wheel",
@@ -150,13 +149,14 @@ after-bump-version = [
before-build-npm = [
"python -m pip install 'jupyterlab<4'",
"jlpm",
"jlpm build:prod",
]
before-build-python = [
"jlpm clean:all",
]

[tool.tbump.version]
current = "0.8.1"
current = "0.8.2"
regex = '''
(?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
((?P<channel>a|b|rc|.dev)(?P<release>\d+))?
@@ -202,3 +202,6 @@ default = ""
[[tool.tbump.field]]
name = "release"
default = ""

[tool.check-wheel-contents]
ignore = ["W002", "W004"]
2 changes: 1 addition & 1 deletion src/assignment_list/index.ts
Original file line number Diff line number Diff line change
@@ -150,7 +150,7 @@ class AssignmentListWidget extends Widget {
checkNbGraderVersion() {
var warning = this.node.getElementsByClassName('version_error')[0] as HTMLDivElement;
warning.hidden=false;
requestAPI<any>('nbgrader_version?version='+"0.8.1")
requestAPI<any>('nbgrader_version?version='+"0.8.2")
.then(response => {
if (!response['success']) {
warning.innerText = response['message'];
2 changes: 1 addition & 1 deletion src/course_list/index.ts
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@ class CourseListWidget extends Widget {
}

checkNbGraderVersion() {
let nbgrader_version = '0.8.1';
let nbgrader_version = '0.8.2';
requestAPI<any>('nbgrader_version?version='+nbgrader_version)
.then(response => {
if (!response['success']) {
2 changes: 1 addition & 1 deletion src/validate_assignment/index.ts
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ import { requestAPI } from './validateassignment';

import { showNbGraderDialog, validate } from '../common/validate';

var nbgrader_version = "0.8.1"; // TODO: hardcoded value
var nbgrader_version = "0.8.2"; // TODO: hardcoded value

const PLUGIN_ID = "nbgrader/validate-assignment"

Loading