small update to get better query mode working
This commit is contained in:
parent
ef011cda55
commit
d41712e010
4 changed files with 164 additions and 234 deletions
|
@ -94,6 +94,7 @@ class CourseBuilder:
|
||||||
|
|
||||||
# generate a compound column --query-compound column:sum
|
# generate a compound column --query-compound column:sum
|
||||||
if args.query_compound:
|
if args.query_compound:
|
||||||
|
print(args.query_compound)
|
||||||
df_q.loc[:,'form-of-instruction.sum'] = df_q['form-of-instruction'].apply(lambda x: sum(list(x.values())))
|
df_q.loc[:,'form-of-instruction.sum'] = df_q['form-of-instruction'].apply(lambda x: sum(list(x.values())))
|
||||||
|
|
||||||
# --query-sort is parameterized as min:credits - hence direction:column
|
# --query-sort is parameterized as min:credits - hence direction:column
|
||||||
|
@ -112,6 +113,7 @@ class CourseBuilder:
|
||||||
# set value transforms
|
# set value transforms
|
||||||
if args.query_template:
|
if args.query_template:
|
||||||
|
|
||||||
|
# no idea yet how to parameterize this
|
||||||
ww = 'written'
|
ww = 'written'
|
||||||
#df_q['form-of-exam'] = 'Schriftlich' if df_q.loc[:,'form-of-exam'] == 'written' else 'was anderes'
|
#df_q['form-of-exam'] = 'Schriftlich' if df_q.loc[:,'form-of-exam'] == 'written' else 'was anderes'
|
||||||
# mm = Template("{'written':'S','oral':'mündlich'}[${v}]")?
|
# mm = Template("{'written':'S','oral':'mündlich'}[${v}]")?
|
||||||
|
@ -122,7 +124,7 @@ class CourseBuilder:
|
||||||
'sum.credits': df_q['credits'].sum()
|
'sum.credits': df_q['credits'].sum()
|
||||||
}])
|
}])
|
||||||
|
|
||||||
# set labels
|
# set labels directly!
|
||||||
if args.query_labels:
|
if args.query_labels:
|
||||||
df_q.columns = args.query_labels
|
df_q.columns = args.query_labels
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Concept
|
# concept
|
||||||
|
|
||||||
The concept behind coursebuilder is to store curricula descriptions in `YAML` files that can be versioned in a git repository. Unlike classic databases an observable and well defined versioning is paramount in these descriptions as they are the legal foundation for study and exam regulations.
|
The concept behind coursebuilder is to store curricula descriptions in `YAML` files that can be versioned in a git repository. Unlike classic databases, an observable and well defined versioning is paramount in these descriptions as they are the legal foundation for study and exam regulations.
|
||||||
|
|
||||||
The following pieces play together here:
|
The following pieces play together here:
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
|
# debug make file for testing
|
||||||
build_dir := build
|
build_dir := build
|
||||||
target_en := ${build_dir}/table.en.pdf
|
target_en := ${build_dir}/table.en.pdf
|
||||||
target_de := ${build_dir}/table.de.pdf
|
target_de := ${build_dir}/table.de.pdf
|
||||||
|
|
258
test/schema.yaml
258
test/schema.yaml
|
@ -5,32 +5,27 @@
|
||||||
# Modulname
|
# Modulname
|
||||||
#
|
#
|
||||||
name:
|
name:
|
||||||
type: str
|
type: str
|
||||||
label:
|
label:
|
||||||
de: "Modulname"
|
de: "Modulname"
|
||||||
en: "name of course"
|
en: "name of course"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Modulverantwortliche:r
|
# Modulverantwortliche:r
|
||||||
#
|
#
|
||||||
instructor:
|
instructor:
|
||||||
type: str
|
type: str
|
||||||
label:
|
label:
|
||||||
de: "Modulverantwortlicher / Modulverantwortliche"
|
de: "Modulverantwortlicher / Modulverantwortliche"
|
||||||
en: "module instructor"
|
en: "module instructor"
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Kürzel / ID
|
# Kürzel / ID
|
||||||
#
|
#
|
||||||
id:
|
id:
|
||||||
type: str
|
type: str
|
||||||
translatable: false
|
translatable: false
|
||||||
label: {
|
label: { de: "Kürzel", en: "code" }
|
||||||
de: "Kürzel",
|
|
||||||
en: "code"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Qualifikationsziele
|
# Qualifikationsziele
|
||||||
|
@ -48,11 +43,8 @@ id:
|
||||||
# als Formulierungshilfe.
|
# als Formulierungshilfe.
|
||||||
|
|
||||||
goal:
|
goal:
|
||||||
type: str
|
type: str
|
||||||
label: {
|
label: { de: "Qualifikationsziele", en: "educational goal" }
|
||||||
de: "Qualifikationsziele",
|
|
||||||
en: "educational goal"
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Modulinhalte
|
# Modulinhalte
|
||||||
|
@ -64,11 +56,8 @@ goal:
|
||||||
# Es ist ein stichpunktartiges Inhaltsverzeichnis zu erstellen.
|
# Es ist ein stichpunktartiges Inhaltsverzeichnis zu erstellen.
|
||||||
|
|
||||||
content:
|
content:
|
||||||
type: str
|
type: str
|
||||||
label: {
|
label: { de: "Modulinhalte", en: "content" }
|
||||||
de: "Modulinhalte",
|
|
||||||
en: "content"
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Lehrform
|
# Lehrform
|
||||||
|
@ -82,40 +71,21 @@ content:
|
||||||
# Es sind nur Werte aus der Prüfungsordung zugelassen
|
# Es sind nur Werte aus der Prüfungsordung zugelassen
|
||||||
#
|
#
|
||||||
form-of-instruction:
|
form-of-instruction:
|
||||||
type: multikey
|
type: multikey
|
||||||
label: {
|
label: { de: "Lehrform(en)", en: "form of instruction" }
|
||||||
de: "Lehrform(en)",
|
keys:
|
||||||
en: "form of instruction"
|
{
|
||||||
|
"lecture": { de: "Vorlesung", en: "lecture" },
|
||||||
|
"lecture_seminar":
|
||||||
|
{ de: "Seminaristische Vorlesung", en: "lecture and seminar" },
|
||||||
|
"seminar": { de: "Seminar", en: "seminar" },
|
||||||
|
"exersise": { de: "Übung", en: "lab exersise" },
|
||||||
|
"pc_lab": { de: "Rechnergestütztes Praktikum", en: "PC exersise" },
|
||||||
|
"project": { de: "Project", en: "project" },
|
||||||
}
|
}
|
||||||
keys: {
|
template:
|
||||||
'lecture' : {
|
de: "{key} ({value}SWS)"
|
||||||
de: "Vorlesung",
|
en: "{key} ({value}SWS)"
|
||||||
en: "lecture"
|
|
||||||
},
|
|
||||||
'lecture_seminar' : {
|
|
||||||
de: "Seminaristische Vorlesung",
|
|
||||||
en: "lecture and seminar"
|
|
||||||
},
|
|
||||||
'seminar' : {
|
|
||||||
de: "Seminar",
|
|
||||||
en: "seminar"
|
|
||||||
},
|
|
||||||
'exersise' : {
|
|
||||||
de: "Übung",
|
|
||||||
en: "lab exersise"
|
|
||||||
},
|
|
||||||
'pc_lab' : {
|
|
||||||
de: "Rechnergestütztes Praktikum",
|
|
||||||
en: "PC exersise"
|
|
||||||
},
|
|
||||||
'project' : {
|
|
||||||
de: "Project",
|
|
||||||
en: "project"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
template:
|
|
||||||
de: "{key} ({value}SWS)"
|
|
||||||
en: "{key} ({value}SWS)"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Voraussetzungen für die Teilnahme
|
# Voraussetzungen für die Teilnahme
|
||||||
|
@ -129,11 +99,8 @@ form-of-instruction:
|
||||||
# Teilnahme im Vorfeld zu belegen sind.
|
# Teilnahme im Vorfeld zu belegen sind.
|
||||||
|
|
||||||
prerequisites:
|
prerequisites:
|
||||||
type: str
|
type: str
|
||||||
label: {
|
label: { de: "Voraussetzungen für die Teilnahme", en: "prerequisites" }
|
||||||
de: "Voraussetzungen für die Teilnahme",
|
|
||||||
en: "prerequisites"
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Literatur und multimediale Lehr- und Lernprogramme
|
# Literatur und multimediale Lehr- und Lernprogramme
|
||||||
|
@ -142,159 +109,120 @@ prerequisites:
|
||||||
# Wie können die Studierenden sich auf die Teilnahme an diesem Modul vorbereiten?
|
# Wie können die Studierenden sich auf die Teilnahme an diesem Modul vorbereiten?
|
||||||
#
|
#
|
||||||
teaching-material:
|
teaching-material:
|
||||||
type: str
|
type: str
|
||||||
label: {
|
label:
|
||||||
de: "Literatur und multimediale Lehr- und Lernprogramme",
|
{
|
||||||
en: "media of instruction"
|
de: "Literatur und multimediale Lehr- und Lernprogramme",
|
||||||
|
en: "media of instruction",
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Lehrbriefautor
|
# Lehrbriefautor
|
||||||
#
|
#
|
||||||
author-of-indenture:
|
author-of-indenture:
|
||||||
type: str
|
type: str
|
||||||
label: {
|
label: { de: "Lehrbriefautor", en: "author of indenture" }
|
||||||
de: "Lehrbriefautor",
|
|
||||||
en: "author of indenture"
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Verwendung in (Studienprogramm)
|
# Verwendung in (Studienprogramm)
|
||||||
#
|
#
|
||||||
used-in:
|
used-in:
|
||||||
type: str
|
type: str
|
||||||
label: {
|
label: { de: "Verwendung", en: "used in study programs" }
|
||||||
de: "Verwendung",
|
|
||||||
en: "used in study programs"
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Arbeitsaufwand
|
# Arbeitsaufwand
|
||||||
#
|
#
|
||||||
workload:
|
workload:
|
||||||
type: str
|
type: str
|
||||||
label: {
|
label: { de: "Arbeitsaufwand / Gesamtworkload", en: "workload" }
|
||||||
de: "Arbeitsaufwand / Gesamtworkload",
|
|
||||||
en: "workload"
|
|
||||||
}
|
|
||||||
#
|
#
|
||||||
# credits/ECTS
|
# credits/ECTS
|
||||||
#
|
#
|
||||||
credits:
|
credits:
|
||||||
type: num
|
type: num
|
||||||
unit: ECTS
|
unit: ECTS
|
||||||
label: {
|
label:
|
||||||
en: "credits and weight of mark",
|
{
|
||||||
de: "Kreditpunkte und Gewichtung der Note in der Gesamtnote"
|
en: "credits and weight of mark",
|
||||||
|
de: "Kreditpunkte und Gewichtung der Note in der Gesamtnote",
|
||||||
}
|
}
|
||||||
template:
|
template:
|
||||||
de: "{value}CP, Gewichtung: {value}CP von 120CP "
|
de: "{value}CP, Gewichtung: {value}CP von 120CP "
|
||||||
en: "{value}CP, weight: {value} / 120 "
|
en: "{value}CP, weight: {value} / 120 "
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Leistungsnachweis
|
# Leistungsnachweis
|
||||||
#
|
#
|
||||||
form-of-exam:
|
form-of-exam:
|
||||||
type: enum
|
type: enum
|
||||||
label: {
|
label: { de: "Leistungsnachweis", en: "form of examination" }
|
||||||
de: "Leistungsnachweis",
|
values:
|
||||||
en: "form of examination"
|
{
|
||||||
|
"written": { de: "Schriftliche Prüfung", en: "written exam" },
|
||||||
|
"oral": { de: "Mündliche Prüfung", en: "oral exam" },
|
||||||
|
"alternative":
|
||||||
|
{ de: "Alternative Prüfungunsleistung", en: "alternative examination" },
|
||||||
}
|
}
|
||||||
values: {
|
spec: true
|
||||||
'written' : {
|
template:
|
||||||
de: "Schriftliche Prüfung",
|
de: "{value} ({spec})"
|
||||||
en: "written exam"
|
en: "{value} ({spec})"
|
||||||
},
|
|
||||||
'oral' : {
|
|
||||||
de: "Mündliche Prüfung",
|
|
||||||
en: "oral exam"
|
|
||||||
},
|
|
||||||
'alternative' : {
|
|
||||||
de: "Alternative Prüfungunsleistung",
|
|
||||||
en: "alternative examination"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
spec: true
|
|
||||||
template:
|
|
||||||
de: "{value} ({spec})"
|
|
||||||
en: "{value} ({spec})"
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Semester
|
# Semester
|
||||||
#
|
#
|
||||||
term:
|
term:
|
||||||
type: multinum
|
type: multinum
|
||||||
label: {
|
label: { de: "Semester", en: "term" }
|
||||||
de: "Semester",
|
template:
|
||||||
en: "term"
|
de: "{value}\\. Semester"
|
||||||
}
|
en: "{value}\\. semester"
|
||||||
template:
|
|
||||||
de: "{value}\\. Semester"
|
|
||||||
en: "{value}\\. semester"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Häufigkeit des Angebots
|
# Häufigkeit des Angebots
|
||||||
#
|
#
|
||||||
frequency:
|
frequency:
|
||||||
type: enum
|
type: enum
|
||||||
label: {
|
label: { de: "Häufigkeit des Angebots", en: "frequency of Offer" }
|
||||||
de: "Häufigkeit des Angebots",
|
values:
|
||||||
en: "frequency of Offer"
|
{
|
||||||
}
|
"once_per_term": { de: "jedes Semester", en: "every semester" },
|
||||||
values: {
|
"once_per_year":
|
||||||
'once_per_term' : {
|
{ de: "einmal im Studienjahr", en: "once per study year" },
|
||||||
de: "jedes Semester",
|
|
||||||
en: "every semester"
|
|
||||||
},
|
|
||||||
'once_per_year' : {
|
|
||||||
de: "einmal im Studienjahr",
|
|
||||||
en: "once per study year"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Dauer des Angebots
|
# Dauer des Angebots
|
||||||
#
|
#
|
||||||
duration:
|
duration:
|
||||||
type: int
|
type: int
|
||||||
label:
|
label:
|
||||||
de: Dauer
|
de: Dauer
|
||||||
en: duration
|
en: duration
|
||||||
template:
|
template:
|
||||||
de: "{value} Semester"
|
de: "{value} Semester"
|
||||||
en: "{value} term(s)"
|
en: "{value} term(s)"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Art der Veranstaltung
|
# Art der Veranstaltung
|
||||||
#
|
#
|
||||||
kind:
|
kind:
|
||||||
type: enum
|
type: enum
|
||||||
label: {
|
label:
|
||||||
de: 'Art der Veranstaltung (Pflicht, Wahl, etc.)',
|
{
|
||||||
en: 'kind of module (compulsory, elective)'
|
de: "Art der Veranstaltung (Pflicht, Wahl, etc.)",
|
||||||
|
en: "kind of module (compulsory, elective)",
|
||||||
}
|
}
|
||||||
values: {
|
values:
|
||||||
'compulsory': {
|
{
|
||||||
de: "Pflicht",
|
"compulsory": { de: "Pflicht", en: "compulsory" },
|
||||||
en: "compulsory"
|
"elective": { de: "Wahl/Wahlpflicht", en: "elective" },
|
||||||
},
|
|
||||||
'elective' : {
|
|
||||||
de: "Wahl/Wahlpflicht",
|
|
||||||
en: "elective"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Freiform Bemerkungen
|
# Freiform Bemerkungen
|
||||||
#
|
#
|
||||||
remarks:
|
remarks:
|
||||||
type: str
|
type: str
|
||||||
label: {
|
label: { de: "Besonderes", en: "remarks" }
|
||||||
de: "Besonderes",
|
|
||||||
en: "remarks"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue