Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rest api version "v4" implementation #3429

Merged
merged 2 commits into from
Oct 25, 2019
Merged

Conversation

waychal
Copy link
Contributor

@waychal waychal commented Oct 16, 2019

Fixes #2384 and fixes #3177

New version of rest api is implemented for aiida v1.0.0. It has only nodes, processes, calcjobs, groups, computers, users and server endpoints.

@waychal waychal requested a review from sphuber October 16, 2019 16:08
Copy link
Contributor

@sphuber sphuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @waychal and @asle85 ! I have a few suggestions and questions. Probably easiest if we discuss tomorrow in person.

aiida/orm/computers.py Outdated Show resolved Hide resolved
aiida/orm/groups.py Outdated Show resolved Hide resolved
aiida/orm/nodes/node.py Outdated Show resolved Hide resolved
aiida/orm/users.py Outdated Show resolved Hide resolved
aiida/restapi/__init__.py Outdated Show resolved Hide resolved
aiida/restapi/translator/nodes/process/process.py Outdated Show resolved Hide resolved
aiida/restapi/translator/nodes/node.py Outdated Show resolved Hide resolved
elsapassaro added a commit to elsapassaro/aiida-core that referenced this pull request Oct 17, 2019
elsapassaro added a commit to elsapassaro/aiida-core that referenced this pull request Oct 17, 2019
Copy link
Member

@giovannipizzi giovannipizzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I gave a first pass.
Sorry for the longish list of comments, but I think some are important as they might change the REST API for users.

docs/source/restapi/index.rst Show resolved Hide resolved
docs/source/restapi/index.rst Outdated Show resolved Hide resolved
docs/source/restapi/index.rst Show resolved Hide resolved
docs/source/restapi/index.rst Outdated Show resolved Hide resolved
docs/source/restapi/index.rst Show resolved Hide resolved
aiida/restapi/translator/base.py Outdated Show resolved Hide resolved
aiida/restapi/translator/base.py Outdated Show resolved Hide resolved
aiida/restapi/translator/base.py Show resolved Hide resolved
aiida/restapi/translator/base.py Show resolved Hide resolved
aiida/restapi/translator/nodes/data/upf.py Outdated Show resolved Hide resolved
sphuber and others added 2 commits October 25, 2019 10:41
A utility `aiida.restapi.common.identifiers.get_node_namespace` is added
that constructs the full nested node namespace present in the current
database. Each entry will contain a `full_type` attribute, which
uniquely identify the exact type, in the case of a leaf, or the sub
class of node types in the case of a namespace. The `full_type` can be
used to generate the query builder filters that will allow to query
exactly for this node type or its sub classes. This is stored in the
REST API module because it is exposed as an endpoint. This can then be
consumed by the Materials Cloud to dynamically build up an index of
available node classes with their `full_types` which can be used to
query for them.
The REST API is updated to `v4` to reflect the changes of the ORM of
`aiida-core` in `v1.0.0`, especially in the available endpoints. The
`calculations` and individual `data` endpoints have been removed. Added
are the `processes` and `calcjobs`  endpoints. The `visualization`
endpoints, which were used by the Materials Cloud to retrieve data in
a specific format that was derived from the basic node attributes and
repository contents, has been changed to `derived_properties`.

Also added the endpoints `repo_list` and `repo_contents` to get the
available objects in a node's repository and their contents in the case
of files.

The `schema` endpoints have been replaced with `projectable_properties`.
The `get_schema` class methods on various ORM classes have been
deprecated as this functionality was used strictly by the REST API.

Co-Authored-By: epassaro <elsa.passaro@epfl.ch>
@sphuber sphuber merged commit 4ff2829 into aiidateam:develop Oct 25, 2019
@sphuber
Copy link
Contributor

sphuber commented Oct 25, 2019

Thanks a lot @waychal and @asle85 ! Great work 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants