ladok3 4.17__tar.gz → 4.18__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ladok3 might be problematic. Click here for more details.

Files changed (34) hide show
  1. {ladok3-4.17 → ladok3-4.18}/LICENSE +1 -1
  2. {ladok3-4.17 → ladok3-4.18}/PKG-INFO +28 -1
  3. {ladok3-4.17 → ladok3-4.18}/README.md +27 -0
  4. {ladok3-4.17 → ladok3-4.18}/doc/Makefile +4 -0
  5. {ladok3-4.17 → ladok3-4.18}/doc/ladok3.tex +4 -9
  6. {ladok3-4.17 → ladok3-4.18}/doc/preamble.tex +1 -0
  7. {ladok3-4.17 → ladok3-4.18}/pyproject.toml +1 -1
  8. {ladok3-4.17 → ladok3-4.18}/src/ladok3/api.nw +1001 -10
  9. {ladok3-4.17 → ladok3-4.18}/src/ladok3/ladok3.nw +70 -4
  10. {ladok3-4.17 → ladok3-4.18}/src/ladok3/report.nw +1 -1
  11. {ladok3-4.17 → ladok3-4.18}/src/ladok3/student.nw +20 -1
  12. ladok3-4.18/src/ladok3/undoc.nw +582 -0
  13. ladok3-4.17/src/ladok3/undoc.nw +0 -3639
  14. {ladok3-4.17 → ladok3-4.18}/doc/abstract.tex +0 -0
  15. {ladok3-4.17 → ladok3-4.18}/makefiles/doc.mk +0 -0
  16. {ladok3-4.17 → ladok3-4.18}/makefiles/exam.mk +0 -0
  17. {ladok3-4.17 → ladok3-4.18}/makefiles/haskell.mk +0 -0
  18. {ladok3-4.17 → ladok3-4.18}/makefiles/miun.course.mk +0 -0
  19. {ladok3-4.17 → ladok3-4.18}/makefiles/miun.depend.mk +0 -0
  20. {ladok3-4.17 → ladok3-4.18}/makefiles/miun.docs.mk +0 -0
  21. {ladok3-4.17 → ladok3-4.18}/makefiles/miun.port.mk +0 -0
  22. {ladok3-4.17 → ladok3-4.18}/makefiles/miun.pub.mk +0 -0
  23. {ladok3-4.17 → ladok3-4.18}/makefiles/noweb.mk +0 -0
  24. {ladok3-4.17 → ladok3-4.18}/makefiles/pkg.mk +0 -0
  25. {ladok3-4.17 → ladok3-4.18}/makefiles/portability.mk +0 -0
  26. {ladok3-4.17 → ladok3-4.18}/makefiles/pub.mk +0 -0
  27. {ladok3-4.17 → ladok3-4.18}/makefiles/results.mk +0 -0
  28. {ladok3-4.17 → ladok3-4.18}/makefiles/subdir.mk +0 -0
  29. {ladok3-4.17 → ladok3-4.18}/makefiles/tex.mk +0 -0
  30. {ladok3-4.17 → ladok3-4.18}/makefiles/transform.mk +0 -0
  31. {ladok3-4.17 → ladok3-4.18}/src/ladok3/.gitignore +0 -0
  32. {ladok3-4.17 → ladok3-4.18}/src/ladok3/Makefile +0 -0
  33. {ladok3-4.17 → ladok3-4.18}/src/ladok3/cli.nw +0 -0
  34. {ladok3-4.17 → ladok3-4.18}/src/ladok3/data.nw +0 -0
@@ -2,7 +2,7 @@ MIT License
2
2
 
3
3
  Copyright (c) 2020 Alexander Baltatzis
4
4
  Copyright (c) 2020 Gerald Q. Maguire Jr.
5
- Copyright (c) 2021--2024 Daniel Bosk
5
+ Copyright (c) 2021--2025 Daniel Bosk
6
6
 
7
7
  Permission is hereby granted, free of charge, to any person obtaining a
8
8
  copy of this software and associated documentation files (the "Software"),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ladok3
3
- Version: 4.17
3
+ Version: 4.18
4
4
  Summary: Python wrapper and CLI for the LADOK3 REST API.
5
5
  Home-page: https://github.com/dbosk/ladok3
6
6
  License: MIT
@@ -123,6 +123,33 @@ component_result.set_grade("P", "2021-03-15")
123
123
  component_result.finalize()
