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

Dataverse: script to verify WorldMap links are valid #3480

Closed
1 of 4 tasks
raprasad opened this issue Nov 17, 2016 · 16 comments
Closed
1 of 4 tasks

Dataverse: script to verify WorldMap links are valid #3480

raprasad opened this issue Nov 17, 2016 · 16 comments

Comments

@raprasad
Copy link
Contributor

raprasad commented Nov 17, 2016

Dataset metadata will contain links to WorldMap layers.

Verify that the WorldMap links are valid--e.g., that the layers still exist.

Run this check via GeoConnect:

  • Get all map layer metadata links via API call
    • Add Dataverse API call to return list of MapLayerMetadata objects. Started in f0cec55.
  • Check against WorldMap, delete non-existent links
  • Run reverse check. For Layers with DataverseInfo objects, make sure Dataverse still has the file/dataset. Delete the WorldMap DataverseInfo object but not the Layer itself.
    • should rarely happen

Notes

@djbrooke
Copy link
Contributor

We discussed this in the Sprint Planning meeting yesterday. We decided on the following approach:

  • We'll add an API endpoint to Dataverse
  • We'll add a script to run in Geoconnect to verify the mapping in Dataverse (using the new endpoint) and the the endpoint in Worldmap (existing endpoint)
  • We'll Update the Geoconnect documentation to inform users what happens when a mapping is deleted

@raprasad
Copy link
Contributor Author

Question in gist for tomorrow: https://gist.github.com/raprasad/b69dcd0549e78837cb29b90e07244b7b

@pdurbin pdurbin self-assigned this Mar 24, 2017
@pdurbin
Copy link
Member

pdurbin commented Mar 24, 2017

I'd like to point out that from the WorldMap side, when you delete a map (WorldMap calls it a "layer"), you get no indication that you're leaving cruft behind in Dataverse. This is what the WorldMap user sees:

screen shot 2017-03-24 at 9 49 54 am

The cruft left behind in Dataverse is the "Explore" button. When anyone comes along and clicks the Explore button...

screen shot 2017-03-24 at 9 53 33 am

... they see "Page Not Found" on the WorldMap side (Safari hides the URL but it's http://worldmap.harvard.edu/data/geonode:starbucks_u_gq ):

screen shot 2017-03-24 at 9 54 54 am

This issue is about deleting the cruft from Dataverse, specifically the MapLayerMetadata entry in the Dataverse database, so that the "Explore" button goes away when it has been detected (nightly or whatever) that the map/layer in WorldMap no longer exists.

@pdurbin
Copy link
Member

pdurbin commented Mar 24, 2017

I just opened cga-harvard/geonode#214 asking for the WorldMap "delete" interface to say something like, "this layer is in use by a dataset with a published DOI."

pdurbin added a commit that referenced this issue Mar 24, 2017
Added lastverifiedstatus and lastverifiedtime to maplayermetadata.
@pdurbin pdurbin assigned pdurbin and unassigned pdurbin Mar 31, 2017
@pdurbin pdurbin removed their assignment Mar 31, 2017
@pdurbin
Copy link
Member

pdurbin commented Mar 31, 2017

@kcondon also, please note that scripts/database/upgrades/upgrade_v4.6.1_to_v4.6.2.sql has been updated

pdurbin added a commit that referenced this issue Mar 31, 2017
@kcondon kcondon self-assigned this Apr 3, 2017
@kcondon
Copy link
Contributor

kcondon commented Apr 3, 2017

After deleting map on Worldmap side, there is stale data on Dataverse, ie. the explore button, but also stale data on GeoConnect. This ticket does address the Dataverse stale data but trying to remap the deleted map from the Dataverse side fails for shape files and has a workaround for tabular data.

@kcondon kcondon assigned raprasad and unassigned kcondon Apr 3, 2017
raprasad added a commit to IQSS/geoconnect that referenced this issue Apr 3, 2017
 - ignore WorldMapInfo already in db
- avoids error where info deleted from WM and DV but still in geoconnect
@raprasad
Copy link
Contributor Author

raprasad commented Apr 4, 2017

@kcondon I put in a fix for stale tabular file data. The updated geoconnect code is available via dvn-build. note: they're in the process of restarting worldmap which is down right now. (May look at shapefiles depending on worldmap availability and time left with other issues)

@raprasad
Copy link
Contributor Author

raprasad commented Apr 4, 2017

Geoconnect pull request: IQSS/geoconnect#125

@pdurbin pdurbin removed their assignment Apr 4, 2017
@pdurbin
Copy link
Member

pdurbin commented Apr 4, 2017

I just reviewed IQSS/geoconnect#125 and it looks good so I'm sending this issue to QA at https://waffle.io/IQSS/dataverse

@kcondon I'd say you can go ahead and merge pull request #3721 into the Dataverse code base because the branch (3480-worldmap-links) hasn't changed since you tested it yesterday and @raprasad and I are not planning on touching it. Basically, further improvements are being worked out in the geoconnect code base at this point.

@kcondon
Copy link
Contributor

kcondon commented Apr 4, 2017

@pdurbin I'd still like to test it again, thanks for the heads up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants