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

Feature: Enhance Analaytics module to fetch Ontology visits, User visits, and the Most visited pages in the month #17

Merged
merged 84 commits into from
Dec 27, 2023

Conversation

syphax-bouazzouni
Copy link

@syphax-bouazzouni syphax-bouazzouni commented Oct 9, 2023

Changes

  • Upgrade our code to the latest release of NCBO: https://github.com/ncbo/ncbo_cron/releases/tag/v5.26.0

    • Add an option to not generate the annotator dictionary on each ontology parsing
    • update ncbo_ontology_archive_old_submissions script
    • update ncbo_ontology_import script, to create contacts if inexistent
  • Update the analytics module to use the new version of the Google Analytics client (starting 2023), this needs a new configuration file

 # Google Analytics GA4 config
  config.analytics_path_to_key_file          = "config/your_analytics_key.json"
  config.analytics_property_id                  = "123456789"
  config.analytics_path_to_ga_data_file = "data/your_ga_data.json"  # will be created if not-existent 
  config.analytics_start_date                    = '2015-01-01' # since when we want to fetch Google Analytics  
  • Update the Analytics module, to fetch and save, in addition to Ontology visits, now also User visits, and the Most visited pages in the previous month.
  • Add a script to import and save Google Analytics UA (2013-2023)

syphax-bouazzouni and others added 30 commits December 5, 2022 10:03
- create contact instance if it doesn't exist
- changed --from-api to --from-apikey
- minor linting
…puller-script

Add a script to pull a new version of an ontology on demand
automatically create contact in ontology import script
Resolves warning messages when we exclude .git directory from docker image
Copy link

codecov bot commented Dec 25, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (development@987fba3). Click here to learn what that means.

Additional details and impacted files
@@              Coverage Diff               @@
##             development      #17   +/-   ##
==============================================
  Coverage               ?   55.05%           
==============================================
  Files                  ?       20           
  Lines                  ?     1475           
  Branches               ?        0           
==============================================
  Hits                   ?      812           
  Misses                 ?      663           
  Partials               ?        0           
