Skip to main content

Client library for XDiscussion - links autograder errors to Ed Discussion threads

Project description

XDiscussion Client

The purpose of the XDiscussion client is to capture errors and provide students with some possible related discussion threads on Ed Discussion.

For best results, ensure you return error messages to students rather than obscuring them:

XDISCUSSION_ADDRESS = ("http://127.0.0.1", 5050)
# In a Question in grader.py
except Exception as e:
    error_str = f"{e.__class__.__name__}: {e}"
    self.add_message(error_str)
    matches = get_formatted_matches(XDISCUSSION_ADDRESS, error_str)
    if matches:
        self.add_message(matches)

Example Usage

Create a .env file inside /server with the following contents

ED_API_TOKEN=
XD_COURSE_ID=67912
XD_CONFIG_PATH=./config

Note: This example expects you to have access to course 67912, which you may not.

cd server
docker build . -t xdiscussion
docker run -p "5050:5050" -t xdiscussion

# In another terminal
cd client/examples
python3 grader.py -s Example_Assignment.ipynb

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xdiscussion-0.1.0.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xdiscussion-0.1.0-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file xdiscussion-0.1.0.tar.gz.

File metadata

  • Download URL: xdiscussion-0.1.0.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for xdiscussion-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c331a38e7148fc890856748900673bbe313e4a44a0fec80a457e3c2110581de3
MD5 a691dde25607ee5f402ccc3fe8f1421f
BLAKE2b-256 3eb5b959136ffa9294c96afb492693d038e333befe509d376298d239001eaa90

See more details on using hashes here.

Provenance

The following attestation bundles were made for xdiscussion-0.1.0.tar.gz:

Publisher: publish-client.yml on aiea-lab/xdiscussion

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xdiscussion-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: xdiscussion-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for xdiscussion-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 27f76ed2de1e5b88e724d45a83afcdc22574b2a08189e7c3a2db40afc738a6b6
MD5 8053d11bd676a13876681c198dbd9ee3
BLAKE2b-256 39f4d26772e27838eefa1d0f224eab99261356e48fd7a0c819342223c2ce1a82

See more details on using hashes here.

Provenance

The following attestation bundles were made for xdiscussion-0.1.0-py3-none-any.whl:

Publisher: publish-client.yml on aiea-lab/xdiscussion

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page