materials-data-science-and-informatics / iridium Goto Github PK
View Code? Open in Web Editor NEWPython library for convenient access to Invenio RDM through its public REST API.
License: MIT License
Python library for convenient access to Invenio RDM through its public REST API.
License: MIT License
Please update both for annual reporting.
Figure out a way to set up Invenio RDM inside of the CI and use that instance for testing.
The tests for vocabularies provided here:
iridium/tests/test_inveniordm_api.py
Lines 23 to 50 in 4d357dc
are only working on instances where the vocabularies aren't adjusted. For example, a freshly installed instance.
It is expected and wanted behaviour that vocabularies are adapted and changed: https://inveniordm.docs.cern.ch/customize/vocabularies/
Our instance, for example, has already some other subjects and we are working on different record-types.
I wonder whether the current tests need more improvement or whether we want to limit these tests down to a 'untouched' vocabularies folder and we expect the user to disable or adjust these tests for their own instances.
Maybe my setup is outdated but for me this command doesn't run through:
Line 92 in 4d357dc
$ pdoc --html -o docs iridium
usage: pdoc [-o DIR] [-d {google,numpy,restructuredtext}] [-e module=url] [--footer-text TEXT] [--logo URL] [--logo-link URL] [--math | --no-math] [--search | --no-search] [--show-source | --no-show-source] [-t DIR] [-h HOST] [-p PORT] [-n] [--help] [--version] [module ...]
pdoc: error: unrecognized arguments: --html
$ pdoc --version
pdoc: 8.3.0
Python: 3.9.2
Platform: Linux-5.10.0-11-amd64-x86_64-with-glibc2.31
$ pdoc -o docs iridium
Creates
.
├── index.html
├── iridium
│ ├── api.html
│ ├── generic.html
│ ├── inveniordm
│ │ ├── models
│ │ │ ├── base.html
│ │ │ ├── biblio.html
│ │ │ ├── query.html
│ │ │ └── technical.html
│ │ └── models.html
│ ├── inveniordm.html
│ ├── pprint.html
│ ├── query.html
│ ├── record.html
│ └── util.html
├── iridium.html
└── search.js
3 directories, 15 files
Do we need to fix the Readme, or do I need to fix my setup? If it is my setup, let me know what is needed (and maybe add this to the Readme, too). ;)
iridium/iridium/inveniordm/__init__.py
Lines 223 to 242 in 4d357dc
In line 236 I would expect some 'delete' information. Something like "Delete information about access link for record."?
$ poetry run pytest
================================================================================================================================================= test session starts =================================================================================================================================================
platform linux -- Python 3.9.2, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /home/chriz/rz/code/invenio/repos/iridium/iridium, configfile: pyproject.toml
plugins: anyio-3.5.0, cov-3.0.0, dotenv-0.5.2
collected 14 items
tests/test_api.py EEE [ 21%]
tests/test_generic.py ... [ 42%]
tests/test_inveniordm_api.py EEEEEE [ 85%]
tests/test_utils.py .. [100%]
======================================================================================================================================================= ERRORS ========================================================================================================================================================
_________________________________________________________________________________________________________________________________________ ERROR at setup of test_vocab_query __________________________________________________________________________________________________________________________________________
@pytest.fixture(scope="session")
def rdm():
"""Return an low-level API instance configured from environment variables."""
cl = InvenioRDMClient.from_env(verify=False)
# clean up all drafts from possible previous unclean runs
if cl.connected():
> drafts = cl.query.records(user=True, q="is_published:false")
tests/conftest.py:94:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
iridium/inveniordm/__init__.py:202: in records
res.parse_hits(Record)
iridium/inveniordm/models/query.py:135: in parse_hits
self.hits.hits = [obj_cls.parse_obj(x) for x in self.hits.hits] # type: ignore
iridium/inveniordm/models/query.py:135: in <listcomp>
self.hits.hits = [obj_cls.parse_obj(x) for x in self.hits.hits] # type: ignore
iridium/inveniordm/models/base.py:66: in parse_obj
return cast(cls, super().parse_obj(val, *args, **kwargs))
pydantic/main.py:578: in pydantic.main.BaseModel.parse_obj
???
iridium/inveniordm/models/base.py:29: in __init__
super().__init__(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E pydantic.error_wrappers.ValidationError: 1 validation error for Record
E is_draft
E extra fields not permitted (type=value_error.extra)
pydantic/main.py:406: ValidationError
____________________________________________________________________________________________________________________________________ ERROR at setup of test_readonly_fields_draft _____________________________________________________________________________________________________________________________________
@pytest.fixture(scope="session")
def rdm():
"""Return an low-level API instance configured from environment variables."""
cl = InvenioRDMClient.from_env(verify=False)
# clean up all drafts from possible previous unclean runs
if cl.connected():
> drafts = cl.query.records(user=True, q="is_published:false")
tests/conftest.py:94:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
iridium/inveniordm/__init__.py:202: in records
res.parse_hits(Record)
iridium/inveniordm/models/query.py:135: in parse_hits
self.hits.hits = [obj_cls.parse_obj(x) for x in self.hits.hits] # type: ignore
iridium/inveniordm/models/query.py:135: in <listcomp>
self.hits.hits = [obj_cls.parse_obj(x) for x in self.hits.hits] # type: ignore
iridium/inveniordm/models/base.py:66: in parse_obj
return cast(cls, super().parse_obj(val, *args, **kwargs))
pydantic/main.py:578: in pydantic.main.BaseModel.parse_obj
???
iridium/inveniordm/models/base.py:29: in __init__
super().__init__(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E pydantic.error_wrappers.ValidationError: 1 validation error for Record
E is_draft
E extra fields not permitted (type=value_error.extra)
pydantic/main.py:406: ValidationError
________________________________________________________________________________________________________________________________________ ERROR at setup of test_create_record _________________________________________________________________________________________________________________________________________
@pytest.fixture(scope="session")
def rdm():
"""Return an low-level API instance configured from environment variables."""
cl = InvenioRDMClient.from_env(verify=False)
# clean up all drafts from possible previous unclean runs
if cl.connected():
> drafts = cl.query.records(user=True, q="is_published:false")
tests/conftest.py:94:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
iridium/inveniordm/__init__.py:202: in records
res.parse_hits(Record)
iridium/inveniordm/models/query.py:135: in parse_hits
self.hits.hits = [obj_cls.parse_obj(x) for x in self.hits.hits] # type: ignore
iridium/inveniordm/models/query.py:135: in <listcomp>
self.hits.hits = [obj_cls.parse_obj(x) for x in self.hits.hits] # type: ignore
iridium/inveniordm/models/base.py:66: in parse_obj
return cast(cls, super().parse_obj(val, *args, **kwargs))
pydantic/main.py:578: in pydantic.main.BaseModel.parse_obj
???
iridium/inveniordm/models/base.py:29: in __init__
super().__init__(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E pydantic.error_wrappers.ValidationError: 1 validation error for Record
E is_draft
E extra fields not permitted (type=value_error.extra)
pydantic/main.py:406: ValidationError
_________________________________________________________________________________________________________________________________________ ERROR at setup of test_vocabularies _________________________________________________________________________________________________________________________________________
@pytest.fixture(scope="session")
def rdm():
"""Return an low-level API instance configured from environment variables."""
cl = InvenioRDMClient.from_env(verify=False)
# clean up all drafts from possible previous unclean runs
if cl.connected():
> drafts = cl.query.records(user=True, q="is_published:false")
tests/conftest.py:94:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
iridium/inveniordm/__init__.py:202: in records
res.parse_hits(Record)
iridium/inveniordm/models/query.py:135: in parse_hits
self.hits.hits = [obj_cls.parse_obj(x) for x in self.hits.hits] # type: ignore
iridium/inveniordm/models/query.py:135: in <listcomp>
self.hits.hits = [obj_cls.parse_obj(x) for x in self.hits.hits] # type: ignore
iridium/inveniordm/models/base.py:66: in parse_obj
return cast(cls, super().parse_obj(val, *args, **kwargs))
pydantic/main.py:578: in pydantic.main.BaseModel.parse_obj
???
iridium/inveniordm/models/base.py:29: in __init__
super().__init__(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E pydantic.error_wrappers.ValidationError: 1 validation error for Record
E is_draft
E extra fields not permitted (type=value_error.extra)
pydantic/main.py:406: ValidationError
________________________________________________________________________________________________________________________________________ ERROR at setup of test_record_queries ________________________________________________________________________________________________________________________________________
@pytest.fixture(scope="session")
def rdm():
"""Return an low-level API instance configured from environment variables."""
cl = InvenioRDMClient.from_env(verify=False)
# clean up all drafts from possible previous unclean runs
if cl.connected():
> drafts = cl.query.records(user=True, q="is_published:false")
tests/conftest.py:94:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
iridium/inveniordm/__init__.py:202: in records
res.parse_hits(Record)
iridium/inveniordm/models/query.py:135: in parse_hits
self.hits.hits = [obj_cls.parse_obj(x) for x in self.hits.hits] # type: ignore
iridium/inveniordm/models/query.py:135: in <listcomp>
self.hits.hits = [obj_cls.parse_obj(x) for x in self.hits.hits] # type: ignore
iridium/inveniordm/models/base.py:66: in parse_obj
return cast(cls, super().parse_obj(val, *args, **kwargs))
pydantic/main.py:578: in pydantic.main.BaseModel.parse_obj
???
iridium/inveniordm/models/base.py:29: in __init__
super().__init__(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E pydantic.error_wrappers.ValidationError: 1 validation error for Record
E is_draft
E extra fields not permitted (type=value_error.extra)
pydantic/main.py:406: ValidationError
__________________________________________________________________________________________________________________________________________ ERROR at setup of test_new_draft ___________________________________________________________________________________________________________________________________________
@pytest.fixture(scope="session")
def rdm():
"""Return an low-level API instance configured from environment variables."""
cl = InvenioRDMClient.from_env(verify=False)
# clean up all drafts from possible previous unclean runs
if cl.connected():
> drafts = cl.query.records(user=True, q="is_published:false")
tests/conftest.py:94:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
iridium/inveniordm/__init__.py:202: in records
res.parse_hits(Record)
iridium/inveniordm/models/query.py:135: in parse_hits
self.hits.hits = [obj_cls.parse_obj(x) for x in self.hits.hits] # type: ignore
iridium/inveniordm/models/query.py:135: in <listcomp>
self.hits.hits = [obj_cls.parse_obj(x) for x in self.hits.hits] # type: ignore
iridium/inveniordm/models/base.py:66: in parse_obj
return cast(cls, super().parse_obj(val, *args, **kwargs))
pydantic/main.py:578: in pydantic.main.BaseModel.parse_obj
???
iridium/inveniordm/models/base.py:29: in __init__
super().__init__(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E pydantic.error_wrappers.ValidationError: 1 validation error for Record
E is_draft
E extra fields not permitted (type=value_error.extra)
pydantic/main.py:406: ValidationError
______________________________________________________________________________________________________________________________________ ERROR at setup of test_draft_from_record _______________________________________________________________________________________________________________________________________
@pytest.fixture(scope="session")
def rdm():
"""Return an low-level API instance configured from environment variables."""
cl = InvenioRDMClient.from_env(verify=False)
# clean up all drafts from possible previous unclean runs
if cl.connected():
> drafts = cl.query.records(user=True, q="is_published:false")
tests/conftest.py:94:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
iridium/inveniordm/__init__.py:202: in records
res.parse_hits(Record)
iridium/inveniordm/models/query.py:135: in parse_hits
self.hits.hits = [obj_cls.parse_obj(x) for x in self.hits.hits] # type: ignore
iridium/inveniordm/models/query.py:135: in <listcomp>
self.hits.hits = [obj_cls.parse_obj(x) for x in self.hits.hits] # type: ignore
iridium/inveniordm/models/base.py:66: in parse_obj
return cast(cls, super().parse_obj(val, *args, **kwargs))
pydantic/main.py:578: in pydantic.main.BaseModel.parse_obj
???
iridium/inveniordm/models/base.py:29: in __init__
super().__init__(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E pydantic.error_wrappers.ValidationError: 1 validation error for Record
E is_draft
E extra fields not permitted (type=value_error.extra)
pydantic/main.py:406: ValidationError
_____________________________________________________________________________________________________________________________________ ERROR at setup of test_version_from_record ______________________________________________________________________________________________________________________________________
@pytest.fixture(scope="session")
def rdm():
"""Return an low-level API instance configured from environment variables."""
cl = InvenioRDMClient.from_env(verify=False)
# clean up all drafts from possible previous unclean runs
if cl.connected():
> drafts = cl.query.records(user=True, q="is_published:false")
tests/conftest.py:94:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
iridium/inveniordm/__init__.py:202: in records
res.parse_hits(Record)
iridium/inveniordm/models/query.py:135: in parse_hits
self.hits.hits = [obj_cls.parse_obj(x) for x in self.hits.hits] # type: ignore
iridium/inveniordm/models/query.py:135: in <listcomp>
self.hits.hits = [obj_cls.parse_obj(x) for x in self.hits.hits] # type: ignore
iridium/inveniordm/models/base.py:66: in parse_obj
return cast(cls, super().parse_obj(val, *args, **kwargs))
pydantic/main.py:578: in pydantic.main.BaseModel.parse_obj
???
iridium/inveniordm/models/base.py:29: in __init__
super().__init__(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E pydantic.error_wrappers.ValidationError: 1 validation error for Record
E is_draft
E extra fields not permitted (type=value_error.extra)
pydantic/main.py:406: ValidationError
_________________________________________________________________________________________________________________________________________ ERROR at setup of test_access_links _________________________________________________________________________________________________________________________________________
@pytest.fixture(scope="session")
def rdm():
"""Return an low-level API instance configured from environment variables."""
cl = InvenioRDMClient.from_env(verify=False)
# clean up all drafts from possible previous unclean runs
if cl.connected():
> drafts = cl.query.records(user=True, q="is_published:false")
tests/conftest.py:94:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
iridium/inveniordm/__init__.py:202: in records
res.parse_hits(Record)
iridium/inveniordm/models/query.py:135: in parse_hits
self.hits.hits = [obj_cls.parse_obj(x) for x in self.hits.hits] # type: ignore
iridium/inveniordm/models/query.py:135: in <listcomp>
self.hits.hits = [obj_cls.parse_obj(x) for x in self.hits.hits] # type: ignore
iridium/inveniordm/models/base.py:66: in parse_obj
return cast(cls, super().parse_obj(val, *args, **kwargs))
pydantic/main.py:578: in pydantic.main.BaseModel.parse_obj
???
iridium/inveniordm/models/base.py:29: in __init__
super().__init__(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E pydantic.error_wrappers.ValidationError: 1 validation error for Record
E is_draft
E extra fields not permitted (type=value_error.extra)
pydantic/main.py:406: ValidationError
=============================================================================================================================================== short test summary info ===============================================================================================================================================
ERROR tests/test_api.py::test_vocab_query - pydantic.error_wrappers.ValidationError: 1 validation error for Record
ERROR tests/test_api.py::test_readonly_fields_draft - pydantic.error_wrappers.ValidationError: 1 validation error for Record
ERROR tests/test_api.py::test_create_record - pydantic.error_wrappers.ValidationError: 1 validation error for Record
ERROR tests/test_inveniordm_api.py::test_vocabularies - pydantic.error_wrappers.ValidationError: 1 validation error for Record
ERROR tests/test_inveniordm_api.py::test_record_queries - pydantic.error_wrappers.ValidationError: 1 validation error for Record
ERROR tests/test_inveniordm_api.py::test_new_draft - pydantic.error_wrappers.ValidationError: 1 validation error for Record
ERROR tests/test_inveniordm_api.py::test_draft_from_record - pydantic.error_wrappers.ValidationError: 1 validation error for Record
ERROR tests/test_inveniordm_api.py::test_version_from_record - pydantic.error_wrappers.ValidationError: 1 validation error for Record
ERROR tests/test_inveniordm_api.py::test_access_links - pydantic.error_wrappers.ValidationError: 1 validation error for Record
============================================================================================================================================= 5 passed, 9 errors in 1.90s =============================================================================================================================================
Looks like, there is an validation error. ;)
Maybe related: https://inveniordm.docs.cern.ch/releases/versions/version-v8.0.0/#my-dashboard
This also means we have changed the URL endpoint of the uploads page from `/uploads` to `/me/uploads` so that we can later add both `/me/communities` and `/me/requests`.
Edit: this seems to be an internal endpoint not an Rest-Api url-change.
For example:
If I find more, I will try to update this issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.