Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@laceysanderson
Copy link
Member

@laceysanderson laceysanderson commented Sep 24, 2025

Tripal 4 Core Dev Task

Issue #1341

Description

We need to actually deprecate this very old API as mentioned in tripal/tripal_doc#109. This PR will accomplish this.

More specifically, this PR

  • Adds deprecation notices to the Chado Query API methods and their direct helpers and hooks. This does not touch the Chado Variables API but since it calls the now deprecated Chado Query API you will see deprecation messages when using it.
  • Updates all usage of chado_query outside of the importers since this is relatively trivial. Does not update usage of chado_*_record() methods.
  • Adds IgnoreDeprecations to API specific tests so that they don't fail due to the deprecations which we expect. This allows us to continue testing these until we remove them in Tripal 4.1.0
  • Updates the config for PHPUnit 9.6 to allow tests to pass when deprecations are seen. This is because the IgnoreDeprecations is not available in that version. This seems ok since we will see the deprecations in Drupal 11+

NOTE: PHPUnit 11.5 is still configured not to fail on deprecations. I did not fix this in this PR because there are remaining deprecations triggered by this PR that will be fixed in #2297. We should make sure to fix this in that PR to ensure that deprecations triggered in tests outside of those specifically testing the deprecated API get caught and cause failure.

Testing?

I'm not sure how to test this. There are automated tests that check this functionality. Since the importers have not yet been updated in this PR one way to test may be run the importers and make sure they haven't broken in this PR.

@laceysanderson laceysanderson linked an issue Sep 24, 2025 that may be closed by this pull request
@qltysh
Copy link

qltysh bot commented Sep 24, 2025

4 new issues

Tool Category Rule Count
qlty Structure Function with many returns (count = 17): chado_insert_cvterm 4

@qltysh
Copy link

qltysh bot commented Sep 24, 2025

Diff Coverage: The code coverage on the diff in this pull request is 69.8%.

Total Coverage: This PR will decrease coverage by 0.06%.

File Coverage Changes
Path File Coverage Δ Indirect
tripal_chado/src/api/tripal_chado.cv.api.php 0.2
tripal_chado/src/api/tripal_chado.db.api.php -0.6
tripal_chado/src/api/tripal_chado.query.api.php -2.3
🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@dsenalik dsenalik added the Group 2 - Data Storage | Tripal DBX | Chado Any issue relating to biological data storage, Tripal DBX and Chado integration, Materialized Views label Sep 24, 2025
@laceysanderson laceysanderson marked this pull request as ready for review September 25, 2025 16:39
Copy link
Contributor

@dsenalik dsenalik left a comment

Choose a reason for hiding this comment

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

A few changes, mainly the script for entity mapping is designed to be run on a Tripal 3 site so no updates there!

I ran all the importers and no problems there.

Co-authored-by: Douglas Senalik <[email protected]>
Copy link
Contributor

@dsenalik dsenalik left a comment

Choose a reason for hiding this comment

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

Approved when tests complete!

@laceysanderson laceysanderson merged commit 34e10c1 into 4.x Sep 25, 2025
16 checks passed
@laceysanderson laceysanderson deleted the tv4g2-1341-deprecateChadoQueryAPI branch September 25, 2025 20:39
@dsenalik dsenalik added the Priority - Release Blocker Any issue/PR which needs to be addressed before another version of Tripal can be released. label Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Group 2 - Data Storage | Tripal DBX | Chado Any issue relating to biological data storage, Tripal DBX and Chado integration, Materialized Views Includes Deprecations Priority - Release Blocker Any issue/PR which needs to be addressed before another version of Tripal can be released.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate existing Chado Query API in favour of new BioDB API

2 participants