librus-python-api 1.12.0__tar.gz → 1.12.1__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.
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/API.md +3 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/CHANGELOG.md +15 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/PKG-INFO +21 -4
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/README.md +20 -3
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/pyproject.toml +3 -1
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/__init__.py +1 -1
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/attendance_frequency.py +0 -1
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/config.py +0 -1
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/diagnostics.py +0 -1
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/grade_records.py +1 -1
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/markup.py +0 -1
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/school_year_archive.py +34 -21
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/service.py +0 -9
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/.gitignore +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/LICENSE +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/SECURITY.md +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/_notification_bootstrap.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/_notification_codec.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/_storage.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/_windows_filesystem.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/announcements.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/attachment_routes.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/attachments.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/attendance.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/budget.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/checkpoint.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/class_free_days.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/completed_lessons.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/detail_fields.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/exceptions.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/files.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/formative_grades.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/gateway_grades.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/grade_parsers.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/homework_range.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/inspect_page.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/justifications.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/lifecycle.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/message_content.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/messages.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/models.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/modern_body.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/modern_mailbox.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/modern_messages.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/notification_models.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/notification_persistence.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/notification_workflow.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/notifications.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/parsers.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/parsing.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/persistence.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/py.typed +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/recipients.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/scheduler.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/school_reads.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/sending.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/timetable.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/transport.py +0 -0
- {librus_python_api-1.12.0 → librus_python_api-1.12.1}/uv.lock +0 -0
|
@@ -336,6 +336,9 @@ selection or chart request. This is separate from the modern message archive.
|
|
|
336
336
|
not asserted to equal `SubjectGradeSummary.annual`.
|
|
337
337
|
- `ArchiveDescriptive(label, text)` keeps whole-year text, with explicit BR
|
|
338
338
|
boundaries as newlines. Source whitespace is normalized.
|
|
339
|
+
- One grade row can hold marks in some years and text in others (1.12.1). Each
|
|
340
|
+
year lists it under `subjects` or `descriptive` by that year's cells, so a
|
|
341
|
+
label can appear in both families across years, never twice in one year.
|
|
339
342
|
- `behaviour_first_semester` and `behaviour_second_semester_and_year_end` retain
|
|
340
343
|
positional text. Populated behaviour semantics have not been observed.
|
|
341
344
|
- `ArchiveAbsences(unexcused, excused, late)` contains `ArchiveCounts` with the
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.12.1 (2026-11-30) - School-year archive rows mixing marks and text
|
|
4
|
+
|
|
5
|
+
- School-year archive: a grade row may hold three marks for one year and a
|
|
6
|
+
descriptive text cell for another. Such rows appeared once Synergia filled
|
|
7
|
+
the archive with the previous year, and every archive read on that login
|
|
8
|
+
failed with `UNSUPPORTED_CAPABILITY`. Each year now lists the row under
|
|
9
|
+
`subjects` or `descriptive` by its own cells; any other geometry is still
|
|
10
|
+
unsupported.
|
|
11
|
+
- Weekly live check: a view Synergia itself marks as unavailable for now
|
|
12
|
+
(`temporarily_unavailable`, such as the school-year archive while it is
|
|
13
|
+
filled with last year's data) is listed under Warnings and no longer fails
|
|
14
|
+
the run. The notice stayed up for days and failed every run although
|
|
15
|
+
nothing had drifted. The release profile still fails on it, since that view
|
|
16
|
+
was not read.
|
|
17
|
+
|
|
3
18
|
## 1.12.0 (2026-11-24) - Attendance on schools' own types; colons in grade comments
|
|
4
19
|
|
|
5
20
|
Follow-ups to librus-mcp#136, found by comparing each check with public Librus
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: librus-python-api
|
|
3
|
-
Version: 1.12.
|
|
3
|
+
Version: 1.12.1
|
|
4
4
|
Summary: Independent bounded async Librus Synergia client
|
|
5
5
|
Project-URL: Repository, https://github.com/krzysztofbury/librus-python-api
|
|
6
6
|
Project-URL: Issues, https://github.com/krzysztofbury/librus-python-api/issues
|
|
@@ -36,13 +36,20 @@ Use it in personal scripts, notification services or application backends. One
|
|
|
36
36
|
service can manage multiple logins while keeping their sessions and data separate.
|
|
37
37
|
It is not an official Librus product.
|
|
38
38
|
|
|
39
|
+
> **Unofficial project.** This is an independent, private open-source project.
|
|
40
|
+
> It is not affiliated with, endorsed by or sponsored by Librus or its owner.
|
|
41
|
+
> "Librus" and "Librus Synergia" are trademarks of their owner, named here only
|
|
42
|
+
> to say which service this software works with. See
|
|
43
|
+
> [Trademarks and affiliation](#trademarks-and-affiliation).
|
|
44
|
+
|
|
39
45
|
**Requirements:** Python 3.13 or newer. Disk workflows require a trusted local
|
|
40
46
|
POSIX filesystem on Linux/macOS, or a fixed local NTFS volume on Windows with
|
|
41
47
|
private ACLs. Windows installations include `pywin32` and `tzdata` automatically.
|
|
42
48
|
Network paths, reparse-point paths and unsafe storage permissions fail closed.
|
|
43
49
|
See [platform requirements](contracts/persistence.md#windows-disk-boundary-25).
|
|
44
50
|
|
|
45
|
-
**Status:** `1.12.
|
|
51
|
+
**Status:** `1.12.1` reads school-year archive rows that hold marks for one
|
|
52
|
+
year and text for another. `1.12.0` resolves a school's own attendance types, counts
|
|
46
53
|
attendance whose lesson or subject cannot be resolved apart instead of failing
|
|
47
54
|
the subject frequency read, keeps grade comment lines that hold a colon as
|
|
48
55
|
text and groups repeated gateway validation errors. `1.11.5` reads gateway attendance records whose ID is not a
|
|
@@ -93,7 +100,7 @@ See [limitations](#supported-features-and-limitations) below.
|
|
|
93
100
|
Install the exact release from PyPI after its gated publication completes:
|
|
94
101
|
|
|
95
102
|
```sh
|
|
96
|
-
python -m pip install librus-python-api==1.12.
|
|
103
|
+
python -m pip install librus-python-api==1.12.1
|
|
97
104
|
```
|
|
98
105
|
|
|
99
106
|
Pin the exact version qualified by your application. Before publication, use a
|
|
@@ -109,7 +116,7 @@ python -m pip install .
|
|
|
109
116
|
To install a locally built wheel instead:
|
|
110
117
|
|
|
111
118
|
```sh
|
|
112
|
-
python -m pip install ./dist/librus_python_api-1.12.
|
|
119
|
+
python -m pip install ./dist/librus_python_api-1.12.1-py3-none-any.whl
|
|
113
120
|
```
|
|
114
121
|
|
|
115
122
|
No console script or background process is installed: import the library in your
|
|
@@ -331,6 +338,16 @@ school data to public reports.
|
|
|
331
338
|
|
|
332
339
|
MIT licensed. See [LICENSE][license].
|
|
333
340
|
|
|
341
|
+
## Trademarks and affiliation
|
|
342
|
+
|
|
343
|
+
This is an independent, private open-source project. It is not affiliated with,
|
|
344
|
+
endorsed by, sponsored by or otherwise connected to Librus or its owner, and it
|
|
345
|
+
is not an official Librus product. "Librus", "Librus Synergia" and related
|
|
346
|
+
names and logos are trademarks of their owner. They are used here only to
|
|
347
|
+
describe which service this software works with; the author claims no rights to
|
|
348
|
+
them. Use of the service through this software remains subject to the
|
|
349
|
+
service's own terms.
|
|
350
|
+
|
|
334
351
|
[api]: https://github.com/krzysztofbury/librus-python-api/blob/main/API.md
|
|
335
352
|
[upgrade]: https://github.com/krzysztofbury/librus-python-api/blob/main/contracts/account-context.md
|
|
336
353
|
[verification]: https://github.com/krzysztofbury/librus-python-api/blob/main/VERIFICATION.md
|
|
@@ -10,13 +10,20 @@ Use it in personal scripts, notification services or application backends. One
|
|
|
10
10
|
service can manage multiple logins while keeping their sessions and data separate.
|
|
11
11
|
It is not an official Librus product.
|
|
12
12
|
|
|
13
|
+
> **Unofficial project.** This is an independent, private open-source project.
|
|
14
|
+
> It is not affiliated with, endorsed by or sponsored by Librus or its owner.
|
|
15
|
+
> "Librus" and "Librus Synergia" are trademarks of their owner, named here only
|
|
16
|
+
> to say which service this software works with. See
|
|
17
|
+
> [Trademarks and affiliation](#trademarks-and-affiliation).
|
|
18
|
+
|
|
13
19
|
**Requirements:** Python 3.13 or newer. Disk workflows require a trusted local
|
|
14
20
|
POSIX filesystem on Linux/macOS, or a fixed local NTFS volume on Windows with
|
|
15
21
|
private ACLs. Windows installations include `pywin32` and `tzdata` automatically.
|
|
16
22
|
Network paths, reparse-point paths and unsafe storage permissions fail closed.
|
|
17
23
|
See [platform requirements](contracts/persistence.md#windows-disk-boundary-25).
|
|
18
24
|
|
|
19
|
-
**Status:** `1.12.
|
|
25
|
+
**Status:** `1.12.1` reads school-year archive rows that hold marks for one
|
|
26
|
+
year and text for another. `1.12.0` resolves a school's own attendance types, counts
|
|
20
27
|
attendance whose lesson or subject cannot be resolved apart instead of failing
|
|
21
28
|
the subject frequency read, keeps grade comment lines that hold a colon as
|
|
22
29
|
text and groups repeated gateway validation errors. `1.11.5` reads gateway attendance records whose ID is not a
|
|
@@ -67,7 +74,7 @@ See [limitations](#supported-features-and-limitations) below.
|
|
|
67
74
|
Install the exact release from PyPI after its gated publication completes:
|
|
68
75
|
|
|
69
76
|
```sh
|
|
70
|
-
python -m pip install librus-python-api==1.12.
|
|
77
|
+
python -m pip install librus-python-api==1.12.1
|
|
71
78
|
```
|
|
72
79
|
|
|
73
80
|
Pin the exact version qualified by your application. Before publication, use a
|
|
@@ -83,7 +90,7 @@ python -m pip install .
|
|
|
83
90
|
To install a locally built wheel instead:
|
|
84
91
|
|
|
85
92
|
```sh
|
|
86
|
-
python -m pip install ./dist/librus_python_api-1.12.
|
|
93
|
+
python -m pip install ./dist/librus_python_api-1.12.1-py3-none-any.whl
|
|
87
94
|
```
|
|
88
95
|
|
|
89
96
|
No console script or background process is installed: import the library in your
|
|
@@ -305,6 +312,16 @@ school data to public reports.
|
|
|
305
312
|
|
|
306
313
|
MIT licensed. See [LICENSE][license].
|
|
307
314
|
|
|
315
|
+
## Trademarks and affiliation
|
|
316
|
+
|
|
317
|
+
This is an independent, private open-source project. It is not affiliated with,
|
|
318
|
+
endorsed by, sponsored by or otherwise connected to Librus or its owner, and it
|
|
319
|
+
is not an official Librus product. "Librus", "Librus Synergia" and related
|
|
320
|
+
names and logos are trademarks of their owner. They are used here only to
|
|
321
|
+
describe which service this software works with; the author claims no rights to
|
|
322
|
+
them. Use of the service through this software remains subject to the
|
|
323
|
+
service's own terms.
|
|
324
|
+
|
|
308
325
|
[api]: https://github.com/krzysztofbury/librus-python-api/blob/main/API.md
|
|
309
326
|
[upgrade]: https://github.com/krzysztofbury/librus-python-api/blob/main/contracts/account-context.md
|
|
310
327
|
[verification]: https://github.com/krzysztofbury/librus-python-api/blob/main/VERIFICATION.md
|
|
@@ -73,6 +73,7 @@ faulthandler_timeout = 100
|
|
|
73
73
|
timeout = 120
|
|
74
74
|
markers = [
|
|
75
75
|
"performance: opt-in hardware-sensitive resource measurements",
|
|
76
|
+
"to_delete(issue): marked by a test audit for replacement; see the issue",
|
|
76
77
|
]
|
|
77
78
|
|
|
78
79
|
[tool.ruff]
|
|
@@ -80,7 +81,8 @@ target-version = "py313"
|
|
|
80
81
|
line-length = 88
|
|
81
82
|
|
|
82
83
|
[tool.ruff.lint]
|
|
83
|
-
|
|
84
|
+
# Why: shortcuts and dead code go to issues, not comments (AGENTS.md, Comments).
|
|
85
|
+
select = ["E", "F", "I", "UP", "B", "ASYNC", "FIX", "ERA001"]
|
|
84
86
|
|
|
85
87
|
[tool.mypy]
|
|
86
88
|
python_version = "3.13"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""Independent bounded async client. General live compatibility is unqualified."""
|
|
2
2
|
|
|
3
3
|
# Before the imports: config reads it for the User-Agent.
|
|
4
|
-
__version__ = "1.12.
|
|
4
|
+
__version__ = "1.12.1"
|
|
5
5
|
|
|
6
6
|
from librus_python_api.attachments import AttachmentStream, ModernAttachmentStream
|
|
7
7
|
from librus_python_api.budget import RequestBudget
|
{librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/attendance_frequency.py
RENAMED
|
@@ -88,7 +88,6 @@ def _collection[M: BaseModel](data: object, key: str, maximum: int, wire: type[M
|
|
|
88
88
|
def _unique(pairs: list[tuple[str, str]]) -> dict[str, str]:
|
|
89
89
|
result: dict[str, str] = {}
|
|
90
90
|
for identifier, value in pairs:
|
|
91
|
-
# Conflicting rows are never resolved by choosing one of them.
|
|
92
91
|
if identifier in result and result[identifier] != value:
|
|
93
92
|
raise LibrusError(ErrorKind.PARSE)
|
|
94
93
|
result[identifier] = value
|
|
@@ -858,7 +858,6 @@ DESCRIPTIVE_IDENTIFIER = re.compile(r"[A-Za-z0-9_-]{1,128}")
|
|
|
858
858
|
DESCRIPTIVE_IDENTIFIER_OPERATIONS = frozenset(
|
|
859
859
|
{"descriptive_user_info", "descriptive_partial_grades"}
|
|
860
860
|
)
|
|
861
|
-
# The PartialGrades read is a POST whose only body is this fixed JSON object.
|
|
862
861
|
DESCRIPTIVE_PARTIAL_GRADES_BODY = b"{}"
|
|
863
862
|
DESCRIPTIVE_MAX_SUBJECTS = 1024
|
|
864
863
|
DESCRIPTIVE_MAX_USERS = 8192
|
|
@@ -560,7 +560,6 @@ def describe_failure(error: BaseException) -> str | None:
|
|
|
560
560
|
frame, line, elements, sequences, counts = site
|
|
561
561
|
redactor = _Redactor()
|
|
562
562
|
lines = [f"at {_site(frame, line)}"]
|
|
563
|
-
# The elements nearest the failure first; a page summary last.
|
|
564
563
|
for name, value in sorted(elements, key=lambda item: _is_page(item[1])):
|
|
565
564
|
redactor.nodes = 0
|
|
566
565
|
if _is_page(value):
|
{librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/grade_records.py
RENAMED
|
@@ -767,7 +767,7 @@ def read_grade_records(document: html.HtmlElement) -> GradeRecords:
|
|
|
767
767
|
else:
|
|
768
768
|
for row in markup.rows(table):
|
|
769
769
|
if markup.in_header(row):
|
|
770
|
-
#
|
|
770
|
+
# Why: the header row has a subject row's shape ("Przedmiot").
|
|
771
771
|
continue
|
|
772
772
|
cells = markup.cells(row)
|
|
773
773
|
if _descriptive_row(cells):
|
|
@@ -150,7 +150,6 @@ def tooltip_fields(
|
|
|
150
150
|
result[last] = f"{result[last]}\n{rendered}".strip()
|
|
151
151
|
continue
|
|
152
152
|
if separator and key in result and key in TOOLTIP_REPEATABLE_LABELS:
|
|
153
|
-
# Each repeat keeps its value, in order, as one more line.
|
|
154
153
|
result[key] = f"{result[key]}\n{value}"
|
|
155
154
|
last = key
|
|
156
155
|
continue
|
{librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/school_year_archive.py
RENAMED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
structural observation; every fixture is synthetic.
|
|
3
3
|
|
|
4
4
|
One table holds every earlier school year: a year header row, a period row,
|
|
5
|
-
grade rows (subject marks or full-year descriptive text),
|
|
6
|
-
behaviour section, one absences section and an empty footer,
|
|
5
|
+
grade rows (per year, three subject marks or one full-year descriptive text),
|
|
6
|
+
then exactly one behaviour section, one absences section and an empty footer,
|
|
7
|
+
in that order.
|
|
7
8
|
A separate table lists achievements. Unknown layouts are unsupported;
|
|
8
9
|
contradictions inside the known layout are parse errors. The student's name in
|
|
9
10
|
the page header and the chart scripts are never read.
|
|
@@ -170,8 +171,8 @@ class _Body:
|
|
|
170
171
|
self.text = text
|
|
171
172
|
self.state = "grades"
|
|
172
173
|
self.labels: set[str] = set()
|
|
173
|
-
self.subjects: list[tuple[str,
|
|
174
|
-
self.descriptive: list[tuple[str,
|
|
174
|
+
self.subjects: list[tuple[str, dict[int, ArchiveMarks]]] = []
|
|
175
|
+
self.descriptive: list[tuple[str, dict[int, str]]] = []
|
|
175
176
|
self.behaviour: list[tuple[str, str]] = []
|
|
176
177
|
self.absences: dict[str, list[ArchiveCounts]] = {}
|
|
177
178
|
|
|
@@ -230,25 +231,33 @@ class _Body:
|
|
|
230
231
|
label = self._label(cells)
|
|
231
232
|
if not label:
|
|
232
233
|
_fail(ErrorKind.UNSUPPORTED_CAPABILITY)
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
]
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
234
|
+
marks: dict[int, ArchiveMarks] = {}
|
|
235
|
+
texts: dict[int, str] = {}
|
|
236
|
+
rest = list(zip(cells[1:], spans[1:], strict=True))
|
|
237
|
+
for year in range(self.count):
|
|
238
|
+
if rest and rest[0][1] == 3:
|
|
239
|
+
(cell, _), *rest = rest
|
|
240
|
+
texts[year] = self._values(
|
|
241
|
+
[cell], multiline=True, limit=ARCHIVE_MAX_TEXT_LENGTH
|
|
242
|
+
)[0]
|
|
243
|
+
elif [pair[1] for pair in rest[:3]] == [1, 1, 1]:
|
|
244
|
+
marks[year] = ArchiveMarks(*self._values([c for c, _ in rest[:3]]))
|
|
245
|
+
rest = rest[3:]
|
|
246
|
+
else:
|
|
247
|
+
_fail(ErrorKind.UNSUPPORTED_CAPABILITY)
|
|
248
|
+
if rest:
|
|
247
249
|
_fail(ErrorKind.UNSUPPORTED_CAPABILITY)
|
|
248
250
|
if label in self.labels:
|
|
249
251
|
_fail(ErrorKind.PARSE)
|
|
250
252
|
self.labels.add(label)
|
|
251
|
-
if
|
|
253
|
+
if marks:
|
|
254
|
+
self.subjects.append((label, marks))
|
|
255
|
+
if texts:
|
|
256
|
+
self.descriptive.append((label, texts))
|
|
257
|
+
if (
|
|
258
|
+
len(self.subjects) > ARCHIVE_MAX_SUBJECTS
|
|
259
|
+
or len(self.descriptive) > ARCHIVE_MAX_DESCRIPTIVE
|
|
260
|
+
):
|
|
252
261
|
_fail(ErrorKind.LIMIT)
|
|
253
262
|
|
|
254
263
|
def _behaviour(
|
|
@@ -299,10 +308,14 @@ def _archive(table: html.HtmlElement, text: _Text) -> tuple[ArchiveYear, ...]:
|
|
|
299
308
|
school_year=school_year,
|
|
300
309
|
first_year=first_year,
|
|
301
310
|
subjects=tuple(
|
|
302
|
-
ArchiveSubject(label, marks[i])
|
|
311
|
+
ArchiveSubject(label, marks[i])
|
|
312
|
+
for label, marks in body.subjects
|
|
313
|
+
if i in marks
|
|
303
314
|
),
|
|
304
315
|
descriptive=tuple(
|
|
305
|
-
ArchiveDescriptive(label, texts[i])
|
|
316
|
+
ArchiveDescriptive(label, texts[i])
|
|
317
|
+
for label, texts in body.descriptive
|
|
318
|
+
if i in texts
|
|
306
319
|
),
|
|
307
320
|
behaviour_first_semester=body.behaviour[i][0],
|
|
308
321
|
behaviour_second_semester_and_year_end=body.behaviour[i][1],
|
|
@@ -622,7 +622,6 @@ class AccountClient:
|
|
|
622
622
|
self, *, budget: RequestBudget | None = None, max_age_seconds: float = 0.0
|
|
623
623
|
) -> ModernIdentity:
|
|
624
624
|
async def fetch(budget: RequestBudget, _: bool) -> ModernIdentity:
|
|
625
|
-
# Identity reads are fresh even if a modern session is already bound.
|
|
626
625
|
account = await self._modern_ready(budget, refresh=True)
|
|
627
626
|
return ModernIdentity(
|
|
628
627
|
self._session_identity(), account, self._observation("modern_identity")
|
|
@@ -1082,8 +1081,6 @@ class AccountClient:
|
|
|
1082
1081
|
deadline=deadline,
|
|
1083
1082
|
)
|
|
1084
1083
|
|
|
1085
|
-
# Public reads: validate input, then describe one fetch for _read.
|
|
1086
|
-
|
|
1087
1084
|
async def notification_counts(
|
|
1088
1085
|
self, *, budget: RequestBudget | None = None, max_age_seconds: float = 0.0
|
|
1089
1086
|
) -> NotificationCounts:
|
|
@@ -2049,8 +2046,6 @@ class AccountClient:
|
|
|
2049
2046
|
("recipients", "choices", group.identifier), fetch, budget, max_age_seconds
|
|
2050
2047
|
)
|
|
2051
2048
|
|
|
2052
|
-
# Shared read machinery.
|
|
2053
|
-
|
|
2054
2049
|
async def _school_detail(
|
|
2055
2050
|
self,
|
|
2056
2051
|
operation: Literal["agenda_detail", "homework_detail"],
|
|
@@ -2390,8 +2385,6 @@ class AccountClient:
|
|
|
2390
2385
|
def _observation(self, source: str) -> Observation:
|
|
2391
2386
|
return Observation(self._alias, datetime.now(UTC), self._generation, source)
|
|
2392
2387
|
|
|
2393
|
-
# Multi-request reads.
|
|
2394
|
-
|
|
2395
2388
|
async def _message_page(
|
|
2396
2389
|
self, folder: MessageFolder, page: int, budget: RequestBudget
|
|
2397
2390
|
) -> MessagesPage:
|
|
@@ -2794,8 +2787,6 @@ class AccountClient:
|
|
|
2794
2787
|
kinds = await self._metadata_map("attendance_types", budget)
|
|
2795
2788
|
return resolve_type_kinds(rows, kinds)
|
|
2796
2789
|
|
|
2797
|
-
# Authentication and response validation.
|
|
2798
|
-
|
|
2799
2790
|
def _validate_read_response(
|
|
2800
2791
|
self, response: TransportResponse, content_type: str
|
|
2801
2792
|
) -> None:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/_notification_codec.py
RENAMED
|
File without changes
|
|
File without changes
|
{librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/_windows_filesystem.py
RENAMED
|
File without changes
|
{librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/announcements.py
RENAMED
|
File without changes
|
{librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/attachment_routes.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/class_free_days.py
RENAMED
|
File without changes
|
{librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/completed_lessons.py
RENAMED
|
File without changes
|
{librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/detail_fields.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/formative_grades.py
RENAMED
|
File without changes
|
{librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/gateway_grades.py
RENAMED
|
File without changes
|
{librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/grade_parsers.py
RENAMED
|
File without changes
|
{librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/homework_range.py
RENAMED
|
File without changes
|
|
File without changes
|
{librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/justifications.py
RENAMED
|
File without changes
|
|
File without changes
|
{librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/message_content.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/modern_mailbox.py
RENAMED
|
File without changes
|
{librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/modern_messages.py
RENAMED
|
File without changes
|
{librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/notification_models.py
RENAMED
|
File without changes
|
|
File without changes
|
{librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/notification_workflow.py
RENAMED
|
File without changes
|
{librus_python_api-1.12.0 → librus_python_api-1.12.1}/src/librus_python_api/notifications.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|