Skip to content

Commit

Permalink
cleanup. bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
Wil Boayue committed Oct 2, 2024
1 parent 2d4568d commit 9749470
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ibapi"
version = "0.4.3"
version = "0.5.0"
edition = "2021"
authors = ["Wil Boayue <[email protected]>"]
description = "A synchronous implementation of the Interactive Brokers TWS API."
Expand Down
26 changes: 26 additions & 0 deletions contributors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,29 @@ RUST_LOG=debug cargo run --bin find_contract_details

`RUST_LOG=debug`
`IBAPI_RECORDING_DIR=/tmp`

## Creating and publishing releases.

1. Make sure build is clean and tests are passing.

```bash
cargo build --all-targets
cargo test
```

2. Update version number in [Cargo.toml](https://github.com/wboayue/rust-ibapi/blob/76033d170f2b87d55ed2cd96fef17bf124161d5f/Cargo.toml#L3) using [semantic versioning](https://semver.org/). Commit and push.

3. Create tag with new version number and push.

```bash
git tag v0.4.0 main
git push origin tag v0.4.0
```

4. [Create release](https://github.com/wboayue/rust-ibapi/releases/new) pointing to new tag. Describe changes in release.

5. Publish to crates.io

```bash
cargo publish
```
6 changes: 3 additions & 3 deletions examples/tick_by_tick.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fn main() {
thread::sleep(Duration::from_secs(5));
}

fn stream_last(client: &mut Client, symbol: &str) -> anyhow::Result<()> {
fn stream_last(client: &mut Client, _symbol: &str) -> anyhow::Result<()> {
let contract = contract_gc();
let ticks = client.tick_by_tick_last(&contract, 0, false)?;

Expand Down Expand Up @@ -87,7 +87,7 @@ fn stream_all_last(client: &Client, symbol: &str) -> anyhow::Result<()> {
Ok(())
}

fn stream_bid_ask(client: &mut Client, symbol: &str) -> anyhow::Result<()> {
fn stream_bid_ask(client: &mut Client, _symbol: &str) -> anyhow::Result<()> {
let contract = contract_es();
let ticks = client.tick_by_tick_bid_ask(&contract, 0, false)?;

Expand All @@ -98,7 +98,7 @@ fn stream_bid_ask(client: &mut Client, symbol: &str) -> anyhow::Result<()> {
Ok(())
}

fn stream_mid_point(client: &mut Client, symbol: &str) -> anyhow::Result<()> {
fn stream_mid_point(client: &mut Client, _symbol: &str) -> anyhow::Result<()> {
let contract = contract_es();
let ticks = client.tick_by_tick_midpoint(&contract, 0, false)?;

Expand Down
1 change: 0 additions & 1 deletion src/contracts/encoders.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ pub(crate) fn request_market_rule(market_rule_id: i32) -> Result<RequestMessage,

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn request_market_rule() {
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fn request_stock_contract_details() {
]
}));

let mut client = Client::stubbed(message_bus, server_versions::SIZE_RULES);
let client = Client::stubbed(message_bus, server_versions::SIZE_RULES);

let contract = Contract::stock("TSLA");

Expand Down

0 comments on commit 9749470

Please sign in to comment.