Mercurial > repos > shellac > guppy_basecaller
comparison env/lib/python3.7/site-packages/schema_salad-4.5.20191229160203.dist-info/METADATA @ 5:9b1c78e6ba9c draft default tip
"planemo upload commit 6c0a8142489327ece472c84e558c47da711a9142"
author | shellac |
---|---|
date | Mon, 01 Jun 2020 08:59:25 -0400 |
parents | 79f47841a781 |
children |
comparison
equal
deleted
inserted
replaced
4:79f47841a781 | 5:9b1c78e6ba9c |
---|---|
1 Metadata-Version: 2.1 | |
2 Name: schema-salad | |
3 Version: 4.5.20191229160203 | |
4 Summary: Schema Annotations for Linked Avro Data (SALAD) | |
5 Home-page: https://github.com/common-workflow-language/schema_salad | |
6 Author: Common workflow language working group | |
7 Author-email: common-workflow-language@googlegroups.com | |
8 License: Apache 2.0 | |
9 Download-URL: https://github.com/common-workflow-language/schema_salad/releases | |
10 Platform: UNKNOWN | |
11 Classifier: Environment :: Console | |
12 Classifier: Intended Audience :: Science/Research | |
13 Classifier: License :: OSI Approved :: Apache Software License | |
14 Classifier: Operating System :: POSIX | |
15 Classifier: Operating System :: MacOS :: MacOS X | |
16 Classifier: Operating System :: Microsoft :: Windows | |
17 Classifier: Development Status :: 5 - Production/Stable | |
18 Classifier: Programming Language :: Python :: 2.7 | |
19 Classifier: Programming Language :: Python :: 3.5 | |
20 Classifier: Programming Language :: Python :: 3.6 | |
21 Classifier: Programming Language :: Python :: 3.7 | |
22 Classifier: Programming Language :: Python :: 3.8 | |
23 Classifier: Typing :: Typed | |
24 Description-Content-Type: text/x-rst | |
25 Requires-Dist: setuptools | |
26 Requires-Dist: requests (>=1.0) | |
27 Requires-Dist: ruamel.yaml (<=0.16,>=0.12.4) | |
28 Requires-Dist: rdflib (<4.3.0,>=4.2.2) | |
29 Requires-Dist: rdflib-jsonld (<0.5.0,>=0.3.0) | |
30 Requires-Dist: mistune (<0.9,>=0.8.1) | |
31 Requires-Dist: CacheControl (<0.12,>=0.11.7) | |
32 Requires-Dist: lockfile (>=0.9) | |
33 Requires-Dist: six (>=1.8.0) | |
34 Requires-Dist: typing-extensions | |
35 Requires-Dist: future | |
36 Requires-Dist: typing (>=3.7.4) ; python_version<"3.5" | |
37 Provides-Extra: docs | |
38 Requires-Dist: sphinx (>=2.2) ; extra == 'docs' | |
39 Requires-Dist: sphinx-rtd-theme ; extra == 'docs' | |
40 Requires-Dist: pytest ; extra == 'docs' | |
41 | |
42 |Linux Build Status| |Windows Build status| |Code coverage| |CII Best Practices| | |
43 | |
44 .. |Linux Build Status| image:: https://img.shields.io/travis/common-workflow-language/schema_salad/master.svg?label=unix%20build | |
45 :target: https://travis-ci.org/common-workflow-language/schema_salad | |
46 .. |Windows Build status| image:: https://img.shields.io/appveyor/ci/mr-c/schema-salad/master.svg?label=windows%20build | |
47 :target: https://ci.appveyor.com/project/mr-c/schema-salad/branch/master | |
48 .. |Code coverage| image:: https://codecov.io/gh/common-workflow-language/schema_salad/branch/master/graph/badge.svg | |
49 :target: https://codecov.io/gh/common-workflow-language/schema_salad | |
50 .. |CII Best Practices| image:: https://bestpractices.coreinfrastructure.org/projects/1867/badge | |
51 :target: https://bestpractices.coreinfrastructure.org/projects/1867 | |
52 | |
53 Schema Salad | |
54 ------------ | |
55 | |
56 Salad is a schema language for describing JSON or YAML structured | |
57 linked data documents. Salad schema describes rules for | |
58 preprocessing, structural validation, and hyperlink checking for | |
59 documents described by a Salad schema. Salad supports rich data | |
60 modeling with inheritance, template specialization, object | |
61 identifiers, object references, documentation generation, code | |
62 generation, and transformation to RDF_. Salad provides a bridge | |
63 between document and record oriented data modeling and the Semantic | |
64 Web. | |
65 | |
66 Usage | |
67 ----- | |
68 | |
69 :: | |
70 | |
71 $ pip install schema_salad | |
72 | |
73 To install from source:: | |
74 | |
75 git clone https://github.com/common-workflow-language/schema_salad | |
76 cd schema_salad | |
77 python setup.py install | |
78 | |
79 Commands | |
80 -------- | |
81 | |
82 Schema salad can be used as a command line tool or imported as a Python module:: | |
83 | |
84 $ schema-salad-tool | |
85 usage: schema-salad-tool [-h] [--rdf-serializer RDF_SERIALIZER] | |
86 [--print-jsonld-context | --print-rdfs | --print-avro | |
87 | --print-rdf | --print-pre | --print-index | |
88 | --print-metadata | --print-inheritance-dot | |
89 | --print-fieldrefs-dot | --codegen language | |
90 | --print-oneline] | |
91 [--strict | --non-strict] [--verbose | --quiet | |
92 | --debug] | |
93 [--version] | |
94 [schema] [document] | |
95 | |
96 $ python | |
97 >>> import schema_salad | |
98 | |
99 Validate a schema:: | |
100 | |
101 $ schema-salad-tool myschema.yml | |
102 | |
103 Validate a document using a schema:: | |
104 | |
105 $ schema-salad-tool myschema.yml mydocument.yml | |
106 | |
107 Generate HTML documentation:: | |
108 | |
109 $ schema-salad-tool myschema.yml > myschema.html | |
110 | |
111 Get JSON-LD context:: | |
112 | |
113 $ schema-salad-tool --print-jsonld-context myschema.yml mydocument.yml | |
114 | |
115 Convert a document to JSON-LD:: | |
116 | |
117 $ schema-salad-tool --print-pre myschema.yml mydocument.yml > mydocument.jsonld | |
118 | |
119 Generate Python classes for loading/generating documents described by the schema:: | |
120 | |
121 $ schema-salad-tool --codegen=python myschema.yml > myschema.py | |
122 | |
123 Display inheritance relationship between classes as a graphviz 'dot' file and | |
124 render as SVG:: | |
125 | |
126 $ schema-salad-tool --print-inheritance-dot myschema.yml | dot -Tsvg > myschema.svg | |
127 | |
128 | |
129 Quick Start | |
130 ----------- | |
131 | |
132 Let's say you have a 'basket' record that can contain items measured either by | |
133 weight or by count. Here's an example:: | |
134 | |
135 basket: | |
136 - product: bananas | |
137 price: 0.39 | |
138 per: pound | |
139 weight: 1 | |
140 - product: cucumbers | |
141 price: 0.79 | |
142 per: item | |
143 count: 3 | |
144 | |
145 We want to validate that all the expected fields are present, the | |
146 measurement is known, and that "count" cannot be a fractional value. | |
147 Here is an example schema to do that:: | |
148 | |
149 - name: Product | |
150 doc: | | |
151 The base type for a product. This is an abstract type, so it | |
152 can't be used directly, but can be used to define other types. | |
153 type: record | |
154 abstract: true | |
155 fields: | |
156 product: string | |
157 price: float | |
158 | |
159 - name: ByWeight | |
160 doc: | | |
161 A product, sold by weight. Products may be sold by pound or by | |
162 kilogram. Weights may be fractional. | |
163 type: record | |
164 extends: Product | |
165 fields: | |
166 per: | |
167 type: | |
168 type: enum | |
169 symbols: | |
170 - pound | |
171 - kilogram | |
172 jsonldPredicate: '#per' | |
173 weight: float | |
174 | |
175 - name: ByCount | |
176 doc: | | |
177 A product, sold by count. The count must be a integer value. | |
178 type: record | |
179 extends: Product | |
180 fields: | |
181 per: | |
182 type: | |
183 type: enum | |
184 symbols: | |
185 - item | |
186 jsonldPredicate: '#per' | |
187 count: int | |
188 | |
189 - name: Basket | |
190 doc: | | |
191 A basket of products. The 'documentRoot' field indicates it is a | |
192 valid starting point for a document. The 'basket' field will | |
193 validate subtypes of 'Product' (ByWeight and ByCount). | |
194 type: record | |
195 documentRoot: true | |
196 fields: | |
197 basket: | |
198 type: | |
199 type: array | |
200 items: Product | |
201 | |
202 You can check the schema and document in schema_salad/tests/basket_schema.yml | |
203 and schema_salad/tests/basket.yml:: | |
204 | |
205 $ schema-salad-tool basket_schema.yml basket.yml | |
206 Document `basket.yml` is valid | |
207 | |
208 | |
209 Documentation | |
210 ------------- | |
211 | |
212 See the specification_ and the metaschema_ (salad schema for itself). For an | |
213 example application of Schema Salad see the Common Workflow Language_. | |
214 | |
215 | |
216 Rationale | |
217 --------- | |
218 | |
219 The JSON data model is an popular way to represent structured data. It is | |
220 attractive because of it's relative simplicity and is a natural fit with the | |
221 standard types of many programming languages. However, this simplicity comes | |
222 at the cost that basic JSON lacks expressive features useful for working with | |
223 complex data structures and document formats, such as schemas, object | |
224 references, and namespaces. | |
225 | |
226 JSON-LD is a W3C standard providing a way to describe how to interpret a JSON | |
227 document as Linked Data by means of a "context". JSON-LD provides a powerful | |
228 solution for representing object references and namespaces in JSON based on | |
229 standard web URIs, but is not itself a schema language. Without a schema | |
230 providing a well defined structure, it is difficult to process an arbitrary | |
231 JSON-LD document as idiomatic JSON because there are many ways to express the | |
232 same data that are logically equivalent but structurally distinct. | |
233 | |
234 Several schema languages exist for describing and validating JSON data, such as | |
235 JSON Schema and Apache Avro data serialization system, however none | |
236 understand linked data. As a result, to fully take advantage of JSON-LD to | |
237 build the next generation of linked data applications, one must maintain | |
238 separate JSON schema, JSON-LD context, RDF schema, and human documentation, | |
239 despite significant overlap of content and obvious need for these documents to | |
240 stay synchronized. | |
241 | |
242 Schema Salad is designed to address this gap. It provides a schema language | |
243 and processing rules for describing structured JSON content permitting URI | |
244 resolution and strict document validation. The schema language supports linked | |
245 data through annotations that describe the linked data interpretation of the | |
246 content, enables generation of JSON-LD context and RDF schema, and production | |
247 of RDF triples by applying the JSON-LD context. The schema language also | |
248 provides for robust support of inline documentation. | |
249 | |
250 .. _JSON-LD: http://json-ld.org | |
251 .. _Avro: http://avro.apache.org | |
252 .. _metaschema: https://github.com/common-workflow-language/schema_salad/blob/master/schema_salad/metaschema/metaschema.yml | |
253 .. _specification: http://www.commonwl.org/v1.0/SchemaSalad.html | |
254 .. _Language: https://github.com/common-workflow-language/common-workflow-language/blob/master/v1.0/CommandLineTool.yml | |
255 .. _RDF: https://www.w3.org/RDF/ | |
256 | |
257 |