Commit 173490c7 authored by Michael R. Crusoe's avatar Michael R. Crusoe 🏳️‍🌈
Browse files

New upstream version 4.5.20190621200723

parent 86636f0e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
include gittaggers.py Makefile LICENSE.txt
include gittaggers.py Makefile LICENSE.txt requirements.txt
include schema_salad/py.typed
include schema_salad/avro/*
include schema_salad/tests/*
include schema_salad/tests/test_schema/*.md
+4 −4
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ COVBASE=coverage run --branch --append --source=${MODULE} \

# Updating the Major & Minor version below?
# Don't forget to update setup.py as well
VERSION=3.0.$(shell date +%Y%m%d%H%M%S --utc --date=`git log --first-parent \
VERSION=4.5.$(shell date +%Y%m%d%H%M%S --utc --date=`git log --first-parent \
	--max-count=1 --format=format:%cI`)

## all         : default task
@@ -89,13 +89,13 @@ diff_pycodestyle_report: pycodestyle_report.txt
pep257: pydocstyle
## pydocstyle      : check Python code style
pydocstyle: $(PYSOURCES)
	pydocstyle --ignore=D100,D101,D102,D103 $^ || true
	pydocstyle --add-ignore=D100,D101,D102,D103 $^ || true

pydocstyle_report.txt: $(PYSOURCES)
	pydocstyle setup.py $^ > $@ 2>&1 || true

diff_pydocstyle_report: pydocstyle_report.txt
	diff-quality --violations=pycodestyle $^
	diff-quality --violations=pycodestyle --fail-under=100 $^

## autopep8    : fix most Python code indentation and formatting
autopep8: $(PYSOURCES)
@@ -199,7 +199,7 @@ jenkins: FORCE
	rm -Rf env && virtualenv env
	. env/bin/activate ; \
	pip install -U setuptools pip wheel ; \
	${MAKE} install-dep coverage.html coverage.xml pep257_report.txt \
	${MAKE} install-dep coverage.html coverage.xml pydocstyle_report.txt \
		sloccount.sc pycodestyle_report.txt pylint_report.txt
	if ! test -d env3 ; then virtualenv -p python3 env3 ; fi
	. env3/bin/activate ; \
+88 −5
Original line number Diff line number Diff line
Metadata-Version: 1.1
Name: schema-salad
Version: 3.0.20181206233650
Version: 4.5.20190621200723
Summary: Schema Annotations for Linked Avro Data (SALAD)
Home-page: https://github.com/common-workflow-language/schema_salad
Author: Common workflow language working group
Author-email: common-workflow-language@googlegroups.com
License: Apache 2.0
Download-URL: https://github.com/common-workflow-language/schema_salad/releases
Description: |Build Status| |Build status|
Description: |Linux Build Status| |Windows Build status| |Code coverage| |CII Best Practices|
        
        .. |Build Status| image:: https://img.shields.io/travis/common-workflow-language/schema_salad/master.svg?label=unix%20build
        .. |Linux Build Status| image:: https://img.shields.io/travis/common-workflow-language/schema_salad/master.svg?label=unix%20build
           :target: https://travis-ci.org/common-workflow-language/schema_salad
        .. |Build status| image:: https://img.shields.io/appveyor/ci/mr-c/schema-salad/master.svg?label=windows%20build
        .. |Windows Build status| image:: https://img.shields.io/appveyor/ci/mr-c/schema-salad/master.svg?label=windows%20build
           :target: https://ci.appveyor.com/project/mr-c/schema-salad/branch/master
        .. |Code coverage| image:: https://codecov.io/gh/common-workflow-language/schema_salad/branch/master/graph/badge.svg
           :target: https://codecov.io/gh/common-workflow-language/schema_salad
        .. |CII Best Practices| image:: https://bestpractices.coreinfrastructure.org/projects/1867/badge
           :target: https://bestpractices.coreinfrastructure.org/projects/1867
        
        Schema Salad
        ------------
@@ -64,6 +66,10 @@ Description: |Build Status| |Build status|
        
           $ schema-salad-tool myschema.yml mydocument.yml
        
        Generate HTML documentation::
        
           $ schema-salad-tool myschema.yml > myschema.html
        
        Get JSON-LD context::
        
           $ schema-salad-tool --print-jsonld-context myschema.yml mydocument.yml
@@ -81,6 +87,84 @@ Description: |Build Status| |Build status|
           $ schema-salad-tool --print-inheritance-dot myschema.yml | dot -Tsvg > myschema.svg
        
        
        Quick Start
        -----------
        
        Let's say you have a 'basket' record that can contain items measured either by weight or by count.  Here's an example::
        
           basket:
             - product: bananas
               price: 0.39
               per: pound
               weight: 1
             - product: cucumbers
               price: 0.79
               per: item
               count: 3
        
        We want to validate that all the expected fields are present, the
        measurement is known, and that "count" cannot be a fractional value.
        Here is an example schema to do that::
        
           - name: Product
             doc: |
               The base type for a product.  This is an abstract type, so it
               can't be used directly, but can be used to define other types.
             type: record
             abstract: true
             fields:
               product: string
               price: float
        
           - name: ByWeight
             doc: |
               A product, sold by weight.  Products may be sold by pound or by
               kilogram.  Weights may be fractional.
             type: record
             extends: Product
             fields:
               per:
                 type:
                   type: enum
                   symbols:
                     - pound
                     - kilogram
                 jsonldPredicate: '#per'
               weight: float
        
           - name: ByCount
             doc: |
               A product, sold by count.  The count must be a integer value.
             type: record
             extends: Product
             fields:
               per:
                 type:
                   type: enum
                   symbols:
                     - item
                 jsonldPredicate: '#per'
               count: int
        
           - name: Basket
             doc: |
               A basket of products.  The 'documentRoot' field indicates it is a
               valid starting point for a document.  The 'basket' field will
               validate subtypes of 'Product' (ByWeight and ByCount).
             type: record
             documentRoot: true
             fields:
               basket:
                 type:
                   type: array
                   items: Product
        
        You can check the schema and document in schema_salad/tests/basket_schema.yml and schema_salad/tests/basket.yml::
        
           $ schema-salad-tool basket_schema.yml basket.yml
           Document `basket.yml` is valid
        
        
        Documentation
        -------------
        
@@ -138,7 +222,6 @@ Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
+87 −3
Original line number Diff line number Diff line
|Build Status| |Build status|
|Linux Build Status| |Windows Build status| |Code coverage| |CII Best Practices|

.. |Build Status| image:: https://img.shields.io/travis/common-workflow-language/schema_salad/master.svg?label=unix%20build
.. |Linux Build Status| image:: https://img.shields.io/travis/common-workflow-language/schema_salad/master.svg?label=unix%20build
   :target: https://travis-ci.org/common-workflow-language/schema_salad
.. |Build status| image:: https://img.shields.io/appveyor/ci/mr-c/schema-salad/master.svg?label=windows%20build
.. |Windows Build status| image:: https://img.shields.io/appveyor/ci/mr-c/schema-salad/master.svg?label=windows%20build
   :target: https://ci.appveyor.com/project/mr-c/schema-salad/branch/master
.. |Code coverage| image:: https://codecov.io/gh/common-workflow-language/schema_salad/branch/master/graph/badge.svg
   :target: https://codecov.io/gh/common-workflow-language/schema_salad
.. |CII Best Practices| image:: https://bestpractices.coreinfrastructure.org/projects/1867/badge
   :target: https://bestpractices.coreinfrastructure.org/projects/1867

Schema Salad
------------
@@ -55,6 +57,10 @@ Validate a document using a schema::

   $ schema-salad-tool myschema.yml mydocument.yml

Generate HTML documentation::

   $ schema-salad-tool myschema.yml > myschema.html

Get JSON-LD context::

   $ schema-salad-tool --print-jsonld-context myschema.yml mydocument.yml
@@ -72,6 +78,84 @@ Display inheritance relationship between classes as a graphviz 'dot' file and re
   $ schema-salad-tool --print-inheritance-dot myschema.yml | dot -Tsvg > myschema.svg


Quick Start
-----------

Let's say you have a 'basket' record that can contain items measured either by weight or by count.  Here's an example::

   basket:
     - product: bananas
       price: 0.39
       per: pound
       weight: 1
     - product: cucumbers
       price: 0.79
       per: item
       count: 3

We want to validate that all the expected fields are present, the
measurement is known, and that "count" cannot be a fractional value.
Here is an example schema to do that::

   - name: Product
     doc: |
       The base type for a product.  This is an abstract type, so it
       can't be used directly, but can be used to define other types.
     type: record
     abstract: true
     fields:
       product: string
       price: float

   - name: ByWeight
     doc: |
       A product, sold by weight.  Products may be sold by pound or by
       kilogram.  Weights may be fractional.
     type: record
     extends: Product
     fields:
       per:
         type:
           type: enum
           symbols:
             - pound
             - kilogram
         jsonldPredicate: '#per'
       weight: float

   - name: ByCount
     doc: |
       A product, sold by count.  The count must be a integer value.
     type: record
     extends: Product
     fields:
       per:
         type:
           type: enum
           symbols:
             - item
         jsonldPredicate: '#per'
       count: int

   - name: Basket
     doc: |
       A basket of products.  The 'documentRoot' field indicates it is a
       valid starting point for a document.  The 'basket' field will
       validate subtypes of 'Product' (ByWeight and ByCount).
     type: record
     documentRoot: true
     fields:
       basket:
         type:
           type: array
           items: Product

You can check the schema and document in schema_salad/tests/basket_schema.yml and schema_salad/tests/basket.yml::

   $ schema-salad-tool basket_schema.yml basket.yml
   Document `basket.yml` is valid


Documentation
-------------

requirements.txt

0 → 100644
+9 −0
Original line number Diff line number Diff line
typing==3.7.4 ; python_version < "3.5"
ruamel.yaml>=0.12.4, <= 0.15.96
rdflib==4.2.2
rdflib-jsonld==0.4.0
mistune>=0.8.1,<0.9
CacheControl==0.11.7
lockfile==0.12.2
typing-extensions
future
Loading