chore: add changelog and documentation updates
All checks were successful
CI / lint-and-test (push) Successful in 17s
All checks were successful
CI / lint-and-test (push) Successful in 17s
- Created a new `CHANGELOG.md` file to document all notable changes to the project, adhering to the Keep a Changelog format. - Updated `CONTRIBUTING.md` to include instructions for building and previewing documentation using MkDocs. - Added `mkdocs.yml` configuration for documentation generation, including navigation structure and theme settings. - Enhanced various documentation files, including API reference, architecture overview, configuration reference, and runbook, to provide comprehensive guidance for users and developers. - Included new sections in the README for changelog and documentation links, improving accessibility to project information.
This commit is contained in:
@@ -36,12 +36,21 @@ class DutyScheduleParseError(Exception):
|
||||
|
||||
|
||||
def parse_duty_schedule(raw_bytes: bytes) -> DutyScheduleResult:
|
||||
"""Parse duty-schedule JSON. Returns start_date, end_date, and list of DutyScheduleEntry.
|
||||
"""Parse duty-schedule JSON into DutyScheduleResult.
|
||||
|
||||
- meta.start_date (YYYY-MM-DD) and schedule (array) required.
|
||||
- meta.weeks optional; number of days from max duty string length (split by ';').
|
||||
- For each schedule item: name (required), duty = CSV with ';'; index i = start_date + i days.
|
||||
- Cell value after strip: в/В/б/Б => duty, Н => unavailable, О => vacation; rest ignored.
|
||||
Expects meta.start_date (YYYY-MM-DD) and schedule (array). For each schedule
|
||||
item: name (required), duty string with ';' separator; index i = start_date + i days.
|
||||
Cell values: в/В/б/Б => duty, Н => unavailable, О => vacation; rest ignored.
|
||||
|
||||
Args:
|
||||
raw_bytes: UTF-8 encoded JSON bytes.
|
||||
|
||||
Returns:
|
||||
DutyScheduleResult with start_date, end_date, and entries (per-person dates).
|
||||
|
||||
Raises:
|
||||
DutyScheduleParseError: On invalid JSON, missing/invalid meta or schedule,
|
||||
or invalid item fields.
|
||||
"""
|
||||
try:
|
||||
data = json.loads(raw_bytes.decode("utf-8"))
|
||||
|
||||
Reference in New Issue
Block a user