Skip to content

Commit 03bdf56

Browse files
tobixenclaude
andcommitted
docs: update USAGE.md with current text format and workflow guides
- Fix --format text example and status table to match actual output (multi-line per-feature blocks, real support level values incl. unknown) - Add guide: contributing a new server profile to caldav/compatibility_hints.py - Add guide: storing checker results in ~/.config/caldav/calendar.conf (named profile, inline features, and base+overrides patterns) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 6d57bac commit 03bdf56

2 files changed

Lines changed: 140 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ This file should adhere to [Keep a Changelog](https://keepachangelog.com/en/1.1.
66

77
This project should adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), though some earlier releases may be incompatible with the SemVer standard.
88

9+
## [Unreleased]
10+
11+
### Documentation
12+
- USAGE.md: updated `--format text` section to reflect current multi-line output format and actual support-level values; added `unknown` status
13+
- USAGE.md: added guide for contributing a new server profile to `caldav/compatibility_hints.py`
14+
- USAGE.md: added guide for storing checker results in `~/.config/caldav/calendar.conf` (named profile, inline features, and base+overrides patterns)
15+
916
## [1.0.0] - 2026-03-15
1017

1118
Considering this tool as "production ready" now - even though it's still lots of corner cases to be tested.

USAGE.md

Lines changed: 133 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,25 +56,36 @@ Note that the only difference between `--name` and `--config-section` is that `-
5656

5757
Human-readable summary. Without `--verbose`, only features deviating from the CalDAV standard are shown. With `--verbose`, all checked features are shown.
5858

59+
Each feature is reported as a block with up to three lines:
60+
5961
```
6062
Server: radicale (http://localhost:5232/)
6163
caldav library version: 1.5.0
6264
6365
Feature compatibility (non-verbose: showing only deviations from the standard):
64-
[no] search.time-range.alarm
65-
[quirk] search.unlimited-time-range
66+
67+
## search.time-range.alarm
68+
Feature support level found: unsupported
69+
70+
## search.unlimited-time-range
71+
Feature support level found: quirk
72+
Extra check information:
73+
behaviour=accepts-but-ignores-end-date
74+
Description of the feature: Whether the server supports CalDAV REPORT search without an end date in a time-range filter
6675
```
6776

68-
Status markers:
77+
The **"Extra check information"** line describes the *specific behaviour observed* during testing — for example, what the server actually did when a feature was exercised (e.g. `behaviour=delayed-deletion`, `behaviour=mkcol-required`). This is distinct from the **"Description of the feature"** line, which gives the general definition of what the feature covers.
78+
79+
Support levels:
6980

70-
| Marker | Meaning |
71-
|--------------|----------------------------------------------------------|
72-
| `[ok]` | Full support |
73-
| `[no]` | Unsupported (silently ignored by the server) |
74-
| `[quirk]` | Supported but needs special client-side handling |
75-
| `[fragile]` | Unreliable / intermittent |
76-
| `[broken]` | Server behaves incorrectly |
77-
| `[error]` | Server returns an error (ungraceful failure) |
81+
| Value | Meaning |
82+
|----------------|--------------------------------------------------------------------|
83+
| `full` | Full, standard-compliant support |
84+
| `unsupported` | Not supported (server silently ignores or rejects the operation) |
85+
| `quirk` | Supported but requires special client-side handling |
86+
| `fragile` | Unreliable or intermittent behaviour |
87+
| `broken` | Server behaves incorrectly (wrong results, data loss, etc.) |
88+
| `unknown` | Could not be determined (e.g. preconditions for the test not met) |
7889

7990
### `--format json` / `--format yaml`
8091

@@ -103,6 +114,55 @@ file in the caldav project (or your own config):
103114
}
104115
```
105116

117+
## Contributing a server profile to the caldav library
118+
119+
If your CalDAV server is not yet listed in
120+
[`caldav/compatibility_hints.py`](https://github.com/python-caldav/caldav/blob/master/caldav/compatibility_hints.py),
121+
you can use this tool to produce a ready-made profile and submit it upstream.
122+
123+
**Step 1 — run the tester and capture the hints output:**
124+
125+
```
126+
caldav-server-tester --caldav-url https://example.com/dav \
127+
--caldav-username alice \
128+
--caldav-password secret \
129+
--format hints > myserver_hints.py
130+
```
131+
132+
The output is a Python dict literal containing every feature the tester
133+
observed, e.g.:
134+
135+
```python
136+
{
137+
'create-calendar': {'support': 'full'},
138+
'search.time-range.alarm': {'support': 'unsupported'},
139+
'search.unlimited-time-range': {'support': 'quirk', 'behaviour': 'accepts-but-ignores-end-date'},
140+
...
141+
}
142+
```
143+
144+
**Step 2 — add the profile to `compatibility_hints.py`:**
145+
146+
In a fork of the [caldav repository](https://github.com/python-caldav/caldav),
147+
open `caldav/compatibility_hints.py` and add a module-level variable near the
148+
other server profiles (look for variables like `radicale`, `baikal`, `xandikos`):
149+
150+
```python
151+
myserver = {
152+
'search.time-range.alarm': {'support': 'unsupported'},
153+
'search.unlimited-time-range': {'support': 'quirk', 'behaviour': 'accepts-but-ignores-end-date'},
154+
# ... paste the non-full entries from the hints output
155+
}
156+
```
157+
158+
It is conventional to strip entries where `support` is `full` (the default),
159+
keeping only deviations. Add a short comment above the dict describing the
160+
server and the version it was tested against.
161+
162+
**Step 3 — open a pull request** against `python-caldav/caldav` on GitHub.
163+
Include the raw `--format text --verbose` output as supporting evidence in the
164+
PR description so maintainers can verify the findings.
165+
106166
## Diffing expected vs observed
107167

108168
When you have an existing `compatibility_hints` configuration for a server
@@ -116,6 +176,68 @@ The `--diff` flag appends a section to the report listing every feature where
116176
the observed support level differs from what the configured hints said to
117177
expect.
118178

179+
## Storing results in your caldav config file
180+
181+
The `~/.config/caldav/calendar.conf` (YAML or JSON) supports a `features` key
182+
in each section that tells the caldav client library which workarounds to
183+
apply. There are two ways to populate it.
184+
185+
### Using a named profile
186+
187+
If your server already has a profile in `caldav/compatibility_hints.py` (e.g.
188+
`radicale`, `baikal`, `xandikos`, `synology`, …), simply name it:
189+
190+
```yaml
191+
myserver:
192+
caldav_url: https://example.com/dav
193+
caldav_username: alice
194+
caldav_password: secret
195+
features: radicale
196+
```
197+
198+
### Using inline features from the tester
199+
200+
If there is no profile for your server yet, run the tester and copy the
201+
`features` block from the YAML output directly into your config:
202+
203+
```
204+
caldav-server-tester --caldav-url https://example.com/dav \
205+
--caldav-username alice \
206+
--caldav-password secret \
207+
--format yaml
208+
```
209+
210+
The output contains a `features:` mapping. Paste it under your config section:
211+
212+
```yaml
213+
myserver:
214+
caldav_url: https://example.com/dav
215+
caldav_username: alice
216+
caldav_password: secret
217+
features:
218+
search.time-range.alarm:
219+
support: unsupported
220+
search.unlimited-time-range:
221+
support: quirk
222+
behaviour: accepts-but-ignores-end-date
223+
```
224+
225+
### Extending a named profile with local overrides
226+
227+
If your server is close to a known profile but differs on a few features, use
228+
the `base` key to inherit that profile and then override only what differs:
229+
230+
```yaml
231+
myserver:
232+
caldav_url: https://example.com/dav
233+
caldav_username: alice
234+
caldav_password: secret
235+
features:
236+
base: radicale
237+
search.time-range.alarm:
238+
support: full
239+
```
240+
119241
## Safety
120242
121243
For servers that supports `MKCALENDAR`, a dedicated calendar will be

0 commit comments

Comments
 (0)