diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 097b3fa..9f1139c 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -28,20 +28,6 @@ jobs: - uses: julia-actions/cache@v3 - # DBN.jl is unregistered — clone it as a sibling and develop it before testing. - - name: Clone DBN.jl - shell: bash - run: git clone --depth 1 https://github.com/tbeason/DBN.jl ../DBN.jl - - - name: Dev DBN.jl + instantiate - shell: bash - run: | - julia --project=. -e ' - using Pkg - Pkg.develop(path="../DBN.jl") - Pkg.instantiate() - ' - - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 diff --git a/Project.toml b/Project.toml index 979fc4a..68572a3 100644 --- a/Project.toml +++ b/Project.toml @@ -6,8 +6,8 @@ authors = ["Tyler Beason "] [deps] Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" CodecZstd = "6b39b394-51ab-5f42-8807-6242bab2b4c2" -DBN = "90689371-c8cb-40d1-831f-18033db90f74" DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" +DatabentoBinaryEncoding = "90689371-c8cb-40d1-831f-18033db90f74" Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" EnumX = "4e289a0a-7415-4d19-859d-a7e5c4648b56" HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3" @@ -19,13 +19,10 @@ TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" URIs = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4" -[sources] -DBN = {path = "C:\\Users\\tbeas\\Documents\\GitHub\\DBN.jl"} - [compat] CodecZstd = "0.8" -DBN = "0.1" DataFrames = "1.7" +DatabentoBinaryEncoding = "0.1" EnumX = "1.0" HTTP = "1.10" JSON3 = "1.14" diff --git a/benchmark/bench_dbn_read.jl b/benchmark/bench_dbn_read.jl index b511fe5..6ad1703 100644 --- a/benchmark/bench_dbn_read.jl +++ b/benchmark/bench_dbn_read.jl @@ -3,7 +3,8 @@ module BenchDBNRead include("fixtures.jl"); using .Fixtures include("bench_common.jl"); using .BenchCommon -using DBN +using DatabentoBinaryEncoding +import DatabentoBinaryEncoding as DBN using CodecZstd using TranscodingStreams diff --git a/benchmark/bench_dbn_write.jl b/benchmark/bench_dbn_write.jl index 0467a12..8030e4b 100644 --- a/benchmark/bench_dbn_write.jl +++ b/benchmark/bench_dbn_write.jl @@ -3,7 +3,8 @@ module BenchDBNWrite include("fixtures.jl"); using .Fixtures include("bench_common.jl"); using .BenchCommon -using DBN +using DatabentoBinaryEncoding +import DatabentoBinaryEncoding as DBN using CodecZstd using TranscodingStreams diff --git a/benchmark/bench_historical_decode.jl b/benchmark/bench_historical_decode.jl index e2554ee..4f1f4a9 100644 --- a/benchmark/bench_historical_decode.jl +++ b/benchmark/bench_historical_decode.jl @@ -4,7 +4,8 @@ include("fixtures.jl"); using .Fixtures include("bench_common.jl"); using .BenchCommon using DatabentoAPI -using DBN +using DatabentoBinaryEncoding +import DatabentoBinaryEncoding as DBN using HTTP using CodecZstd using TranscodingStreams diff --git a/benchmark/bench_live_reader.jl b/benchmark/bench_live_reader.jl index 2009933..a4d031e 100644 --- a/benchmark/bench_live_reader.jl +++ b/benchmark/bench_live_reader.jl @@ -5,7 +5,8 @@ include("bench_common.jl"); using .BenchCommon using DatabentoAPI using DatabentoAPI: read_text_frame, build_text_frame, cram_response -using DBN +using DatabentoBinaryEncoding +import DatabentoBinaryEncoding as DBN using CodecZstd using TranscodingStreams using Sockets diff --git a/benchmark/bench_live_replay.jl b/benchmark/bench_live_replay.jl index 393911b..3f401a4 100644 --- a/benchmark/bench_live_replay.jl +++ b/benchmark/bench_live_replay.jl @@ -15,7 +15,8 @@ include("bench_common.jl"); using .BenchCommon using DatabentoAPI using DatabentoAPI: read_text_frame, build_text_frame -using DBN +using DatabentoBinaryEncoding +import DatabentoBinaryEncoding as DBN using CodecZstd using TranscodingStreams using Sockets diff --git a/benchmark/bench_live_stress.jl b/benchmark/bench_live_stress.jl index 0b55f06..7ac83b8 100644 --- a/benchmark/bench_live_stress.jl +++ b/benchmark/bench_live_stress.jl @@ -12,7 +12,8 @@ module BenchLiveStress # subscription. using DatabentoAPI -using DBN +using DatabentoBinaryEncoding +import DatabentoBinaryEncoding as DBN using Printf const DEFAULT_PARENTS = [ diff --git a/benchmark/bench_stream_to_file.jl b/benchmark/bench_stream_to_file.jl index e126054..81acb36 100644 --- a/benchmark/bench_stream_to_file.jl +++ b/benchmark/bench_stream_to_file.jl @@ -5,7 +5,8 @@ include("bench_common.jl"); using .BenchCommon using DatabentoAPI using DatabentoAPI: read_text_frame, build_text_frame, cram_response -using DBN +using DatabentoBinaryEncoding +import DatabentoBinaryEncoding as DBN using CodecZstd using TranscodingStreams using Sockets diff --git a/benchmark/bench_tcp_throughput.jl b/benchmark/bench_tcp_throughput.jl index 04f8f48..deeb990 100644 --- a/benchmark/bench_tcp_throughput.jl +++ b/benchmark/bench_tcp_throughput.jl @@ -17,7 +17,8 @@ module BenchTCPThroughput # buffer would lift the live ceiling. using Sockets -using DBN +using DatabentoBinaryEncoding +import DatabentoBinaryEncoding as DBN using DatabentoAPI: CountingIO using Printf diff --git a/benchmark/fixtures.jl b/benchmark/fixtures.jl index 4caa586..6e7ca07 100644 --- a/benchmark/fixtures.jl +++ b/benchmark/fixtures.jl @@ -1,6 +1,7 @@ module Fixtures -using DBN +using DatabentoBinaryEncoding +import DatabentoBinaryEncoding as DBN using CodecZstd using TranscodingStreams diff --git a/benchmark/profile_hotspots.jl b/benchmark/profile_hotspots.jl index 6a10964..13a1521 100644 --- a/benchmark/profile_hotspots.jl +++ b/benchmark/profile_hotspots.jl @@ -3,7 +3,8 @@ module ProfileHotspots include("fixtures.jl"); using .Fixtures using Profile -using DBN +using DatabentoBinaryEncoding +import DatabentoBinaryEncoding as DBN using CodecZstd using TranscodingStreams using Printf diff --git a/benchmark/profile_live_reader.jl b/benchmark/profile_live_reader.jl index 5f6ef14..c81329f 100644 --- a/benchmark/profile_live_reader.jl +++ b/benchmark/profile_live_reader.jl @@ -8,7 +8,8 @@ module ProfileLiveReader include("fixtures.jl"); using .Fixtures using DatabentoAPI -using DBN +using DatabentoBinaryEncoding +import DatabentoBinaryEncoding as DBN using Profile using Printf using CodecZstd diff --git a/src/DatabentoAPI.jl b/src/DatabentoAPI.jl index 11b8e16..bf9178f 100644 --- a/src/DatabentoAPI.jl +++ b/src/DatabentoAPI.jl @@ -3,7 +3,8 @@ Julia client for the Databento Historical (HTTP) and Live (TCP) market data APIs. -Wraps Databento's wire protocols on top of [DBN.jl](https://github.com/tylerbeason/DBN.jl), +Wraps Databento's wire protocols on top of +[DatabentoBinaryEncoding.jl](https://github.com/tbeason/DatabentoBinaryEncoding.jl), which handles all binary record decoding. # Quick start @@ -49,8 +50,8 @@ using TOML using TranscodingStreams using URIs -import DBN -using DBN: Schema, SType, Compression, Encoding, Action, Side, InstrumentClass +import DatabentoBinaryEncoding as DBN +using DatabentoBinaryEncoding: Schema, SType, Compression, Encoding, Action, Side, InstrumentClass include("errors.jl") include("enums.jl") @@ -74,7 +75,7 @@ include("live/subscribe.jl") include("live/heartbeat.jl") include("live/streaming.jl") -# Re-exported DBN.jl enums (single import for users) +# Re-exported DatabentoBinaryEncoding enums (single import for users) export Schema, SType, Compression, Encoding, Action, Side, InstrumentClass # DatabentoAPI-specific enums diff --git a/test/live/test_live_streaming_smoke.jl b/test/live/test_live_streaming_smoke.jl index 22d4f52..2a60561 100644 --- a/test/live/test_live_streaming_smoke.jl +++ b/test/live/test_live_streaming_smoke.jl @@ -1,6 +1,7 @@ using Test using DatabentoAPI -using DBN +using DatabentoBinaryEncoding +import DatabentoBinaryEncoding as DBN @testset "Live streaming smoke (OPRA.PILLAR)" begin base = mktempdir() diff --git a/test/test_conversion.jl b/test/test_conversion.jl index 300d124..8bd1241 100644 --- a/test/test_conversion.jl +++ b/test/test_conversion.jl @@ -1,6 +1,7 @@ using Test using DatabentoAPI -using DBN +using DatabentoBinaryEncoding +import DatabentoBinaryEncoding as DBN using DataFrames function _tiny_store() diff --git a/test/test_historical_timeseries.jl b/test/test_historical_timeseries.jl index 094ae7f..9a76e56 100644 --- a/test/test_historical_timeseries.jl +++ b/test/test_historical_timeseries.jl @@ -3,7 +3,8 @@ using DatabentoAPI using HTTP using CodecZstd using TranscodingStreams -using DBN +using DatabentoBinaryEncoding +import DatabentoBinaryEncoding as DBN # Build a small in-memory DBN file (uncompressed), then zstd-compress, and serve it # from the mock dispatcher to exercise the full get_range pipeline. diff --git a/test/test_live_reader.jl b/test/test_live_reader.jl index 9e8a0d8..945ccdf 100644 --- a/test/test_live_reader.jl +++ b/test/test_live_reader.jl @@ -1,7 +1,8 @@ using Test using DatabentoAPI using DatabentoAPI: read_text_frame, build_text_frame, cram_response -using DBN +using DatabentoBinaryEncoding +import DatabentoBinaryEncoding as DBN using Sockets # Encode a tiny DBN payload (header + 3 trades) as raw bytes. diff --git a/test/test_live_reader_typed.jl b/test/test_live_reader_typed.jl index c3bf80c..780c7c7 100644 --- a/test/test_live_reader_typed.jl +++ b/test/test_live_reader_typed.jl @@ -1,7 +1,8 @@ using Test using DatabentoAPI using DatabentoAPI: read_text_frame, build_text_frame, cram_response -using DBN +using DatabentoBinaryEncoding +import DatabentoBinaryEncoding as DBN using Sockets # Build a DBN payload that contains: diff --git a/test/test_live_streaming.jl b/test/test_live_streaming.jl index 305f261..37efdc4 100644 --- a/test/test_live_streaming.jl +++ b/test/test_live_streaming.jl @@ -4,7 +4,8 @@ using DatabentoAPI: SessionStats, RotatingDBNFile, SessionContext, _is_bbo_family, _replay_start_ts, _log_status_alarm!, _handle_record!, _open!, _close!, _ALARM_STATUS_ACTIONS, _SPARSE_SCHEMAS -using DBN +using DatabentoBinaryEncoding +import DatabentoBinaryEncoding as DBN using Sockets using CodecZstd using TranscodingStreams diff --git a/test/test_live_subscribe.jl b/test/test_live_subscribe.jl index 0d27b88..0f8b9f9 100644 --- a/test/test_live_subscribe.jl +++ b/test/test_live_subscribe.jl @@ -1,7 +1,8 @@ using Test using DatabentoAPI using DatabentoAPI: read_text_frame, build_text_frame -using DBN +using DatabentoBinaryEncoding +import DatabentoBinaryEncoding as DBN using Sockets const TEST_API_KEY_2 = "db-aaaaaaaaaaaaaaa12345" diff --git a/test/test_typed_mode_errors.jl b/test/test_typed_mode_errors.jl index 64e1ef3..b44244d 100644 --- a/test/test_typed_mode_errors.jl +++ b/test/test_typed_mode_errors.jl @@ -1,6 +1,7 @@ using Test using DatabentoAPI -using DBN +using DatabentoBinaryEncoding +import DatabentoBinaryEncoding as DBN @testset "typed mode — error coverage" begin