124
124
  ```
125
125
 
126
+ A better way is to use the `load_credentials` function of the CLI.
127
+ ```python
128
+ import ladok3
129
+ import ladok3.cli
130
+
131
+ ls = ladok3.LadokSession(*ladok3.cli.load_credentials())
132
+
133
+ student = ls.get_student("123456-1234")
134
+ # ...
135
+ ```
136
+
137
+ An even better way is to reuse the stored session to use the already built
138
+ cache.
139
+ ```python
140
+ import ladok3
141
+ import ladok3.cli
142
+
143
+ _, credentials = ladok3.cli.load_credentials()
144
+
145
+ ls = ladok3.cli.restore_ladok_session(credentials)
146
+
147
+ student = ls.get_student("123456-1234")
148
+ # ...
149
+
150
+ ladok3.cli.store_ladok_session(ls, credentials)
151
+ ```
152
+
126
153
  ## More documentation
127
154
 
128
155
  There are more detailed usage examples in the details documentation that can be
@@ -87,6 +87,33 @@ component_result.set_grade("P", "2021-03-15")
87
87
  component_result.finalize()
88
88
  ```
89
89
 
90
+ A better way is to use the `load_credentials` function of the CLI.
91
+ ```python
92
+ import ladok3
93
+ import ladok3.cli
94
+
95
+ ls = ladok3.LadokSession(*ladok3.cli.load_credentials())
96
+
97
+ student = ls.get_student("123456-1234")
98
+ # ...
99
+ ```
100
+
101
+ An even better way is to reuse the stored session to use the already built
102
+ cache.
103
+ ```python
104
+ import ladok3
105
+ import ladok3.cli
106
+
107
+ _, credentials = ladok3.cli.load_credentials()
108
+
109
+ ls = ladok3.cli.restore_ladok_session(credentials)
110
+
111
+ student = ls.get_student("123456-1234")
112
+ # ...
113
+
114
+ ladok3.cli.store_ladok_session(ls, credentials)
115
+ ```
116
+
90
117
  ## More documentation
91
118
 
92
119
  There are more detailed usage examples in the details documentation that can be
@@ -25,6 +25,8 @@ ladok3.pdf: ../examples/example_Student.py
25
25
  ladok3.pdf: ../examples/example_Course.py
26
26
  ladok3.pdf: ../examples/canvas2ladok.tex
27
27
 
28
+ ladok3.pdf: didactic.sty
29
+
28
30
  ../%::
29
31
  ${MAKE} -C $(dir $@) $(notdir $@)
30
32
 
@@ -44,3 +46,5 @@ distclean:
44
46
 
45
47
  INCLUDE_MAKEFILES=../makefiles
46
48
  include ${INCLUDE_MAKEFILES}/tex.mk
49
+ INCLUDE_DIDACTIC=./didactic
50
+ include ${INCLUDE_DIDACTIC}/didactic.mk
@@ -1,14 +1,9 @@
1
- \documentclass[a4paper,oneside]{book}
2
- \newenvironment{abstract}{}{}
3
- \usepackage{abstract}
1
+ \documentclass[a4paper,oneside]{memoir}
4
2
  \usepackage{noweb}
5
- % Needed to relax penalty for breaking code chunks across pages, otherwise
6
- % there might be a lot of space following a code chunk.
7
- \def\nwendcode{\endtrivlist \endgroup}
8
- \let\nwdocspar=\smallbreak
3
+ \noweboptions{breakcode,longchunks,longxref}
9
4
 
10
5
  \usepackage[hyphens]{url}
11
- \usepackage{hyperref}
6
+ \usepackage[colorlinks]{hyperref}
12
7
  \usepackage{authblk}
13
8
 
14
9
  \input{preamble.tex}
@@ -39,7 +34,7 @@
39
34
  \end{abstract}
40
35
  \clearpage
41
36
 
42
- \tableofcontents
37
+ \tableofcontents*
43
38
  \clearpage
44
39
 
45
40
  \mainmatter
@@ -53,3 +53,4 @@
53
53
  \Crefname{question}{Question}{Questions}
54
54
  \creflabelformat{question}{#2\textup{#1}#3}
55
55
 
56
+ \usepackage{didactic}
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "ladok3"
3
- version = "4.17"
3
+ version = "4.18"
4
4
  description = "Python wrapper and CLI for the LADOK3 REST API."
5
5
  authors = [
6
6
  "Daniel Bosk <dbosk@kth.se>",