-
Notifications
You must be signed in to change notification settings - Fork 21
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
Ensuring that links point to index meta-dbs #34
Ensuring that links point to index meta-dbs #34
Conversation
- Explicitly stated in the README the requirement that this list only allows pointing to Index meta-DBs - Add Index meta-DBs for COD and TCOD - Add instructions on how to host a new Index meta-DB - Set to `null` the `base_url` of the example entry (otherwise it would not pass validation) - Added new pytest that validates that all `base_url`s in the main `providers.json` file are indeed Index meta-DBs, and that at least these Index meta-DBs have a valid syntax
I create a draft PR so I can start to get feedback. This is still draft because:
|
758b7e8
to
a293735
Compare
Also removing the now useless symlinks that, in my opinion, create confusion (I was under the impression that they were honored, but they are not - I think we used earlier, before Netlify, when serving with GitHub Pages).
a293735
to
bb551ab
Compare
Just for reference, for people who want to check live the results using Netlify preview feature:
BTW: Thanks @rartino for pointing out this preview feature! Not only I discovered a small issue, but I could also simplify further the instructions to create a new meta-db: now the redirects are parametrised, so there is no need to create symlinks or specify new redirects. I also took the occasion to remove symlinks from the repo: I think they are confusing, as they are not really honoured by netlify, that instead uses the |
I suppose we can remove the symlinks... But they were there because with them, the repository also works correctly in github pages, except for the serving json files with the wrong mime-type. But I guess some people may find it a good thing that this way of serving the repositry with that flaw stops working. (I was holding out for github pages to deliver some form of solution to that limitation some day...) |
@rartino yes, I see. I think the best would be to open an issue to say that we might want to go back to GitHub pages, and in that case we should remove |
Also: I agree with your suggestion. Do you open the issue, just so that the notes about what needs to be done to re-instate github compatibility are kept. (You know best what you removed...) |
Co-authored-by: Rickard Armiento <[email protected]>
Sorry about this; but my first suggestion had slashes at the end of the OPTIMADE providers URLs (both homepage and base_url). I tried to quickly edit it, but apparently you picked it up anyway. |
@rartino: done, issue open: #35 Also thanks for the |
BTW: this issue is ready for review. The failing test is due to something that is being fixed in the nomad implementation (pinging @markus1978 - as soon as it's redeployed, please let me know so I re-run the tests) |
Co-authored-by: Rickard Armiento <[email protected]>
Also adding flag that allows to allow/disallow v0.x endpoints
These have been adapted in the OPTIMADE specs in Materials-Consortia/OPTIMADE#273
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great @giovannipizzi !
I haven't checked the test_providers.py
, but as the only file.
Not your fault @CasperWA actually thanks for reviewing! I just saw 273 merged so I decided to update directly this. BTW: I think this is ready for a final review and possibly merge. I see three options:
I don't like approach 3, so I suggest approach 1; but if there are no other issues I'd like to merge this by tomorrow (Friday) evening before the end the workshop (also because this is blocking for e.g. #23) so maybe if the deployment is not ready, we continue tomorrow with approach 3? @markus1978 do you know how long it will take for the fix to be in production? What is the opinion of others? Also, @sauliusg it would be good to have your review on this since I am "touching" the COD and TCOD entries (even if I am not really changing anything, except adding the Index Meta-DB). |
I think @markus1978 has an intention of having the Index Meta-Database hosted here as well? |
I think @markus1978 told me in private that now they have their own meta-db so he's happy to use his own, and that he would have fixed the syntax error in his response |
How would we normally handle this situation? As the providers list grows, there surely is going to be situations when we want to merge changes while someones database is offline. We probably should only mark as 'fail' if the database we are trying to add is the breaking one and only issue warnings for other failing databases. (Is it possible in travis to see which database is being added somehow?...) And then we probably should set up some other external system that checks the list periodically and alerts us if some database has been failing for weeks - in which case we should have a protocol for sending out a warning, and then removing it. |
Yeah, this feels like something that is at a I agree that it would be great to test the incoming providers, however, I don't know how easy that is to do technically, and I don't know that it even at that point should be a Instead we should probably have a "dashboard" of a sort, where it's possible to see the current list of responding providers ("current" here being on a weekly basis or similar?). |
Fully agreed, was thinking the same thing. If we accept that these errors should be checked manually but not be blocking (I am ok, and we can revisit later), I will now convert this PR from a draft to a real PR, so it can be reviewed and merged. |
This was discussed and found not a good idea. Maybe we can do something similar by letting the validator look at the git history. |
I think I fixed the nomad issues that failed the tests. Is there a way to re-run the checks without a new commit? |
@markus1978 yes, I just rerun it. That problem went away, thanks!
I think that the specs require that in the |
@CasperWA is this ok with you now? |
Regarding the dashboard, see the independent PR #39 |
Ok, I am going to change the url under available versions. But, if I remember correctly @CasperWA instructing me the other way around? But I might also just be solidly confused, since it feels that I have changed urls from versioned to un-versioned and back again about a dozen times by now. |
:-) I think it's unversioned when you link to another base_url, but versioned when you declare your own URL in /info (please correct me if I'm wrong) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should use the IndexInfoResponse
for the /info
endpoints of Index Meta-Databases. These are slightly different, adding in the relationships
key where one can provide a default
database/links
resource.
Concerning the suggested version value changes, I am not completely sure if they are needed according to the spec, so I would suggest to check that before blindly accepting the changes :)
Otherwise fine by me, thanks @giovannipizzi !
In the |
All good, eventually I will get it; you just have to be patient with me ;-). Should be fixed now. |
Thanks a lot @markus1978 - all tests pass now! :-D |
Co-authored-by: Casper Welzel Andersen <[email protected]>
Thanks @CasperWA . Merged all your changes.
For those of cod, cod, exmpl, it's probably because the optimade-python-tools have not yet been released with the fix? When will this happen? For nomad, is the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
How clear are we in the specification about in which fields you are supposed to prefix the version number with 'v' and not? I feel we are widely inconsistent with this. (And IMO it had been better to just have the 'v' on the URL and nowhere else.)
I think I addressed all requests by Casper so I'm dismissing this
@rartino I'm not 100% sure that this is currently specified, I didn't check - what is in here should be correct as it is used by the client. Indeed we should probably open an issue in the main repo if this is not clear, or it's confusing |
In particular:
only allows pointing to Index meta-DBs (fixes Add policy text to README.md #26 and fixes What should the URLs in the /links endpoint point to? #27)
null
thebase_url
of the example entry (otherwise itwould not pass validation)
base_url
s in the mainproviders.json
file are indeed Index meta-DBs, and thatat least these Index meta-DBs have a valid syntax (fixes Validate base_url #25)
Also, this PR probably supersedes PR #18
Mentioning also #23 as here we are providing an easy way to host an index Meta-DB, if you don't want to host it yourself.
Fixes #36 : Updating
providers.json
with the updated links resource object schema added to the spec in Materials-Consortia/OPTIMADE#273.