Open zachary-foster opened 6 years ago
Does check_db_id
check if it's a valid/known ID to the specific data source? Or some other kind of check?
It would check if the ID conforms the the regex we set for whatever data source is specified by the taxon_database
object. A taxon
object would check the taxon_database
object in its taxon_id
object for which database it is from and use the regex there to determine what a valid ID is.
The taxon_database
is one place where it might make sense to allow for vectors that match a name in database_list
rather than require taxon_database
objects, since each taxon will have separate database info for its name, id, and rank. Actually, we might want to force the taxon database to be a vector that matches a name in database_list
and have a function that can add to that list for custom databases.
regex checking seems safe enough where it wouldn't add to much time, but API calls would have to be designed to fail safely i guess
@sckott, what do you think about this:
check_db_id
of thetaxon_database
class that takes ataxon_id
. It could optionally usetaxize
to actually check via an API call.taxon
,hierarchy
, andtaxonomy
that call that method on all their taxaWhen do you think this checking should occur?
taxon_id
, andtaxon
, andtaxa
described in #139Can you think of any other instance where these should be checked automatically?
related to #144