Flag Coverage Δ
unittests 55.05% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@syphax-bouazzouni syphax-bouazzouni force-pushed the merge-to-upstream-v5.26.0 branch 5 times, most recently from ff4327d to 197a228 Compare December 27, 2023 16:37
@syphax-bouazzouni syphax-bouazzouni force-pushed the merge-to-upstream-v5.26.0 branch from 197a228 to 080629e Compare December 27, 2023 16:46
@syphax-bouazzouni syphax-bouazzouni force-pushed the merge-to-upstream-v5.26.0 branch from d0e7f1e to 1154c7c Compare December 27, 2023 17:15
@syphax-bouazzouni syphax-bouazzouni changed the title Merge to upstream v5.26.0 Feature: Enhance Analaytics module to fetch Ontology visits, User visits, and the Most visited pages in the month Dec 27, 2023
@syphax-bouazzouni syphax-bouazzouni merged commit 9cb209d into development Dec 27, 2023
4 checks passed
syphax-bouazzouni added a commit that referenced this pull request Dec 28, 2023
…its, and the Most visited pages in the month (#17)

* remove forgot variables

* fix for #61

- create contact instance if it doesn't exist
- changed --from-api to --from-apikey
- minor linting

* Restore branch specifier to develop

* Optimization - remove repeated query

* Gemfile.lock update

* Gemfile.lock update

* Gemfile.lock update

* Gemfile had references to develop branch

* implemented #64 - ability to generate labels independently of RDF processing (and vise versa)

* Gemfile.lock update

* fixed a bug in #64

* Relocate docker-compose file and update default configs

* Add GH workflow for publishing docker images

* use ruby native method for listing files instead of a git function

Resolves warning messages when we exclude .git directory from docker image

* remove comment

* capitalize argument in order to be consistent with other scripts

* add arm/64 platform

* additional error handling for SPAM deletion script, #60

* additional error handling for SPAM deletion script, #60

* implemented #67 - improved corrupt data and error handling

* Gemfile.lock update

* exclude test/data/dictionary.txt from git commits

* update version of solr-ut

* Gemfile.lock update

* Restore branch specifier to master

* fixed configuration for the analytics module

* Gemfile.lock update

* implemented #69 - scheduled annotator dictionary file generation should be a configurable option instead of the default

* Gemfile.lock update

* gem update

* create new rake taks for updating purls for all ontologies

moved from ontologies_api/fix_purls.rb

* initial implementation of #70 - Google Analytics v4 Update Compatibility Issue

* added the /data folder to ignore

* update gems

* Gemfile.lock update

* Gemfile.lock update

* Gemfile.lock update

* use patched version of agraph v7.3.1

* unpin faraday gem

* A chnage to reference Analytics Redis from LinkedData block

* Gemfile.lock update

* Gemfile.lock update

* Gemfile.lock update

* Gemfile.lock update

* use assert_operator instead of assert

minitest style guide adherence.
encountered an intermittent unit test failure so assert_operator will provide
better failure feedback than assert

* use local solr to pass the tests

* fixed ncbo_ontology_archive_old_submissions error output

* Gemfile.lock update

* Gemfile.lock update

* Gemfile update

* Gemfile update

* fixes to the analytics script and a new script to generate UA analytics for documentation

* Gemfile.lock update

* Gemfile.lock update

* implemented the first pass at bmir-radx/radx-project#37

* implemented the first pass at bmir-radx/radx-project#37

* set bundler version to be comptatible with ruby 2.7

+ AG v8

* refactor ontologies analytics job to handle the new google analytics migration

* add user analytics fetching the monthly user visits count

* add page visits analytics  fetching  last month most visited pages

* extract google analytics UA import code to a script to make current code clean of it

* add option to force submission archiving even if already archived

---------

Co-authored-by: Alex Skrenchuk <[email protected]>
Co-authored-by: mdorf <[email protected]>
Co-authored-by: Jennifer Vendetti <[email protected]>
syphax-bouazzouni added a commit that referenced this pull request Dec 28, 2023
…its, and the Most visited pages in the month (#17)

* remove forgot variables

* fix for #61

- create contact instance if it doesn't exist
- changed --from-api to --from-apikey
- minor linting

* Restore branch specifier to develop

* Optimization - remove repeated query

* Gemfile.lock update

* Gemfile.lock update

* Gemfile.lock update

* Gemfile had references to develop branch

* implemented #64 - ability to generate labels independently of RDF processing (and vise versa)

* Gemfile.lock update

* fixed a bug in #64

* Relocate docker-compose file and update default configs

* Add GH workflow for publishing docker images

* use ruby native method for listing files instead of a git function

Resolves warning messages when we exclude .git directory from docker image

* remove comment

* capitalize argument in order to be consistent with other scripts

* add arm/64 platform

* additional error handling for SPAM deletion script, #60

* additional error handling for SPAM deletion script, #60

* implemented #67 - improved corrupt data and error handling

* Gemfile.lock update

* exclude test/data/dictionary.txt from git commits

* update version of solr-ut

* Gemfile.lock update

* Restore branch specifier to master

* fixed configuration for the analytics module

* Gemfile.lock update

* implemented #69 - scheduled annotator dictionary file generation should be a configurable option instead of the default

* Gemfile.lock update

* gem update

* create new rake taks for updating purls for all ontologies

moved from ontologies_api/fix_purls.rb

* initial implementation of #70 - Google Analytics v4 Update Compatibility Issue

* added the /data folder to ignore

* update gems

* Gemfile.lock update

* Gemfile.lock update

* Gemfile.lock update

* use patched version of agraph v7.3.1

* unpin faraday gem

* A chnage to reference Analytics Redis from LinkedData block

* Gemfile.lock update

* Gemfile.lock update

* Gemfile.lock update

* Gemfile.lock update

* use assert_operator instead of assert

minitest style guide adherence.
encountered an intermittent unit test failure so assert_operator will provide
better failure feedback than assert

* use local solr to pass the tests

* fixed ncbo_ontology_archive_old_submissions error output

* Gemfile.lock update

* Gemfile.lock update

* Gemfile update

* Gemfile update

* fixes to the analytics script and a new script to generate UA analytics for documentation

* Gemfile.lock update

* Gemfile.lock update

* implemented the first pass at bmir-radx/radx-project#37

* implemented the first pass at bmir-radx/radx-project#37

* set bundler version to be comptatible with ruby 2.7

+ AG v8

* refactor ontologies analytics job to handle the new google analytics migration

* add user analytics fetching the monthly user visits count

* add page visits analytics  fetching  last month most visited pages

* extract google analytics UA import code to a script to make current code clean of it

* add option to force submission archiving even if already archived

---------

Co-authored-by: Alex Skrenchuk <[email protected]>
Co-authored-by: mdorf <[email protected]>
Co-authored-by: Jennifer Vendetti <[email protected]>
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.

4 participants