From 76765b5dfc00160ceff7f11db33b6c20837e0e31 Mon Sep 17 00:00:00 2001
From: Daniel <d.hornung@indiscale.com>
Date: Thu, 11 May 2023 15:04:03 +0200
Subject: [PATCH] WIP: Rename caosdb -> linkahead

---
 RELEASE_GUIDELINES.md                         |  6 +-
 build.properties.d/00_default.properties      | 18 +++---
 misc/entity_state_test_data.py                |  4 +-
 misc/ext_bottom_line_test_data.py             | 32 +++++------
 misc/ext_cosmetics_test_data.py               |  2 +-
 misc/install_comment_datamodel.py             |  2 +-
 misc/list_references_test_data.py             | 31 +++++------
 misc/map_test_data.py                         | 40 ++++++--------
 misc/merge_js.sh                              |  2 +-
 misc/query_shortcuts_test_data.py             | 55 +++++++++----------
 misc/select_query_test_data.py                | 34 ++++++------
 misc/test_entities/insert.py                  |  2 +-
 misc/versioning_test_data.py                  | 22 ++++----
 src/core/html/imprint.html                    |  2 +-
 src/core/js/edit_mode.js                      |  2 +-
 src/core/js/ext_cosmetics.js                  |  2 +-
 src/core/js/ext_editmode_wysiwyg_text.js      |  8 +--
 src/core/js/ext_references.js                 |  6 +-
 src/core/js/form_elements.js                  |  2 +-
 src/core/js/linkahead.js                      | 12 ++--
 src/core/xsl/welcome.xsl                      |  2 +-
 .../ext_file_download/zip_files.py            | 10 ++--
 .../ext_table_preview/pandas_table_preview.py | 10 ++--
 test/core/js/modules/ext_autocomplete.js.js   |  2 +-
 test/core/js/modules/ext_prop_display.js.js   |  2 +-
 test/core/js/modules/linkahead.js.js          |  4 +-
 test/docker/Dockerfile                        |  2 +
 .../ext_table_preview/requirements.txt        |  1 +
 .../test_pandas_table_preview.py              |  4 +-
 29 files changed, 156 insertions(+), 165 deletions(-)

diff --git a/RELEASE_GUIDELINES.md b/RELEASE_GUIDELINES.md
index 8d54ece3..28140742 100644
--- a/RELEASE_GUIDELINES.md
+++ b/RELEASE_GUIDELINES.md
@@ -1,8 +1,8 @@
 # Release Guidelines for the LinkAhead Web Interface
 
-This document specifies release guidelines in addition to the generel release
+This document specifies release guidelines in addition to the general release
 guidelines of the LinkAhead Project
