snac-cooperative / snac

SNAC Server with WebUI and RestAPI
Other
5 stars 3 forks source link

Rename "Function" to "Activity" #284

Closed glassjoseph closed 3 years ago

glassjoseph commented 3 years ago

Replace SNAC term "Function" with "Activity" in the SNAC codebase.

Terms to consider searching for find and replace:

SNACFunction.php >> Activity.php 
SNACFunction     >> Activity
'function'       >> 'activity'
"function"       >> "activity"
Function         >> Activity
function         >> activity
functions        >> activities
$function        >> $activity
$functions       >> $activities

Code that will need changed:

Database:

It's very important that we only replace 'function' where it is used in the sense of a SNACFunction term, as in "SNAC subject, function, or occupation", and not where it is used as a programming keyword or in regular non-SNAC usage.

So, for instance, we'd want to change line 43 of vocabulary.sql: INSERT INTO vocabulary (type, value) values ( 'function', 'Abstracting' );)

But we would leave line 41667: INSERT INTO vocabulary (type, value) values ( 'subject', 'Algebraic functions' );

And also leave line 162225: INSERT INTO vocabulary (type, value) values ( 'subject', 'Function Theory' );

We should not change any reference to 'function' that is not referring to the SNACFunction (from subjects, function), or any references to Function in non-SNAC vendor code. Example files to exclude:

    radial-jit.js
    uploadparse.js
    alchemy.js
    other vendor libraries

We will need either a file of sql queries or a php script to make the replacements in SNAC-Dev and production, and for backwards compatibility if we need to access old table backups.

glassjoseph commented 3 years ago

Closed by #286