-
Notifications
You must be signed in to change notification settings - Fork 22
Howto create a new checker
ifrh edited this page Feb 20, 2022
·
4 revisions
1. Create a new checker subclass in src/praktomat/checker/checker. An annotated skeleton of such an checker can be found in documentation/ExampleChecker.py.
2. Add the name of the new checker class to the __all__
list of src/praktomat/checker/checker/__init__.py
. (Otherwise bin/praktomat would not find it.)
3. Create a new migration for the database by running:
- from Django 1.7 upwards migrations are built into the core of Django. (Documentation can be found here: https://docs.djangoproject.com/en/2.2/topics/migrations/) If you add
--name SOMENAME
as parameter tomakemigrations
you can define a semantic meaningfull name of migrationfile:
./Praktomat/src/manage-local.py makemigrations --noinput
+ Added model checker.ExampleChecker
Created 0004_auto__add_examplechecker.py. You can now apply this migration with: ./manage.py migrate checker
- If you are running a previous version, you use South. (That Documatation for migrations can be found here: http://south.aeracode.org/)
./bin/praktomat schemamigration checker --auto
+ Added model checker.ExampleChecker
Created 0004_auto__add_examplechecker.py. You can now apply this migration with: ./manage.py migrate checker
4. Update the database by running:
./bin/praktomat migrate checker
Running migrations for checker:
- Migrating forwards to 0004_auto__add_examplechecker.
> checker:0004_auto__add_examplechecker
- Loading initial data for checker.
No fixtures found.