[med-svn] [Git][med-team/python-schema-salad][upstream] New upstream version 5.0.20200220195218
Michael R. Crusoe
gitlab at salsa.debian.org
Thu Feb 27 18:59:57 GMT 2020
Michael R. Crusoe pushed to branch upstream at Debian Med / python-schema-salad
Commits:
017b186f by Michael R. Crusoe at 2020-02-27T19:46:55+01:00
New upstream version 5.0.20200220195218
- - - - -
8 changed files:
- Makefile
- PKG-INFO
- schema_salad.egg-info/PKG-INFO
- schema_salad.egg-info/SOURCES.txt
- schema_salad/avro/schema.py
- schema_salad/tests/test_examples.py
- + schema_salad/tests/test_schema/cwltest-schema.yml
- setup.cfg
Changes:
=====================================
Makefile
=====================================
@@ -192,7 +192,7 @@ release-test: FORCE
release: release-test
. testenv3_2/bin/activate && \
testenv3_2/src/${PACKAGE}/setup.py sdist bdist_wheel
- . testenv3.7_2/bin/activate && \
+ . testenv3_2/bin/activate && \
pip install twine && \
twine upload testenv3_2/src/${PACKAGE}/dist/* && \
git tag ${VERSION} && git push --tags
=====================================
PKG-INFO
=====================================
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: schema-salad
-Version: 5.0.20200126033820
+Version: 5.0.20200220195218
Summary: Schema Annotations for Linked Avro Data (SALAD)
Home-page: https://github.com/common-workflow-language/schema_salad
Author: Common workflow language working group
=====================================
schema_salad.egg-info/PKG-INFO
=====================================
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: schema-salad
-Version: 5.0.20200126033820
+Version: 5.0.20200220195218
Summary: Schema Annotations for Linked Avro Data (SALAD)
Home-page: https://github.com/common-workflow-language/schema_salad
Author: Common workflow language working group
=====================================
schema_salad.egg-info/SOURCES.txt
=====================================
@@ -160,6 +160,7 @@ schema_salad/tests/test_schema/Process.yml
schema_salad/tests/test_schema/Workflow.yml
schema_salad/tests/test_schema/concepts.md
schema_salad/tests/test_schema/contrib.md
+schema_salad/tests/test_schema/cwltest-schema.yml
schema_salad/tests/test_schema/intro.md
schema_salad/tests/test_schema/invocation.md
schema_salad/tests/test_schema/metaschema_base.yml
=====================================
schema_salad/avro/schema.py
=====================================
@@ -556,6 +556,11 @@ def make_avsc_object(json_data, names=None):
names = Names()
assert isinstance(names, Names)
+ if isinstance(json_data, Dict) and json_data.get("name") == "Any":
+ del names.names["Any"]
+ elif not names.has_name("Any", ""):
+ EnumSchema("Any", "", ["Any"], names=names)
+
# JSON object (non-union)
if hasattr(json_data, "get") and callable(json_data.get): # type: ignore
assert isinstance(json_data, Dict)
=====================================
schema_salad/tests/test_examples.py
=====================================
@@ -415,3 +415,15 @@ def test_blank_node_id():
ra, _ = ldr.resolve_all(cmap({"id": "_:foo"}), "http://example.com")
assert {"id": "_:foo"} == ra
+
+
+def test_can_use_Any():
+ # Test that 'type: Any' can be used
+ (
+ document_loader,
+ avsc_names,
+ schema_metadata,
+ metaschema_loader,
+ ) = schema_salad.schema.load_schema( # noqa: B950
+ get_data("tests/test_schema/cwltest-schema.yml")
+ )
=====================================
schema_salad/tests/test_schema/cwltest-schema.yml
=====================================
@@ -0,0 +1,25 @@
+$base: "https://w3id.org/cwl/cwltest#"
+$graph:
+ - name: TestCase
+ type: record
+ documentRoot: true
+ fields:
+ id:
+ type: [int, string]
+ jsonldPredicate:
+ _type: "@id"
+ identity: true
+ label: string?
+ doc: string?
+ tags: string[]?
+ tool:
+ type: string
+ jsonldPredicate:
+ _type: "@id"
+ job:
+ type: string?
+ jsonldPredicate:
+ _type: "@id"
+ should_fail: boolean?
+ output:
+ type: Any?
=====================================
setup.cfg
=====================================
@@ -5,6 +5,6 @@ test = pytest
addopts = --pyargs schema_salad
[egg_info]
-tag_build = .20200126033820
+tag_build = .20200220195218
tag_date = 0
View it on GitLab: https://salsa.debian.org/med-team/python-schema-salad/-/commit/017b186fde19ea8afee2a02baaedb5b31b67e223
--
View it on GitLab: https://salsa.debian.org/med-team/python-schema-salad/-/commit/017b186fde19ea8afee2a02baaedb5b31b67e223
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200227/89f0474f/attachment-0001.html>
More information about the debian-med-commit
mailing list