File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 8585- Add the ``tsk_tree_get_size_bound `` function which returns an upper bound on the number of nodes reachable from
8686 the roots of a tree. Useful for tree stack allocations (:user: `jeromekelleher `, :pr: `1704 `).
8787
88+ - Add ``MetadataSchema.permissive_json `` for an easy way to get the simplest schema.
89+
8890
8991----------------------
9092[0.99.14] - 2021-09-03
Original file line number Diff line number Diff line change @@ -53,6 +53,9 @@ the keys and types of those properties are specified along with optional
5353long-form names, descriptions and validations such as min/max or regex matching for
5454strings, see the {ref}` sec_metadata_schema_examples ` below.
5555
56+ As a convenience the simplest, permissive JSON schema is available as
57+ {meth}` MetadataSchema.permissive_json() ` .
58+
5659The {ref}` sec_tutorial_metadata ` Tutorial shows how to use schemas and access metadata
5760in the tskit Python API.
5861
Original file line number Diff line number Diff line change @@ -700,12 +700,12 @@ def encode_row(self, row: Any) -> bytes:
700700 # Set by __init__
701701 pass # pragma: no cover
702702
703- # Utility to make a simple permission JSON schema. Probably should be
704- # part of the documented API. See
705- # https://github.com/tskit-dev/tskit/issues/1956 for more details.
706-
707703 @staticmethod
708704 def permissive_json ():
705+ """
706+ The simplest, permissive JSON schema. Only specifies the JSON codec and has
707+ no constraints on the properties.
708+ """
709709 return MetadataSchema ({"codec" : "json" })
710710
711711
You can’t perform that action at this time.
0 commit comments