https://github.com/cvxgrp/cvxbson

dealing with json and bson files

https://github.com/cvxgrp/cvxbson

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.0%) to scientific vocabulary

Keywords from Contributors

critical-line-algorithm efficient-frontier markowitz unit-test labels numerical-optimization
Last synced: 10 months ago · JSON representation

Repository

dealing with json and bson files

Basic Info
Statistics
  • Stars: 2
  • Watchers: 3
  • Forks: 1
  • Open Issues: 5
  • Releases: 16
Created almost 3 years ago · Last pushed 11 months ago
Metadata Files
Readme Contributing License Code of conduct

README.md

📦 cvxbson

PyPI version Apache 2.0
License Downloads Coverage Status Renovate enabled

Open in GitHub Codespaces

🔄 IPC

IPC stands for InterProcess Communication. It is a mechanism that allows to share data between processes. A traditional way to do so is to use json files. Json files are rather flexible and can be used to share data between different programming languages. However, they are not very efficient.

Here we use their binary counterpart, bson files. Bson files are much more efficient but somewhat lack the flexibility of json files. Here we rely on the bson package to read and write bson files. We are interested in parsing dictionaries of numpy arrays, pandas and polars dataframes as fast as possible.

There might be faster ways to achieve this goal and we are open to suggestions and pull requests.

We recommend using json files to transfer configurations and small amounts of data. Bson files can then be used to transfer large matrices. A coexistence is possible and encouraged.

🚀 Demo

```python

import numpy as np

from cvx.bson import readbson, writebson

data = {"A": np.random.rand(50, 50), "B": np.random.rand(50)}

writebson("test.bson", data) recovered = readbson("test.bson")

assert np.allclose(data["A"], recovered["A"]) assert np.allclose(data["B"], recovered["B"]) ```

We have also implemented the same functionality in for json files but would advise against using it. It is much slower and less efficient.

You may want to avoid the explicit construction of files. It is possible to work directly with bson strings. We provide methods for that, too.

🛠️ uv

You need to install task. Starting with

bash task build:install

will install uv and create the virtual environment defined in pyproject.toml and locked in uv.lock.

📊 marimo

We install marimo on the fly within the aforementioned virtual environment. Executing

bash task docs:marimo

will install and start marimo.

Owner

  • Name: Stanford University Convex Optimization Group
  • Login: cvxgrp
  • Kind: organization
  • Location: Stanford, CA

GitHub Events

Total
  • Create event: 82
  • Issues event: 7
  • Release event: 7
  • Delete event: 75
  • Issue comment event: 83
  • Push event: 402
  • Pull request review comment event: 2
  • Pull request review event: 2
  • Pull request event: 193
  • Fork event: 1
Last Year
  • Create event: 82
  • Issues event: 7
  • Release event: 7
  • Delete event: 75
  • Issue comment event: 83
  • Push event: 402
  • Pull request review comment event: 2
  • Pull request review event: 2
  • Pull request event: 193
  • Fork event: 1

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 373
  • Total Committers: 5
  • Avg Commits per committer: 74.6
  • Development Distribution Score (DDS): 0.63
Past Year
  • Commits: 147
  • Committers: 4
  • Avg Commits per committer: 36.75
  • Development Distribution Score (DDS): 0.456
Top Committers
Name Email Commits
Thomas Schmelzer t****r@g****m 138
Thomas Schmelzer t****r@a****e 92
dependabot[bot] 4****]@u****m 91
renovate[bot] 2****]@u****m 49
pre-commit-ci[bot] 6****]@u****m 3
Committer Domains (Top 20 + Academic)
adia.ae: 1

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 19
  • Total pull requests: 365
  • Average time to close issues: 9 days
  • Average time to close pull requests: about 21 hours
  • Total issue authors: 2
  • Total pull request authors: 4
  • Average comments per issue: 0.11
  • Average comments per pull request: 0.72
  • Merged pull requests: 333
  • Bot issues: 1
  • Bot pull requests: 263
Past Year
  • Issues: 6
  • Pull requests: 206
  • Average time to close issues: 33 minutes
  • Average time to close pull requests: about 8 hours
  • Issue authors: 2
  • Pull request authors: 4
  • Average comments per issue: 0.17
  • Average comments per pull request: 0.8
  • Merged pull requests: 187
  • Bot issues: 1
  • Bot pull requests: 129
Top Authors
Issue Authors
  • tschm (18)
  • renovate[bot] (1)
Pull Request Authors
  • dependabot[bot] (165)
  • tschm (102)
  • renovate[bot] (92)
  • pre-commit-ci[bot] (6)
Top Labels
Issue Labels
Pull Request Labels
dependencies (178) python (115) renovate (55) pre-commit (13) github_actions (10)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 778 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 1
  • Total versions: 15
  • Total maintainers: 1
pypi.org: cvxbson

Dealing with json and bson files

  • Versions: 15
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 778 Last month
Rankings
Dependent packages count: 7.4%
Downloads: 9.1%
Average: 20.2%
Dependent repos count: 22.2%
Forks count: 30.0%
Stargazers count: 32.0%
Maintainers (1)
Last synced: 11 months ago

Dependencies

.github/workflows/basic.yml actions
  • actions/checkout v3 composite
  • cvxgrp/.github/actions/test main composite
  • pre-commit/action v3.0.0 composite
.github/workflows/book.yml actions
  • JamesIves/github-pages-deploy-action v4.4.3 composite
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • cvxgrp/.github/actions/jupyter main composite
  • cvxgrp/.github/actions/sphinx main composite
  • cvxgrp/.github/actions/test main composite
.github/workflows/ci.yml actions
  • actions/checkout v3 composite
  • coverallsapp/github-action v2 composite
  • cvxgrp/.github/actions/test main composite
.github/workflows/release.yml actions
  • actions/checkout v3 composite
  • cvxgrp/.github/actions/release main composite
poetry.lock pypi
  • 154 dependencies
pyproject.toml pypi
  • numpy *
  • numpyencoder *
  • pandas *
  • pyarrow *
  • python >=3.8,<4.0
  • python-snappy >=0.6.1
  • requests *
  • simple-bson *