Skip to main content

Protocol Buffer definitions for EpochFolio models

Project description

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-deploy

What 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.Lines

TypeScript

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-deploy

Python Local Install

./scripts/python_publish.sh install-local

TypeScript Local Install

./scripts/typescript_publish.sh install-local

Deploy Everything

./scripts/deploy.sh all

Integration

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 install

Proto Files

  • common.proto - Basic types and enums
  • chart_def.proto - Chart definitions
  • table_def.proto - Table definitions
  • tearsheet.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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

epoch_protos-1.0.0.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

epoch_protos-1.0.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file epoch_protos-1.0.0.tar.gz.

File metadata

  • Download URL: epoch_protos-1.0.0.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for epoch_protos-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f65425ac7318c652873072d03c54b0b853bccd1bf1f0860435e69070717e319f
MD5 9ca7a3c1006c1c5df72594e9e040b6b6
BLAKE2b-256 6af473df59eee90ec9e0825f8d3c5a17db7ac662f211dbba7a21fad2c03a5388

See more details on using hashes here.

File details

Details for the file epoch_protos-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: epoch_protos-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for epoch_protos-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28085d5e0c6ffb37dd882ba97089883fb35be8c4d59941d13b9fce656feb208f
MD5 0e1a732954a47da766661d44e265e613
BLAKE2b-256 a72460e3f1944007fd41d4f325d7e53d85c55beafdcf526c6fe29c823f164b5f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page