Closed plbremer closed 8 months ago
Hello,
When attempting to replicate the behavior described in the docs
https://linkml.io/linkml-validator/usage/#using-linkml-validator-as-a-module
with something like
from linkml.validator import Validator my_dict={ 'species':'Homo sapiens' } schema_path='/Users/pgleasonbremer/coding_projects/altos/altos-labs-ontology/src/alo/schema/alo.yaml' my_Validator=Validator(schema=schema_path) my_Validator.validate( obj=my_dict, target_class='DataPackage' )
I get
Traceback (most recent call last): File "/Users/pgleasonbremer/coding_projects/altos/linkml/mwe_validator_broken.py", line 12, in <module> my_Validator.validate( TypeError: validate() got an unexpected keyword argument `obj`
however, I get no error when changing the keyword to instance
instance
my_Validator.validate( instance=my_dict, target_class='DataPackage' )
I would submit a PR to fix it, but i looked at the source and it looks like validate expects keyword obj, so i was a little confused, thanks.
validate
obj
wrong place
Hello,
When attempting to replicate the behavior described in the docs
https://linkml.io/linkml-validator/usage/#using-linkml-validator-as-a-module
with something like
I get
however, I get no error when changing the keyword to
instance
I would submit a PR to fix it, but i looked at the source and it looks like
validate
expects keywordobj
, so i was a little confused, thanks.