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

Support for Chado to Term Mapping #254

Merged
merged 19 commits into from
Aug 30, 2022
Merged

Support for Chado to Term Mapping #254

merged 19 commits into from
Aug 30, 2022

Conversation

spficklin
Copy link
Member

This PR adds the mapping of terms to chado table columns that occurs during the Chado prepare step. In Tripal v3 these mappings were referred to as "semweb" but that is a bit of a misnaming as these mappings are needed for more than just semantic web. They are needed for fields.

Issue

Issue #212

This PR should not be merged until after PR #244 and PR #251 as it includes both of those already.

Changes:

  • Previously PR Support for Materialized Views. #251 moved all of the additions of cv terms into functions named addOntology<idSpace>(). I realized this would be easier to maintain if we used a Configuration Entity and stored all of the terms we wanted to add in a YAML file. So, this PR removes those functions from the ChadoPrepare task and moves the definitions in a configuration YAML file. See the example below.
  • This PR adds two new configuration entity types: tripal_content_terms and chado_term_mapping. The first is for managing the terms that we need Tripal to know about for creating entities. The second is for managing the mapping of terms that Tripal knows about to the columns of Chado. This is needed for creating fields.
  • Because these are configuration entities they needed all of the classes and forms. So, this PR adds classes for the entity, controller and forms.
  • We no longer need the chado_semweb table because Drupal manages the mapping for us with the configuration entity. So that table is not present in the install file.

Screenshots

Example config/install/tripal.tripal_content_terms.tripal_chado.yml file.

This file shows how the default vocabularies and terms needed by Tripal are stored in YAML files. These are dynamic content entities so anyone can add new ones by creating a file named config/install/tripal.tripal_content_terms.<id>.yml in their own custom modules (replacing <id> with their unique identifier).

image

Example config/install/tripal_chado.chado_term_mapping.core.yml file

This is the YAML file mapping chado table columns to ontology terms.
image

Example of Term Mapping Edit Page

Currently this page only provides a viewing of the mapping of each table's columns. But in the future we can add functionality for editing and adding new ones.
image

What's Missing

  • Both of these new entities can have forms for adding/editing elements in the configuration. I did not create those because this PR contains only what is needed to move forward with fields creation. Someone can come in later and add this other functionality. I can add a new issue to remind us to do that if this PR is approved.

How to Test

  1. You must start with a new installation of Tripal and Chado.
  2. Install Chado and run the prepare step. There should be no errors and Chado should prepare normally.
  3. Try creating a second Chado instance and preapre that. If you inspect the cv, db and cvterm tables of both chado instances you should see that cvterms have been added to both.
  4. After installation of Chado you should see two new configuration pages:
    • Go to Admin > Tripal > more > Tripal Content Terms. You should see one item in the list titled "Chado Managed Terms". There is no editing form yet, so clickin the edit button takes you to a useless page.
    • Go to Admin > Tripal > Data Storage > Chado > Chado Term Mapping. You should see one item in the list titled. "Core Chado Term Mapping" . Clicking the 'Edit' button will take you to a page where you can select a table and view it's column mappings.
  5. Try deleting the configurations. Because these are technically entities you can remove them. Go back to the listings of each type (using the paths in step 4) and click the delete option. It should remove the entity from the list. Then rebuild the cache with drush cache-rebuild. Return to the listing and the configuration entities should return. This means that someone could potentially make changes (via a future interface) and decide to reset to default by deleting the configuration and rebuilding the cache.

That's it! This PR has a lot of code changes but functionally there's not a lot to test.

laceysanderson
laceysanderson previously approved these changes Aug 11, 2022
Copy link
Member

@laceysanderson laceysanderson left a comment

Choose a reason for hiding this comment

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

I've gone through a done a code review and all looks good now :-)

These are the changes I made:

  • The ID for config entity yml do not have the config entity prefix in them
  • There was still some "Example" placeholder comments so I updated them
  • The config entity listings should be a in ListBuilders directory as was done for the other tripal entites
  • hook_rebuild hadn't been updated to some previous changes + thus wasn't realizing views/config entities already existed
  • There were WSOD errors when you tried to save the config entities as it was using old example code. I just commented out save functionality and added a message that there was nothing to save.