-([RELEASE_GUIDELINES.md](https://gitlab.com/caosdb/caosdb/blob/dev/RELEASE_GUIDELINES.md))
+([RELEASE_GUIDELINES.md](https://gitlab.com/linkahead/linkahead-meta/blob/dev/RELEASE_GUIDELINES.md))
 
 ## General Prerequisites
 
@@ -18,7 +18,7 @@ guidelines of the LinkAhead Project
 2. Check all general prerequisites.
 
 3. Update the version:
-   - Update `src/doc/conf.py` version and check that the correct caosdb-server
+   - Update `src/doc/conf.py` version and check that the correct linkahead-server
      version is listed in `DEPENDENCIES.md`.
    - `CITATION.cff` (update version and date)
 
diff --git a/build.properties.d/00_default.properties b/build.properties.d/00_default.properties
index fdb5bb9a..4c2bec55 100644
--- a/build.properties.d/00_default.properties
+++ b/build.properties.d/00_default.properties
@@ -61,7 +61,7 @@ BUILD_MODULE_USER_MANAGEMENT=ENABLED
 BUILD_MODULE_USER_MANAGEMENT_CHANGE_OWN_PASSWORD_REALM=LinkAhead
 
 BUILD_MODULE_EXT_RESOLVE_REFERENCES=ENABLED
-BUILD_EXT_REFERENCES_CUSTOM_RESOLVER=caosdb_default_person_reference
+BUILD_EXT_REFERENCES_CUSTOM_RESOLVER=linkahead_default_person_reference
 
 BUILD_MODULE_EXT_EDITMODE_WYSIWYG_TEXT=DISABLED
 BUILD_MODULE_EXT_PROPERTY_DISPLAY=DISABLED
@@ -71,12 +71,12 @@ BUILD_MODULE_EXT_PROPERTY_DISPLAY=DISABLED
 ##############################################################################
 
 # relative file path in the webui to the logo. The actual files resides in
-# `./src/core/pics/caosdb_logo_medium.png`, relative to the build directory.
-BUILD_NAVBAR_LOGO=pics/caosdb_logo_medium.png
+# `./src/core/pics/linkahead_logo_medium.png`, relative to the build directory.
+BUILD_NAVBAR_LOGO=pics/linkahead_logo_medium.png
 # The name LinkAhead is shown to the right of the logo image.
 BUILD_NAVBAR_BRAND_NAME=LinkAhead
 BUILD_TITLE_BRAND_NAME=LinkAhead
-BUILD_FAVICON=pics/caosdb_logo_42.png
+BUILD_FAVICON=pics/linkahead_logo_42.png
 
 ##############################################################################
 # queryForm properties
@@ -106,11 +106,11 @@ BUILD_FREE_SEARCH_ROLE_NAME_FACET_OPTIONS=
 # Link to the data policy statement document.
 BUILD_FOOTER_DATA_POLICY_HREF="Please configure me!"
 
-# Contact mail or link to contact information for the responsible administrator of this caosdb server instance.
+# Contact mail or link to contact information for the responsible administrator of this linkahead server instance.
 BUILD_FOOTER_CONTACT_HREF="Please configure me!"
 #BUILD_FOOTER_CONTACT_HREF=mailto:info@indiscale.com
 
-# Link to imprint for this caosdb server instance.
+# Link to imprint for this linkahead server instance.
 BUILD_FOOTER_IMPRINT_HREF="Please configure me!"
 #BUILD_FOOTER_IMPRINT_HREF=https://www.indiscale.com/imprint/
 
@@ -118,7 +118,7 @@ BUILD_FOOTER_IMPRINT_HREF="Please configure me!"
 BUILD_FOOTER_DOCS_HREF="https://docs.indiscale.com"
 
 # Link to sources (should almost never be changed (maybe for additional sources))
-BUILD_FOOTER_SOURCES_HREF="https://gitlab.com/caosdb"
+BUILD_FOOTER_SOURCES_HREF="https://gitlab.com/linkahead"
 
 # Link to license (should almost never be changed (maybe for other languages))
 BUILD_FOOTER_LICENCE_HREF="https://www.gnu.org/licenses/agpl-3.0.en.html"
@@ -174,7 +174,7 @@ MODULE_DEPENDENCIES=(
     pako.js
     utif.js
     ext_version_history.js
-    caosdb.js
+    linkahead.js
     form_elements.js
     ext_autocomplete.js
     preview.js
@@ -206,6 +206,6 @@ MODULE_DEPENDENCIES=(
     form_panel.js
     ckeditor.js
     ext_editmode_wysiwyg_text.js
-    reference_resolver/caosdb_default_person.js
+    reference_resolver/linkahead_default_person.js
     ext_prop_display.js
 )
diff --git a/misc/entity_state_test_data.py b/misc/entity_state_test_data.py
index ff06452c..342b7b57 100755
--- a/misc/entity_state_test_data.py
+++ b/misc/entity_state_test_data.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python3
 import sys
-import caosdb as db
+import linkahead as db
 
 
 _PASSWORD = "Password1!"
@@ -98,7 +98,6 @@ def setup_state_model():
     unpublished_state.acl = unpublished_acl
     unpublished_state.insert()
 
-
     review_acl = db.ACL()
     review_acl.grant(role="publisher", permission="*")
     review_acl.grant(role="normal", permission="RETRIEVE:ENTITY")
@@ -112,7 +111,6 @@ def setup_state_model():
     review_state.acl = db.State.create_state_acl(review_acl)
     review_state.insert()
 
-
     published_acl = db.ACL()
 
     published_state = db.Record(
diff --git a/misc/ext_bottom_line_test_data.py b/misc/ext_bottom_line_test_data.py
index 3335485c..a82b2828 100755
--- a/misc/ext_bottom_line_test_data.py
+++ b/misc/ext_bottom_line_test_data.py
@@ -23,42 +23,42 @@
 # ** end header
 
 import os
-import caosdb
+import linkahead
 import random
 
 filename = "small.webm"
 if not os.path.isfile(filename):
-    import wget #pylint: disable=E0401
+    import wget  # pylint: disable=E0401
     filename = wget.download("http://techslides.com/demos/sample-videos/small.webm")
-caosdb.configure_connection(ssl_insecure=True)
+linkahead.configure_connection(ssl_insecure=True)
 
 # clean
-old = caosdb.execute_query("FIND Test*")
+old = linkahead.execute_query("FIND Test*")
 if len(old):
     old.delete()
 
 # data model
-datamodel = caosdb.Container()
+datamodel = linkahead.Container()
 datamodel.extend([
-    caosdb.RecordType("TestPreviewRecordType")
+    linkahead.RecordType("TestPreviewRecordType")
 ])
 
 datamodel.insert()
 
 
 # test data
-testdata = caosdb.Container()
+testdata = linkahead.Container()
 
-## record with references
-refrec = caosdb.Record("TestPreviewRecord-references").add_parent("TestPreviewRecordType")
+# record with references
+refrec = linkahead.Record("TestPreviewRecord-references").add_parent("TestPreviewRecordType")
 testdata.append(refrec)
 
-video = caosdb.File(name="TestFileVideo", file=filename, path="testfile.webm")
-image = caosdb.File(name="TestFileImage",
-                    file="../src/core/pics/map_tile_caosdb_logo.png",
-                    path="testfile.png")
+video = linkahead.File(name="TestFileVideo", file=filename, path="testfile.webm")
+image = linkahead.File(name="TestFileImage",
+                       file="../src/core/pics/map_tile_linkahead_logo.png",
+                       path="testfile.png")
 for i in ["load-forever", "fall-back", "error", "success", "success-2"]:
-    rec = caosdb.Record("TestPreviewRecord-{}".format(i)).add_parent("TestPreviewRecordType")
+    rec = linkahead.Record("TestPreviewRecord-{}".format(i)).add_parent("TestPreviewRecordType")
     testdata.append(rec)
     refrec.add_property("TestPreviewRecordType", rec)
 
@@ -66,8 +66,6 @@ testdata.append(image)
 testdata.append(video)
 
 
-testdata.insert();
+testdata.insert()
 
 os.remove(filename)
-
-
diff --git a/misc/ext_cosmetics_test_data.py b/misc/ext_cosmetics_test_data.py
index 1d9f067b..c1b53ee6 100755
--- a/misc/ext_cosmetics_test_data.py
+++ b/misc/ext_cosmetics_test_data.py
@@ -22,7 +22,7 @@
 #
 # ** end header
 
-import caosdb as db
+import linkahead as db
 
 # clean
 old = db.execute_query("FIND Test*")
diff --git a/misc/install_comment_datamodel.py b/misc/install_comment_datamodel.py
index e169576c..d3fa9f22 100755
--- a/misc/install_comment_datamodel.py
+++ b/misc/install_comment_datamodel.py
@@ -23,7 +23,7 @@
 # ** end header
 
 import sys
-import caosdb as db
+import linkahead as db
 
 
 if len(db.execute_query("FIND RecordType CommentAnnotation")) > 0:
diff --git a/misc/list_references_test_data.py b/misc/list_references_test_data.py
index 806f4222..b95ad5c4 100755
--- a/misc/list_references_test_data.py
+++ b/misc/list_references_test_data.py
@@ -7,39 +7,38 @@
 Test entities for the ext_references module.
 """
 
-import caosdb
+import linkahead
 import random
 
-d = caosdb.execute_query("FIND TestReferenc*")
+d = linkahead.execute_query("FIND TestReferenc*")
 if len(d) > 0:
     d.delete()
 
 # data model
-datamodel = caosdb.Container()
+datamodel = linkahead.Container()
 datamodel.extend([
-    caosdb.RecordType("TestReferenced"),
-    caosdb.RecordType(
+    linkahead.RecordType("TestReferenced"),
+    linkahead.RecordType(
         "TestReferencing"
-        ).add_property("TestReferenced", datatype=caosdb.LIST("TestReferenced")),
+    ).add_property("TestReferenced", datatype=linkahead.LIST("TestReferenced")),
 ])
 
 datamodel.insert()
 
 
 # test data
-testdata = caosdb.Container()
+testdata = linkahead.Container()
 
 for i in range(100):
     testdata.append(
-        caosdb.Record("TestReferenceObject-{}".format(i)
-            ).add_parent("TestReferenced")
+        linkahead.Record("TestReferenceObject-{}".format(i)
+                         ).add_parent("TestReferenced")
     )
 
-testdata.insert();
-caosdb.Record().add_parent(
+testdata.insert()
+linkahead.Record().add_parent(
     "TestReferencing"
-    ).add_property("TestReferenced",
-                   datatype=caosdb.LIST("TestReferenced"),
-                   value=testdata
-    ).insert()
-
+).add_property("TestReferenced",
+               datatype=linkahead.LIST("TestReferenced"),
+               value=testdata
+               ).insert()
diff --git a/misc/map_test_data.py b/misc/map_test_data.py
index eda56c0e..f4809911 100755
--- a/misc/map_test_data.py
+++ b/misc/map_test_data.py
@@ -4,23 +4,23 @@
 (C) Copyright IndiScale GmbH 2019
 """
 
-import caosdb
+import linkahead
 import random
 
-caosdb.get_connection()._login()
+linkahead.get_connection()._login()
 
 # data model
-datamodel = caosdb.Container()
+datamodel = linkahead.Container()
 datamodel.extend([
-    caosdb.Property("longitude", datatype=caosdb.DOUBLE, unit="°"),
-    caosdb.Property("latitude", datatype=caosdb.DOUBLE, unit="°"),
-    caosdb.RecordType(
+    linkahead.Property("longitude", datatype=linkahead.DOUBLE, unit="°"),
+    linkahead.Property("latitude", datatype=linkahead.DOUBLE, unit="°"),
+    linkahead.RecordType(
         "MapObject"
-        ).add_property("longitude", importance=caosdb.OBLIGATORY
-        ).add_property("latitude", importance=caosdb.OBLIGATORY),
-    caosdb.RecordType(
+    ).add_property("longitude", importance=linkahead.OBLIGATORY
+                   ).add_property("latitude", importance=linkahead.OBLIGATORY),
+    linkahead.RecordType(
         "PathObject"
-        ).add_property("MapObject", datatype=caosdb.LIST("MapObject")),
+    ).add_property("MapObject", datatype=linkahead.LIST("MapObject")),
 ])
 
 datamodel.insert()
@@ -28,25 +28,21 @@ datamodel.insert()
 
 # test data
 
-testdata = caosdb.Container()
+testdata = linkahead.Container()
 
-path = caosdb.Record()
+path = linkahead.Record()
 path.add_parent("PathObject")
-path.add_property("MapObject", datatype=caosdb.LIST("MapObject"), value=[])
+path.add_property("MapObject", datatype=linkahead.LIST("MapObject"), value=[])
 testdata.append(path)
 
 for i in range(100):
-    loc = caosdb.Record(
+    loc = linkahead.Record(
         "Object-{}".format(i)
-        ).add_parent("MapObject"
-        ).add_property("longitude", random.gauss(-42.0, 5)
-        ).add_property("latitude", random.gauss(77.0, 5))
+    ).add_parent("MapObject"
+                 ).add_property("longitude", random.gauss(-42.0, 5)
+                                ).add_property("latitude", random.gauss(77.0, 5))
     testdata.append(loc)
     path.get_property("MapObject").value.append(loc)
 
 
-
-testdata.insert();
-
-
-
+testdata.insert()
diff --git a/misc/merge_js.sh b/misc/merge_js.sh
index ba2d9fd1..2b4243e5 100755
--- a/misc/merge_js.sh
+++ b/misc/merge_js.sh
@@ -75,7 +75,7 @@ _create_jsheader () {
 <!-- THIS FILE IS AUTO-GENERATED BY THE merge_js.sh SCRIPT -->
 <xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\">
   <xsl:output method=\"html\"/>
-  <xsl:template name=\"caosdb-head-js\">
+  <xsl:template name=\"linkahead-head-js\">
     <script>
         window.sessionStorage.caosdbBasePath = \"<xsl:value-of select=\"\$basepath\"/>\";
     </script>
diff --git a/misc/query_shortcuts_test_data.py b/misc/query_shortcuts_test_data.py
index 1fdcf463..b794a8a7 100755
--- a/misc/query_shortcuts_test_data.py
+++ b/misc/query_shortcuts_test_data.py
@@ -4,58 +4,55 @@
 (C) Copyright IndiScale GmbH 2019
 """
 
-import caosdb
+import linkahead
 
-caosdb.get_connection()._login()
+linkahead.get_connection()._login()
 
 # data model
-if caosdb.execute_query("COUNT RecordType UserTemplate") == 0:
+if linkahead.execute_query("COUNT RecordType UserTemplate") == 0:
 
-    datamodel = caosdb.Container()
+    datamodel = linkahead.Container()
     datamodel.extend([
-        caosdb.Property("Query", datatype=caosdb.TEXT),
-        caosdb.Property("templateDescription", datatype=caosdb.TEXT),
-        caosdb.RecordType(
+        linkahead.Property("Query", datatype=linkahead.TEXT),
+        linkahead.Property("templateDescription", datatype=linkahead.TEXT),
+        linkahead.RecordType(
             "UserTemplate"
-            ).add_property("Query", importance=caosdb.OBLIGATORY
-            ).add_property("templateDescription", importance=caosdb.OBLIGATORY),
+        ).add_property("Query", importance=linkahead.OBLIGATORY
+                       ).add_property("templateDescription", importance=linkahead.OBLIGATORY),
     ])
 
     datamodel.insert()
 
 
 # test data
-testdata = caosdb.Container()
+testdata = linkahead.Container()
 
-if caosdb.execute_query("COUNT Record 'Test Template (Delete with Error)'") == 0:
+if linkahead.execute_query("COUNT Record 'Test Template (Delete with Error)'") == 0:
     testdata.append(
-        caosdb.Record(
+        linkahead.Record(
             "Test Template (Delete with Error)"
-            ).add_parent("UserTemplate"
-            ).add_property("Query", "FIND Error"
-            ).add_property("templateDescription",
-                           "Test Template (Delete with Error)")
+        ).add_parent("UserTemplate"
+                     ).add_property("Query", "FIND Error"
+                                    ).add_property("templateDescription",
+                                                   "Test Template (Delete with Error)")
     )
 
-if caosdb.execute_query("COUNT Record 'Test Template (Referencing)'") == 0:
+if linkahead.execute_query("COUNT Record 'Test Template (Referencing)'") == 0:
     testdata.append(
-        caosdb.Record(
+        linkahead.Record(
             "Test Template (Referencing)"
-            ).add_parent("UserTemplate"
-            ).add_property("UserTemplate", "Test Template (Delete with Error)")
+        ).add_parent("UserTemplate"
+                     ).add_property("UserTemplate", "Test Template (Delete with Error)")
     )
 
 for i in range(2):
     testdata.append(
-        caosdb.Record(
+        linkahead.Record(
             "Test Template (User {})".format(i)
-            ).add_parent("UserTemplate"
-            ).add_property("Query", "FIND Thing{}".format(i)
-            ).add_property("templateDescription",
-                           "Test Template (User {})".format(i))
+        ).add_parent("UserTemplate"
+                     ).add_property("Query", "FIND Thing{}".format(i)
+                                    ).add_property("templateDescription",
+                                                   "Test Template (User {})".format(i))
     )
 
-testdata.insert();
-
-
-
+testdata.insert()
diff --git a/misc/select_query_test_data.py b/misc/select_query_test_data.py
index dd5d6f63..cd419fd3 100755
--- a/misc/select_query_test_data.py
+++ b/misc/select_query_test_data.py
@@ -22,40 +22,40 @@
 #
 # ** end header
 
-import caosdb
+import linkahead
 
 
-d = caosdb.execute_query("FIND Test*")
+d = linkahead.execute_query("FIND Test*")
 if len(d) > 0:
     d.delete()
 
-rt_house = caosdb.RecordType("TestHouse").insert()
+rt_house = linkahead.RecordType("TestHouse").insert()
 rt_house.description = "A House"
-caosdb.RecordType("TestWindow").insert()
-rt_person = caosdb.RecordType("TestPerson").insert()
-caosdb.RecordType("TestParty").insert()
-caosdb.Property("TestHeight", datatype=caosdb.DOUBLE, unit="ft").insert()
-caosdb.Property("TestDate", datatype=caosdb.DATETIME).insert()
+linkahead.RecordType("TestWindow").insert()
+rt_person = linkahead.RecordType("TestPerson").insert()
+linkahead.RecordType("TestParty").insert()
+linkahead.Property("TestHeight", datatype=linkahead.DOUBLE, unit="ft").insert()
+linkahead.Property("TestDate", datatype=linkahead.DATETIME).insert()
 
-window = caosdb.Record().add_parent("TestWindow")
+window = linkahead.Record().add_parent("TestWindow")
 window.add_property("TestHeight", 20.5, unit="ft")
 window.insert()
 
-owner = caosdb.Record("The Queen").add_parent("TestPerson").insert()
+owner = linkahead.Record("The Queen").add_parent("TestPerson").insert()
 
-house = caosdb.Record("Buckingham Palace")
+house = linkahead.Record("Buckingham Palace")
 house.description = "A rather large house"
 house.add_parent("TestHouse")
 house.add_property(rt_person, name="TestOwner", value=owner)
 house.add_property("TestWindow", window).insert()
 
-g1 = caosdb.Record().add_parent("TestPerson").insert()
-g2 = caosdb.Record().add_parent("TestPerson").insert()
-g3 = caosdb.Record().add_parent("TestPerson").insert()
+g1 = linkahead.Record().add_parent("TestPerson").insert()
+g2 = linkahead.Record().add_parent("TestPerson").insert()
+g3 = linkahead.Record().add_parent("TestPerson").insert()
 
-party = caosdb.Record("Diamond Jubilee of Elizabeth II").add_parent("TestParty")
+party = linkahead.Record("Diamond Jubilee of Elizabeth II").add_parent("TestParty")
 party.add_property(rt_house, name="Location", value=house)
 party.add_property("TestDate", "2012-02-06")
-party.add_property(rt_person, datatype=caosdb.LIST(rt_person), name="Guests",
-                   value = [g1, g2, g3])
+party.add_property(rt_person, datatype=linkahead.LIST(rt_person), name="Guests",
+                   value=[g1, g2, g3])
 party.insert()
diff --git a/misc/test_entities/insert.py b/misc/test_entities/insert.py
index ac8067bd..83feaa2a 100644
--- a/misc/test_entities/insert.py
+++ b/misc/test_entities/insert.py
@@ -1,4 +1,4 @@
-import caosdb as db
+import linkahead as db
 
 
 try:
diff --git a/misc/versioning_test_data.py b/misc/versioning_test_data.py
index 92ee515b..eb7c59af 100755
--- a/misc/versioning_test_data.py
+++ b/misc/versioning_test_data.py
@@ -27,22 +27,22 @@ webinterface.
 """
 # pylint: disable=no-member
 
-import caosdb
+import linkahead
 
 # clean
-old = caosdb.execute_query("FIND Test*")
+old = linkahead.execute_query("FIND Test*")
 if len(old) > 0:
     old.delete()
 
 # data model
 
-rt = caosdb.RecordType("TestRT")
+rt = linkahead.RecordType("TestRT")
 rt.insert()
 
 
 # test data
-## record with several versions
-rec1 = caosdb.Record("TestRecord1-firstVersion").add_parent("TestRT")
+# record with several versions
+rec1 = linkahead.Record("TestRecord1-firstVersion").add_parent("TestRT")
 rec1.description = "This is the first version."
 rec1.insert()
 
@@ -58,14 +58,14 @@ rec1.name = "TestRecord1-thirdVersion"
 rec1.description = "This is the third version."
 rec1.update()
 
-rec2 = caosdb.Record("TestRecord2").add_parent("TestRT")
+rec2 = linkahead.Record("TestRecord2").add_parent("TestRT")
 rec2.description = ("This record references the TestRecord1 in the second "
                     "version where the name and the description of the record "
                     "should indicate the referenced version.")
 rec2.add_property("TestRT", ref)
 rec2.insert()
 
-rec3 = caosdb.Record("TestRecord3").add_parent("TestRT")
+rec3 = linkahead.Record("TestRecord3").add_parent("TestRT")
 rec3.description = ("This record references the TestRecord1 without "
                     "specifying a version. Therefore the latest (at least the "
                     "third version) is being openend when you click on the "
@@ -73,26 +73,26 @@ rec3.description = ("This record references the TestRecord1 without "
 rec3.add_property("TestRT", rec1.id)
 rec3.insert()
 
-rec4 = caosdb.Record("TestRecord4").add_parent("TestRT")
+rec4 = linkahead.Record("TestRecord4").add_parent("TestRT")
 rec4.description = ("This record has a list of references to several versions "
                     "of TestRecord1. The first references the record without "
                     "specifying the version, the other each reference a "
                     "different version of that record.")
 if rec1.version:
-    rec4.add_property("TestRT", datatype=caosdb.LIST("TestRT"),
+    rec4.add_property("TestRT", datatype=linkahead.LIST("TestRT"),
                       value=[rec1.id,
                              str(rec1.id) + "@HEAD",
                              str(rec1.id) + "@HEAD~1",
                              str(rec1.id) + "@HEAD~2"])
 else:
-    rec4.add_property("TestRT", datatype=caosdb.LIST("TestRT"),
+    rec4.add_property("TestRT", datatype=linkahead.LIST("TestRT"),
                       value=[rec1.id,
                              str(rec1.id),
                              str(rec1.id),
                              str(rec1.id)])
 rec4.insert()
 
-for i in range(4,11):
+for i in range(4, 11):
     rec1.name = f"TestRecord1-{i}thVersion"
     rec1.description = f"This is the {i}th version."
     rec1.update()
diff --git a/src/core/html/imprint.html b/src/core/html/imprint.html
index 34d553b3..721d5705 100644
--- a/src/core/html/imprint.html
+++ b/src/core/html/imprint.html
@@ -24,7 +24,7 @@
     <h1>Trademark notice</h1>
     <p>The names "LinkAhead" and "IndiScale" are registered trademarks owned by
     IndiScale GmbH.  Permissive uses for the name "LinkAhead" can be
-    found <a href="https://gitlab.com/caosdb/">in the sources</a>.</p>
+    found <a href="https://gitlab.com/linkahead/">in the sources</a>.</p>
   <footer>
   </footer>
   </body>
diff --git a/src/core/js/edit_mode.js b/src/core/js/edit_mode.js
index 427c838f..9fb1b123 100644
--- a/src/core/js/edit_mode.js
+++ b/src/core/js/edit_mode.js
@@ -559,7 +559,7 @@ var edit_mode = new function () {
      * Get a list of js objects representing the properties of the entity.
      * Calls getPropertyFromElement on each property row found.
      *
-     * TODO merge with caosdb.js->getProperties
+     * TODO merge with linkahead.js->getProperties
      *
      * ent_element : {HTMLElement} entity in view mode
      */
diff --git a/src/core/js/ext_cosmetics.js b/src/core/js/ext_cosmetics.js
index 43d2e1ce..9443bf65 100644
--- a/src/core/js/ext_cosmetics.js
+++ b/src/core/js/ext_cosmetics.js
@@ -24,7 +24,7 @@
 
 /**
  * Cosmetics module is a collection of small look-and-feel tweaks for the
- * caosdb webui.
+ * LinkAhead webui.
  *
  * @author Timm Fitschen
  */
diff --git a/src/core/js/ext_editmode_wysiwyg_text.js b/src/core/js/ext_editmode_wysiwyg_text.js
index fa09d155..7094cd5a 100644
--- a/src/core/js/ext_editmode_wysiwyg_text.js
+++ b/src/core/js/ext_editmode_wysiwyg_text.js
@@ -29,12 +29,12 @@
  * @param jQuery - well-known library.
  * @param log - singleton from loglevel library or javascript console.
  * @param {class} ClassicEditor - ClassicEditor class from ckEditor
- * @param {module} edit_mode - caosdb's edit-mode module
- * @param {function} getPropertyElements - caosdb's function to extract the
+ * @param {module} edit_mode - LinkAhead's edit-mode module
+ * @param {function} getPropertyElements - LinkAhead's function to extract the
  *     property HTML elements from an entity HTML element
- * @param {function} getPropertyDatatype - caosdb's function to extract the
+ * @param {function} getPropertyDatatype - LinkAhead's function to extract the
  *     data type from a property HTML element
- * @param {function} getPropertyName - caosdb's function to extract the
+ * @param {function} getPropertyName - LinkAhead's function to extract the
  *     name from a property HTML element
  */
 var ext_editmode_wysiwyg_text = function ($, logger, ClassicEditor, edit_mode, getPropertyElements, getPropertyDatatype, getPropertyName) {
diff --git a/src/core/js/ext_references.js b/src/core/js/ext_references.js
index 8f2ea20c..74c4ca50 100644
--- a/src/core/js/ext_references.js
+++ b/src/core/js/ext_references.js
@@ -249,7 +249,7 @@ var resolve_references = new function () {
     /** Check if an element is inside of the viewport on the horizontal axis.
      *
      * This criterion is very much different from the vertical correspondent: It
-     * looks for the parent which contains the list scroll bar for caosdb values.
+     * looks for the parent which contains the list scroll bar for LinkAhead values.
      * Then it is checked whether the element's bounding box is visible inside the
      * scroll box.
      *
@@ -305,13 +305,13 @@ var resolve_references = new function () {
      * You may add your own custom resolver by specifying a JS module
      * via the `BUILD_EXT_REFERENCES_CUSTOM_RESOLVER` build
      * variable. The custom resolver has to be a JS module (typically
-     * located at caosdb-webui/src/ext/js), the name of which is given
+     * located at linkahead-webui/src/ext/js), the name of which is given
      * as the value of `BUILD_EXT_REFERENCES_CUSTOM_RESOLVER`. It has
      * to provide a `resolve` function that takes the entity id to be
      * resolved as a string and returns a `reference_info` object with
      * the resolved custom reference as a `text` property.
      *
-     * See caosdb-webui/src/core/js/reference_resolver/caosdb_default_person.js
+     * See linkahead-webui/src/core/js/reference_resolver/linkahead_default_person.js
      * for an example.
      *
      * TODO refactor to be configurable.  @async @param {string} id - the id of
diff --git a/src/core/js/form_elements.js b/src/core/js/form_elements.js
index 4725937b..b4538dd3 100644
--- a/src/core/js/form_elements.js
+++ b/src/core/js/form_elements.js
@@ -1439,7 +1439,7 @@ var form_elements = new function () {
      *
      * IMPORTANT: The select picker has to be initialized by the client by
      * calling ``form_elements.init_select_picker(ret, config.value)`` (see
-     * below and https://gitlab.com/caosdb/caosdb-webui/-/issues/208).
+     * below and https://gitlab.com/linkahead/linkahead-webui/-/issues/208).
      *
      * @param {SelectFieldConfig} config
      * @returns {HTMLElement} a select field.
diff --git a/src/core/js/linkahead.js b/src/core/js/linkahead.js
index b7b206e0..3a5e7ac0 100644
--- a/src/core/js/linkahead.js
+++ b/src/core/js/linkahead.js
@@ -26,7 +26,7 @@
 'use strict';
 
 /**
- * JavaScript client for CaosDB
+ * JavaScript client for LinkAhead
  *
  * Dependency: jquery
  * Dependency: weblinkahead
@@ -327,10 +327,10 @@ var getEntityIdVersion = function (entity) {
 }
 
 /**
- * Take a date and a time and format it into a CaosDB compatible representation.
+ * Take a date and a time and format it into a LinkAhead compatible representation.
  * @param date A date
  * @param time A time
- * @return A CaosDB compatible representation.
+ * @return A LinkAhead compatible representation.
  */
 function input2caosdbDate(date, time) {
     return date + "T" + time;
@@ -368,7 +368,7 @@ var getAllEntityPermissions = function (entity) {
  *
  * If the text contains only a date it is returned.
  *
- * @param text The string from CaosDB.
+ * @param text The string from LinkAhead.
  * @return A new string for the input element.
  */
 function caosdb2InputDate(text) {
@@ -1069,7 +1069,7 @@ function createEntityXML(role, name, id, properties, parents,
  * @param name The name of the entity. Can be undefined.
  * @param id The id of the entity. Can be undefined.
  * @param parents A list of parents.
- * @param file_path The path of the file in the CaosDB file system.
+ * @param file_path The path of the file in the LinkAhead file system.
  * @param file_checksum The checksum of the file.
  * @param file_size The size of the file in bytes.
  * @param description A description for this entity.
@@ -1115,7 +1115,7 @@ function createUpdate(xmls) {
 }
 
 /**
- * Concat and convert these xml documents into an insert request body for caosdb server.
+ * Concat and convert these xml documents into an insert request body for LinkAhead server.
  *
  * @param {(Document[]|DocumentFragment[])} xmls - Array of xml documents.
  * @return {(Document|DocumentFragment)} A new xml document.
diff --git a/src/core/xsl/welcome.xsl b/src/core/xsl/welcome.xsl
index 9ec5061a..3f688989 100644
--- a/src/core/xsl/welcome.xsl
+++ b/src/core/xsl/welcome.xsl
@@ -28,7 +28,7 @@
     <div class="caosdb-v-welcome-panel bg-light container">
       <h1>Welcome</h1>
       <p>This is LinkAhead.</p>
-              <p>This is the default welcome message. If you are an administrator you can override it. Just copy <code>src/core/xsl/welcome.xsl</code> to <code>src/ext/xsl/welcome.xsl</code> and change this content. Then run <code>make</code> again in CaosdDB's web interface's root directory.</p>
+              <p>This is the default welcome message. If you are an administrator you can override it. Just copy <code>src/core/xsl/welcome.xsl</code> to <code>src/ext/xsl/welcome.xsl</code> and change this content. Then run <code>make</code> again in LinkAhead's web interface's root directory.</p>
     </div>
   </xsl:template>
 </xsl:stylesheet>
diff --git a/src/server_side_scripting/ext_file_download/zip_files.py b/src/server_side_scripting/ext_file_download/zip_files.py
index 60b8b7ea..975fdac3 100755
--- a/src/server_side_scripting/ext_file_download/zip_files.py
+++ b/src/server_side_scripting/ext_file_download/zip_files.py
@@ -32,7 +32,7 @@ from zipfile import ZipFile
 
 import linkahead as db
 import pandas as pd
-from caosadvancedtools.serverside import helper
+from linkaheadadvancedtools.serverside import helper
 from linkahead import LinkAheadException, ConsistencyError, EntityDoesNotExistError
 
 
@@ -43,8 +43,8 @@ def _parse_arguments():
     """
     parser = argparse.ArgumentParser(description='__doc__')
     parser.add_argument('-a', '--auth-token', required=False,
-                        help=("An authentication token. If not provided caosdb"
-                              " pylib will search for other methods of "
+                        help=("An authentication token. If not provided LinkAhead's "
+                              "pylib will search for other methods of "
                               "authentication if necessary."))
     parser.add_argument('ids', help="list of entity ids.")
     parser.add_argument('table', help="tsv table to be saved (as string).")
@@ -81,14 +81,14 @@ def collect_files_in_zip(ids, table):
                 # Desired behavior: The script should go on with the other
                 # ids, but the user should be informed about the missing files.
                 # How should we do this?
-                logger = logging.getLogger("caosadvancedtools")
+                logger = logging.getLogger("linkaheadadvancedtools")
                 logger.error("Did not find Entity with ID={}.".format(
                     file_id))
 
                 raise e
             savename = nc.get_unique_savename(os.path.basename(tmp.path))
             val_file = helper.get_file_via_download(
-                tmp, logger=logging.getLogger("caosadvancedtools"))
+                tmp, logger=logging.getLogger("linkaheadadvancedtools"))
 
             zf.write(val_file, savename)
 
diff --git a/src/server_side_scripting/ext_table_preview/pandas_table_preview.py b/src/server_side_scripting/ext_table_preview/pandas_table_preview.py
index f648750f..16636f7d 100755
--- a/src/server_side_scripting/ext_table_preview/pandas_table_preview.py
+++ b/src/server_side_scripting/ext_table_preview/pandas_table_preview.py
@@ -33,17 +33,17 @@ import os
 import sys
 from datetime import datetime
 
-import caosdb as db
+import linkahead as db
 import pandas as pd
-from caosadvancedtools.serverside.helper import get_argument_parser
-from caosadvancedtools.serverside.logging import configure_server_side_logging
+from linkaheadadvancedtools.serverside.helper import get_argument_parser
+from linkaheadadvancedtools.serverside.logging import configure_server_side_logging
 
 MAXIMUMFILESIZE = 1e8
 VALID_ENDINGS = [".csv", ".tsv", ".xls", ".xlsx"]
 
 
 def get_file(eid):
-    """ retrieves the file entity from caosdb """
+    """Retrieve the file entity from LinkAhead."""
     try:
         fi = db.File(id=eid)
         fi.retrieve()
@@ -135,7 +135,7 @@ if __name__ == "__main__":
     args = parser.parse_args()
 
     debug_file = configure_server_side_logging()
-    logger = logging.getLogger("caosadvancedtools")
+    logger = logging.getLogger("linkaheadadvancedtools")
 
     db.configure_connection(auth_token=args.auth_token)
     entity_id = args.filename
diff --git a/test/core/js/modules/ext_autocomplete.js.js b/test/core/js/modules/ext_autocomplete.js.js
index c1a1f5e6..d9329804 100644
--- a/test/core/js/modules/ext_autocomplete.js.js
+++ b/test/core/js/modules/ext_autocomplete.js.js
@@ -89,7 +89,7 @@ QUnit.test("searchPost", async function(assert) {
 });
 
 QUnit.test("searchPost webui#170", async function(assert) {
-  // https://gitlab.com/caosdb/caosdb-webui/-/issues/170
+  // https://gitlab.com/linkahead/linkahead-webui/-/issues/170
   // Autocompletion for "IS REFERENCED BY" leads to query syntax error
   const resultsFromServer = ["REFERENCED BY"];
   const origJQElement = [{
diff --git a/test/core/js/modules/ext_prop_display.js.js b/test/core/js/modules/ext_prop_display.js.js
index cc12c340..e21c8140 100644
--- a/test/core/js/modules/ext_prop_display.js.js
+++ b/test/core/js/modules/ext_prop_display.js.js
@@ -28,7 +28,7 @@ QUnit.module("ext_prop_display.js", {
         // setup before each test
         // entity list, one entity with three properties (ids 1,2,3 for
         // testing), all of them hidden by default.
-        $(document.body).append('<div class="caosdb-f-main-entities prop-display-test-entities"><div id=115 class="caosdb-entity-panel"><div class="caosdb-entity-panel-heading"><span class="caosdb-f-parent-list"><span class="caosdb-parent-item"><a class="caosdb-parent-name" href="https://demo.indiscale.com/Entity/110">Guitar</a></span></span></div><div class="caosdb-entity-panel-body"><ul class="list-group caosdb-properties"><li id=1 class="caosdb-v-property-row caosdb-f-entity-property caosdb-v-hidden-property"><div class="row"><div class="caosdb-v-property-left-col"><span class="caosdb-property-name">first prop</span></div><div class="caosdb-f-property-value"><span class="caosdb-f-property-single-raw-value caosdb-property-text-value caosdb-f-property-text-value caosdb-v-property-text-value">48.0</span><span class="caosdb-unit">€</span></div></div></li><li id=2 class="caosdb-v-property-row caosdb-f-entity-property caosdb-v-hidden-property"><div class="row"><div class="caosdb-v-property-left-col"><span class="caosdb-property-name">second prop</span></div><div class="caosdb-f-property-value"><span class="caosdb-f-property-single-raw-value caosdb-property-text-value caosdb-f-property-text-value caosdb-v-property-text-value">48.0</span><span class="caosdb-unit">€</span></div></div></li><li id=3 class="caosdb-v-property-row caosdb-f-entity-property caosdb-v-hidden-property"><div class="row"><div class="caosdb-v-property-left-col"><span class="caosdb-property-name">third prop</span></div><div class="caosdb-f-property-value"><span class="caosdb-f-property-single-raw-value caosdb-property-text-value caosdb-f-property-text-value caosdb-v-property-text-value">48.0</span><span class="caosdb-unit">€</span></div></div></li></ul></div></div></div>');
+        $(document.body).append('<div class="caosdb-f-main-entities prop-display-test-entities"><div id=115 class="caosdb-entity-panel"><div class="caosdb-entity-panel-heading"><span class="caosdb-f-parent-list"><span class="caosdb-parent-item"><a class="caosdb-parent-name" href="https://demo.linkahead.org/Entity/110">Guitar</a></span></span></div><div class="caosdb-entity-panel-body"><ul class="list-group caosdb-properties"><li id=1 class="caosdb-v-property-row caosdb-f-entity-property caosdb-v-hidden-property"><div class="row"><div class="caosdb-v-property-left-col"><span class="caosdb-property-name">first prop</span></div><div class="caosdb-f-property-value"><span class="caosdb-f-property-single-raw-value caosdb-property-text-value caosdb-f-property-text-value caosdb-v-property-text-value">48.0</span><span class="caosdb-unit">€</span></div></div></li><li id=2 class="caosdb-v-property-row caosdb-f-entity-property caosdb-v-hidden-property"><div class="row"><div class="caosdb-v-property-left-col"><span class="caosdb-property-name">second prop</span></div><div class="caosdb-f-property-value"><span class="caosdb-f-property-single-raw-value caosdb-property-text-value caosdb-f-property-text-value caosdb-v-property-text-value">48.0</span><span class="caosdb-unit">€</span></div></div></li><li id=3 class="caosdb-v-property-row caosdb-f-entity-property caosdb-v-hidden-property"><div class="row"><div class="caosdb-v-property-left-col"><span class="caosdb-property-name">third prop</span></div><div class="caosdb-f-property-value"><span class="caosdb-f-property-single-raw-value caosdb-property-text-value caosdb-f-property-text-value caosdb-v-property-text-value">48.0</span><span class="caosdb-unit">€</span></div></div></li></ul></div></div></div>');
     },
     afterEach: function (assert) {
         // teardown after each test
diff --git a/test/core/js/modules/linkahead.js.js b/test/core/js/modules/linkahead.js.js
index b9925f28..a27f0df9 100644
--- a/test/core/js/modules/linkahead.js.js
+++ b/test/core/js/modules/linkahead.js.js
@@ -7,7 +7,7 @@
 
 
 // Module initialization
-QUnit.module("caosdb.js", {
+QUnit.module("linkahead.js", {
     setTestDocument: function(varname, done, xml) {
         var xml_test_document = str2xml(xml);
 
@@ -458,7 +458,7 @@ QUnit.test("getEntityUnit", function(assert) {
 
 
 // Test for bug #53
-// https://gitlab.com/caosdb/caosdb-webui/issues/53
+// https://gitlab.com/linkahead/linkahead-webui/issues/53
 QUnit.test("unset_entity_references", function(assert) {
     console.log(this.unsetReferencesTest);
     for (var i=0; i<this.unsetReferencesTest.length; i++) {
diff --git a/test/docker/Dockerfile b/test/docker/Dockerfile
index dd6c8d65..9169fad9 100644
--- a/test/docker/Dockerfile
+++ b/test/docker/Dockerfile
@@ -13,8 +13,10 @@ RUN  apt-get update \
     && apt-get install -f
 
 RUN pip3 install pylint pytest
+# TODO rename to linkahead
 RUN pip3 install caosdb>=0.7.4
 RUN pip3 install pandas
+# TODO rename to linkahead
 RUN pip3 install git+https://gitlab.com/caosdb/caosdb-advanced-user-tools.git@dev
 # For automatic documentation
 # RUN npm install -g jsdoc
diff --git a/test/server_side_scripting/ext_table_preview/requirements.txt b/test/server_side_scripting/ext_table_preview/requirements.txt
index 4628529b..828669fd 100644
--- a/test/server_side_scripting/ext_table_preview/requirements.txt
+++ b/test/server_side_scripting/ext_table_preview/requirements.txt
@@ -1,3 +1,4 @@
+# TODO rename to linkahead
 caosdb
 caosadvancedtools
 pandas
diff --git a/test/server_side_scripting/ext_table_preview/test_pandas_table_preview.py b/test/server_side_scripting/ext_table_preview/test_pandas_table_preview.py
index eda38046..5fbcc06c 100644
--- a/test/server_side_scripting/ext_table_preview/test_pandas_table_preview.py
+++ b/test/server_side_scripting/ext_table_preview/test_pandas_table_preview.py
@@ -26,8 +26,8 @@
 import os
 import unittest
 
-import caosdb as db
-from caosdb.common.models import _parse_single_xml_element
+import linkahead as db
+from linkahead.common.models import _parse_single_xml_element
 from lxml import etree
 from pandas_table_preview import (MAXIMUMFILESIZE, create_table_preview,
                                   ending_is_valid, read_file, size_is_ok)
-- 
GitLab