uclibs / ucrate

Scholar@UC: University of Cincinnati's self-submission institutional repository
https://scholar.uc.edu
Other
5 stars 3 forks source link

HUT : Analytics Config #1136

Closed scherztc closed 6 months ago

scherztc commented 7 months ago

Descriptive summary

Broke with Hyrax upgrade from 2.9.8 to 3.6

‘’' 507) Hyrax::Analytics::Config defines analytics variables Failure/Error: new yaml.fetch('analytics')

   ArgumentError:
     wrong number of arguments (given 1, expected 0)
   # ./app/services/hyrax/analytics.rb:15:in `initialize'
   # ./app/services/hyrax/analytics.rb:15:in `new'
   # ./app/services/hyrax/analytics.rb:15:in `load_from_yaml'
   # ./spec/services/hyrax/analytics_spec.rb:5:in `block (2 levels) in <top (required)>’ ‘''

Expected behavior

Actual behavior

Steps to reproduce the behavior

  1. Do this
  2. Then do this...

Related work

Link to related issues or prior related work here.

crowesn commented 6 months ago

We have an override app/models/hyrax/statistic.rb where we include Filesets in the stats. Do we want maintain the customization? https://github.com/uclibs/ucrate/blob/hyrax_3/app/models/hyrax/statistic.rb

crowesn@UCL-M3WYML7L ucrate % diff /tmp/hyrax/statistics.rb /tmp/ucrate/statistics.rb 
30c32,37
<         path = polymorphic_path(object)
---
>         path = if object.class.to_s == 'FileSet'
>                  hyrax_parent_file_set_path(object.parent, object)
>                else
>                  polymorphic_path object
>                end
> 
crowesn commented 6 months ago

I'm thinking we can drop this override altogether: https://github.com/uclibs/ucrate/blob/hyrax_3/app/services/hyrax/analytics.rb

This yaml load happens in the hyrax engine, I tested on local and values from /config/analytics.rb are populated. What am I missing?

crowesn commented 6 months ago

We have an override app/models/hyrax/statistic.rb where we include Filesets in the stats. Do we want maintain the customization? https://github.com/uclibs/ucrate/blob/hyrax_3/app/models/hyrax/statistic.rb

crowesn@UCL-M3WYML7L ucrate % diff /tmp/hyrax/statistics.rb /tmp/ucrate/statistics.rb 
30c32,37
<         path = polymorphic_path(object)
---
>         path = if object.class.to_s == 'FileSet'
>                  hyrax_parent_file_set_path(object.parent, object)
>                else
>                  polymorphic_path object
>                end
> 

This override is moot here: https://github.com/samvera/hyrax/commit/e8a20ec1a217b32e062f7d5f5f285408cfdff00c

We can remove it.