diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index be44d9b34b68ed01f746a95edd8f19488480c05b..1854a42a694896a413572c324941a92d6757963c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -89,7 +89,7 @@ test: - mkdir build - cd build - VERSION="$(conan inspect --raw version ..)" - - conan install -s "compiler.libcxx=libstdc++11" -o build_acm=True .. "caosdb/$VERSION@_/_" + - conan install -s "compiler.libcxx=libstdc++11" --build=missing -o build_acm=True .. "caosdb/$VERSION@_/_" - cmake -DCMAKE_BUILD_TYPE=Debug .. - cmake --build . -j - cmake --build . -j --target unit_test_coverage diff --git a/CMakeLists.txt b/CMakeLists.txt index fa8e56fc1737c9b1eb3b20cce26bb0a08e976fbd..cf4774183f458f27b89fdc5e1f6d79ad53383134 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ cmake_minimum_required(VERSION 3.13) -set(libcaosdb_VERSION 0.2.0) +set(libcaosdb_VERSION 0.2.1) set(libcaosdb_COMPATIBLE_SERVER_VERSION_MAJOR 0) set(libcaosdb_COMPATIBLE_SERVER_VERSION_MINOR 8) set(libcaosdb_COMPATIBLE_SERVER_VERSION_PATCH 0) diff --git a/Makefile b/Makefile index 21cd43348cb545bfbf0acd8985dd0e3a459ca8f1..4be361a56cb09fa5359d5ef03ccff3064b2e4e3d 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ conan: conan-install conan-create .PHONY: conan doc: - mkdir -p build && cd build && conan install .. -s $(CONAN_SETTINGS) \ + mkdir -p build && cd build && conan install .. --build=missing -s $(CONAN_SETTINGS) \ && cmake .. && cmake --build . --target doc-sphinx \ && echo "The documentation starts at build/doc/sphinx_out/index.html ." .PHONY: doc diff --git a/RELEASE_GUIDELINES.md b/RELEASE_GUIDELINES.md index c725ec86fd0fb5f8019da955bbe5999ff47afe25..faa7d4399c10ea4e0b45c48943d122ac15fbef5b 100644 --- a/RELEASE_GUIDELINES.md +++ b/RELEASE_GUIDELINES.md @@ -41,4 +41,8 @@ guidelines of the CaosDB Project 9. Release cppinttests with updated cpplib version 10. Merge `main` back into `dev` and increase patch version by one to begin next - release cycle. Do the same in cppintest. + release cycle. + * update `conanfile.py` + * update `CMakeLists.txt` + * update `CHANGELOG.md` with empty `[Unreleased]` sections. + * Don't forget to update cppintest. diff --git a/conanfile.py b/conanfile.py index 156bd99fee0a9fb695487edc1ffc8c785f5717b2..fbcb39a730089ae8a113a5d411fefd8788ba08a2 100644 --- a/conanfile.py +++ b/conanfile.py @@ -3,7 +3,7 @@ from conans import ConanFile, CMake, tools class CaosdbConan(ConanFile): name = "caosdb" - version = "0.2.0" + version = "0.2.1" license = "AGPL-3.0-or-later" author = "Timm C. Fitschen <t.fitschen@indiscale.com>" url = "https://gitlab.indiscale.com/caosdb/src/caosdb-cpplib.git" @@ -22,10 +22,10 @@ class CaosdbConan(ConanFile): } generators = "cmake" requires = [ - ("grpc/1.45.2"), + ("grpc/1.48.0"), ] build_requires = [ - ("boost/1.77.0"), + ("boost/1.78.0"), ("gtest/1.11.0"), ] exports = ("*.cmake", "*CMakeLists.txt", "*.in", @@ -38,6 +38,7 @@ class CaosdbConan(ConanFile): if self.settings.os == "Windows": del self.options.fPIC self.options["boost"].without_python = True + self.options["boost"].filesystem_version = "3" # def source(self): # self.run("git clone https://gitlab.indiscale.com/caosdb/src/caosdb-cpplib.git") diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index e3af12debeb7ca2a6e3a6d69b7c88e886978fa4f..8f8b536d5f9810c4a565cd07866dfe56388ad979 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.2.1] - 2022-09-22 ## +(Daniel Hornung) + +### Changed ### + +* Updated dependencies +* Simplified implementation code a bit + ## [0.2.0] - 2022-07-13 (Timm Fitschen) @@ -19,19 +27,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Transaction::ExecuteAsynchronously is actually asynchronous now. * Removed boost from the headers. Boost is only a build dependency from now on. -### Deprecated - -### Removed - ### Fixed * Calling "GetFileDescriptor().wrapped->path()" after retrieval leads to SegFault. - #41 Updated Conan version in CI pipeline. -### Security - -### Documentation - ## [0.1.2] - 2022-05-31 (Florian Spreckelsen) diff --git a/include/caosdb/logging.h b/include/caosdb/logging.h index 94c78ed3d6c303149e755c4aa83e757a04500724..3fda8e83ac5c164728b2cd156292d22952b70130 100644 --- a/include/caosdb/logging.h +++ b/include/caosdb/logging.h @@ -2,8 +2,8 @@ /* * This file is a part of the CaosDB Project. * - * Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com> - * Copyright (C) 2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2021-2022 Timm Fitschen <t.fitschen@indiscale.com> + * Copyright (C) 2021-2022 IndiScale GmbH <info@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -27,7 +27,6 @@ #include <cstdint> // for uint64_t #include <iosfwd> // for streamsize #include <memory> // for shared_ptr -#include <ostream> // for ostream #include <string> // for string #include <vector> // for vector diff --git a/requirements.txt b/requirements.txt index 171a4c323631116bbd3cfc3019035d77cc1cad6e..2ef354530924d65208089d8825e3a9876f638775 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,29 +1,22 @@ -attrs==21.2.0 -bottle==0.12.19 -certifi==2021.10.8 -chardet==4.0.0 -charset-normalizer==2.0.7 -colorama==0.4.4 -conan==1.48.0 -deprecation==2.1.0 +bottle==0.12.21 +certifi==2022.6.15 +charset-normalizer==2.1.0 +colorama==0.4.5 +conan==1.52.0 distro==1.6.0 -fasteners==0.16.3 +fasteners==0.17.3 future==0.18.2 -idna==3.2 -Jinja2==3.1.1 -jsonschema==4.1.0 -MarkupSafe==2.0.1 +idna==3.3 +Jinja2==3.1.2 +MarkupSafe==2.1.1 node-semver==0.6.1 -packaging==21.0 patch-ng==1.17.4 pluginbase==1.0.1 -Pygments==2.10.0 -PyJWT==1.7.1 -pyparsing==2.4.7 -pyrsistent==0.18.0 +Pygments==2.12.0 +PyJWT==2.4.0 python-dateutil==2.8.2 PyYAML==5.4.1 -requests==2.26.0 +requests==2.28.1 six==1.16.0 -tqdm==4.62.3 -urllib3==1.26.7 +tqdm==4.64.0 +urllib3==1.26.9 diff --git a/src/caosdb/connection.cpp b/src/caosdb/connection.cpp index abc87dacb054a570540eff7e896eb1058b7b267b..4c77c5254c1300e908622882cd01d29d7b0aab65 100644 --- a/src/caosdb/connection.cpp +++ b/src/caosdb/connection.cpp @@ -2,8 +2,8 @@ * * This file is a part of the CaosDB Project. * - * Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com> - * Copyright (C) 2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2021-2022 Timm Fitschen <t.fitschen@indiscale.com> + * Copyright (C) 2021-2022 IndiScale GmbH <info@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -25,18 +25,17 @@ #include "caosdb/acm/v1alpha1/main.grpc.pb.h" // for AccessControlMan... #include "caosdb/acm/v1alpha1/main.pb.h" // for CreateSingleUser... #endif -#include "caosdb/configuration.h" // for ConnectionConfigur... -#include "caosdb/exceptions.h" // for ConfigurationError -#include "caosdb/info.h" // for VersionInfo -#include "caosdb/info/v1/main.grpc.pb.h" // for GeneralInfoService -#include "caosdb/info/v1/main.pb.h" // for GetVersionInfoRequest -#include "caosdb/transaction.h" // for Transaction -#include "caosdb/transaction_status.h" // for TransactionStatus -#include <grpcpp/client_context.h> // for ClientContext -#include <grpcpp/create_channel.h> // for CreateChannel -#include <grpcpp/support/status.h> // for Status -#include <grpcpp/support/status_code_enum.h> // for StatusCode, UNAUTHENTIC... -#include <string> // for string, operator+ +#include "caosdb/configuration.h" // for ConnectionConfigur... +#include "caosdb/exceptions.h" // for ConfigurationError +#include "caosdb/info.h" // for VersionInfo +#include "caosdb/info/v1/main.grpc.pb.h" // for GeneralInfoService +#include "caosdb/info/v1/main.pb.h" // for GetVersionInfoRequest +#include "caosdb/transaction.h" // for Transaction +#include "caosdb/transaction_status.h" // for TransactionStatus +#include <grpcpp/client_context.h> // for ClientContext +#include <grpcpp/create_channel.h> // for CreateChannel +#include <grpcpp/support/status.h> // for Status +#include <string> // for string, operator+ // IWYU pragma: no_include "net/proto2/public/repeated_field.h" namespace caosdb::connection { diff --git a/src/caosdb/file_transmission/download_request_handler.cpp b/src/caosdb/file_transmission/download_request_handler.cpp index 821ed79477045f4e3bf49c061cfac622b814700d..1b0764fa2039b7d4c37ba09fdc03cedf4959736a 100644 --- a/src/caosdb/file_transmission/download_request_handler.cpp +++ b/src/caosdb/file_transmission/download_request_handler.cpp @@ -1,7 +1,7 @@ /* * This file is a part of the CaosDB Project. - * Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com> - * Copyright (C) 2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2021-2022 Timm Fitschen <t.fitschen@indiscale.com> + * Copyright (C) 2021-2022 IndiScale GmbH <info@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -47,21 +47,20 @@ * > DEALINGS IN THE SOFTWARE. */ #include "caosdb/file_transmission/download_request_handler.h" -#include "caosdb/logging.h" // for CAOSDB_LOG_TRACE -#include "caosdb/protobuf_helper.h" // for get_arena -#include "caosdb/status_code.h" // for GENERIC_RPC_E... -#include "caosdb/transaction_status.h" // for TransactionStatus -#include <exception> // IWYU pragma: keep -#include <filesystem> // for operator<<, path -#include <google/protobuf/arena.h> // for Arena -#include <grpcpp/client_context.h> // for ClientContext -#include <grpcpp/completion_queue.h> // for CompletionQueue -#include <grpcpp/support/async_stream.h> // for ClientAsyncReader -#include <grpcpp/support/status.h> // for Status -#include <grpcpp/support/status_code_enum.h> // for OK -#include <stdexcept> // for runtime_error -#include <string> // for string, opera... -#include <utility> // for move +#include "caosdb/logging.h" // for CAOSDB_LOG_TRACE +#include "caosdb/protobuf_helper.h" // for get_arena +#include "caosdb/status_code.h" // for GENERIC_RPC_E... +#include "caosdb/transaction_status.h" // for TransactionStatus +#include <exception> // IWYU pragma: keep +#include <filesystem> // for operator<<, path +#include <google/protobuf/arena.h> // for Arena +#include <grpcpp/client_context.h> // for ClientContext +#include <grpcpp/completion_queue.h> // for CompletionQueue +#include <grpcpp/support/async_stream.h> // for ClientAsyncReader +#include <grpcpp/support/status.h> // for Status +#include <stdexcept> // for runtime_error +#include <string> // for string, opera... +#include <utility> // for move // IWYU pragma: no_include <bits/exception.h> // namespace caosdb::transaction { diff --git a/src/caosdb/file_transmission/upload_request_handler.cpp b/src/caosdb/file_transmission/upload_request_handler.cpp index 32bb8132e0b4a966774c5f8111800151895b6ced..57bd224dfe53a57ecb706d74dc1438e143dac641 100644 --- a/src/caosdb/file_transmission/upload_request_handler.cpp +++ b/src/caosdb/file_transmission/upload_request_handler.cpp @@ -1,7 +1,7 @@ /* * This file is a part of the CaosDB Project. - * Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com> - * Copyright (C) 2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2021-2022 Timm Fitschen <t.fitschen@indiscale.com> + * Copyright (C) 2021-2022 IndiScale GmbH <info@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -57,7 +57,6 @@ #include <filesystem> // for operator<<, path #include <google/protobuf/arena.h> // for Arena #include <grpcpp/impl/codegen/call_op_set.h> // for WriteOptions -#include <grpcpp/support/status_code_enum.h> // for OK #include <string> // for basic_string #include <utility> // for move // IWYU pragma: no_include <bits/exception.h> diff --git a/src/caosdb/transaction.cpp b/src/caosdb/transaction.cpp index c75fdeb7fcf5b1a5854464dcabf76c11bb5a4262..ca8338dce4e4b721202e72c3fdecf58339746ee0 100644 --- a/src/caosdb/transaction.cpp +++ b/src/caosdb/transaction.cpp @@ -1,7 +1,7 @@ /* * This file is a part of the CaosDB Project. - * Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com> - * Copyright (C) 2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2021-2022 Timm Fitschen <t.fitschen@indiscale.com> + * Copyright (C) 2021-2022 IndiScale GmbH <info@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -32,7 +32,7 @@ #include <filesystem> // for operator<<, path #include <future> // for async, future #include <google/protobuf/arena.h> // for Arena -#include <grpc/impl/codegen/gpr_types.h> // for gpr_timespec +#include <grpc/grpc.h> // for gpr_timespec #include <map> // for map, operator!= #include <memory> // for unique_ptr #include <random> // for mt19937, rand... diff --git a/src/caosdb/unary_rpc_handler.cpp b/src/caosdb/unary_rpc_handler.cpp index 06afc127cecea22b1b805d20a68eab177841e981..6d116eafae7203498ebf431a09d85c184b619191 100644 --- a/src/caosdb/unary_rpc_handler.cpp +++ b/src/caosdb/unary_rpc_handler.cpp @@ -1,7 +1,7 @@ /* * This file is a part of the CaosDB Project. - * Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com> - * Copyright (C) 2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2021-2022 Timm Fitschen <t.fitschen@indiscale.com> + * Copyright (C) 2021-2022 IndiScale GmbH <info@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -47,11 +47,10 @@ * > DEALINGS IN THE SOFTWARE. */ #include "caosdb/unary_rpc_handler.h" -#include "caosdb/logging.h" // for CAOSDB_LOG_TRACE -#include "caosdb/status_code.h" // for GENERIC_RPC_E... -#include <exception> // IWYU pragma: keep -#include <grpcpp/support/status_code_enum.h> // for OK -#include <string> // for string, opera... +#include "caosdb/logging.h" // for CAOSDB_LOG_TRACE +#include "caosdb/status_code.h" // for GENERIC_RPC_E... +#include <exception> // IWYU pragma: keep +#include <string> // for string, opera... // IWYU pragma: no_include <bits/exception.h> namespace caosdb::transaction { diff --git a/test/test_transaction.cpp b/test/test_transaction.cpp index e710b6c775615968b567b6efa64ba76e56717c69..77d457c6eee2c5e9d95c53c95c1b2f0a713dcff4 100644 --- a/test/test_transaction.cpp +++ b/test/test_transaction.cpp @@ -1,8 +1,8 @@ /* * This file is a part of the CaosDB Project. * - * Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com> - * Copyright (C) 2021 IndiScale GmbH <info@indiscale.com> + * Copyright (C) 2021-2022 Timm Fitschen <t.fitschen@indiscale.com> + * Copyright (C) 2021-2022 IndiScale GmbH <info@indiscale.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -55,10 +55,10 @@ TEST(test_transaction, create_transaction) { auto transaction = connection.CreateTransaction(); ASSERT_EQ(StatusCode::GO_ON, transaction->RetrieveById("100")); - EXPECT_THROW_MESSAGE(transaction->Execute(), ConnectionError, - "The attempt to execute this transaction was not successful because the " - "connection to the server could not be established. " - "Original message: failed to connect to all addresses"); + EXPECT_THROW_STARTS_WITH(transaction->Execute(), ConnectionError, + "The attempt to execute this transaction was not successful because the " + "connection to the server could not be established. " + "Original message: failed to connect to all addresses"); } TEST(test_transaction, test_multi_result_set) {