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

Adding OQMD's info to providers.json #52

Merged
merged 2 commits into from
Dec 21, 2020

Conversation

tachyontraveler
Copy link
Member

@tachyontraveler tachyontraveler commented Dec 18, 2020

OPTiMaDe v1.0.0 is now fully incorporated into qmpy (Django-based Python API that OQMD is based on).
I can pull the new scripts onto the public oqmd.org website once the internal review of qmpy is finished, but the final base-URLs are now designated.

I will update it here when the optimade-validator can access oqmd.org/optimade for validation. Created this PR now to initiate the process.

@tachyontraveler
Copy link
Member Author

@ml-evs @CasperWA The optimade implementation of oqmd.org is now up and running at oqmd.org/optimade. But the checks are failing without much info on what went wrong. can you help me with this? Thanks!

@ml-evs
Copy link
Member

ml-evs commented Dec 19, 2020

Hi @tachyontraveler, nice job getting the API up and running! It looks like there's just a couple of minor technical things going wrong.

  1. The link you have provided (http://oqmd.org/optimade) is to your main implementation, not your index meta-db implementation (a database of links to multiple databases served by one provider). I assume the OQMD will be in the same position as the materials project, i.e. they will only be serving one database, in which case you can follow their example and host the index meta-db statically through this repository over here: https://github.com/Materials-Consortia/providers/tree/master/src/index-metadbs. If I get a chance today, I'm happy to help set this up for you.
  2. I don't seem to get JSON responses from the API at the moment, which might be causing issues. e.g. http://oqmd.org/optimade/v1/info responds with some formatted HTML (see below). This will definitely cause issues for the optimade-validator, which can only handle pure JSON responses. The structures endpoint, on the other hand, seems to be returning JSON fine, so it must just be some missing response headers somewhere for links and info.
$ curl http://oqmd.org/optimade/v1/info
<body>
<pre>
{
  &quot;meta&quot;: {
    &quot;api_version&quot;: &quot;1.0.0&quot;,
    &quot;query&quot;: {
      &quot;representation&quot;: &quot;/info&quot;
    },
    &quot;more_data_available&quot;: false,
    &quot;schema&quot;: &quot;https://schemas.optimade.org/openapi/v1.0/optimade_index.json&quot;
...

"homepage": null,
"name": "The Open Quantum Materials Database",
"description": "The OQMD is a database of DFT calculated thermodynamic and structural properties of materials",
"base_url": "http://oqmd.org/optimade",
Copy link
Member

Choose a reason for hiding this comment

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

This would be the only change required in the providers file, you would then need to add an oqmd/ folder that follows the same structure as e.g. https://github.com/Materials-Consortia/providers/tree/master/src/index-metadbs/mp/v1

Suggested change
"base_url": "http://oqmd.org/optimade",
"base_url": "http://providers.optimade.org/index-metadbs/oqmd",

Copy link
Member

@ml-evs ml-evs Dec 19, 2020

Choose a reason for hiding this comment

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

It looks like this PR still hasn't made it in, but the instructions are all there if you wanted to self-host #18 or here https://github.com/Materials-Consortia/providers/tree/master/src/index-metadbs if you wanted to use this repo

Copy link
Member

Choose a reason for hiding this comment

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

It looks like this PR still hasn't made it in, but the instructions are all there if you wanted to self-host #18 or here https://github.com/Materials-Consortia/providers/tree/master/src/index-metadbs if you wanted to use this repo

I have just merged this now. So you can read the instructions directly in the repository README on the landing page.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, @ml-evs and @CasperWA ! I've added a new directory in index-metadb and changed the API response from HTML to JSON.

Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @tachyontraveler!

There's a couple of things that the optimade-validator is stumbling over when I run it on http://oqmd.org/optimade locally. Is the qmpy repository the appropriate place to raise any issues if need be?

@ml-evs ml-evs requested a review from CasperWA December 21, 2020 20:24
@tachyontraveler
Copy link
Member Author

@ml-evs Thanks for looking into validation issues. It'd be great if you can raise an issue here at https://github.com/wolverton-research-group/qmpy/issues . I will merge this PR in the meantime since any fixes to such issues will not affect scripts on any files involved in this PR.

@tachyontraveler tachyontraveler merged commit fe5048b into Materials-Consortia:master Dec 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants