From 2402068da77763e8495e005eec4138221f473a31 Mon Sep 17 00:00:00 2001
From: Daniel <d.hornung@indiscale.com>
Date: Wed, 3 May 2023 14:19:45 +0200
Subject: [PATCH] MAINT: Rename caosdb -> linkahead

---
 .gitlab-ci.yml                       |  1 +
 CHANGELOG.md                         |  8 +++++---
 CMakeLists.txt                       | 10 +++++-----
 README.md                            |  2 +-
 RELEASE_GUIDELINES.md                |  6 +++---
 doc/CMakeLists.txt                   |  6 +++---
 proto/caosdb/CMakeLists.txt          | 10 +++++-----
 proto/caosdb/acm/v1alpha1/main.proto |  6 +++---
 proto/caosdb/entity/v1/main.proto    |  6 +++---
 proto/caosdb/info/v1/main.proto      |  6 +++---
 10 files changed, 32 insertions(+), 29 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 711c4c8..a1f725e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -21,6 +21,7 @@
 #
 
 variables:
+  # TODO Rename to LinkAhead
   CI_REGISTRY_IMAGE: $CI_REGISTRY/caosdb/src/caosdb-proto/testenv:latest
 
 image: $CI_REGISTRY_IMAGE
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0b8f215..339041a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ### Changed ###
 
+* Rename CaosDB to LinkAhead.
+
 ### Deprecated ###
 
 ### Removed ###
@@ -34,9 +36,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ### Added
 
-* EXPERIMENTAL Access Control Management API (caosdb.acm.v1alpha1)
-* EntityACL API as extension of the Entity API (caosdb.entity.v1) for retrieval and update of entity acls.
-* SessionInfo API as extension of the Info API (caosdb.info.v1) for the
+* EXPERIMENTAL Access Control Management API (linkahead.acm.v1alpha1)
+* EntityACL API as extension of the Entity API (linkahead.entity.v1) for retrieval and update of entity acls.
+* SessionInfo API as extension of the Info API (linkahead.info.v1) for the
   retrival of information about the current users session.
 
 ### Changed
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 84b4d53..9858332 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,13 +20,13 @@
 
 cmake_minimum_required(VERSION 3.13)
 
-set(CAOSDB_PROTO_VERSION 0.3.1)
+set(LINKAHEAD_PROTO_VERSION 0.3.1)
 
