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
|
||||||
|
|
164
test/schema.yaml
164
test/schema.yaml
|
@ -19,18 +19,13 @@ instructor:
|
||||||
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
|
||||||
|
@ -49,10 +44,7 @@ id:
|
||||||
|
|
||||||
goal:
|
goal:
|
||||||
type: str
|
type: str
|
||||||
label: {
|
label: { de: "Qualifikationsziele", en: "educational goal" }
|
||||||
de: "Qualifikationsziele",
|
|
||||||
en: "educational goal"
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Modulinhalte
|
# Modulinhalte
|
||||||
|
@ -65,10 +57,7 @@ goal:
|
||||||
|
|
||||||
content:
|
content:
|
||||||
type: str
|
type: str
|
||||||
label: {
|
label: { de: "Modulinhalte", en: "content" }
|
||||||
de: "Modulinhalte",
|
|
||||||
en: "content"
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Lehrform
|
# Lehrform
|
||||||
|
@ -83,35 +72,16 @@ content:
|
||||||
#
|
#
|
||||||
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" },
|
||||||
keys: {
|
"lecture_seminar":
|
||||||
'lecture' : {
|
{ de: "Seminaristische Vorlesung", en: "lecture and seminar" },
|
||||||
de: "Vorlesung",
|
"seminar": { de: "Seminar", en: "seminar" },
|
||||||
en: "lecture"
|
"exersise": { de: "Übung", en: "lab exersise" },
|
||||||
},
|
"pc_lab": { de: "Rechnergestütztes Praktikum", en: "PC exersise" },
|
||||||
'lecture_seminar' : {
|
"project": { de: "Project", en: "project" },
|
||||||
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:
|
template:
|
||||||
de: "{key} ({value}SWS)"
|
de: "{key} ({value}SWS)"
|
||||||
|
@ -130,10 +100,7 @@ form-of-instruction:
|
||||||
|
|
||||||
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
|
||||||
|
@ -143,9 +110,10 @@ prerequisites:
|
||||||
#
|
#
|
||||||
teaching-material:
|
teaching-material:
|
||||||
type: str
|
type: str
|
||||||
label: {
|
label:
|
||||||
|
{
|
||||||
de: "Literatur und multimediale Lehr- und Lernprogramme",
|
de: "Literatur und multimediale Lehr- und Lernprogramme",
|
||||||
en: "media of instruction"
|
en: "media of instruction",
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -153,83 +121,60 @@ teaching-material:
|
||||||
#
|
#
|
||||||
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",
|
en: "credits and weight of mark",
|
||||||
de: "Kreditpunkte und Gewichtung der Note in der Gesamtnote"
|
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" },
|
||||||
values: {
|
"oral": { de: "Mündliche Prüfung", en: "oral exam" },
|
||||||
'written' : {
|
"alternative":
|
||||||
de: "Schriftliche Prüfung",
|
{ de: "Alternative Prüfungunsleistung", en: "alternative examination" },
|
||||||
en: "written exam"
|
|
||||||
},
|
|
||||||
'oral' : {
|
|
||||||
de: "Mündliche Prüfung",
|
|
||||||
en: "oral exam"
|
|
||||||
},
|
|
||||||
'alternative' : {
|
|
||||||
de: "Alternative Prüfungunsleistung",
|
|
||||||
en: "alternative examination"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
spec: true
|
spec: true
|
||||||
template:
|
template:
|
||||||
de: "{value} ({spec})"
|
de: "{value} ({spec})"
|
||||||
en: "{value} ({spec})"
|
en: "{value} ({spec})"
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Semester
|
# Semester
|
||||||
#
|
#
|
||||||
term:
|
term:
|
||||||
type: multinum
|
type: multinum
|
||||||
label: {
|
label: { de: "Semester", en: "term" }
|
||||||
de: "Semester",
|
|
||||||
en: "term"
|
|
||||||
}
|
|
||||||
template:
|
template:
|
||||||
de: "{value}\\. Semester"
|
de: "{value}\\. Semester"
|
||||||
en: "{value}\\. semester"
|
en: "{value}\\. semester"
|
||||||
|
@ -239,19 +184,12 @@ term:
|
||||||
#
|
#
|
||||||
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"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -271,19 +209,15 @@ duration:
|
||||||
#
|
#
|
||||||
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: {
|
|
||||||
'compulsory': {
|
|
||||||
de: "Pflicht",
|
|
||||||
en: "compulsory"
|
|
||||||
},
|
|
||||||
'elective' : {
|
|
||||||
de: "Wahl/Wahlpflicht",
|
|
||||||
en: "elective"
|
|
||||||
}
|
}
|
||||||
|
values:
|
||||||
|
{
|
||||||
|
"compulsory": { de: "Pflicht", en: "compulsory" },
|
||||||
|
"elective": { de: "Wahl/Wahlpflicht", en: "elective" },
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -291,10 +225,4 @@ kind:
|
||||||
#
|
#
|
||||||
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