Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 2 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ authors = ["Tyler Beason <tbeas12@gmail.com>"]
[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"
Expand All @@ -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"
Expand Down
3 changes: 2 additions & 1 deletion benchmark/bench_dbn_read.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ module BenchDBNRead
include("fixtures.jl"); using .Fixtures
include("bench_common.jl"); using .BenchCommon

using DBN
using DatabentoBinaryEncoding

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update the benchmark environment dependency name

When running the documented benchmark entry point (julia --project=benchmark benchmark/runbench.jl), these renamed imports are resolved against benchmark/Project.toml, but that environment still declares DBN = "90689371-c8cb-40d1-831f-18033db90f74" and a [sources] path for ../../DBN.jl rather than DatabentoBinaryEncoding. As a result the benchmark project has no root dependency named DatabentoBinaryEncoding, so the first included benchmark that executes this import will fail with the package not found unless the user manually edits/devs the benchmark environment too.

Useful? React with 👍 / 👎.

import DatabentoBinaryEncoding as DBN
using CodecZstd
using TranscodingStreams

Expand Down
3 changes: 2 additions & 1 deletion benchmark/bench_dbn_write.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion benchmark/bench_historical_decode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion benchmark/bench_live_reader.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion benchmark/bench_live_replay.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion benchmark/bench_live_stress.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ module BenchLiveStress
# subscription.

using DatabentoAPI
using DBN
using DatabentoBinaryEncoding
import DatabentoBinaryEncoding as DBN
using Printf

const DEFAULT_PARENTS = [
Expand Down
3 changes: 2 additions & 1 deletion benchmark/bench_stream_to_file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion benchmark/bench_tcp_throughput.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion benchmark/fixtures.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module Fixtures

using DBN
using DatabentoBinaryEncoding
import DatabentoBinaryEncoding as DBN
using CodecZstd
using TranscodingStreams

Expand Down
3 changes: 2 additions & 1 deletion benchmark/profile_hotspots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion benchmark/profile_live_reader.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions src/DatabentoAPI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion test/live/test_live_streaming_smoke.jl
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
3 changes: 2 additions & 1 deletion test/test_conversion.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Test
using DatabentoAPI
using DBN
using DatabentoBinaryEncoding
import DatabentoBinaryEncoding as DBN
using DataFrames

function _tiny_store()
Expand Down
3 changes: 2 additions & 1 deletion test/test_historical_timeseries.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion test/test_live_reader.jl
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 2 additions & 1 deletion test/test_live_reader_typed.jl
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
3 changes: 2 additions & 1 deletion test/test_live_streaming.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion test/test_live_subscribe.jl
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
3 changes: 2 additions & 1 deletion test/test_typed_mode_errors.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Test
using DatabentoAPI
using DBN
using DatabentoBinaryEncoding
import DatabentoBinaryEncoding as DBN

@testset "typed mode — error coverage" begin

Expand Down
Loading