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

Retrieve providers list if no submodule is found #374

Merged
merged 3 commits into from Jun 25, 2020

Conversation

CasperWA
Copy link
Member

Fixes #373

The logic is now:

  1. Try to fetch providers from optimade.server.data:providers.json.
  2. If not found, try to fetch providers from https://providers.optimade.org/v1/links.
  3. If not found, raise.

@CasperWA CasperWA requested review from ml-evs and shyamd June 25, 2020 18:32
@codecov
Copy link

codecov bot commented Jun 25, 2020

Codecov Report

Merging #374 into master will decrease coverage by 0.48%.
The diff coverage is 35.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #374      +/-   ##
==========================================
- Coverage   90.92%   90.43%   -0.49%     
==========================================
  Files          54       54              
  Lines        2335     2352      +17     
==========================================
+ Hits         2123     2127       +4     
- Misses        212      225      +13     
Flag Coverage Δ
#unittests 90.43% <35.00%> (-0.49%) ⬇️
Impacted Files Coverage Δ
optimade/server/routers/utils.py 91.03% <28.57%> (-6.70%) ⬇️
optimade/server/data/__init__.py 70.00% <50.00%> (-30.00%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 16ab982...36ed18f. Read the comment docs.

Co-authored-by: Matthew Evans <7916000+ml-evs@users.noreply.github.com>
@shyamd
Copy link
Contributor

shyamd commented Jun 25, 2020

I think the loading of data in optimade.server.data should be the robust part. That way we're single-sourcing where the rest of the module gets "data" from.

@shyamd
Copy link
Contributor

shyamd commented Jun 25, 2020

Ideally, we eliminate get_providers or put that and similar functions into optimade.server.data

@ml-evs
Copy link
Member

ml-evs commented Jun 25, 2020

Ideally, we eliminate get_providers or put that and similar functions into optimade.server.data

We're trying to unblock a load of other PRs along the way here, but you're right, think this was the eventual intention, we should come back to it ;)

@CasperWA CasperWA merged commit ad68951 into master Jun 25, 2020
@CasperWA CasperWA deleted the fix_373_fetch-providers-list branch June 25, 2020 18:47
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.

Heroku cannot handle submodules when deploying via GitHub
3 participants