Now it just needs a functional review from @risharde. Thanks @spficklin!

@laceysanderson
Copy link
Member

Hi @risharde, this is still waiting on a functional review from you :-)

@risharde
Copy link
Contributor

I was only able to reach reinstalling drupal and tripal. However when performing a chado install, I encountered a WSOD which breaks all of the admin. I'm tagging @spficklin here - I'm not exactly sure if I can get logs to determine why this is breaking but I'll try my best but as such, I can't continue at the moment.

No errors could be seen during the chado install process:
image

But there's the WSOD:
image

@risharde
Copy link
Contributor

This is what I was able to extract from watchdog.
Environment I'm running on
PHP 7.3.31
Drupal 9.3.12 (not dev) - wondering if I should try a dev branch?
@laceysanderson tagged if she also has any ideas here

a:6:{s:5:"%type";s:5:"Error";s:8:"@message";s:36:"Class 'Drush\\Log\\DrushLog' not found";s:9:"%function";s:63:"Drupal\\Component\\DependencyInjection\\Container->createService()";s:5:"%file";s:84:"/var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php";s:5:"%line";i:262;s:17:"@backtrace_string";s:5283:"#0 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\\Component\\DependencyInjection\\Container->createService(Array, 'logger.drupalto...')\012#1 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\\Component\\DependencyInjection\\Container->get('logger.drupalto...', 1)\012#2 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(276): Drupal\\Component\\DependencyInjection\\Container->resolveServicesAndParameters(Array)\012#3 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\\Component\\DependencyInjection\\Container->createService(Array, 'logger.factory')\012#4 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\\Component\\DependencyInjection\\Container->get('logger.factory', 1)\012#5 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(252): Drupal\\Component\\DependencyInjection\\Container->resolveServicesAndParameters(Array)\012#6 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\\Component\\DependencyInjection\\Container->createService(Array, 'logger.channel....')\012#7 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\\Component\\DependencyInjection\\Container->get('logger.channel....', 1)\012#8 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(240): Drupal\\Component\\DependencyInjection\\Container->resolveServicesAndParameters(Array)\012#9 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\\Component\\DependencyInjection\\Container->createService(Array, 'form_validator')\012#10 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\\Component\\DependencyInjection\\Container->get('form_validator', 1)\012#11 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(240): Drupal\\Component\\DependencyInjection\\Container->resolveServicesAndParameters(Array)\012#12 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\\Component\\DependencyInjection\\Container->createService(Array, 'form_builder')\012#13 /var/www/html/drupal/web/core/modules/system/src/Controller/SystemController.php(104): Drupal\\Component\\DependencyInjection\\Container->get('form_builder')\012#14 /var/www/html/drupal/web/core/lib/Drupal/Core/DependencyInjection/ClassResolver.php(28): Drupal\\system\\Controller\\SystemController::create(Object(Drupal\\Core\\DependencyInjection\\Container))\012#15 /var/www/html/drupal/web/core/lib/Drupal/Core/Controller/ControllerResolver.php(117): Drupal\\Core\\DependencyInjection\\ClassResolver->getInstanceFromDefinition('\\\\Drupal\\\\system\\\\...')\012#16 /var/www/html/drupal/web/core/lib/Drupal/Core/Controller/ControllerResolver.php(69): Drupal\\Core\\Controller\\ControllerResolver->createController('\\\\Drupal\\\\system\\\\...')\012#17 /var/www/html/drupal/web/core/lib/Drupal/Core/Controller/ControllerResolver.php(85): Drupal\\Core\\Controller\\ControllerResolver->getControllerFromDefinition('\\\\Drupal\\\\system\\\\...', '/admin/')\012#18 /var/www/html/drupal/vendor/symfony/http-kernel/HttpKernel.php(141): Drupal\\Core\\Controller\\ControllerResolver->getController(Object(Symfony\\Component\\HttpFoundation\\Request))\012#19 /var/www/html/drupal/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1)\012#20 /var/www/html/drupal/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\\Component\\HttpKernel\\HttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\012#21 /var/www/html/drupal/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\\Core\\StackMiddleware\\Session->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\012#22 /var/www/html/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\\Core\\StackMiddleware\\KernelPreHandle->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\012#23 /var/www/html/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\\page_cache\\StackMiddleware\\PageCache->pass(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\012#24 /var/www/html/drupal/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\\page_cache\\StackMiddleware\\PageCache->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\012#25 /var/www/html/drupal/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\\Core\\StackMiddleware\\ReverseProxyMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\012#26 /var/www/html/drupal/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\\Core\\StackMiddleware\\NegotiationMiddleware->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\012#27 /var/www/html/drupal/web/core/lib/Drupal/Core/DrupalKernel.php(708): Stack\\StackedHttpKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true)\012#28 /var/www/html/drupal/web/index.php(19): Drupal\\Core\\DrupalKernel->handle(Object(Symfony\\Component\\HttpFoundation\\Request))\012#29 {main}";}

