Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP 0.5.0 release candidate #144

Merged
merged 42 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
dd7e841
compile to wasm
Oct 30, 2023
59ea43d
change license to BSL
Oct 30, 2023
f8d387c
This bit of documentation is out of date as of commit `a1f42c9a`
Swandog Oct 30, 2023
faf52cb
Renamed `.feather` to `.arrow` as per the Apache Arrow FAQ (https://a…
Swandog Oct 30, 2023
dbee8db
Formatted CHANGELOG
Swandog Oct 30, 2023
c5f75e6
Updated dependencies for the book preprocessor
Swandog Oct 31, 2023
dee2e6a
Fixed header indentation of CHANGELOG
Swandog Oct 31, 2023
47e0018
New workflow for the CLI crate/dir
Swandog Oct 31, 2023
c7d7fd9
Updated to match the version of `lace` in the repo
Swandog Oct 31, 2023
057f2ca
Added the necessary `lace` feature flags for the CLI
Swandog Oct 31, 2023
2dbab39
`cargo fmt`
Swandog Oct 31, 2023
0317873
Fixed working directory for this step
Swandog Nov 1, 2023
9257bb0
Move the `examples` module into its own feature, which is on by default
Swandog Nov 1, 2023
b86404c
Fix the default features flag
Swandog Nov 1, 2023
2be5692
Only build examples when the examples feature is set
Swandog Nov 1, 2023
6349721
Cleaned up some stuff
Swandog Nov 1, 2023
fd3f816
Updates to the rust workflow
Swandog Nov 1, 2023
b2d1013
Updated dependencies in the MDBook checker
Swandog Nov 2, 2023
e49a457
Updated the CHANGELOG
Swandog Nov 2, 2023
3066c18
Add Codebook.value_map fn and iterator
Nov 2, 2023
4a51ad0
Activate the `ctrlc_handler` feature in the MDBook tester
Swandog Nov 2, 2023
cbf7dfd
Merge pull request #145 from promised-ai/chore/0.5.0-cleanup
Swandog Nov 2, 2023
9e4815a
Merge branch 'release/0.5.0' into feature/expose-value-map
Nov 3, 2023
e691ec1
cleaning
Nov 14, 2023
bd229b0
ruff
Nov 14, 2023
645866e
Merge pull request #147 from promised-ai/feature/expose-value-map
BaxterEaves Nov 14, 2023
c730068
fix license text in README
Nov 14, 2023
bcf464e
Merge pull request #149 from promised-ai/bugfix/0.5.0-score
BaxterEaves Nov 14, 2023
b366b45
Change the README hook
Nov 14, 2023
7050aae
Merge branch 'release/0.5.0' of github.com:promised-ai/lace into rele…
Nov 14, 2023
4d4d8af
cargo update
Nov 14, 2023
cf79060
Publish the new `cli` crate
Swandog Nov 14, 2023
489cfce
feat!(pylace): Added common transitions sets by name to `Engine.updat…
schmidmt Nov 14, 2023
b3815e7
Merge pull request #151 from promised-ai/feature/0.5.0-deps
BaxterEaves Nov 15, 2023
14c8b20
Add citation file
Nov 15, 2023
f11e8f4
Update license in book preprocessor
Nov 15, 2023
f01c2ae
Builder -> Engine builder; typo in UpdateHandler
Nov 15, 2023
4550c49
Merge pull request #152 from promised-ai/feature/publish-cli
Swandog Nov 15, 2023
c98d758
Merge pull request #150 from promised-ai/feature/common-transition-sets
schmidmt Nov 15, 2023
4a48270
Merge pull request #153 from promised-ai/docs/0.5.0-sweep-20231114
BaxterEaves Nov 16, 2023
f0b033e
Updated CHANGELOG for release
Swandog Nov 21, 2023
9084594
Merge branch 'master' into release/0.5.0
Swandog Nov 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading