Skip to content
Snippets Groups Projects
Verified Commit 22669759 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

WIP: Rename caosdb -> linkahead

parent 3b03a819
No related branches found
No related tags found
1 merge request!79MAINT: linkahead rename
Pipeline #36702 canceled
Showing
with 56 additions and 56 deletions
......@@ -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
# TODO rename to linkahead, remove branch
RUN pip3 install git+https://gitlab.com/caosdb/caosdb-pylib@f-linkahead-rename
......@@ -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
......
......@@ -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
......@@ -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
......@@ -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
......
......@@ -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
......@@ -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).
......@@ -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.
......
# -*- 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>
......
......@@ -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 /
......@@ -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"
......
......@@ -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):
......
......@@ -30,7 +30,7 @@ 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,
from linkahead.exceptions import (TransactionError,
UnqualifiedParentsError,
UnqualifiedPropertiesError)
......
......@@ -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.
......
......@@ -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):
......
......@@ -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):
......
......@@ -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;
README.md
.caosdbignore*
.linkaheadignore*
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment