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

Skip to content

Conversation

@dsenalik
Copy link
Contributor

@dsenalik dsenalik commented Jun 5, 2024

Tripal 4 Core Dev Task

Closes #1879

Tripal Version: 4.x

Description

We have a hardcoded $record_id_term = 'SIO:000729'; in most fields.
This moves this to the parent ChadoFieldItemBase class.

Three fields weren't consistent so they now also use this term, they can get extra careful code review 😼
ChadoSourceDataTypeDefault
ChadoUnitTypeDefault
ChadoSequenceCoordinatesDefault

Testing?

Automated testing will test some of this. But I suppose ideally we need to create at least one instance of every field type. Importing all of the field type collections should do this.

To test these three fields, create an organism and analysis.
The analysis will test the source data field.
Run the GFF3 importer. I used this file for testing from issue #1824
issue1824.gff3.txt
Publish gene
Check the sequence coordinates field, should be NC_001133.9:1806..2169-
Create a genetic map to test the unit field.

@dsenalik dsenalik added Tripal 4 Group 1 - Tripal Content Types | Terms | Fields Any issue relating to Tripal Content including types, terms, and fields. labels Jun 5, 2024
@dsenalik dsenalik changed the title Tv4g1 issue1879 record id term Fields move record_id_term to parent class Jun 5, 2024
$ft_uniqname_term = $mapping->getColumnTermId( 'feature', 'name' );
$ft_uniqname_term = $mapping->getColumnTermId('feature', 'name');

$feature_id_term = $mapping->getColumnTermId('featureloc', 'feature_id');
Copy link
Member

@laceysanderson laceysanderson Jun 11, 2024

Choose a reason for hiding this comment

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

Good catch! I agree with getting the term for the featureloc.feature_id in case we want to be more specific there :-)

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.

✅ Code changes look great
✅ Fields attach without error
✅ Can create content with no errors

@laceysanderson laceysanderson merged commit 1ab1b69 into 4.x Jun 11, 2024
@laceysanderson laceysanderson deleted the tv4g1-issue1879-record_id_term branch June 11, 2024 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Group 1 - Tripal Content Types | Terms | Fields Any issue relating to Tripal Content including types, terms, and fields.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stop hardcoding record_id_term

2 participants