microsoft / pybryt

Python library for pedagogical auto-assessment
https://microsoft.github.io/pybryt
MIT License
63 stars 19 forks source link

Annotation for requiring/forbidding the use of specific functions #85

Closed chrispyles closed 3 years ago

chrispyles commented 3 years ago

Instructors should be able to write annotations for asserting the use or non-use of specific functions.

This change is somewhat complicated, as it will involve editing the trace function to track information that it is not currently tracking (which function is being traced and to what package it belongs, namely).

ranigb commented 3 years ago

This one may be relevant: https://docs.python.org/3/library/trace.html

chrispyles commented 3 years ago

I think we decided to resolve this issue by instead tracking function calls and letting the instructor use some post-grading process to assert conditions on this information.

92 implements this feature by updating the tracing function and exposes the list of calls as (filename, function name) tuples in StudentImplementation.calls.