Package Exports
- @epochlab/epoch-protos
- @epochlab/epoch-protos/chart_def
- @epochlab/epoch-protos/common
- @epochlab/epoch-protos/table_def
- @epochlab/epoch-protos/tearsheet
- @epochlab/epoch-protos/web/chart_def
- @epochlab/epoch-protos/web/common
- @epochlab/epoch-protos/web/table_def
- @epochlab/epoch-protos/web/tearsheet
Readme
EpochProtos
Protocol Buffer definitions for EpochFolio - generates C++, Python, and TypeScript code.
Quick Start
Build Everything
mkdir build && cd build
cmake ..
make -j$(nproc)Deploy to Local Projects
# Build and copy C++ headers + library (recommended)
./scripts/build_and_copy.sh
# Or just copy (requires build first)
./scripts/copy_to_local.sh
# Quick headers only
./quick-deployWhat You Get
- C++: Static library in
build/generated/cpp/ - Python: Package in
build/generated/python/ - TypeScript: Package in
build/generated/typescript/
Usage
C++
#include "common.pb.h"
#include "chart_def.pb.h"
epoch_proto::ChartDef chart;
chart.set_id("my_chart");
chart.set_type(epoch_proto::EpochFolioDashboardWidget::Lines);Python
import common_pb2
import chart_def_pb2
chart = chart_def_pb2.ChartDef()
chart.id = "my_chart"
chart.type = common_pb2.EpochFolioDashboardWidget.LinesTypeScript
import { ChartDef, EpochFolioDashboardWidget } from './chart_def';
const chart = new ChartDef();
chart.setId("my_chart");
chart.setType(EpochFolioDashboardWidget.Lines);Deployment
C++ Local Copy (No vcpkg needed)
# Build and copy headers + library to EpochFolio (recommended)
./scripts/build_and_copy.sh
# Or just copy (requires build first)
./scripts/copy_to_local.sh
# Quick C++ headers only
./quick-deployPython Local Install
./scripts/python_publish.sh install-localTypeScript Local Install
./scripts/typescript_publish.sh install-localDeploy Everything
./scripts/deploy.sh allIntegration
C++ Project
# After running copy_to_local.sh
add_subdirectory(/path/to/epoch_protos)
target_link_libraries(your_target PRIVATE epoch::proto)Python Project
cd build/generated/python
pip install .TypeScript Project
cd build/generated/typescript
npm installProto Files
common.proto- Basic types and enumschart_def.proto- Chart definitionstable_def.proto- Table definitionstearsheet.proto- Dashboard tearsheet structure
Testing
cd test
g++ -std=c++20 -I../build -o test_cpp test_cpp.cpp ../build/generated/cpp/libepoch_protos_cpp.a -lprotobuf
./test_cpp
python3 test_python.py