README/docs example validate_dataset({"resources": "bad"}) raises AttributeError (dict input unsupported).
Environment
fairspec 0.1.4 (installed from PyPI)
- Python 3.12.3, Linux
- Reproduced in a clean virtualenv against the published wheel.
Repro (verbatim from README.md / docs/python.md)
from fairspec import validate_dataset
report = validate_dataset({"resources": "bad"})
print(report.valid)
Actual
AttributeError: 'dict' object has no attribute 'model_dump'
Passing a model works:
from fairspec import Dataset, validate_dataset
validate_dataset(Dataset(resources=[])).valid # True
So validate_dataset only accepts a Dataset model, but the documented public example passes a plain dict.
Expected: either accept a dict descriptor (coerce/validate it) as the docs show, or update the docs — the README example should run as written.
README/docs example
validate_dataset({"resources": "bad"})raisesAttributeError(dict input unsupported).Environment
fairspec0.1.4 (installed from PyPI)Repro (verbatim from
README.md/docs/python.md)Actual
Passing a model works:
So
validate_datasetonly accepts aDatasetmodel, but the documented public example passes a plaindict.Expected: either accept a
dictdescriptor (coerce/validate it) as the docs show, or update the docs — the README example should run as written.