Skip to content

Comments

5445 dynamic custom hmpg redux#5475

Merged
kcondon merged 44 commits intodevelopfrom
5445-dynamic-custom-hmpg-redux
Feb 13, 2019
Merged

5445 dynamic custom hmpg redux#5475
kcondon merged 44 commits intodevelopfrom
5445-dynamic-custom-hmpg-redux

Conversation

@mheppler
Copy link
Contributor

@mheppler mheppler commented Jan 17, 2019

Related Issues

Pull Request Checklist

mheppler and others added 29 commits January 9, 2019 15:06
dataverses/downloads do not involve harvest
@mheppler mheppler mentioned this pull request Jan 17, 2019
22 tasks
@coveralls
Copy link

coveralls commented Jan 17, 2019

Coverage Status

Coverage decreased (-0.02%) to 17.335% when pulling b1af223 on 5445-dynamic-custom-hmpg-redux into 1d37e99 on develop.

@djbrooke djbrooke mentioned this pull request Jan 17, 2019
5 tasks
@matthew-a-dunlap
Copy link
Contributor

matthew-a-dunlap commented Jan 17, 2019

This PR includes changes for 4 different issues. As they were all metrics related, they were combined. These are the code changes:

  • Metrics: All dataset and file endpoints support the dataLocation query parameter. Added to support new homepage needs in Homepage Count Updates #5447
  • Metrics: Metrics API to get datasets by subject AND to month, to support future visualization in Add Metrics API to get datasets by subject AND to month #5398 (written by @landreev).
  • Metrics: Querying download totals by month now returns the historic download counts that do not have a timestamp. Querying a date before the earliest timestamped record will return 0. Fixes Count of all file downloads from metrics API doesn't always match what's in UI (on old homepage metrics bar) #4970.
  • Metrics: Metric table redone to support more metrics variations. Backend code was also rewritten a fair bit to match. Update script created to clear all caches and change the table.
  • Metrics: Previously unreported bug solved where if the same metric is called twice when it needed to be cached, it would create two entries in the db. Subsequent calls would then throw an error about multiple caches. Multiple copies of the metric are still cached, but now when the system uses the cache it'll clear out duplicates and not error.
  • Javascript: to get totals of datasets + dataverses by subject, the two separate metrics endpoints are called and summed on the user side. Running speed tests on this it seemed to take about 10ms. Developed for Dynamic Custom Homepage - ROUND TWO #5445

Its also worth noting that for the homepage to run optimally, the metrics cache timeout option should be set to update daily. The default is every 7 days.

In terms of testing, all dataset/file endpoints would benefit from being retested as they were touched the most. Other metrics endpoints could be tested as well tho the changes that effect them are more generic.

Copy link
Contributor

@sekmiller sekmiller left a comment

Choose a reason for hiding this comment

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

Maybe make metricName static strings kept in one place?

Copy link
Contributor

@sekmiller sekmiller left a comment

Choose a reason for hiding this comment

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

Also, DatasetsToMonth isn't coming close to matching what we see from the counts from Solr. Not sure why, it may be based on being logged in or not and permissions that Sold counts take into consideration. I was expecting the number to be close to what you would see if you weren't logged in.

@kcondon kcondon merged commit a775833 into develop Feb 13, 2019
@kcondon kcondon deleted the 5445-dynamic-custom-hmpg-redux branch February 13, 2019 16:56
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.

7 participants