diff --git a/CHANGELOG.md b/CHANGELOG.md index c1c5539..ca0fc4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,10 @@ # Changelog -## 0.32.0 - 2025-03-25 +## 0.32.0 - 2025-04-02 ### Enhancements - Upgraded default date version to 3.0.3 +- Updated `vcpkg` baseline ### Breaking changes - Upgraded default cpp-httplib version to 0.20.0 which requires OpenSSL >= 3.0 diff --git a/CMakeLists.txt b/CMakeLists.txt index e008dc2..3e85ad2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,9 +111,13 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_BUILD_TYPE STREQUAL "Debug") endif() # -# Model project dependencies +# Project dependencies # +find_package(OpenSSL REQUIRED) +find_package(Zstd REQUIRED) +find_package(Threads REQUIRED) + include(FetchContent) # JSON if(${PROJECT_NAME_UPPERCASE}_USE_EXTERNAL_JSON) @@ -163,7 +167,7 @@ if(${PROJECT_NAME_UPPERCASE}_USE_EXTERNAL_HTTPLIB) find_package(httplib REQUIRED) endif() else() - set(httplib_version 0.14.3) + set(httplib_version 0.20.0) if(CMAKE_VERSION VERSION_LESS 3.24) FetchContent_Declare( httplib @@ -195,7 +199,7 @@ if(${PROJECT_NAME_UPPERCASE}_USE_EXTERNAL_DATE) find_package(date REQUIRED) endif() else() - set(date_version 3.0.1) + set(date_version 3.0.3) if(CMAKE_VERSION VERSION_LESS 3.24) FetchContent_Declare( date_src @@ -213,13 +217,6 @@ else() # Ignore compiler warnings in headers add_system_include_property(date) endif() -# openSSL -find_package(OpenSSL REQUIRED) -if(OPENSSL_FOUND) - set(HTTPLIB_IS_USING_OPENSSL TRUE) -endif() -find_package(Zstd REQUIRED) -find_package(Threads REQUIRED) # # Platform-specific dependencies diff --git a/cmake/FindZstd.cmake b/cmake/FindZstd.cmake index 8af7b0b..5d96f5f 100644 --- a/cmake/FindZstd.cmake +++ b/cmake/FindZstd.cmake @@ -50,6 +50,10 @@ if(ZSTD_FOUND AND NOT TARGET zstd::zstd) INTERFACE_INCLUDE_DIRECTORIES ${ZSTD_INCLUDE_DIR} ) endif() +# cpp-httplib only searches for zstd::libzstd +if (NOT TARGET zstd::libzstd) + add_library(zstd::libzstd ALIAS zstd::zstd) +endif() # Check if the Conan-provided target exists if(TARGET zstd::libzstd_static) diff --git a/include/databento/historical.hpp b/include/databento/historical.hpp index 0068257..c542bca 100644 --- a/include/databento/historical.hpp +++ b/include/databento/historical.hpp @@ -37,6 +37,9 @@ class Historical { * Batch API */ + // Submits a new batch job and returns a description of the job. + // + // WARNING: Calling this method will incur a cost. BatchJob BatchSubmitJob(const std::string& dataset, const std::vector& symbols, Schema schema, @@ -63,11 +66,13 @@ class Historical { bool split_symbols, SplitDuration split_duration, std::uint64_t split_size, Delivery delivery, SType stype_in, SType stype_out, std::uint64_t limit); + // Lists previous batch jobs. std::vector BatchListJobs(); std::vector BatchListJobs(const std::vector& states, UnixNanos since); std::vector BatchListJobs(const std::vector& states, const std::string& since); + // Lists all files associated with a batch job. std::vector BatchListFiles(const std::string& job_id); // Returns the paths of the downloaded files. std::vector BatchDownload(const std::string& output_dir, @@ -160,12 +165,15 @@ class Historical { * Timeseries API */ - // Stream historical market data to `record_callback`. This method will - // return only after all data has been returned or `record_callback` returns - // `KeepGoing::Stop`. + // Stream historical market data to `record_callback`. `metadata_callback` + // will be called exactly once, before any calls to `record_callback`. + // This method will return only after all data has been returned or + // `record_callback` returns `KeepGoing::Stop`. // // NOTE: This method spawns a thread, however, the callbacks will be called // from the current thread. + // + // WARNING: Calling this method will incur a cost. void TimeseriesGetRange(const std::string& dataset, const DateTimeRange& datetime_range, const std::vector& symbols, @@ -174,13 +182,6 @@ class Historical { const DateTimeRange& datetime_range, const std::vector& symbols, Schema schema, const RecordCallback& record_callback); - // Stream historical market data to `record_callback`. `metadata_callback` - // will be called exactly once, before any calls to `record_callback`. - // This method will return only after all data has been returned or - // `record_callback` returns `KeepGoing::Stop`. - // - // NOTE: This method spawns a thread, however, the callbacks will be called - // from the current thread. void TimeseriesGetRange(const std::string& dataset, const DateTimeRange& datetime_range, const std::vector& symbols, @@ -199,6 +200,8 @@ class Historical { // object for replaying the data in `file_path`. // // If a file at `file_path` already exists, it will be overwritten. + // + // WARNING: Calling this method will incur a cost. DbnFileStore TimeseriesGetRangeToFile( const std::string& dataset, const DateTimeRange& datetime_range, diff --git a/tests/cmake_import/CMakeLists.txt b/tests/cmake_import/CMakeLists.txt index 9aebc64..de69d1e 100644 --- a/tests/cmake_import/CMakeLists.txt +++ b/tests/cmake_import/CMakeLists.txt @@ -13,10 +13,10 @@ add_test( ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} - -Ddatabento_DIR=${CMAKE_CURRENT_BINARY_DIR}/pkg/lib/cmake/databento + -Ddatabento_DIR=${CMAKE_CURRENT_BINARY_DIR}/pkg/${CMAKE_INSTALL_LIBDIR}/cmake/databento -Dnlohmann_json_DIR=${nlohmann_json_BINARY_DIR} - -Ddate_DIR=${CMAKE_CURRENT_BINARY_DIR}/pkg/lib/cmake/date - -Dhttplib_DIR=${CMAKE_CURRENT_BINARY_DIR}/pkg/lib/cmake/httplib + -Ddate_DIR=${CMAKE_CURRENT_BINARY_DIR}/pkg/${CMAKE_INSTALL_LIBDIR}/cmake/date + -Dhttplib_DIR=${CMAKE_CURRENT_BINARY_DIR}/pkg/${CMAKE_INSTALL_LIBDIR}/cmake/httplib ${CMAKE_CURRENT_SOURCE_DIR}/project ) # Build test project diff --git a/vcpkg.json b/vcpkg.json index 7199325..875810e 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -9,5 +9,5 @@ "openssl", "zstd" ], - "builtin-baseline": "d1e11918f5c88c1dd364b93e1452fea69bacd479" + "builtin-baseline": "b02e341c927f16d991edbd915d8ea43eac52096c" }