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

Fix Wikidata ID parsing #35

Closed
larsgw opened this issue Mar 31, 2017 · 0 comments
Closed

Fix Wikidata ID parsing #35

larsgw opened this issue Mar 31, 2017 · 0 comments
Assignees
Labels
enhancement Feature requests refactor Requests not impacting main APIs

Comments

@larsgw
Copy link
Owner

larsgw commented Mar 31, 2017

Current setup:

1          2           3                4                     5

input ---> array  ---> each element  -> repeat from step 1 -> concat
       \-> string ---> url/single ID -> ID extracted, URL  -> WD JSON
                   \-> Multiple IDs  -> IDs extracted, URL -> WD JSON

Problems:

  • difficult to check for test cases (parseInput() on ID should return URL, instead of fetching data from API) [Edit: see Expose parseInput via Cite #34]
  • parsing strings with multiple IDs is broken [Edit: fixed in cddab7f]
  • strings with single IDs count and are parsed as URLs
  • arrays with IDs are taken into another parse loop, which is unnecessarily time-consuming
@larsgw larsgw added bug Something isn't working right refactor Requests not impacting main APIs enhancement Feature requests labels Mar 31, 2017
@larsgw larsgw self-assigned this Mar 31, 2017
@larsgw larsgw removed the bug Something isn't working right label Apr 3, 2017
@larsgw larsgw closed this as completed in cc87871 Apr 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests refactor Requests not impacting main APIs
Projects
None yet
Development

No branches or pull requests

1 participant