Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C covid19india-react
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 27
    • Issues 27
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 11
    • Merge requests 11
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • covid19india
  • covid19india-react
  • Merge requests
  • !986

#355 Comparing data from the API and the public/maps file

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/tannakartikey/355 into master Apr 12, 2020
  • Overview 6
  • Commits 3
  • Pipelines 0
  • Changes 5

Created by: tannakartikey

Description of PR

The spec gets the data from https://api.covid19india.org/state_district_wise.json and check if each state and district received from the API exist within the public/maps file or not.

We need this spec because each day we are getting new places added to the patients' database and hence the API. If any of the upcoming places is missing in the maps data then this spec will start failing. And it is very likely that the place is missing or spelled wrong. It's hard to get the latest data of India in geo objects.

I am going to comment on PR explaining the output of each function shortly after creating the PR.

The spec is added here instead of API because the map is rendered from the public/maps folder and that data is not available in the API repository.

P.S. Special thanks to @guneetnarula and his friends for real hard work and keep the data updated. Geo objects repo: https://github.com/guneetnarula/indian-district-boundaries.

Note: The spec will fail early on the first mismatch. With Jest, for our case, it is not possible to make the test fail after checking everything without storing the response of the API in a file first. It will make the test static and useless because we will have to update the data manually. Related Jest thread: https://github.com/facebook/jest/issues/1619

Type of PR

  • Bugfix
  • New feature

Relevant Issues
#355 (closed)

Checklist

  • Compiles and passes lint tests
  • Properly formatted
  • Tested on desktop
  • Tested on phone

Screenshots

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/tannakartikey/355