Skip to content

Commit ededeb7

Browse files
committed
Name mbinary should be unique in pypi and cartes.io
1 parent 0b33d01 commit ededeb7

27 files changed

+186
-274
lines changed

.github/workflows/publish_crate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
uses: Swatinem/rust-cache@v2
2323

2424
- name: Publish to Crates.io
25-
working-directory: rust # Adjust if needed
25+
working-directory: rust
2626
env:
2727
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_TOKEN }}
2828
run: cargo publish --verbose

.github/workflows/publish_pypi.yml

Lines changed: 1 addition & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,4 @@
1-
name: CI
2-
3-
# on:
4-
# push:
5-
# branches:
6-
# - main
7-
# - master
8-
# tags:
9-
# - '*'
10-
# pull_request:
11-
# workflow_dispatch:
12-
#
13-
# permissions:
14-
# contents: read
15-
16-
17-
# on:
18-
# push:
19-
# branches:
20-
# - main
21-
# - master
22-
# - 'test_release'
1+
name: Publish Pypi
232

243
on:
254
workflow_run:
@@ -56,13 +35,6 @@ jobs:
5635
pip install maturin
5736
cd python
5837
maturin build --release --out dist --find-interpreter
59-
# - name: Build wheels
60-
# uses: PyO3/maturin-action@v1
61-
# with:
62-
# target: ${{ matrix.platform.target }}
63-
# args: -m python --release --out dist --find-interpreter
64-
# sccache: 'true'
65-
# manylinux: auto
6638
- name: Upload wheels
6739
uses: actions/upload-artifact@v4
6840
with:
@@ -92,13 +64,6 @@ jobs:
9264
pip install maturin
9365
cd python
9466
maturin build --release --out dist --find-interpreter
95-
# - name: Build wheels
96-
# uses: PyO3/maturin-action@v1
97-
# with:
98-
# target: ${{ matrix.platform.target }}
99-
# args: --release --out dist --find-interpreter
100-
# sccache: 'true'
101-
# manylinux: musllinux_1_2
10267
- name: Upload wheels
10368
uses: actions/upload-artifact@v4
10469
with:
@@ -126,12 +91,6 @@ jobs:
12691
pip install maturin
12792
cd python
12893
maturin build --release --out dist --find-interpreter
129-
# - name: Build wheels
130-
# uses: PyO3/maturin-action@v1
131-
# with:
132-
# target: ${{ matrix.platform.target }}
133-
# args: --release --out dist --find-interpreter
134-
# sccache: 'true'
13594
- name: Upload wheels
13695
uses: actions/upload-artifact@v4
13796
with:
@@ -157,12 +116,6 @@ jobs:
157116
pip install maturin
158117
cd python
159118
maturin build --release --out dist --find-interpreter
160-
# - name: Build wheels
161-
# uses: PyO3/maturin-action@v1
162-
# with:
163-
# target: ${{ matrix.platform.target }}
164-
# args: --release --out dist --find-interpreter
165-
# sccache: 'true'
166119
- name: Upload wheels
167120
uses: actions/upload-artifact@v4
168121
with:
@@ -178,12 +131,6 @@ jobs:
178131
pip install maturin
179132
cd python
180133
maturin sdist --out dist
181-
182-
# - name: Build sdist
183-
# uses: PyO3/maturin-action@v1
184-
# with:
185-
# command: sdist
186-
# args: --out dist
187134
- name: Upload sdist
188135
uses: actions/upload-artifact@v4
189136
with:
@@ -193,8 +140,6 @@ jobs:
193140
release:
194141
name: Release
195142
runs-on: ubuntu-latest
196-
# if: "startsWith(github.ref, 'refs/tags/')"
197-
# needs: [macos]
198143
needs: [linux, musllinux, windows, macos, sdist]
199144
steps:
200145
- uses: actions/download-artifact@v4
@@ -204,11 +149,3 @@ jobs:
204149
run: |
205150
pip install maturin
206151
maturin upload --non-interactive --skip-existing wheels-*/*
207-
208-
# - name: Publish to PyPI
209-
# uses: PyO3/maturin-action@v1
210-
# env:
211-
# MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
212-
# with:
213-
# command: upload
214-
# args: --non-interactive --skip-existing wheels-*/*

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 13 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,39 @@
1-
# Midas Binary Encoding (MBN)
1+
# Midas Binary Encoding
22

