diff --git a/.docker-base/Dockerfile b/.docker-base/Dockerfile index 02c7d5c3045f527c1f17c678633c0f42ee8ce3a5..77b452076a0c31ef25d8e4a3d54ed7ece2bbd10e 100644 --- a/.docker-base/Dockerfile +++ b/.docker-base/Dockerfile @@ -40,14 +40,15 @@ RUN set -eux; \ RUN pip3 install docker-compose==1.25 # Script for waiting on LA server -COPY wait-for-it.sh /opt/caosdb/wait-for-it.sh +COPY wait-for-it.sh /opt/linkahead/wait-for-it.sh # Runtime settings -WORKDIR /opt/caosdb -RUN mkdir -p /opt/caosdb/build_docker/ +WORKDIR /opt/linkahead +RUN mkdir -p /opt/linkahead/build_docker/ CMD /bin/bash # python client ADD https://gitlab.com/api/v4/projects/13656973/repository/branches/dev \ - pylib_version.json -RUN pip3 install git+https://gitlab.com/caosdb/caosdb-pylib + pylib_version.json +# TODO rename to linkahead, remove branch +RUN pip3 install git+https://gitlab.com/caosdb/caosdb-pylib@f-linkahead-rename diff --git a/.docker/cert.sh b/.docker/cert.sh index 6cf97936725a2c7b89a78df7dcdea3f8e9e9cfe5..b90ae6c4b37d9ea4c9008326dfd9a838037a7eb5 100755 --- a/.docker/cert.sh +++ b/.docker/cert.sh @@ -24,18 +24,18 @@ # Creates a directory `cert` and certificates in this directory. # # The hostname for which the certificate is created can be changed by setting -# the environment variable CAOSHOSTNAME. +# the environment variable LINKAHEADHOSTNAME. # # ## Overview of variables ## # -# - CAOSHOSTNAME :: Hostname for the key (localhost) +# - LINKAHEADHOSTNAME :: Hostname for the key (localhost) # - KEYPW :: Password for the key (default ist CaosDBSecret) # - KEYSTOREPW :: Password for the key store (same as KEYPW) function cert() { mkdir -p cert cd cert KEYPW="${KEYPW:-CaosDBSecret}" - CAOSHOSTNAME="${CAOSHOSTNAME:-localhost}" + LINKAHEADHOSTNAME="${LINKAHEADHOSTNAME:-localhost}" KEYSTOREPW="${KEYPW:-}" # NOTE: KEYPW and KEYSTOREPW are the same, due to Java limitations. KEYPW="${KEYPW}" openssl genrsa -aes256 -out caosdb.key.pem \ @@ -43,7 +43,7 @@ function cert() { # Certificate is for localhost KEYPW="${KEYPW}" openssl req -new -x509 -key caosdb.key.pem \ -out caosdb.cert.pem -passin env:KEYPW \ - -subj "/C=/ST=/L=/O=/OU=/CN=${CAOSHOSTNAME}" + -subj "/C=/ST=/L=/O=/OU=/CN=${LINKAHEADHOSTNAME}" KEYPW="${KEYPW}" KEYSTOREPW="$KEYSTOREPW" openssl pkcs12 -export \ -inkey caosdb.key.pem -in caosdb.cert.pem -out all-certs.pkcs12 \ -passin env:KEYPW -passout env:KEYPW diff --git a/.docker/docker-compose.yml b/.docker/docker-compose.yml index aa5db139507d50bf417978e55a061c6497668990..c09c3ec42b3ed7726259f19f3023478f11b0906c 100644 --- a/.docker/docker-compose.yml +++ b/.docker/docker-compose.yml @@ -5,7 +5,7 @@ services: environment: MYSQL_ROOT_PASSWORD: caosdb1234 networks: - - caosnet + - linkaheadnet linkahead-server: # TODO Rename to linkahead image: "$CI_REGISTRY/caosdb/src/caosdb-deploy:$LINKAHEAD_TAG" @@ -13,7 +13,7 @@ services: depends_on: - sqldb networks: - - caosnet + - linkaheadnet volumes: - type: bind source: "$EXEPATH/.docker/cert" @@ -30,5 +30,5 @@ services: DEBUG: 1 networks: - caosnet: + linkaheadnet: driver: bridge diff --git a/.docker/local_testing.sh b/.docker/local_testing.sh index bdecf73be670775b3b888846e77d261f22e552df..b3ba441a0899486d3861f336e0b7c5135c6e3c75 100755 --- a/.docker/local_testing.sh +++ b/.docker/local_testing.sh @@ -3,14 +3,14 @@ # locally testing whtat the pipeline does. # Note: this is not 100% replication as the pipeline might change and not every # thing is replicated. -CI_REGISTRY=registry.indiscale.com EXEPATH=`pwd` CAOSDB_TAG=dev-latest \ +CI_REGISTRY=registry.indiscale.com EXEPATH=`pwd` LINKAHEAD_TAG=dev-latest \ docker-compose -f .docker/docker-compose.yml pull -CI_REGISTRY_IMAGE=registry.indiscale.com/caosdb-advanced-testenv \ +CI_REGISTRY_IMAGE=registry.indiscale.com/linkahead-advanced-testenv \ docker-compose -f .docker/tester.yml pull -CI_REGISTRY=registry.indiscale.com EXEPATH=`pwd` CAOSDB_TAG=dev-latest \ +CI_REGISTRY=registry.indiscale.com EXEPATH=`pwd` LINKAHEAD_TAG=dev-latest \ docker-compose -f .docker/docker-compose.yml up -d cd .docker -CAOSHOSTNAME=caosdb-server ./cert.sh -CI_REGISTRY_IMAGE=registry.indiscale.com/caosdb-advanced-testenv ./run.sh +LINKAHEADHOSTNAME=linkahead-server ./cert.sh +CI_REGISTRY_IMAGE=registry.indiscale.com/linkahead-advanced-testenv ./run.sh docker-compose down diff --git a/.docker/pylinkahead.ini b/.docker/pylinkahead.ini index 3d807f00798a655f45994f1929399cbe82813fce..ccd67f0e7127f7813b53c4a38578127c1a2e75de 100644 --- a/.docker/pylinkahead.ini +++ b/.docker/pylinkahead.ini @@ -2,7 +2,7 @@ test_server_side_scripting.bin_dir=../linkahead-server/test_scripting/bin/ [Connection] -url=https://caosdb-server:10443 +url=https://linkahead-server:10443 username=admin cacert=/opt/linkahead/cert/caosdb.cert.pem debug=0 diff --git a/.docker/tester.yml b/.docker/tester.yml index 262ad378b86cbfe883bbaa07225763c7937f90f8..24c6b73a0b1194761bcab240c6e38577c44909f2 100644 --- a/.docker/tester.yml +++ b/.docker/tester.yml @@ -5,9 +5,9 @@ services: volumes: - type: bind source: ./cert - target: /opt/caosdb/cert + target: /opt/linkahead/cert networks: - - docker_caosnet + - docker_linkaheadnet networks: - docker_caosnet: + docker_linkaheadnet: external: true diff --git a/README.md b/README.md index ebda4f641bc3b5e6a74cf72f4bc25a4237a73131..df085241089d667774b1638e9adc7befe7684b8c 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,10 @@ ## Welcome -This is the **CaosDB Advanced User Tools** repository and a part of the -CaosDB project. +This is the **LinkAhead Advanced User Tools** repository and a part of the +LinkAhead project. This project contains tools that are beyond the typical use of -the CaosDB python client. Especially, this includes the crawler which will +the LinkAhead python client. Especially, this includes the crawler which will typically be used by a data curator. ## Setup @@ -16,42 +16,42 @@ setup this code. ## Further Reading Please refer to the [official -documentation](https://docs.indiscale.com/caosdb-advanced-user-tools/) for more +documentation](https://docs.linkahead.org/linkahead-advanced-user-tools/) for more information. ## Contributing Thank you very much to all contributers—[past, -present](https://gitlab.com/caosdb/caosdb/-/blob/dev/HUMANS.md), and prospective +present](https://gitlab.com/linkahead/linkahead-meta/-/blob/dev/HUMANS.md), and prospective ones. ### Code of Conduct By participating, you are expected to uphold our [Code of -Conduct](https://gitlab.com/caosdb/caosdb/-/blob/dev/CODE_OF_CONDUCT.md). +Conduct](https://gitlab.com/linkahead/linkahead-meta/-/blob/dev/CODE_OF_CONDUCT.md). ### How to Contribute - You found a bug, have a question, or want to request a feature? Please [create - an issue](https://gitlab.com/caosdb/caosdb-advanced-user-tools/-/issues). + an issue](https://gitlab.com/linkahead/linkahead-advanced-user-tools/-/issues). - You want to contribute code? Please fork the repository and create a merge request in GitLab and choose this repository as target. Make sure to select "Allow commits from members who can merge the target branch" under Contribution when creating the merge request. This allows our team to work with you on your request. - If you have a suggestion for the - [documentation](https://docs.indiscale.com/caosdb-advanced-user-tools/), the + [documentation](https://docs.linkahead.org/linkahead-advanced-user-tools/), the preferred way is also a merge request as describe above (the documentation resides in `src/doc`). However, you can also create an issue for it. -- You can also contact us at **info (AT) caosdb.org** and join the CaosDB +- You can also contact us at **info (AT) linkahead.org** and join the LinkAhead community on - [#caosdb:matrix.org](https://matrix.to/#/!unwwlTfOznjEnMMXxf:matrix.org). + [#linkahead:matrix.org](https://matrix.to/#/!unwwlTfOznjEnMMXxf:matrix.org). ## License * Copyright (C) 2018 Research Group Biomedical Physics, Max Planck Institute for Dynamics and Self-Organization Göttingen. -* Copyright (C) 2020-2021 Indiscale GmbH <info@indiscale.com> +* Copyright (C) 2020-2023 Indiscale GmbH <info@indiscale.com> All files in this repository are licensed under a [GNU Affero General Public License](LICENCE.md) (version 3 or later). diff --git a/README_SETUP.md b/README_SETUP.md index 263cc967564443e3afa62c1d66a65b73cb57e68c..7c9f5aff063842d884ec5cdfef436a6be461fe0c 100644 --- a/README_SETUP.md +++ b/README_SETUP.md @@ -4,13 +4,12 @@ The recommended way is: ``` # Clone the repository: -git clone 'https://gitlab.com/caosdb/caosdb-advanced-user-tools' +git clone 'https://gitlab.com/linkahead/linkahead-advanced-user-tools' ``` ## Dependencies -Dependencies will be installed automatically if you use the below described -procedure. -- `caosdb>=0.6.0` +Dependencies will be installed automatically if you use the procedure described below. +- `linkahead>=0.6.0` - `openpyxl>=3.0.7` - `xlrd>=1.2.0` - `pandas>=1.2.0` @@ -38,11 +37,11 @@ Optional h5-crawler: 1. Change directory to `integrationtests/`. 2. Mount `extroot` to the folder that will be used as extroot. E.g. `sudo mount - -o bind extroot ../../caosdb-deploy/profiles/debug/paths/extroot` (or + -o bind extroot ../../linkahead-deploy/profiles/debug/paths/extroot` (or whatever path the extroot of the empty profile to be used is located at). -3. Start (or restart) an empty (!) CaosDB instance (with the mounted +3. Start (or restart) an empty (!) LinkAhead instance (with the mounted extroot). The database will be cleared during testing, so it's important to - use an empty instance. Make sure your configuration for the python caosdb + use an empty instance. Make sure your configuration for the LinkAhead python module is correct and allows to connect to the server. 4. Run `test.sh`. Note that this may modify content of the `integrationtest/extroot/` directory. diff --git a/extra/emacs/snippets/yaml-mode/Property inside RecordType b/extra/emacs/snippets/yaml-mode/Property inside RecordType index 92769b78e5496ec4cb545556b3eff3fc924c872d..9640a34e48be6666677848290963c16fa6229023 100644 --- a/extra/emacs/snippets/yaml-mode/Property inside RecordType +++ b/extra/emacs/snippets/yaml-mode/Property inside RecordType @@ -1,5 +1,5 @@ # -*- mode: snippet -*- -# This file is a part of the CaosDB Project. +# This file is a part of the LinkAhead Project. # # Copyright (C) 2022 IndiScale GmbH <info@indiscale.com> # Copyright (C) 2022 Daniel Hornung <d.hornung@indiscale.com> diff --git a/integrationtests/filldb.sh b/integrationtests/filldb.sh index 9c45d5fdc6271c619964264c8f56bf7a4f9b6311..9bcf828775aeab6c405ca170ad4e6cfaf66dd3f0 100755 --- a/integrationtests/filldb.sh +++ b/integrationtests/filldb.sh @@ -5,7 +5,7 @@ python3 -m linkaheadadvancedtools.loadFiles /opt/linkahead/mnt/extroot/Experimen python3 -m linkaheadadvancedtools.loadFiles /opt/linkahead/mnt/extroot/DataAnalysis python3 -m linkaheadadvancedtools.loadFiles /opt/linkahead/mnt/extroot/SimulationData python3 -m linkaheadadvancedtools.loadFiles /opt/linkahead/mnt/extroot/Publications -python3 -m linkaheadadvancedtools.loadFiles -c caosdbignore -l $PWD/extroot/Software /opt/linkahead/mnt/extroot/Software +python3 -m linkaheadadvancedtools.loadFiles -c linkaheadignore -l $PWD/extroot/Software /opt/linkahead/mnt/extroot/Software python3 insert_model.py python3 insert_some.py python3 crawl.py / diff --git a/integrationtests/test.sh b/integrationtests/test.sh index e5a87ae06c1a22994538ddf81355db88ba3d4eb1..904fc5b3467132a6ddc58d6fb8256f1ecb57ff3d 100755 --- a/integrationtests/test.sh +++ b/integrationtests/test.sh @@ -15,8 +15,8 @@ then fi OUT=/tmp/crawler.output ls -cat pycaosdb.ini -python3 -c "import linkahead; print('CaosDB Version:', caosdb.__version__)" +cat pylinkahead.ini +python3 -c "import linkahead; print('LinkAhead Version:', linkahead.__version__)" rm -rf /tmp/linkahead_identifiable_cache.db set -e echo "Clearing database" diff --git a/integrationtests/test_crawler_with_cfoods.py b/integrationtests/test_crawler_with_cfoods.py index 801bf4b3811c17bfa9d7c4ed86135341caedd608..d3783bb2a0a903dadd90ff1a25ff42f387003d16 100755 --- a/integrationtests/test_crawler_with_cfoods.py +++ b/integrationtests/test_crawler_with_cfoods.py @@ -26,7 +26,7 @@ import os import unittest import linkahead as db -from caosdb.apiutils import retrieve_entity_with_id +from linkahead.apiutils import retrieve_entity_with_id def get_entity_with_id(eid): diff --git a/integrationtests/test_datamodel_problems.py b/integrationtests/test_datamodel_problems.py index 5c316b7bc83bdcc0a17be5a58023c962c31f0dbf..4b9aad3a2a28168076024e6cb1f967d3a4060909 100644 --- a/integrationtests/test_datamodel_problems.py +++ b/integrationtests/test_datamodel_problems.py @@ -30,9 +30,9 @@ class in crawler.py and cfood.py can be found in full-tests. import linkahead as db import pytest from linkaheadadvancedtools.datamodel_problems import DataModelProblems -from caosdb.exceptions import (TransactionError, - UnqualifiedParentsError, - UnqualifiedPropertiesError) +from linkahead.exceptions import (TransactionError, + UnqualifiedParentsError, + UnqualifiedPropertiesError) def setup_module(): diff --git a/integrationtests/test_im_und_export.py b/integrationtests/test_im_und_export.py index f7c065ca9d68e837738987d80d3c56ebe634212a..bdfc435aa89e378ba4d36e2233a098e603dfb820 100644 --- a/integrationtests/test_im_und_export.py +++ b/integrationtests/test_im_und_export.py @@ -19,7 +19,7 @@ if __name__ == "__main__": assert 0 == len(db.execute_query("FIND File which is stored at " "**/poster.pdf")) print("Importing stored elements") - import_xml(os.path.join(directory.name, "caosdb_data.xml"), interactive=False) + import_xml(os.path.join(directory.name, "linkahead_data.xml"), interactive=False) # The following tests the existence of some required entities. # However, this is not a full list. diff --git a/manual_tests/test_labfolder_import.py b/manual_tests/test_labfolder_import.py index 25253832a1f759124b032144fc41b79479a8f876..af8b7b53b0a9539d1a353b5cb972853d47ac1e14 100644 --- a/manual_tests/test_labfolder_import.py +++ b/manual_tests/test_labfolder_import.py @@ -24,10 +24,10 @@ import argparse import sys -import caosmodels -from caosmodels.parser import parse_model_from_yaml +import linkaheadmodels +from linkaheadmodels.parser import parse_model_from_yaml -from caosadvancedtools.converter import labfolder_export as labfolder +from linkaheadadvancedtools.converter import labfolder_export as labfolder def main(args): diff --git a/manual_tests/test_labfolder_retrieve.py b/manual_tests/test_labfolder_retrieve.py index 3459ad7d0088cc44cfd00f6183d913865bf8b136..6b140f6c5db7530a444ceac5329ceb55d1e77afd 100644 --- a/manual_tests/test_labfolder_retrieve.py +++ b/manual_tests/test_labfolder_retrieve.py @@ -23,10 +23,10 @@ import argparse import sys -import caosmodels -from caosmodels.parser import parse_model_from_yaml +import linkaheadmodels +from linkaheadmodels.parser import parse_model_from_yaml -from caosadvancedtools.converter.labfolder_api import Importer +from linkaheadadvancedtools.converter.labfolder_api import Importer def main(args): diff --git a/pylintrc b/pylintrc index 625f83ce950841f7a239538123ef7b5812fc5c5f..76c6766e022a0f3a4b49c856c996db2517f51dfb 100644 --- a/pylintrc +++ b/pylintrc @@ -14,6 +14,6 @@ ignored-modules=etree,h5py,labfolder # TODO: The max_inferred size is necessary for https://github.com/PyCQA/pylint/issues/4577, # otherwise pandas.read_csv's return value would be inferred as TextFileReader. init-hook= - import sys; sys.path.extend(["src/caosadvancedtools"]); + import sys; sys.path.extend(["src/linkaheadadvancedtools"]); import astroid; astroid.context.InferenceContext.max_inferred = 500; diff --git a/unittests/linkaheadignore-example b/unittests/linkaheadignore-example index 04500046def6f8d1a7efb1cdceeff7e85f8e1f91..f974106514e3c91cdbc4c681163350239a0def48 100644 --- a/unittests/linkaheadignore-example +++ b/unittests/linkaheadignore-example @@ -1,2 +1,2 @@ README.md -.caosdbignore* +.linkaheadignore*