@risharde
Copy link
Contributor

@laceysanderson nevermind this one, @spficklin helped me out here, I forgot to run a drush cr which resolved this but I will come back to checking why this happened in the first place later on after completing the functional test.

@risharde
Copy link
Contributor

Another issue on my environment has arose so working on figuring this one out:
[notice] Map Chado Controlled vocabularies to Tripal Terms...
[notice] Creating default content types...
[error] Error: Call to undefined method GuzzleHttp\Utils::chooseHandler() in GuzzleHttp\choose_handler() (line 61 of /var/www/html/vendor/guzzlehttp/guzzle/src/functions.php) #0 /var/www/html/drupal/vendor/guzzlehttp/guzzle/src/HandlerStack.php(42): GuzzleHttp\choose_handler()
#1 [internal function]: GuzzleHttp\HandlerStack::create()
#2 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(258): call_user_func_array(Array, Array)
#3 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(452): Drupal\Component\DependencyInjection\Container->createService(Array, 'private__2i5Fjk...')
#4 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(240): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#5 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService(Array, 'http_client_fac...')
#6 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\Component\DependencyInjection\Container->get('http_client_fac...', 1)
#7 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(252): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#8 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService(Array, 'http_client')
#9 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\Component\DependencyInjection\Container->get('http_client', 1)
#10 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(240): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#11 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService(Array, 'system.sa_fetch...')
#12 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\Component\DependencyInjection\Container->get('system.sa_fetch...', 1)
#13 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(240): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#14 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService(Array, 'system.advisori...')
#15 /var/www/html/drupal/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(136): Drupal\Component\DependencyInjection\Container->get('system.advisori...')
#16 /var/www/html/drupal/web/core/lib/Drupal/Core/Config/Config.php(229): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Drupal\Core\Config\ConfigCrudEvent), 'config.save')
#17 /var/www/html/drupal/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(274): Drupal\Core\Config\Config->save(false)
#18 /var/www/html/drupal/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(524): Drupal\Core\Config\Entity\ConfigEntityStorage->doSave('bio_data_1', Object(Drupal\tripal\Entity\TripalEntityType))
#19 /var/www/html/drupal/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(253): Drupal\Core\Entity\EntityStorageBase->save(Object(Drupal\tripal\Entity\TripalEntityType))
#20 /var/www/html/drupal/web/core/lib/Drupal/Core/Entity/EntityBase.php(339): Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object(Drupal\tripal\Entity\TripalEntityType))
#21 /var/www/html/drupal/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php(607): Drupal\Core\Entity\EntityBase->save()
#22 /var/www/html/drupal/web/modules/t4d8/tripal_chado/src/Task/ChadoPreparer.php(1068): Drupal\Core\Config\Entity\ConfigEntityBase->save()
#23 /var/www/html/drupal/web/modules/t4d8/tripal_chado/src/Task/ChadoPreparer.php(1087): Drupal\tripal_chado\Task\ChadoPreparer->createContentType(Array)
#24 /var/www/html/drupal/web/modules/t4d8/tripal_chado/src/Task/ChadoPreparer.php(184): Drupal\tripal_chado\Task\ChadoPreparer->createGeneralContentTypes()
#25 /var/www/html/drupal/web/modules/t4d8/tripal_chado/src/legacyFunctions.php(154): Drupal\tripal_chado\Task\ChadoPreparer->performTask()
#26 [internal function]: tripal_chado_prepare_chado('chado', Object(Drupal\tripal\Services\TripalJob))
#27 /var/www/html/drupal/web/modules/t4d8/tripal/src/Services/TripalJob.php(359): call_user_func_array('tripal_chado_pr...', Array)
#28 /var/www/html/drupal/web/modules/t4d8/tripal/src/api/tripal.jobs.api.php(443): Drupal\tripal\Services\TripalJob->run()
#29 /var/www/html/drupal/web/modules/t4d8/tripal/src/Commands/TripalCommands.php(76): tripal_launch_job(0, '2', -1, 0)
#30 [internal function]: Drupal\tripal\Commands\TripalCommands->runJobs(Array)
#31 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array(Array, Array)
#32 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#33 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#34 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(313): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#35 /var/www/html/drupal/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#36 /var/www/html/drupal/vendor/symfony/console/Application.php(1027): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#37 /var/www/html/drupal/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#38 /var/www/html/drupal/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#39 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(118): Symfony\Component\Console\Application->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#40 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(48): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#41 /var/www/html/vendor/drush/drush/drush.php(72): Drush\Runtime\Runtime->run(Array)
#42 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...')
#43 {main}.
Error: Call to undefined method GuzzleHttp\Utils::chooseHandler() in /var/www/html/vendor/guzzlehttp/guzzle/src/functions.php on line 61 #0 /var/www/html/drupal/vendor/guzzlehttp/guzzle/src/HandlerStack.php(42): GuzzleHttp\choose_handler()
#1 [internal function]: GuzzleHttp\HandlerStack::create()
#2 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(258): call_user_func_array(Array, Array)
#3 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(452): Drupal\Component\DependencyInjection\Container->createService(Array, 'private__2i5Fjk...')
#4 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(240): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#5 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService(Array, 'http_client_fac...')
#6 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\Component\DependencyInjection\Container->get('http_client_fac...', 1)
#7 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(252): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#8 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService(Array, 'http_client')
#9 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\Component\DependencyInjection\Container->get('http_client', 1)
#10 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(240): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#11 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService(Array, 'system.sa_fetch...')
#12 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(437): Drupal\Component\DependencyInjection\Container->get('system.sa_fetch...', 1)
#13 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(240): Drupal\Component\DependencyInjection\Container->resolveServicesAndParameters(Array)
#14 /var/www/html/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(176): Drupal\Component\DependencyInjection\Container->createService(Array, 'system.advisori...')
#15 /var/www/html/drupal/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(136): Drupal\Component\DependencyInjection\Container->get('system.advisori...')
#16 /var/www/html/drupal/web/core/lib/Drupal/Core/Config/Config.php(229): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Drupal\Core\Config\ConfigCrudEvent), 'config.save')
#17 /var/www/html/drupal/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(274): Drupal\Core\Config\Config->save(false)
#18 /var/www/html/drupal/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(524): Drupal\Core\Config\Entity\ConfigEntityStorage->doSave('bio_data_1', Object(Drupal\tripal\Entity\TripalEntityType))
#19 /var/www/html/drupal/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(253): Drupal\Core\Entity\EntityStorageBase->save(Object(Drupal\tripal\Entity\TripalEntityType))
#20 /var/www/html/drupal/web/core/lib/Drupal/Core/Entity/EntityBase.php(339): Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object(Drupal\tripal\Entity\TripalEntityType))
#21 /var/www/html/drupal/web/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php(607): Drupal\Core\Entity\EntityBase->save()
#22 /var/www/html/drupal/web/modules/t4d8/tripal_chado/src/Task/ChadoPreparer.php(1068): Drupal\Core\Config\Entity\ConfigEntityBase->save()
#23 /var/www/html/drupal/web/modules/t4d8/tripal_chado/src/Task/ChadoPreparer.php(1087): Drupal\tripal_chado\Task\ChadoPreparer->createContentType(Array)
#24 /var/www/html/drupal/web/modules/t4d8/tripal_chado/src/Task/ChadoPreparer.php(184): Drupal\tripal_chado\Task\ChadoPreparer->createGeneralContentTypes()
#25 /var/www/html/drupal/web/modules/t4d8/tripal_chado/src/legacyFunctions.php(154): Drupal\tripal_chado\Task\ChadoPreparer->performTask()
#26 [internal function]: tripal_chado_prepare_chado('chado', Object(Drupal\tripal\Services\TripalJob))
#27 /var/www/html/drupal/web/modules/t4d8/tripal/src/Services/TripalJob.php(359): call_user_func_array('tripal_chado_pr...', Array)
#28 /var/www/html/drupal/web/modules/t4d8/tripal/src/api/tripal.jobs.api.php(443): Drupal\tripal\Services\TripalJob->run()
#29 /var/www/html/drupal/web/modules/t4d8/tripal/src/Commands/TripalCommands.php(76): tripal_launch_job(0, '2', -1, 0)
#30 [internal function]: Drupal\tripal\Commands\TripalCommands->runJobs(Array)
#31 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array(Array, Array)
#32 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
#33 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#34 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(313): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
#35 /var/www/html/drupal/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#36 /var/www/html/drupal/vendor/symfony/console/Application.php(1027): Symfony\Component\Console\Command\Command->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#37 /var/www/html/drupal/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#38 /var/www/html/drupal/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#39 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(118): Symfony\Component\Console\Application->run(Object(Drush\Symfony\DrushArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#40 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(48): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
#41 /var/www/html/vendor/drush/drush/drush.php(72): Drush\Runtime\Runtime->run(Array)
#42 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...')
#43 {main}
Error: Call to undefined method GuzzleHttp\Utils::chooseHandler() in GuzzleHttp\choose_handler() (line 61 of /var/www/html/vendor/guzzlehttp/guzzle/src/functions.php).
[warning] Drush command terminated abnormally.

