Add updated documentation and tests
This commit is contained in:
parent
bd910e09e0
commit
5576b58949
15 changed files with 63 additions and 29 deletions
|
@ -1,14 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
for d in $(cat abgaben.txt)
|
||||
do
|
||||
time=$(echo $d | cut -d',' -f1)
|
||||
tag=$(echo $d | cut -d',' -f2)
|
||||
now=$(date --iso-8601)
|
||||
|
||||
if [[ "$time" < "$now" ]] || [[ "$time" = "$now" ]]
|
||||
then
|
||||
git tag ${tag}
|
||||
git push --tags
|
||||
fi
|
||||
done
|
13
deadline.sh
13
deadline.sh
|
@ -1,13 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
read -p "Enter a name for the exercise (used for tag name): " exercise_name
|
||||
|
||||
read -p "Are you sure you want to create a new tag? This will cause a new tag to be created in each student project and run JPlag on the solutions. [N/y]: " cont
|
||||
|
||||
if [ ${cont} == 'y' ] || [ ${cont} == 'Y' ]
|
||||
then
|
||||
git tag "${exercise_name}"
|
||||
git push --tag
|
||||
fi
|
|
@ -14,7 +14,7 @@
|
|||
#
|
||||
import os
|
||||
import sys
|
||||
sys.path.insert(0, os.path.abspath('.'))
|
||||
sys.path.insert(0, os.path.abspath('../src'))
|
||||
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
|
@ -22,5 +22,14 @@ Indices and tables
|
|||
.. automodule:: abgabesystem
|
||||
:members:
|
||||
|
||||
.. autoclass:: abgabesystem.Student
|
||||
.. automodule:: abgabesystem.projects
|
||||
:members:
|
||||
|
||||
.. automodule:: abgabesystem.students
|
||||
:members:
|
||||
|
||||
.. automodule:: abgabesystem.commands
|
||||
:members:
|
||||
|
||||
.. autoclass:: abgabesystem.students.Student
|
||||
:members:
|
2
setup.cfg
Normal file
2
setup.cfg
Normal file
|
@ -0,0 +1,2 @@
|
|||
[aliases]
|
||||
test=pytest
|
1
tests/.#test_students.py
Symbolic link
1
tests/.#test_students.py
Symbolic link
|
@ -0,0 +1 @@
|
|||
tim@metis.680:1534753335
|
0
tests/__init.py__
Normal file
0
tests/__init.py__
Normal file
8
tests/test_auth.py
Normal file
8
tests/test_auth.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
import gitlab
|
||||
|
||||
|
||||
def auth(config="/tmp/python-gitlab.cfg"):
|
||||
gl = gitlab.Gitlab.from_config(config_files=[config])
|
||||
gl.auth()
|
||||
|
||||
return gl
|
27
tests/test_commands.py
Normal file
27
tests/test_commands.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
import gitlab
|
||||
|
||||
from abgabesystem.commands import create_users, projects, deadline, plagiates, course
|
||||
|
||||
|
||||
gl = gitlab.Gitlab.from_config()
|
||||
gl.auth()
|
||||
|
||||
|
||||
def test_create_users():
|
||||
pass
|
||||
|
||||
|
||||
def test_courses():
|
||||
pass
|
||||
|
||||
|
||||
def test_projects():
|
||||
pass
|
||||
|
||||
|
||||
def test_deadlines():
|
||||
pass
|
||||
|
||||
|
||||
def test_plagiates():
|
||||
pass
|
0
tests/test_projects.py
Normal file
0
tests/test_projects.py
Normal file
0
tests/test_students.py
Normal file
0
tests/test_students.py
Normal file
14
tox.ini
Normal file
14
tox.ini
Normal file
|
@ -0,0 +1,14 @@
|
|||
# tox (https://tox.readthedocs.io/) is a tool for running tests
|
||||
# in multiple virtualenvs. This configuration file will run the
|
||||
# test suite on all supported python versions. To use it, "pip install tox"
|
||||
# and then run "tox" from this directory.
|
||||
|
||||
[tox]
|
||||
envlist = py37
|
||||
|
||||
[testenv]
|
||||
deps =
|
||||
pytest
|
||||
python-gitlab
|
||||
commands =
|
||||
pytest
|
Loading…
Add table
Add a link
Reference in a new issue