NO TICKET: further contact updates#120
Conversation
Codecov Report❌ Patch coverage is
|
| author_associations: Mapped[List["AuthorContactAssociation"]] = ( # noqa: F821 | ||
| relationship( | ||
| "AuthorContactAssociation", | ||
| back_populates="contact", | ||
| cascade="all, delete-orphan", | ||
| ) | ||
| ) | ||
| authors = association_proxy("author_associations", "author") |
There was a problem hiding this comment.
What is this reference to Author?
There was a problem hiding this comment.
The data system needs to store bibliographic data, the author of a paper, map, report, etc.
Since we already had a contact table it made sense to use it for contact info for authors of bureau publication.
A super brittle aspect of the bureau's current data system is its handling of publications. There are multiple systems that need access to this data, e.g., website, bookstore, GIS, publications group, etc Currently, the connections are tenuous at best. Ocotillo should serve as the central authority to manage and share this data.
Ocotillo's current implementation is only an idea of how this could work. there are other better approaches im sure
Why
This PR addresses the following problem / context:
Contactmodel should have acontact_typefield that is separate from therolefield to indicate priority for contacting (e.g. who to call first when planning a visit).roleindicates how the contact relates to the thing (e.g.Owner,Manager,Ranch hand) whereascontact_typeindicates priority.PrimaryandSecondaryAMP folks will know who to contact first. This doesn't restrict the model because a thing can have multiplePrimarycontacts if there are multiple people that can be contacted initially.How
Implementation summary - the following was changed / added / removed:
PrimaryandSecondarycontact_typeterms in the lexicon term tablecontact_typeto theContactmodel, schemas, tests, and transfer scriptsContact,Phone,Email,Address, andThingContactAssociationmodels to use the latest type-hinting/mapping styles for SQL AlchemyNotes
Any special considerations, workarounds, or follow-up work to note?
schemas/). There are some fields that may need to be removed because they aren't part of the model (e.g.thing_idforcontact), but those can be handled individually.