@risharde
Copy link
Contributor

Worked as intended on my new setup, great going @spficklin !

New environment setup was Drupal 9.4.5 + PHP 7.4
WSOD was not encountered and did not require any cache refreshes other than what was required in the last step (deleting and rebuilding configurations).

[GOOD] You must start with a new installation of Tripal and Chado.
[GOOD] Install Chado and run the prepare step. There should be no errors and Chado should prepare normally.
[GOOD] Try creating a second Chado instance and preapre that. If you inspect the cv, db and cvterm tables of both chado instances you should see that cvterms have been added to both.
After installation of Chado you should see two new configuration pages:
[GOOD note: did not find 'more'] Go to Admin > Tripal > more > Tripal Content Terms. You should see one item in the list titled "Chado Managed Terms". There is no editing form yet, so clickin the edit button takes you to a useless page.
[GOOD] Go to Admin > Tripal > Data Storage > Chado > Chado Term Mapping. You should see one item in the list titled. "Core Chado Term Mapping" . Clicking the 'Edit' button will take you to a page where you can select a table and view it's column mappings.
[GOOD] Try deleting the configurations. Because these are technically entities you can remove them. Go back to the listings of each type (using the paths in step 4) and click the delete option. It should remove the entity from the list. Then rebuild the cache with drush cache-rebuild. Return to the listing and the configuration entities should return. This means that someone could potentially make changes (via a future interface) and decide to reset to default by deleting the configuration and rebuilding the cache.

@risharde
Copy link
Contributor

@laceysanderson this seems good to go for your review

@spficklin
Copy link
Member Author

Since @risharde approved and @laceysanderson this is ready to merge. But there was a merge conflict which I resolved. Once all the tests have a chance to run again I'll mege.

Copy link
Contributor

@risharde risharde left a comment

Choose a reason for hiding this comment

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

Functional tests worked as intended!

Copy link

@codeclimate codeclimate bot left a comment

Choose a reason for hiding this comment

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

The PR diff size of 7092 lines exceeds the maximum allowed for the inline comments feature.

@codeclimate
Copy link

codeclimate bot commented Aug 30, 2022

Code Climate has analyzed commit 9ebdc52 and detected 3 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 3

The test coverage on the diff in this pull request is 0.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 24.3% (0.9% change).

View more on Code Climate.

@spficklin
Copy link
Member Author

All tests pass but the Drupal 10 test which seems to be failing at Docker construction and was failing before. So I think it's safe to merge.

@spficklin spficklin merged commit 259cf69 into 9.x-4.x Aug 30, 2022
@spficklin spficklin deleted the tv4g4-212-semweb branch August 30, 2022 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants