Skip to content

Commit

Permalink
Merge pull request #144 from promised-ai/release/0.5.0
Browse files Browse the repository at this point in the history
WIP 0.5.0 release candidate
  • Loading branch information
Swandog authored Nov 21, 2023
2 parents cc8a53d + 9084594 commit 4d6108c
Show file tree
Hide file tree
Showing 80 changed files with 12,402 additions and 4,402 deletions.
8 changes: 4 additions & 4 deletions .github/scripts/run_code_in_mdfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ def process_file(file, language, version):
elif args.language == "rust":
rust_script_contents = f"""//! ```cargo
//! [dependencies]
//! lace = {{ path = ".", version="{version}" }}
//! polars = {{ version = "0.33", features=["csv"] }}
//! rand = "0.8"
//! rand_xoshiro = "0.6"
//! lace = {{ path = ".", version="{version}", features = ["examples", "ctrlc_handler"] }}
//! polars = {{ version = "0.34", default_features=false, features=["csv", "dtype-i8", "dtype-i16", "dtype-u8", "dtype-u16"] }}
//! rand = {{version="0.8", features=["serde1"]}}
//! rand_xoshiro = {{ version="0.6", features = ["serde1"] }}
//! ```
fn main() {{
{code}
Expand Down
143 changes: 143 additions & 0 deletions .github/workflows/cli-build-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
name: 'CLI: Build and Test'

on:
push:
branches:
- main
- master
workflow_dispatch:
pull_request:
paths:
- 'cli/**'
- 'lace/**'
- '.github/workflows/cli-build-test.yaml'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always

jobs:
features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
workspaces: . -> cli/target

- name: Install dependencies
run: cargo install cargo-hack

- name: Run cargo check on all features
working-directory: cli
run: cargo hack check --each-feature --all-targets

lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: cli

steps:
- uses: actions/checkout@v3

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
workspaces: . -> cli/target

- name: Run rustfmt
working-directory: cli
run: cargo fmt --all -- --check

- name: Run clippy
working-directory: cli
env:
RUSTFLAGS: -C debuginfo=0
run: |
cargo clippy --all-features
- name: Install audit
run: cargo install cargo-audit

- name: Run audit
working-directory: cli
# Note: Both `polars` and `arrow2` trigger this security violation
# due to their reliance on `chrono`, which is the ultimate source of the violation
# as of 2/21/23, no version of `chrono` has been published that fixes the issue
# and thus neither `polars` or `arrow2` can pass `audit` checks
run: cargo audit -f Cargo.lock --ignore RUSTSEC-2020-0071

test:
runs-on: ${{ matrix.os }}
needs: ["lint", "features"]
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
defaults:
run:
working-directory: cli

steps:
- uses: actions/checkout@v3

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
workspaces: . -> cli/target

- name: Regen Examples
env:
RUSTFLAGS: -C debuginfo=0
run: cargo run -- regen-examples

- name: Run tests
env:
RUSTFLAGS: -C debuginfo=0
run: cargo test

# semver-checks:
# runs-on: ubuntu-latest
# needs: ["features", "lint", "test"]
# steps:
# - name: Checkout branch
# uses: actions/checkout@v3
# with:
# path: branch

# - name: Checkout master
# uses: actions/checkout@v3
# with:
# ref: master
# path: master

# - name: Set up Rust
# uses: dtolnay/rust-toolchain@stable

# - name: Cache Rust
# uses: Swatinem/rust-cache@v2
# with:
# workspaces: . -> lace/target

# - name: Install extra cargo tools
# run: cargo install cargo-semver-checks --locked

# - name: Check for semver-incompatibilities
# run: cargo semver-checks check-release --manifest-path branch/lace/Cargo.toml --baseline-root master/lace --verbose
16 changes: 14 additions & 2 deletions .github/workflows/rust-build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,15 @@ jobs:
workspaces: . -> lace/target

- name: Regen Examples
working-directory: cli
env:
RUSTFLAGS: -C debuginfo=0
run: cargo run -- regen-examples

- name: Run tests
env:
RUSTFLAGS: -C debuginfo=0
run: cargo test
run: cargo test --all-features

# semver-checks:
# runs-on: ubuntu-latest
Expand Down Expand Up @@ -217,7 +218,7 @@ jobs:
test "$DEPLOYING_VERSION" = "$MAIN_VERSION"
- name: Install dependencies
run: cargo install cargo-crate
- name: Publish Updated Crates to Crates.io
- name: Publish Updated Library Crates to Crates.io
working-directory: lace
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
Expand All @@ -239,3 +240,14 @@ jobs:
cargo publish --token "${CRATES_TOKEN}" -p $PACKAGE_NAME
fi
done
- name: Publish Updated CLI Crate to Crates.io
working-directory: cli
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
run: |
PACKAGE_VERSION=$(tomlq .package.version Cargo.toml)
ALREADY_PUBLISHED=$(cargo crate info lace-cli --json --max-versions 100 | jq '[.krate.versions[].num] | any(. == '$PACKAGE_VERSION')')
if [ "$ALREADY_PUBLISHED" == 'false' ]
then
cargo publish --token "${CRATES_TOKEN}" -p lace-cli
fi
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ Pipfile
pybraid/.github
*.ini
.vscode/
.helix
35 changes: 34 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [python-0.5.0] - 2023-11-20

### Added

- Codebook.value_map fn and iterator

### Changed

- Added common transitions sets by name to `Engine.update` transition argument.

## [rust-0.5.0] - 2023-11-20

### Added

- Lace can now be compiled to Wasm

### Changed

- Moved CLI into its own crate
- Moved `DataSource` variants for Parquet, IPC (Arrow), and JSON data types into the `formats` feature flag.
- Moved the `CtrlC` `UpdateHandler` into `ctrlc_handler` feature flag
- Moved `Bencher` into the `bencher` feature flag
- Moved `Example` code into the `examples` feature flag (on by default)
- Replaced instances of `once_cell::sync::OnceCell` with `syd::sync::OnceLock`
- Renamed all files/methods with the name `feather` to `arrow`
- Renamed `Builder` to `EngineBuilder`

### Fixed

- Fixed typo `UpdateHandler::finialize` is now `UpdateHandler::finalize`

## [python-0.4.1] - 2023-10-19

### Fixed
Expand Down Expand Up @@ -152,7 +183,9 @@ Initial release on [PyPi](https://pypi.org/)

Initial release on [crates.io](https://crates.io/)

[unreleased]: https://github.com/promised-ai/lace/compare/python-0.4.1...HEAD
[unreleased]: https://github.com/promised-ai/lace/compare/python-0.5.0...HEAD
[python-0.5.0]: https://github.com/promised-ai/lace/compare/python-0.4.1...python-0.5.0
[rust-0.5.0]: https://github.com/promised-ai/lace/compare/rust-0.4.1...rust-0.5.0
[python-0.4.1]: https://github.com/promised-ai/lace/compare/python-0.4.0...python-0.4.1
[rust-0.4.1]: https://github.com/promised-ai/lace/compare/rust-0.4.0...rust-0.4.1
[python-0.4.0]: https://github.com/promised-ai/lace/compare/python-0.3.1...python-0.4.0
Expand Down
38 changes: 38 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: 'Lace: Bayesian Tabular Analysis for Scientific Discovery'
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Baxter
family-names: Eaves
name-suffix: Jr
email: [email protected]
affiliation: Redpoll
- given-names: Michael
family-names: Schmidt
email: [email protected]
affiliation: Redpoll
- given-names: Ken
family-names: Swanson
email: [email protected]
affiliation: Redpoll
identifiers:
- type: url
value: 'https://github.com/promised-ai/lace'
description: Github repository
repository-code: 'https://github.com/promised-ai/lace'
url: 'https://lace.dev'
abstract: >-
Lace is a probabilistic cross-categorization engine
written in rust.
keywords:
- Bayesian
- Machine Learning
license: BSL-1.1
version: 0.5.0
date-released: '2023-11-17'
Loading

0 comments on commit 4d6108c

Please sign in to comment.