edina / nbexchange

External exchange for nbgrader
Other
6 stars 2 forks source link

nbgrader list does not print anything #167

Closed ykazakov closed 1 month ago

ykazakov commented 1 month ago

After switching the standard exchange to nbexchange, some of the nbgrader commands suppress output. This could have been a result of #27.

Specifically, nbgrader list should "List inbound or outbound assignments in the nbgrader exchange. Intended for use by instructors and students." However the output is always empty.

One can turn the output with the --debug flag, however this is too verbose and not very readable:

$ nbgrader list --debug
[ListApp | DEBUG] Searching ['/home/student/.jupyter', '/home/student/.local/etc/jupyter', '/opt/conda/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
[ListApp | DEBUG] Looking for jupyter_config in /etc/jupyter
[ListApp | DEBUG] Looking for jupyter_config in /usr/local/etc/jupyter
[ListApp | DEBUG] Looking for jupyter_config in /opt/conda/etc/jupyter
[ListApp | DEBUG] Looking for jupyter_config in /home/student/.local/etc/jupyter
[ListApp | DEBUG] Looking for jupyter_config in /home/student/.jupyter
[ListApp | DEBUG] Looking for nbgrader_config in /etc/jupyter
[ListApp | DEBUG] Loaded config file: /etc/jupyter/nbgrader_config.py
[ListApp | DEBUG] Looking for nbgrader_config in /usr/local/etc/jupyter
[ListApp | DEBUG] Looking for nbgrader_config in /opt/conda/etc/jupyter
[ListApp | DEBUG] Loaded config file: /opt/conda/etc/jupyter/nbgrader_config.py
[ListApp | DEBUG] Looking for nbgrader_config in /home/student/.local/etc/jupyter
[ListApp | DEBUG] Looking for nbgrader_config in /home/student/.jupyter
[ListApp | DEBUG] Looking for nbgrader_config in /home/student
[ListApp | DEBUG] Looking for nbgrader_config in /home/student
[ListApp | DEBUG] Using authenticator: NoAuthPlugin
[ListApp | DEBUG] ExchaneList.list_file starting
[ListApp | DEBUG] service_url: http://jupyterhub:8000/cs101/services/nbexchange/
[ListApp | DEBUG] Exchange.api_request calling exchange with url http://jupyterhub:8000/cs101/services/nbexchange/assignments?course_id=cs101
[ListApp | DEBUG] Got back <Response [200]> when listing assignments
[ListApp | DEBUG] parse_assignment singular assignment returned: {'assignment_id': 'ps2', 'student_id': 2, 'course_id': 'cs101', 'status': 'released', 'path': '/var/run/nbexchange/storage/1/released/cs101/ps2/1727192330/8cc081b1-6dda-4305-90b1-98f207f24bb9.gz', 'notebooks': [{'notebook_id': 'part1', 'has_exchange_feedback': False, 'feedback_updated': False, 'feedback_timestamp': None}], 'timestamp': '2024-09-24 15:38:50.199355 '}
[ListApp | DEBUG] parse_assignment singular assignment returned: {'assignment_id': 'ps1', 'student_id': 2, 'course_id': 'cs101', 'status': 'fetched', 'path': '/var/run/nbexchange/storage/1/released/cs101/ps1/1727167602/5171a950-44b4-48e5-b7aa-ca8b6df846e1.gz', 'notebooks': [{'path': './ps1/problem1.ipynb', 'notebook_id': 'problem1', 'has_local_feedback': False, 'has_exchange_feedback': False, 'local_feedback_path': None, 'feedback_updated': False}, {'path': './ps1/problem2.ipynb', 'notebook_id': 'problem2', 'has_local_feedback': False, 'has_exchange_feedback': False, 'local_feedback_path': None, 'feedback_updated': False}], 'timestamp': '2024-09-24 08:46:42.239274 '}

Here is the output with the built-in exchange, for comparison:

$ nbgrader list
[ListApp | INFO] Released assignments:
[ListApp | INFO] cs101 ps1 (already downloaded)
[ListApp | INFO] cs101 ps2
perllaghu commented 1 month ago

Thank you for this.... there will be updates to the default plugins that we have not followed & added to the nbexchange plugins