From 2f6e9b6594269b4e75bbc34345a7f29d3eaa0a8e Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Sun, 21 Sep 2025 22:10:23 +0000 Subject: [PATCH] Add ROLE_CODES table --- db/schemas/codes/tables/Makefile | 1 + db/schemas/codes/tables/create/role_codes.m4 | 29 +++++++++++ doc/src/code_tables.m4 | 55 ++++++++++++++++++++ doc/src/epilog.inc.m4 | 4 ++ 4 files changed, 89 insertions(+) create mode 100644 db/schemas/codes/tables/create/role_codes.m4 diff --git a/db/schemas/codes/tables/Makefile b/db/schemas/codes/tables/Makefile index 6d02279..58ceed2 100644 --- a/db/schemas/codes/tables/Makefile +++ b/db/schemas/codes/tables/Makefile @@ -28,6 +28,7 @@ ORDER := certainties \ entrytypes \ people \ obs_periods \ + role_codes \ species \ studies diff --git a/db/schemas/codes/tables/create/role_codes.m4 b/db/schemas/codes/tables/create/role_codes.m4 new file mode 100644 index 0000000..e4a8f52 --- /dev/null +++ b/db/schemas/codes/tables/create/role_codes.m4 @@ -0,0 +1,29 @@ +dnl Copyright (C) 2025 The Meme Factory, Inc., http://www.karlpinc.com/ +dnl +dnl This program is free software: you can redistribute it and/or modify +dnl it under the terms of the GNU Affero General Public License as published +dnl by the Free Software Foundation, either version 3 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +dnl GNU Affero General Public License for more details. +dnl +dnl You should have received a copy of the GNU Affero General Public License +dnl along with this program. If not, see . +dnl +dnl Karl O. Pinc +dnl +dnl +dnl m4 includes +include(`copyright.m4')dnl +include(`constants.m4')dnl +include(`tablemacros.m4')dnl +include(`grants.m4')dnl +dnl + +support_table(`ROLE_CODES', `Role', `TEXT', ` + emptytext_check(`Role') + uppercase_check(`Role')' +) diff --git a/doc/src/code_tables.m4 b/doc/src/code_tables.m4 index 577c399..95ca556 100644 --- a/doc/src/code_tables.m4 +++ b/doc/src/code_tables.m4 @@ -488,6 +488,61 @@ existing data to be cleaned while preventing undesirable values from appearing in new data. +.. _ROLE_CODES: + +ROLE_CODES +---------- + +.. |ROLE_CODES_summary| replace:: + Contains one row for each code designating a generic role that an + invididual may have in an event. + +|ROLE_CODES_summary| + + +Special Values +`````````````` +None. + + +Column Descriptions +``````````````````` + +.. _ROLE_CODES.Role: + +Role +'''' + +.. |ROLE_CODES.Role_summary| replace:: + A code identifying a role played by an individual during an event. + +|ROLE_CODES.Role_summary| +Roles are intended to be generic. +For example, it is presumed better to have a single role of "Actor" to +be used for both those individuals who groom and those who aggress, +than it is to have two roles, one of "Groomer" and one of "Aggressor". + +It is suggested to have 2 roles for dyadic directed interactions, one +for each direction, a single role for chimpanzees involved in +singleton or non-directed multi-party interactions, and a role for +observations of non-chimpanzees. +To have more specific roles risks encoding the same information in +multiple places, which is bad practice. + +|keycol| |uppercase| + + +.. _ROLE_CODES.Description: + +Description +''''''''''' + +.. |ROLE_CODES.Description_summary| replace:: + A description of the role. + +|ROLE_CODES.Description_summary| |emptytext| |notnull| + + .. _SPECIES: SPECIES diff --git a/doc/src/epilog.inc.m4 b/doc/src/epilog.inc.m4 index 6d5dc30..80620fc 100644 --- a/doc/src/epilog.inc.m4 +++ b/doc/src/epilog.inc.m4 @@ -250,6 +250,10 @@ sdb_generated_rst()dnl .. |PEOPLE.Description| replace:: :ref:`Description ` .. |PEOPLE.Active| replace:: :ref:`Active ` +.. |ROLE_CODES| replace:: :ref:`ROLE_CODES ` +.. |ROLE_CODES.Role| replace:: + :ref:`Role ` + .. |SPECIES| replace:: :ref:`SPECIES ` .. |SPECIES.Species| replace:: :ref:`Species ` -- 2.34.1