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

Build fix: Remove dependency on http://europa.eu/rapid/conf/RSS20.xsd and update WorldBank to API to V2 #1320

Merged
merged 3 commits into from
Oct 4, 2020

Conversation

nhirschey
Copy link
Contributor

These are fixes to get the build working again.

  1. The dependency on the http://europa.eu/rapid/conf/RSS20.xsd has been creating build problems for awhile. I simply removed the test dependency.

  2. Also, on June 19, 2020, the World Bank deprecated the "v1" api.This broke the WorldBank provider and tests. The change to fix this is simple as far as I can tell (add "v2" to the url), but in the new api the indicator queries were failing because of the 1900:2050 date query parameter. I simply changed the date query to "" to minimize code changes. Now the tests pass, and I did some simple exploratory queries and everything seemed to work fine.

The API fails with the old restriction. It works with a smaller date restriction like 2000:2010, but for simplicity just removing the restriction (which also works and gets the whole history). http://api.worldbank.org/v2/country/gb/indicator/SP.POP.TOTL?format=json&date=
@zyzhu
Copy link
Contributor

zyzhu commented Aug 9, 2020

@dsyme Bump this. This pull is necessary to interact with World Bank data as the old API is already gone.

I was planning to update Deedle's documentations. But the docs uses World Bank data as examples and it failed because of this issue.

@eugbaranov
Copy link
Contributor

@dsyme @cartermp would be great if you could merge this!

@cartermp
Copy link
Collaborator

I don't have the ability to approve or merge things. I think the fix does look good though.

@eugbaranov
Copy link
Contributor

@cartermp my mistake, sorry!
Maybe @ovatsus or @baronfel could have a look?

@baronfel
Copy link
Contributor

Sorry, I don't have merge rights to this repo either. I do concur that this would fix the issue, though.

@nhirschey
Copy link
Contributor Author

For what it's worth, the small change to the worldbank API seems to do fine on the Fslab tutorial, and at least the first few numbers that I've checked match what is on the worldbank website. See screenshot below.

The other change (deleting the unavailable europa file) was suggested by Don as a fix on another open pull request (#1316), so I went ahead and did it here too. If the .xsd test that I deleted is required, then perhaps the test could be amended by somebody else in a separate pull request using the .xsd file I referenced docs/content/library/XmlProvider.fsx?

image

@@ -24,7 +24,7 @@ type public WorldBankProvider(cfg:TypeProviderConfig) as this =
let asm = System.Reflection.Assembly.GetExecutingAssembly()
let ns = "FSharp.Data"

let defaultServiceUrl = "http://api.worldbank.org"
let defaultServiceUrl = "http://api.worldbank.org/v2"
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe change to https whilst you're at it?

Copy link
Contributor

Choose a reason for hiding this comment

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

lets do in separate PR

@dsyme dsyme merged commit 940e339 into fsprojects:master Oct 4, 2020
@dsyme
Copy link
Contributor

dsyme commented Oct 4, 2020

@nhirschey Would you like to join me in having admin rights on the repo?

@nhirschey
Copy link
Contributor Author

@dsyme, I am happy join you with admin rights and help where I can.

@nhirschey nhirschey deleted the worldbank-api-v2 branch December 2, 2020 01:20
@zyzhu
Copy link
Contributor

zyzhu commented Mar 2, 2021

@dsyme @cartermp As this pull has been merged, could you find some time to release a newer version on nuget so that the World Bank API can be used again?

I'm trying to update docs on Deedle but some samples using World Bank data are broken because of the retirement of its v1 API. Thanks.

@cartermp
Copy link
Collaborator

cartermp commented Mar 3, 2021

I will try to prepare a fix. Lots of things to add to the release notes!

@cartermp
Copy link
Collaborator

cartermp commented Mar 3, 2021

@zyzhu I have published a 4.0.0 here: https://www.nuget.org/packages/FSharp.Data/4.0.0

Release: https://github.com/fsprojects/FSharp.Data/releases/tag/4.0.0

Please let me know if this is working okay. If not we'll get it sorted.

@zyzhu
Copy link
Contributor

zyzhu commented Mar 3, 2021

That's so quick! It finally works again now. Thanks!

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.

6 participants