@@ -100,43 +100,43 @@ def dump_description(
100100 {
101101 "0.2" : GenericDescr_v0_2 ,
102102 "0.3" : GenericDescr_v0_3 ,
103- None : GenericDescr ,
103+ "latest" : GenericDescr ,
104104 }
105105 ),
106106 "generic" : MappingProxyType (
107107 {
108108 "0.2" : GenericDescr_v0_2 ,
109109 "0.3" : GenericDescr_v0_3 ,
110- None : GenericDescr ,
110+ "latest" : GenericDescr ,
111111 }
112112 ),
113113 "application" : MappingProxyType (
114114 {
115115 "0.2" : ApplicationDescr_v0_2 ,
116116 "0.3" : ApplicationDescr_v0_3 ,
117- None : ApplicationDescr ,
117+ "latest" : ApplicationDescr ,
118118 }
119119 ),
120120 "dataset" : MappingProxyType (
121121 {
122122 "0.2" : DatasetDescr_v0_2 ,
123123 "0.3" : DatasetDescr_v0_3 ,
124- None : DatasetDescr ,
124+ "latest" : DatasetDescr ,
125125 }
126126 ),
127127 "notebook" : MappingProxyType (
128128 {
129129 "0.2" : NotebookDescr_v0_2 ,
130130 "0.3" : NotebookDescr_v0_3 ,
131- None : NotebookDescr ,
131+ "latest" : NotebookDescr ,
132132 }
133133 ),
134134 "model" : MappingProxyType (
135135 {
136136 "0.3" : ModelDescr_v0_4 ,
137137 "0.4" : ModelDescr_v0_4 ,
138138 "0.5" : ModelDescr_v0_5 ,
139- None : ModelDescr ,
139+ "latest" : ModelDescr ,
140140 }
141141 ),
142142 }
@@ -184,8 +184,14 @@ def build_description(
184184 Args:
185185 content: loaded rdf.yaml file (loaded with YAML, not bioimageio.spec)
186186 context: validation context to use during validation
187- format_version: (optional) use this argument to load the resource and
188- convert its metadata to a higher format_version
187+ format_version:
188+ (optional) use this argument to load the resource and
189+ convert its metadata to a higher format_version.
190+ Note:
191+ - Use "latest" to convert to the latest available format version.
192+ - Use "discover" to use the format version specified in the RDF.
193+ - Only considers major.minor format version, ignores patch version.
194+ - Conversion to lower format versions is not supported.
189195
190196 Returns:
191197 An object holding all metadata of the bioimage.io resource
@@ -213,7 +219,13 @@ def validate_format(
213219
214220 Args:
215221 data: Dictionary holding the raw bioimageio.yaml content.
216- format_version: Format version to (update to and) use for validation.
222+ format_version:
223+ Format version to (update to and) use for validation.
224+ Note:
225+ - Use "latest" to convert to the latest available format version.
226+ - Use "discover" to use the format version specified in the RDF.
227+ - Only considers major.minor format version, ignores patch version.
228+ - Conversion to lower format versions is not supported.
217229 context: Validation context, see `bioimagieo.spec.ValidationContext`
218230
219231 Note:
0 commit comments