Skip to content

Commit a7e02b1

Browse files
committed
Merge branch 'main' into forman-55-lock_file_issue
# Conflicts: # CHANGES.md # docs/config.md
2 parents 20cf9eb + 9e6ec28 commit a7e02b1

File tree

4 files changed

+39
-24
lines changed

4 files changed

+39
-24
lines changed

CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
reporting that the lock file to be written does not exist. Changed this to
77
report that the target parent directory does not exist. [#55]
88

9+
### Enhancements
10+
11+
* Added missing documentation of the `append_step` setting in the
12+
[configuration reference](https://bcdev.github.io/zappend/config/).
13+
914
## Version 0.4.0 (from 2024-02-08)
1015

1116
### Enhancements

docs/config.md

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
## `version`
55

66
Configuration schema version. Allows the schema to evolve while still preserving backwards compatibility.
7-
Its value must be `1`.
7+
Its value is `1`.
88
Defaults to `1`.
99

1010
## `zarr_version`
1111

1212
The Zarr version to be used.
13-
Its value must be `2`.
13+
Its value is `2`.
1414
Defaults to `2`.
1515

1616
## `fixed_dims`
@@ -28,22 +28,23 @@ Defaults to `"time"`.
2828
## `append_step`
2929

3030
If set, enforces a step size in the append dimension between two slices or just enforces a direction.
31-
Must be one of the following.
31+
Must be one of the following:
3232

3333
* Arbitrary step size or not applicable.
34-
Its value must be `null`.
34+
Its value is `null`.
3535

3636
* Monotonically increasing.
37-
Its value must be `"+"`.
37+
Its value is `"+"`.
3838

3939
* Monotonically decreasing.
40-
Its value must be `"-"`.
40+
Its value is `"-"`.
4141

4242
* Type _string_.
43-
A time delta value.
43+
A positive or negative time delta value, such as `12h`, `2D`, `-1D`.
4444

4545
* Type _number_.
46-
A numerical delta value.
46+
A positive or negative numerical delta value.
47+
4748
Defaults to `null`.
4849

4950
## `included_variables`
@@ -80,27 +81,29 @@ Variable metadata.
8081

8182
* `chunks`:
8283
Storage chunking.
83-
Must be one of the following.
84+
Must be one of the following:
8485

8586
* Type _array_.
8687
Chunk sizes in the order of the dimensions.
8788
The items of the array are of type _integer_.
8889

8990
* Disable chunking.
90-
Its value must be `null`.
91+
Its value is `null`.
92+
9193

9294
* `fill_value`:
9395
Storage fill value.
94-
Must be one of the following.
96+
Must be one of the following:
9597

9698
* Type _number_.
9799
A number of type and unit of the given storage `dtype`.
98100

99101
* Not-a-number. Can be used only if storage `dtype` is `float32` or `float64`.
100-
Its value must be `"NaN"`.
102+
Its value is `"NaN"`.
101103

102104
* No fill value.
103-
Its value must be `null`.
105+
Its value is `null`.
106+
104107

105108
* `scale_factor`:
106109
Type _number_.
@@ -168,13 +171,13 @@ Options for the filesystem given by the protocol of the URIs of contributing dat
168171
## `slice_polling`
169172

170173
Defines how to poll for contributing datasets.
171-
Must be one of the following.
174+
Must be one of the following:
172175

173176
* No polling, fail immediately if dataset is not available.
174-
Its value must be `false`.
177+
Its value is `false`.
175178

176179
* Poll using default values.
177-
Its value must be `true`.
180+
Its value is `true`.
178181

179182
* Type _object_.
180183
Polling parameters.
@@ -190,6 +193,7 @@ Must be one of the following.
190193
Polling timeout in seconds.
191194
Defaults to `60`.
192195

196+
193197
## `persist_mem_slices`
194198

195199
Type _boolean_.
@@ -215,7 +219,7 @@ Defaults to `false`.
215219
## `profiling`
216220

217221
Profiling configuration. Allows for runtime profiling of the processing.
218-
Must be one of the following.
222+
Must be one of the following:
219223

220224
* Type _boolean_.
221225
If set, profiling is enabled and output is logged using level `"INFO"`. Otherwise, profiling is disabled.
@@ -248,7 +252,7 @@ Must be one of the following.
248252
* `restrictions`:
249253
Type _array_.
250254
Used to limit the list down to the significant entries in the profiling report. Refer to [Stats.print_stats(*restrictions)](https://docs.python.org/3/library/profile.html#pstats.Stats.print_stats).
251-
The items of the array must be one of the following.
255+
The items of the array must be one of the following:
252256

253257
* Type _integer_.
254258
Select a count of lines.
@@ -258,6 +262,8 @@ Must be one of the following.
258262

259263
* Type _string_.
260264
Pattern-match the standard name that is printed.
265+
266+
261267

262268
## `logging`
263269

@@ -267,7 +273,7 @@ The key `version` is required.
267273

268274
* `version`:
269275
Logging schema version.
270-
Its value must be `1`.
276+
Its value is `1`.
271277

272278
* `formatters`:
273279
Type _object_.

zappend/config/markdown.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ def _schema_to_md(
4444
one_of = schema.get("anyOf") or schema.get("oneOf")
4545
if one_of:
4646
if sequence_name:
47-
lines.append(f"The {sequence_name} must be one of the following.")
47+
lines.append(f"The {sequence_name} must be one of the following:")
4848
else:
49-
lines.append("Must be one of the following.")
49+
lines.append("Must be one of the following:")
5050
for sub_schema in one_of:
5151
sub_lines = []
5252
_schema_to_md(sub_schema, path, sub_lines)
@@ -55,11 +55,12 @@ def _schema_to_md(
5555
lines.append(" * " + sub_lines[0])
5656
for sub_line in sub_lines[1:]:
5757
lines.append(" " + sub_line)
58+
lines.append("")
5859

5960
const = schema.get("const", undefined)
6061
if const is not undefined:
6162
value = json.dumps(const)
62-
lines.append(f"Its value must be `{value}`.")
63+
lines.append(f"Its value is `{value}`.")
6364

6465
default = schema.get("default", undefined)
6566
if default is not undefined:

zappend/config/schema.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -487,12 +487,15 @@
487487
{"description": "Monotonically increasing.", "const": "+"},
488488
{"description": "Monotonically decreasing.", "const": "-"},
489489
{
490-
"description": "A time delta value.",
490+
"description": (
491+
"A positive or negative time delta value,"
492+
" such as `12h`, `2D`, `-1D`."
493+
),
491494
"type": "string",
492495
"not": {"const": ""},
493496
},
494497
{
495-
"description": "A numerical delta value.",
498+
"description": "A positive or negative numerical delta value.",
496499
"type": "number",
497500
"not": {"const": 0},
498501
},

0 commit comments

Comments
 (0)