Skip to content

Commit

Permalink
Merge pull request #149 from DigiKlausur/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
tmetzl authored Aug 29, 2023
2 parents 3a1ba76 + bdd2aa3 commit 5b5bf5e
Show file tree
Hide file tree
Showing 378 changed files with 35,856 additions and 12,473 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Lint with black
name: Format with black

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: psf/black@stable
6 changes: 3 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.8, 3.9, '3.10', 3.11]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Lint with Ruff
on: [ push, pull_request ]

jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: chartboost/ruff-action@v1
6 changes: 3 additions & 3 deletions .github/workflows/sonar-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
python-version: [3.9]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -39,7 +39,7 @@ jobs:
pytest --cov
coverage xml -i
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
uses: SonarSource/sonarcloud-github-action@v2.0.0
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Node modules

node_modules

# Build static files
e2xgrader/static

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -127,3 +134,6 @@ dmypy.json

# Pyre type checker
.pyre/

# vscode
.vscode/
26 changes: 26 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
repos:
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black

- repo: https://github.com/PyCQA/isort
rev: 5.11.5
hooks:
- id: isort
files: \.py$
args: [--profile=black]

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.267"
hooks:
- id: ruff

- repo: local
hooks:
- id: prettier
name: prettier
entry: 'npm run prettier:files'
language: node
language_version: system
types_or: [json, markdown, ts, tsx, javascript, jsx, css]
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
recursive-include e2xgrader/static *

72 changes: 62 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,69 @@
# e2xgrader

[![PyPi](https://img.shields.io/pypi/v/e2xgrader)](https://pypi.org/project/e2xgrader)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=DigiKlausur_e2xgrader&metric=alert_status)](https://sonarcloud.io/dashboard?id=DigiKlausur_e2xgrader)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=DigiKlausur_e2xgrader&metric=coverage)](https://sonarcloud.io/dashboard?id=DigiKlausur_e2xgrader)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=DigiKlausur_e2xgrader&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=DigiKlausur_e2xgrader)
[![Docs](https://img.shields.io/readthedocs/e2xgrader)](https://e2xgrader.readthedocs.io)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

e2xgrader is an add-on for nbgrader that adds functionality for teachers and students.
e2xgrader introduces new cell types and tools for graders (per question grading view, authoring component, pen-based grading) and students (assignment toolbar, exam toolbar, restricted notebook extension).
Please refer to the [documenation](https://e2xgrader.readthedocs.io) for further information.

*Currently e2xgrader works with notebook<7 or nbclassic. We are working on porting the notebook extension to lab extensions*

## Screenshots

A multiple choice cell:
![multiplechoice](docs/source/user_docs/cells/img/mc_render.png)
<br/>

An annotated student answer:
![annotation](docs/source/user_docs/img/annotate_answer.png)
<br/>


A per question grading view for teachers:
![task_view](docs/source/user_docs/img/task_view.png)
<br/>


A help extension to make docs and other files available to students:
![help_extension](docs/source/user_docs/img/help_tab.png)
<br/>


An assignment toolbar for students:
![assignment_toolbar](docs/source/user_docs/img/assignment_toolbar_md.png)
<br/>

An exam toolbar for students:
![exam_toolbar](docs/source/user_docs/img/exam_toolbar.png)
<br/>

## Install

To install e2xgrader, execute:

```bash
pip install e2xgrader
```

## Change Mode

e2xgrader comes in three different modes, `teacher`, `student` and `student_exam`.
You can switch between them:
```bash
e2xgrader activate teacher --sys-prefix
e2xgrader activate student --sys-prefix
e2xgrader activate student_exam --sys-prefix
```

E2xgrader is an add on for nbgrader. All information can be found under https://digiklausur.github.io/e2xgrader/e2xgrader.html
## Uninstall

It comes with the following features:
To uninstall, execute:

- Multiple and single choice cells
- Exporting of grades via a web interface
- Per cell grading view
- Hashing of student submissions
- Permuting assignments during fetching
```bash
e2xgrader deactivate --sys-prefix
pip uninstall e2xgrader
```
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pydata-sphinx-theme
27 changes: 27 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = "e2xgrader"
copyright = "2023, Tim Metzler"
author = "Tim Metzler"
release = "0.1.0-dev3"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = []

templates_path = ["_templates"]
exclude_patterns = []


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "pydata_sphinx_theme"
html_static_path = ["_static"]
Loading

0 comments on commit 5b5bf5e

Please sign in to comment.