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

Adds citations to iDC #219

Merged
merged 4 commits into from
Sep 3, 2021
Merged

Adds citations to iDC #219

merged 4 commits into from
Sep 3, 2021

Conversation

bseeger
Copy link

@bseeger bseeger commented Sep 2, 2021

Please note that the composer.lock file was created with Composer 2 (2.1.6 specifically). We may want to hold off bringing this PR in until this one that upgrades composer in the drupal container is in.

This brings in the ability to get citation information from a citation endpoint, like so:

https://islandora-idc.traefik.me/citation?nid=100

Which will return a JSON object that contains the nid, citable URL and 3 forms of bibliographic citations (APA, MLA and Chicago).

This PR also:

  • upgrades citeproc-php library to 2.2.5, which solved a regex issue I was facing
  • adds a few tests in the 20-export-tests
    • general citations, which makes sure there are no iconv() errors in the Drupal Report Log and
    • test for caching where it changes the title of a node and ensures that the new title shows up in the citation right away.
  • Fixes an issue with Digital Publisher in the solr search index (changes it to be the name of the term). I don't think this change will ripple, but the tests will tell if that's the case.
  • Fixes an issue in one migration in 21-role-permission-tests, which was caught because it ran with validation
  • Adds codebase/config/sync/migrate_plus.migration_group.default.yml -- that's from a drupal config-export and was a new file missed in a PR yesterday.

To manually test:

  • create a few objects or ingest some data
  • make a query to this endpoint, tacking on the nid you're testing: https://islandora-idc.traefik.me/citation?nid=
  • try as an anonymous user as well

@github-actions
Copy link

github-actions bot commented Sep 2, 2021

Dependency diff between development base branch development (521b43f) and PR branch citations (e756324):

diff --git a/deps.521b43fd233f38a611b317da699e0787050525e5 b/deps.pr-219.e7563243594bd7890fb92d25b37533311f47351c
index 38a8084..f791f6f 100644
--- a/deps.521b43fd233f38a611b317da699e0787050525e5
+++ b/deps.pr-219.e7563243594bd7890fb92d25b37533311f47351c
@@ -136,9 +136,9 @@ jean85/pretty-package-versions                            1.6.0
 jhu-idc/controlled_access_terms                           dev-8.x-1.x 7a03834
 jhu-idc/idc-ui-theme                                      dev-develop 977bb9a
 jhu-idc/idc_defaults                                      dev-main f4fffc4   
-jhu-idc/idc_export                                        dev-main c060e02   
+jhu-idc/idc_export                                        dev-main 4966136   
 jhu-idc/idc_ui_module                                     dev-main 317441c   
-jhu-idc/islandora_defaults                                dev-8.x-1.x fb1aac2
+jhu-idc/islandora_defaults                                dev-8.x-1.x efe2668
 jhu-idc/migrate_file                                      dev-8.x-1.x 1c0da9e
 jhu-idc/reference_value_pair                              dev-main ee0bb99   
 jhu_idc/idc_migration                                     v2.0.0             
@@ -221,8 +221,8 @@ sebastian/recursion-context                               4.0.4
 sebastian/resource-operations                             3.0.3              
 sebastian/type                                            2.3.4              
 sebastian/version                                         3.0.2              
-seboettg/citeproc-php                                     v2.1.6             
-seboettg/collection                                       v1.3.1             
+seboettg/citeproc-php                                     v2.2.5             
+seboettg/collection                                       v2.1.1             
 seld/jsonlint                                             1.8.3              
 seld/phar-utils                                           1.1.2              
 silex/silex                                               v2.3.0             
@@ -307,7 +307,7 @@ symfony/routing                                           v4.4.25
 symfony/security                                          v4.4.29            
 symfony/serializer                                        v4.4.25            
 symfony/service-contracts                                 v2.4.0             
-symfony/string                                            v5.3.3             
+symfony/string                                            v5.3.7             
 symfony/translation                                       v4.4.25            
 symfony/translation-contracts                             v2.4.0             
 symfony/validator                                         v4.4.25            

@bseeger bseeger changed the title WIP: Adds citations to iDC Adds citations to iDC Sep 2, 2021
@github-actions
Copy link

github-actions bot commented Sep 2, 2021

Dependency diff between development base branch development (521b43f) and PR branch citations (cc34a93):

diff --git a/deps.521b43fd233f38a611b317da699e0787050525e5 b/deps.pr-219.cc34a938dbe3945c08e695c0b5220a6565d41b4b
index 38a8084..f791f6f 100644
--- a/deps.521b43fd233f38a611b317da699e0787050525e5
+++ b/deps.pr-219.cc34a938dbe3945c08e695c0b5220a6565d41b4b
@@ -136,9 +136,9 @@ jean85/pretty-package-versions                            1.6.0
 jhu-idc/controlled_access_terms                           dev-8.x-1.x 7a03834
 jhu-idc/idc-ui-theme                                      dev-develop 977bb9a
 jhu-idc/idc_defaults                                      dev-main f4fffc4   
-jhu-idc/idc_export                                        dev-main c060e02   
+jhu-idc/idc_export                                        dev-main 4966136   
 jhu-idc/idc_ui_module                                     dev-main 317441c   
-jhu-idc/islandora_defaults                                dev-8.x-1.x fb1aac2
+jhu-idc/islandora_defaults                                dev-8.x-1.x efe2668
 jhu-idc/migrate_file                                      dev-8.x-1.x 1c0da9e
 jhu-idc/reference_value_pair                              dev-main ee0bb99   
 jhu_idc/idc_migration                                     v2.0.0             
@@ -221,8 +221,8 @@ sebastian/recursion-context                               4.0.4
 sebastian/resource-operations                             3.0.3              
 sebastian/type                                            2.3.4              
 sebastian/version                                         3.0.2              
-seboettg/citeproc-php                                     v2.1.6             
-seboettg/collection                                       v1.3.1             
+seboettg/citeproc-php                                     v2.2.5             
+seboettg/collection                                       v2.1.1             
 seld/jsonlint                                             1.8.3              
 seld/phar-utils                                           1.1.2              
 silex/silex                                               v2.3.0             
@@ -307,7 +307,7 @@ symfony/routing                                           v4.4.25
 symfony/security                                          v4.4.29            
 symfony/serializer                                        v4.4.25            
 symfony/service-contracts                                 v2.4.0             
-symfony/string                                            v5.3.3             
+symfony/string                                            v5.3.7             
 symfony/translation                                       v4.4.25            
 symfony/translation-contracts                             v2.4.0             
 symfony/validator                                         v4.4.25            

@birkland birkland self-requested a review September 3, 2021 13:01
Copy link

@birkland birkland left a comment

Choose a reason for hiding this comment

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

Works as advertised. The citations can be rather thin if there is no underlying metadata to draw from (e.g. no author), but that's a natural consequence of not having underlying metadata.

@bseeger bseeger merged commit eb13eb8 into development Sep 3, 2021
jaredgalanis pushed a commit that referenced this pull request Feb 15, 2022
Changed defaults for cantaloupe to a working state
@DonRichards DonRichards deleted the citations branch August 10, 2022 15: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.

2 participants