-project("caosdb-proto"
-    VERSION ${CAOSDB_PROTO_VERSION}
+project("linkahead-proto"
+    VERSION ${LINKAHEAD_PROTO_VERSION}
     DESCRIPTION "LinkAhead gRPC API"
     LANGUAGES NONE)
 
-add_subdirectory(proto/caosdb)
-message("CAOSDB_API_PACKAGES: ${CAOSDB_API_PACKAGES}")
+add_subdirectory(proto/linkahead)
+message("LINKAHEAD_API_PACKAGES: ${LINKAHEAD_API_PACKAGES}")
 add_subdirectory(doc)
diff --git a/README.md b/README.md
index 60370d1..5fe22e7 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ develop, build and use this code.
 
 ## Further Reading
 
-Please refer to the [official documentation](https://docs.indiscale.com/caosdb-proto/) for more information.
+Please refer to the [official documentation](https://docs.linkahead.org/linkahead-proto/) for more information.
 
 ## Contributing
 
diff --git a/RELEASE_GUIDELINES.md b/RELEASE_GUIDELINES.md
index d505dd6..973bc0a 100644
--- a/RELEASE_GUIDELINES.md
+++ b/RELEASE_GUIDELINES.md
@@ -2,7 +2,7 @@
 
 This document specifies release guidelines in addition to the generel 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/blob/dev/RELEASE_GUIDELINES.md))
 
 ## General Prerequisites
 
@@ -19,7 +19,7 @@ guidelines of the LinkAhead Project
 
 3. Check all general prerequisites.
 
-4. Prepare [CMakeLists.txt](./CMakeLists.txt): Check the `CAOSDB_PROTO_VERSION`
+4. Prepare [CMakeLists.txt](./CMakeLists.txt): Check the `LINKAHEAD_PROTO_VERSION`
    version variable.
 
 5. Merge the release branch into the main branch.
@@ -31,7 +31,7 @@ guidelines of the LinkAhead Project
 8. Merge the `main` branch back into `dev` 
 
 9. Prepare the next release cycle by updating [CMakeLists.txt](./CMakeLists.txt)
-   in the `dev` branch - bump the version number of `CAOSDB_PROTO_VERSION` to
+   in the `dev` branch - bump the version number of `LINKAHEAD_PROTO_VERSION` to
    the next minor number.
 
 10. Add a new `Unreleased` section to the changelog 
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index f02f4d3..6fc1fb7 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -38,7 +38,7 @@ else ()
 
 
     # PROTOC-GEN-DOC STUFF
-    list(GET CAOSDB_API_PACKAGES 0 PACKAGE_NAME)
+    list(GET LINKAHEAD_API_PACKAGES 0 PACKAGE_NAME)
     string(REPLACE "." "/" PACKAGE_DIR ${PACKAGE_NAME})
     add_custom_target(doc-scalar-value-types
         COMMAND ${PROTOC_CMD}
@@ -50,10 +50,10 @@ else ()
         VERBATIM )
 
     # create rst pages for every package
-    list(LENGTH CAOSDB_API_PACKAGES len_packages)
+    list(LENGTH LINKAHEAD_API_PACKAGES len_packages)
     math(EXPR len_packages "${len_packages} - 1")
     foreach (i RANGE "${len_packages}")
-        list(GET CAOSDB_API_PACKAGES ${i} PACKAGE_NAME)
+        list(GET LINKAHEAD_API_PACKAGES ${i} PACKAGE_NAME)
 
         configure_file(protoc-gen-doc.rst.in
             ${CMAKE_CURRENT_BINARY_DIR}_build/packages/${PACKAGE_NAME}.rst.tmpl)
diff --git a/proto/caosdb/CMakeLists.txt b/proto/caosdb/CMakeLists.txt
index 590e2cf..97982c8 100644
--- a/proto/caosdb/CMakeLists.txt
+++ b/proto/caosdb/CMakeLists.txt
@@ -18,11 +18,11 @@
 # along with this program. If not, see <https://www.gnu.org/licenses/>.
 #
 
-set(CAOSDB_API_PACKAGES
-    caosdb.info.v1
-    caosdb.entity.v1
-    caosdb.acm.v1alpha1
+set(LINKAHEAD_API_PACKAGES
+    linkahead.info.v1
+    linkahead.entity.v1
+    linkahead.acm.v1alpha1
     )
 
 # pass variable to parent scope
-set(CAOSDB_API_PACKAGES ${CAOSDB_API_PACKAGES} PARENT_SCOPE)
+set(LINKAHEAD_API_PACKAGES ${LINKAHEAD_API_PACKAGES} PARENT_SCOPE)
diff --git a/proto/caosdb/acm/v1alpha1/main.proto b/proto/caosdb/acm/v1alpha1/main.proto
index 321cfc3..12b75d0 100644
--- a/proto/caosdb/acm/v1alpha1/main.proto
+++ b/proto/caosdb/acm/v1alpha1/main.proto
@@ -18,12 +18,12 @@
 // along with this program. If not, see <https://www.gnu.org/licenses/>.
 //
 
-// This is the main file of the caosdb.acm.v1alpha1 package.
+// This is the main file of the linkahead.acm.v1alpha1 package.
 syntax                     = "proto3";
 option java_multiple_files = true;
-option java_package        = "org.caosdb.api.acm.v1alpha1";
+option java_package        = "org.linkahead.api.acm.v1alpha1";
 
-package caosdb.acm.v1alpha1;
+package linkahead.acm.v1alpha1;
 
 ///////////////////////////////////////////
 // COMMON MESSAGES
diff --git a/proto/caosdb/entity/v1/main.proto b/proto/caosdb/entity/v1/main.proto
index ba3f6a0..912705d 100644
--- a/proto/caosdb/entity/v1/main.proto
+++ b/proto/caosdb/entity/v1/main.proto
@@ -18,12 +18,12 @@
 // along with this program. If not, see <https://www.gnu.org/licenses/>.
 //
 
-// This is the main file of the caosdb.entity.v1 package.
+// This is the main file of the linkahead.entity.v1 package.
 syntax                      = "proto3";
 option  java_multiple_files = true;
-option  java_package        = "org.caosdb.api.entity.v1";
+option  java_package        = "org.linkahead.api.entity.v1";
 option  cc_enable_arenas    = true;
-package caosdb.entity.v1;
+package linkahead.entity.v1;
 
 // Data type for references to other entities.
 message ReferenceDataType {
diff --git a/proto/caosdb/info/v1/main.proto b/proto/caosdb/info/v1/main.proto
index 1a84253..041d77e 100644
--- a/proto/caosdb/info/v1/main.proto
+++ b/proto/caosdb/info/v1/main.proto
@@ -18,12 +18,12 @@
 // along with this program. If not, see <https://www.gnu.org/licenses/>.
 //
 
-// This is the main file of the caosdb.info.v1 package.
+// This is the main file of the linkahead.info.v1 package.
 syntax                     = "proto3";
 option java_multiple_files = true;
-option java_package        = "org.caosdb.api.info.v1";
+option java_package        = "org.linkahead.api.info.v1";
 
-package caosdb.info.v1;
+package linkahead.info.v1;
 
 /////////////////////////////// SERVER VERSION
 
-- 
GitLab