Comments (5)
this is a bit cryptic!
from schemasheets.
I don't know what problem I was having with examples in the past. schemasheets seems to handle single and multiple, delimited examples fine now. I did not add any new code, just working examples.
from schemasheets.
Ahh... I was getting an error when creating a SchemaView from a YAML file, created by schemasheets, from a TSV with an examples column
From sheets_and_friends/sheets_and_friends/shuttle.py
:
Traceback (most recent call last):
File "", line 1, in
File "/home/mark/.cache/pypoetry/virtualenvs/sheets-and-friends-eIKNSve2-py3.9/lib/python3.9/site-packages/click/core.py", line 1128, in call
return self.main(*args, **kwargs)
File "/home/mark/.cache/pypoetry/virtualenvs/sheets-and-friends-eIKNSve2-py3.9/lib/python3.9/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/mark/.cache/pypoetry/virtualenvs/sheets-and-friends-eIKNSve2-py3.9/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/mark/.cache/pypoetry/virtualenvs/sheets-and-friends-eIKNSve2-py3.9/lib/python3.9/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/mark/gitrepos/sheets_and_friends/sheets_and_friends/shuttle.py", line 42, in do_shuttle
shuttle.prepare_dest_schema()
File "/home/mark/gitrepos/sheets_and_friends/sheets_and_friends/shuttle.py", line 75, in prepare_dest_schema
current_view = SchemaView(self.recipient_model_fp)
File "/home/mark/.cache/pypoetry/virtualenvs/sheets-and-friends-eIKNSve2-py3.9/lib/python3.9/site-packages/linkml_runtime/utils/schemaview.py", line 102, in init
schema = load_schema_wrap(schema)
File "/home/mark/.cache/pypoetry/virtualenvs/sheets-and-friends-eIKNSve2-py3.9/lib/python3.9/site-packages/linkml_runtime/utils/schemaview.py", line 56, in load_schema_wrap
schema = yaml_loader.load(path, target_class=SchemaDefinition, **kwargs)
File "/home/mark/.cache/pypoetry/virtualenvs/sheets-and-friends-eIKNSve2-py3.9/lib/python3.9/site-packages/linkml_runtime/loaders/loader_root.py", line 85, in load
results = self.load_any(*args, **kwargs)
File "/home/mark/.cache/pypoetry/virtualenvs/sheets-and-friends-eIKNSve2-py3.9/lib/python3.9/site-packages/linkml_runtime/loaders/yaml_loader.py", line 25, in load_any
return self.load_source(source, loader, target_class, accept_header="text/yaml, application/yaml;q=0.9",
File "/home/mark/.cache/pypoetry/virtualenvs/sheets-and-friends-eIKNSve2-py3.9/lib/python3.9/site-packages/linkml_runtime/loaders/loader_root.py", line 66, in load_source
return target_class(**data_as_dict)
File "", line 50, in init
File "/home/mark/.cache/pypoetry/virtualenvs/sheets-and-friends-eIKNSve2-py3.9/lib/python3.9/site-packages/linkml_runtime/linkml_model/meta.py", line 402, in post_init
self._normalize_inlined_as_dict(slot_name="classes", slot_type=ClassDefinition, key_name="name", keyed=True)
File "/home/mark/.cache/pypoetry/virtualenvs/sheets-and-friends-eIKNSve2-py3.9/lib/python3.9/site-packages/linkml_runtime/utils/yamlutils.py", line 100, in _normalize_inlined_as_dict
self._normalize_inlined(slot_name, slot_type, key_name, keyed, False)
File "/home/mark/.cache/pypoetry/virtualenvs/sheets-and-friends-eIKNSve2-py3.9/lib/python3.9/site-packages/linkml_runtime/utils/yamlutils.py", line 200, in _normalize_inlined
form_1({k: v})
File "/home/mark/.cache/pypoetry/virtualenvs/sheets-and-friends-eIKNSve2-py3.9/lib/python3.9/site-packages/linkml_runtime/utils/yamlutils.py", line 153, in form_1
order_up(key, slot_type(**as_dict(raw_obj)))
File "", line 59, in init
File "/home/mark/.cache/pypoetry/virtualenvs/sheets-and-friends-eIKNSve2-py3.9/lib/python3.9/site-packages/linkml_runtime/linkml_model/meta.py", line 1348, in post_init
self._normalize_inlined_as_dict(slot_name="slot_usage", slot_type=SlotDefinition, key_name="name", keyed=True)
File "/home/mark/.cache/pypoetry/virtualenvs/sheets-and-friends-eIKNSve2-py3.9/lib/python3.9/site-packages/linkml_runtime/utils/yamlutils.py", line 100, in _normalize_inlined_as_dict
self._normalize_inlined(slot_name, slot_type, key_name, keyed, False)
File "/home/mark/.cache/pypoetry/virtualenvs/sheets-and-friends-eIKNSve2-py3.9/lib/python3.9/site-packages/linkml_runtime/utils/yamlutils.py", line 200, in _normalize_inlined
form_1({k: v})
File "/home/mark/.cache/pypoetry/virtualenvs/sheets-and-friends-eIKNSve2-py3.9/lib/python3.9/site-packages/linkml_runtime/utils/yamlutils.py", line 153, in form_1
order_up(key, slot_type(**as_dict(raw_obj)))
File "", line 84, in init
File "/home/mark/.cache/pypoetry/virtualenvs/sheets-and-friends-eIKNSve2-py3.9/lib/python3.9/site-packages/linkml_runtime/linkml_model/meta.py", line 1221, in post_init
super().post_init(**kwargs)
File "/home/mark/.cache/pypoetry/virtualenvs/sheets-and-friends-eIKNSve2-py3.9/lib/python3.9/site-packages/linkml_runtime/linkml_model/meta.py", line 638, in post_init
super().post_init(**kwargs)
File "/home/mark/.cache/pypoetry/virtualenvs/sheets-and-friends-eIKNSve2-py3.9/lib/python3.9/site-packages/linkml_runtime/linkml_model/meta.py", line 297, in post_init
self.examples = [v if isinstance(v, Example) else Example(**as_dict(v)) for v in self.examples]
File "/home/mark/.cache/pypoetry/virtualenvs/sheets-and-friends-eIKNSve2-py3.9/lib/python3.9/site-packages/linkml_runtime/linkml_model/meta.py", line 297, in
self.examples = [v if isinstance(v, Example) else Example(**as_dict(v)) for v in self.examples]
TypeError: linkml_runtime.linkml_model.meta.Example() argument after ** must be a mapping, not extended_str
from schemasheets.
closed by #24
from schemasheets.
Could improve PR with a test instead of an example in the Makefile
from schemasheets.
Related Issues (20)
- repo missing LICENSE.md
- the converter doesn't work with the gsheet example
- no docker image available
- linkml2sheets reports `slots` isn't implemented
- Provide pre-test for #109
- Export a schemasheet from a schema with no template HOT 2
- change `import pkg_resources` in `generate_populate.py` to `importlib` HOT 2
- audit the names of variable added in branch `exporting-without-tsv-templ` HOT 1
- merge from branch `exporting-without-tsv-templ` requires unit tests
- Support schema-level settings in the metamodel
- test support for schema elements required for a full-schemasheets MIxS model
- string-ify list items before pasting
- Basics description HOT 1
- linkml2schemasheets-template is not guaranteed to produce a row for every slot used by every class
- issues with attributes column HOT 1
- attribute and slot usage in one schema
- slots are created when using `--use-attributes`
- using `template` to create exact mapping
- Blank permissible values for enumerations
- adding option to support attributes together with slots
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from schemasheets.