-
Notifications
You must be signed in to change notification settings - Fork 289
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
Conversation
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=
@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. |
I don't have the ability to approve or merge things. I think the fix does look good though. |
Sorry, I don't have merge rights to this repo either. I do concur that this would fix the issue, though. |
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? |
@@ -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" |
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.
Maybe change to https
whilst you're at it?
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.
lets do in separate PR
@nhirschey Would you like to join me in having admin rights on the repo? |
@dsyme, I am happy join you with admin rights and help where I can. |
I will try to prepare a fix. Lots of things to add to the release notes! |
@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. |
That's so quick! It finally works again now. Thanks! |
These are fixes to get the build working again.
The dependency on the http://europa.eu/rapid/conf/RSS20.xsd has been creating build problems for awhile. I simply removed the test dependency.
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.