33
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
44

55
## Disclaimer
66

7-
The Midas Binary Encoding (MBN) library is heavily inspired by and directly influenced by the [Databento DBN](https://github.com/databento/dbn) library. When starting this project, I was new to Rust and binary encoding, and much of the initial development was based on learning from and building upon Databento's DBN implementation. While MBN will continue to evolve into its own implementation, it is important to acknowledge the foundational inspiration provided by Databento's work.
7+
The Midas Binary Encoding library is heavily inspired by and directly influenced by the [Databento DBN](https://github.com/databento/dbn) library. When starting this project, I was new to Rust and binary encoding, and much of the initial development was based on learning from and building upon Databento's DBN implementation. While it will continue to evolve into its own implementation, it is important to acknowledge the foundational inspiration provided by Databento's work.
88

99
## Overview
1010

11-
The Midas Binary Encoding (MBN) library is a foundational component of the Midas ecosystem. It serves as the shared protocol for encoding and decoding data across all Midas system components. Although users typically do not interact with MBN directly, it plays a crucial role in ensuring seamless data exchange between:
11+
The Midas Binary Encoding library is a foundational component of the Midas ecosystem. It serves as the shared protocol for encoding and decoding data across all Midas system components. Although users typically do not interact with mbinary directly, it plays a crucial role in ensuring seamless data exchange between:
1212

1313
- **Midas Server**: Data storage and API backend.
1414
- **MidasTrader**: Core backtesting and live trading engine.
1515
- **Midas Shell**: Command-line and REPL interface.
1616
- **Midas GUI**: Frontend visualization and analysis.
1717

18-
MBN functions similarly to protocol buffers, providing a structured and efficient binary format for data serialization and deserialization.
18+
Functions similarly to protocol buffers, providing a structured and efficient binary format for data serialization and deserialization.
1919

2020
## Installation
2121

22-
### Rust Installation
22+
### Rust
2323

24-
Add MBN to your Rust project's `Cargo.toml`:
24+
Install `mbinary` directly from [Crates.io](https://crates.io/crates/mbinary)
2525

26-
```toml
27-
[dependencies]
28-
mbn = { git = "https://github.com/midassystems/mbn.git", branch = "main" }
26+
```bash
27+
cargo add mbinary
2928
```
3029

31-
### Python Installation
30+
### Python
3231

33-
For Python, MBN must be installed from source:
32+
Install `mbinary` directly from [PyPI](https://pypi.org/project/mbinary/):
3433

35-
1. Clone the repository:
36-
37-
```bash
38-
git clone https://github.com/midassystems/mbn.git
39-
cd mbn/mbn_python
40-
```
41-
42-
2. Install dependencies:
43-
44-
```bash
45-
pip install -r requirements.txt
46-
```
47-
48-
3. Build the package:
49-
50-
```bash
51-
./test.sh
52-
```
53-
54-
\*\*Select build when prompted
55-
56-
4. Navigate to the desired installation location and install the built package:
57-
```bash
58-
cd mbn/mbn_python
59-
pip install dist/*.whl
60-
```
34+
```bash
35+
pip install mbinary
36+
```
6137

6238
## Future Plans
6339

python/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[package]
2-
name = "mbe_python"
2+
name = "mbinary_python"
33
version = "1.0.0"
44
edition = "2021"
55

66
[lib]
7-
name = "mbe_python"
7+
name = "mbinary_python"
88
crate-type = ["cdylib"]
99

1010
[dependencies]
11-
mbe = {path = "../rust" , features =["python"]}
11+
mbinary = {path = "../rust" , features =["python"]}
1212
pyo3 = { workspace = true }
1313

1414

python/README.md

Lines changed: 7 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,30 @@
1-
# Midas Binary Encoding (MBN)
1+
# Midas Binary Encoding
22

33
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
44

55
## Disclaimer
66

7-
The Midas Binary Encoding (MBN) library is heavily inspired by and directly influenced by the [Databento DBN](https://github.com/databento/dbn) library. When starting this project, I was new to Rust and binary encoding, and much of the initial development was based on learning from and building upon Databento's DBN implementation. While MBN will continue to evolve into its own implementation, it is important to acknowledge the foundational inspiration provided by Databento's work.
7+
The Midas Binary Encoding library is heavily inspired by and directly influenced by the [Databento DBN](https://github.com/databento/dbn) library. When starting this project, I was new to Rust and binary encoding, and much of the initial development was based on learning from and building upon Databento's DBN implementation. While it will continue to evolve into its own implementation, it is important to acknowledge the foundational inspiration provided by Databento's work.
88

99
## Overview
1010

11-
The Midas Binary Encoding (MBN) library is a foundational component of the Midas ecosystem. It serves as the shared protocol for encoding and decoding data across all Midas system components. Although users typically do not interact with MBN directly, it plays a crucial role in ensuring seamless data exchange between:
11+
The Midas Binary Encoding library is a foundational component of the Midas ecosystem. It serves as the shared protocol for encoding and decoding data across all Midas system components. Although users typically do not interact with mbinary directly, it plays a crucial role in ensuring seamless data exchange between:
1212

1313
- **Midas Server**: Data storage and API backend.
1414
- **MidasTrader**: Core backtesting and live trading engine.
1515
- **Midas Shell**: Command-line and REPL interface.
1616
- **Midas GUI**: Frontend visualization and analysis.
1717

18-
MBN functions similarly to protocol buffers, providing a structured and efficient binary format for data serialization and deserialization.
18+
Functions similarly to protocol buffers, providing a structured and efficient binary format for data serialization and deserialization.
1919

2020
## Installation
2121

22-
### Rust Installation
22+
You can install `mbinary` directly from [PyPI](https://pypi.org/project/mbinary/):
2323

24-
Add MBN to your Rust project's `Cargo.toml`:
25-
26-
```toml
27-
[dependencies]
28-
mbe = { git = "https://github.com/midassystems/mbe.git", branch = "main" }
24+
```bash
25+
pip install mbinary
2926
```
3027

31-
### Python Installation
32-
33-
For Python, MBN must be installed from source:
34-
35-
1. Clone the repository:
36-
37-
```bash
38-
git clone https://github.com/midassystems/mbe.git
39-
cd mbe/mbe_python
40-
```
41-
42-
2. Install dependencies:
43-
44-
```bash
45-
pip install -r requirements.txt
46-
```
47-
48-
3. Build the package:
49-
50-
```bash
51-
./test.sh
52-
```
53-
54-
\*\*Select build when prompted
55-
56-
4. Navigate to the desired installation location and install the built package:
57-
```bash
58-
cd mbe/mbe_python
59-
pip install dist/*.whl
60-
```
61-
6228
## Future Plans
6329

6430
- Extend schema support for additional data types.

python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ python-source = "python"
88
module-name = "mbe._lib"
99

1010
[project]
11-
name = "mbe"
11+
name = "mbinary"
1212
version = "1.0.17"
1313
description = "A binary encoding library designed for efficient data storage and transportation in trading platforms."
1414
readme = "README.md"

python/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use mbe::{
1+
use mbinary::{
22
backtest::{
33
BacktestData, BacktestMetaData, Parameters, SignalInstructions, Signals, StaticStats,
44
TimeseriesStats, Trades,
@@ -19,13 +19,13 @@ use pyo3::{prelude::*, PyClass};
1919

2020
// ensure a module was specified, otherwise it defaults to builtins
2121
fn checked_add_class<T: PyClass>(m: &Bound<PyModule>) -> PyResult<()> {
22-
assert_eq!(T::MODULE.unwrap(), "mbe");
22+
assert_eq!(T::MODULE.unwrap(), "mbinary");
2323
m.add_class::<T>()
2424
}
2525

2626
#[pymodule] // The name of the function must match `lib.name` in `Cargo.toml`
2727
#[pyo3(name = "_lib")]
28-
fn python_mbe(_py: Python<'_>, m: &Bound<PyModule>) -> PyResult<()> {
28+
fn python_mbinary(_py: Python<'_>, m: &Bound<PyModule>) -> PyResult<()> {
2929
checked_add_class::<Side>(m)?;
3030
checked_add_class::<Vendors>(m)?;
3131
checked_add_class::<Stype>(m)?;

0 commit comments

Comments
 (0)