Jij-Inc
ommx
BlogDocsChangelog

Performance History

Latest Results

Bump actions/checkout from 5 to 6 in the dependencies group (#685) Bumps the dependencies group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 5 to 6 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/checkout/releases">actions/checkout's releases</a>.</em></p> <blockquote> <h2>v6.0.0</h2> <h2>What's Changed</h2> <ul> <li>Update README to include Node.js 24 support details and requirements by <a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2248">actions/checkout#2248</a></li> <li>Persist creds to a separate file by <a href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2286">actions/checkout#2286</a></li> <li>v6-beta by <a href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2298">actions/checkout#2298</a></li> <li>update readme/changelog for v6 by <a href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2311">actions/checkout#2311</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v5.0.0...v6.0.0">https://github.com/actions/checkout/compare/v5.0.0...v6.0.0</a></p> <h2>v6-beta</h2> <h2>What's Changed</h2> <p>Updated persist-credentials to store the credentials under <code>$RUNNER_TEMP</code> instead of directly in the local git config.</p> <p>This requires a minimum Actions Runner version of <a href="https://github.com/actions/runner/releases/tag/v2.329.0">v2.329.0</a> to access the persisted credentials for <a href="https://docs.github.com/en/actions/tutorials/use-containerized-services/create-a-docker-container-action">Docker container action</a> scenarios.</p> <h2>v5.0.1</h2> <h2>What's Changed</h2> <ul> <li>Port v6 cleanup to v5 by <a href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2301">actions/checkout#2301</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v5...v5.0.1">https://github.com/actions/checkout/compare/v5...v5.0.1</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's changelog</a>.</em></p> <blockquote> <h1>Changelog</h1> <h2>V6.0.0</h2> <ul> <li>Persist creds to a separate file by <a href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2286">actions/checkout#2286</a></li> <li>Update README to include Node.js 24 support details and requirements by <a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2248">actions/checkout#2248</a></li> </ul> <h2>V5.0.1</h2> <ul> <li>Port v6 cleanup to v5 by <a href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2301">actions/checkout#2301</a></li> </ul> <h2>V5.0.0</h2> <ul> <li>Update actions checkout to use node 24 by <a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2226">actions/checkout#2226</a></li> </ul> <h2>V4.3.1</h2> <ul> <li>Port v6 cleanup to v4 by <a href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2305">actions/checkout#2305</a></li> </ul> <h2>V4.3.0</h2> <ul> <li>docs: update README.md by <a href="https://github.com/motss"><code>@​motss</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1971">actions/checkout#1971</a></li> <li>Add internal repos for checking out multiple repositories by <a href="https://github.com/mouismail"><code>@​mouismail</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1977">actions/checkout#1977</a></li> <li>Documentation update - add recommended permissions to Readme by <a href="https://github.com/benwells"><code>@​benwells</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2043">actions/checkout#2043</a></li> <li>Adjust positioning of user email note and permissions heading by <a href="https://github.com/joshmgross"><code>@​joshmgross</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2044">actions/checkout#2044</a></li> <li>Update README.md by <a href="https://github.com/nebuk89"><code>@​nebuk89</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2194">actions/checkout#2194</a></li> <li>Update CODEOWNERS for actions by <a href="https://github.com/TingluoHuang"><code>@​TingluoHuang</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2224">actions/checkout#2224</a></li> <li>Update package dependencies by <a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2236">actions/checkout#2236</a></li> </ul> <h2>v4.2.2</h2> <ul> <li><code>url-helper.ts</code> now leverages well-known environment variables by <a href="https://github.com/jww3"><code>@​jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1941">actions/checkout#1941</a></li> <li>Expand unit test coverage for <code>isGhes</code> by <a href="https://github.com/jww3"><code>@​jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1946">actions/checkout#1946</a></li> </ul> <h2>v4.2.1</h2> <ul> <li>Check out other refs/* by commit if provided, fall back to ref by <a href="https://github.com/orhantoy"><code>@​orhantoy</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1924">actions/checkout#1924</a></li> </ul> <h2>v4.2.0</h2> <ul> <li>Add Ref and Commit outputs by <a href="https://github.com/lucacome"><code>@​lucacome</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1180">actions/checkout#1180</a></li> <li>Dependency updates by <a href="https://github.com/dependabot"><code>@​dependabot</code></a>- <a href="https://redirect.github.com/actions/checkout/pull/1777">actions/checkout#1777</a>, <a href="https://redirect.github.com/actions/checkout/pull/1872">actions/checkout#1872</a></li> </ul> <h2>v4.1.7</h2> <ul> <li>Bump the minor-npm-dependencies group across 1 directory with 4 updates by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1739">actions/checkout#1739</a></li> <li>Bump actions/checkout from 3 to 4 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1697">actions/checkout#1697</a></li> <li>Check out other refs/* by commit by <a href="https://github.com/orhantoy"><code>@​orhantoy</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1774">actions/checkout#1774</a></li> <li>Pin actions/checkout's own workflows to a known, good, stable version. by <a href="https://github.com/jww3"><code>@​jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1776">actions/checkout#1776</a></li> </ul> <h2>v4.1.6</h2> <ul> <li>Check platform to set archive extension appropriately by <a href="https://github.com/cory-miller"><code>@​cory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1732">actions/checkout#1732</a></li> </ul> <h2>v4.1.5</h2> <ul> <li>Update NPM dependencies by <a href="https://github.com/cory-miller"><code>@​cory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1703">actions/checkout#1703</a></li> <li>Bump github/codeql-action from 2 to 3 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1694">actions/checkout#1694</a></li> <li>Bump actions/setup-node from 1 to 4 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1696">actions/checkout#1696</a></li> <li>Bump actions/upload-artifact from 2 to 4 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1695">actions/checkout#1695</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/actions/checkout/commit/1af3b93b6815bc44a9784bd300feb67ff0d1eeb3"><code>1af3b93</code></a> update readme/changelog for v6 (<a href="https://redirect.github.com/actions/checkout/issues/2311">#2311</a>)</li> <li><a href="https://github.com/actions/checkout/commit/71cf2267d89c5cb81562390fa70a37fa40b1305e"><code>71cf226</code></a> v6-beta (<a href="https://redirect.github.com/actions/checkout/issues/2298">#2298</a>)</li> <li><a href="https://github.com/actions/checkout/commit/069c6959146423d11cd0184e6accf28f9d45f06e"><code>069c695</code></a> Persist creds to a separate file (<a href="https://redirect.github.com/actions/checkout/issues/2286">#2286</a>)</li> <li><a href="https://github.com/actions/checkout/commit/ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493"><code>ff7abcd</code></a> Update README to include Node.js 24 support details and requirements (<a href="https://redirect.github.com/actions/checkout/issues/2248">#2248</a>)</li> <li>See full diff in <a href="https://github.com/actions/checkout/compare/v5...v6">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=5&new-version=6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
main
15 days ago
Logical Memory Profiler (#683) # Logical Memory Profiler Add logical memory profiling capabilities to OMMX instances with flamegraph-compatible output format. ## Overview This PR introduces a visitor-based memory profiling system that generates flamegraph-compatible folded stack format. It enables visualization and analysis of memory usage for optimization problem instances. ## Key Features ### 🔧 Core Infrastructure **Visitor Pattern with RAII Path Management:** ```rust pub trait LogicalMemoryProfile { fn visit_logical_memory<V: LogicalMemoryVisitor>(&self, path: &mut Path, visitor: &mut V); } pub trait LogicalMemoryVisitor { fn visit_leaf(&mut self, path: &Path, bytes: usize); } ``` - `Path` with `PathGuard` for automatic push/pop management - `FoldedCollector` for flamegraph-compatible output generation - Helper functions: `logical_memory_to_folded()`, `logical_total_bytes()` ### 🪄 Macro-Based Implementation Declarative macro for automatic implementation generation: ```rust // Simple types impl_logical_memory_profile! { DecisionVariable { id, kind, bound, substituted_value, metadata, } } // Types with path (e.g., protobuf) impl_logical_memory_profile! { v1::Parameters as "Parameters" { entries, } } ``` **Coverage:** - 13 types converted to use macro (Instance, Constraint, DecisionVariable, etc.) - 8 basic type implementations (ConstraintID, VariableID, Equality, Kind, Bound, Sense, etc.) - Generic implementations for collections (Vec, HashMap, BTreeMap, FnvHashMap, BTreeSet, Option, String) ### 📛 Naming Conventions **Type.field notation** - Type and field combined with dots within flamegraph frames: ``` Instance.decision_variables;DecisionVariable.id 24 Instance.objective;Linear;PolynomialBase.terms 80 ``` **[stack] suffix** - Indicates stack-allocated memory: ``` Instance.decision_variables;BTreeMap[stack] 24 Instance.decision_variables;BTreeMap[key] 16 Instance.constraint_hints;ConstraintHints.one_hot_constraints;Vec[stack] 24 Instance.decision_variables;DecisionVariable.metadata;DecisionVariableMetadata.name;Option[additional stack] 24 ``` ### 🐍 Python API Simple, intuitive API: ```python from ommx.v1 import Instance, DecisionVariable x = [DecisionVariable.binary(i) for i in range(3)] instance = Instance.from_components( decision_variables=x, objective=x[0] + x[1], constraints=[], sense=Instance.MAXIMIZE, ) # Get folded stack format profile = instance.logical_memory_profile() print(profile) ``` **Example Output:** ``` Instance.constraint_hints;ConstraintHints.one_hot_constraints;Vec[stack] 24 Instance.constraint_hints;ConstraintHints.sos1_constraints;Vec[stack] 24 Instance.constraints;BTreeMap[stack] 24 Instance.decision_variable_dependency;AcyclicAssignments.assignments;FnvHashMap[stack] 32 Instance.decision_variable_dependency;AcyclicAssignments.dependency 144 Instance.decision_variables;BTreeMap[key] 24 Instance.decision_variables;BTreeMap[stack] 24 Instance.decision_variables;DecisionVariable.bound 48 Instance.decision_variables;DecisionVariable.id 24 Instance.decision_variables;DecisionVariable.kind 3 Instance.objective;Linear;PolynomialBase.terms 80 Instance.sense 1 ``` ### 📊 Flamegraph Visualization ```bash # Generate flamegraph python -c "from ommx.v1 import Instance; print(Instance(...).logical_memory_profile())" > profile.txt flamegraph.pl profile.txt > memory.svg ``` ## Implementation Details ### Generic Collection Implementations All standard collections have generic implementations in `rust/ommx/src/logical_memory/collections.rs`: - `String` - Stack + heap length - `Option<T>` - `[additional stack]` (Some) or `[stack]` (None) - `Vec<T>` - `Vec[stack]` + element delegation - `HashMap/BTreeMap/FnvHashMap<K, V>` - `Map[stack]` + `Map[key]` + value delegation - `BTreeSet<T>` - `BTreeSet[stack]` + element delegation ### Avoiding Double-Counting **Critical Rule:** Never use `size_of::<Self>()` - count each field individually: ```rust // ✅ Good - field-by-field counting impl LogicalMemoryProfile for DecisionVariable { fn visit_logical_memory<V: LogicalMemoryVisitor>( &self, path: &mut Path, visitor: &mut V, ) { visitor.visit_leaf(&path.with("DecisionVariable.id"), size_of::<VariableID>()); visitor.visit_leaf(&path.with("DecisionVariable.kind"), size_of::<Kind>()); visitor.visit_leaf(&path.with("DecisionVariable.bound"), size_of::<Bound>()); // Delegate to nested struct self.metadata.visit_logical_memory( path.with("DecisionVariable.metadata").as_mut(), visitor ); } } ``` ### Automatic Aggregation `FoldedCollector` automatically aggregates multiple visits to the same path: ```rust // Multiple DecisionVariables with same structure for dv in decision_variables.values() { dv.visit_logical_memory(path, visitor); } // Automatically aggregated: // "Instance.decision_variables;DecisionVariable.id 24" (3 × 8 bytes) ``` ## Important Limitations ⚠️ **This is logical memory estimation, not exact heap profiling:** - ✅ Useful for: Comparing relative sizes, identifying large structures, tracking growth trends - ⚠️ Not exact: Does not account for allocator overhead, padding, internal fragmentation - ⚠️ Approximation: Uses `len()` and `size_of::<T>()` (ignores unused capacity) For precise memory profiling, use dedicated heap profilers (jemalloc, valgrind). ## Testing - ✅ **35 Rust tests** - Comprehensive snapshot testing with `insta` - ✅ **390 Python tests** - Including doctests with example output - ✅ **All tests passing** - Both Rust and Python test suites ## Documentation - 📄 **Complete design document** - `docs/design/logical_memory_profile.md` - 📝 **Python docstrings** - With usage examples and output samples - 🎯 **Implementation patterns** - Macro usage, RAII guards, and best practices ## Files Changed **Core infrastructure:** - `rust/ommx/src/logical_memory.rs` - Traits, Path, FoldedCollector, macro - `rust/ommx/src/logical_memory/path.rs` - Path and PathGuard - `rust/ommx/src/logical_memory/collections.rs` - Generic collection implementations - `rust/ommx/src/logical_memory/tests.rs` - Core tests **Domain implementations:** - `rust/ommx/src/instance/logical_memory.rs` - Instance, Sense, protobuf types - `rust/ommx/src/constraint/logical_memory.rs` - Constraint types - `rust/ommx/src/decision_variable/logical_memory.rs` - Variable types - `rust/ommx/src/constraint_hints/logical_memory.rs` - Hint types - `rust/ommx/src/function/logical_memory.rs` - Function enum - `rust/ommx/src/polynomial/logical_memory.rs` - PolynomialBase - `rust/ommx/src/bound/logical_memory.rs` - Bound type **Python bindings:** - `python/ommx/src/instance.rs` - `logical_memory_profile()` method - `python/ommx/ommx/v1/__init__.pyi` - Type stubs **Documentation:** - `docs/design/logical_memory_profile.md` - Complete design specification --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
main
15 days ago
Bump the dependencies group with 3 updates (#684) Bumps the dependencies group with 3 updates: [clap](https://github.com/clap-rs/clap), [indexmap](https://github.com/indexmap-rs/indexmap) and [insta](https://github.com/mitsuhiko/insta). Updates `clap` from 4.5.52 to 4.5.53 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/clap-rs/clap/releases">clap's releases</a>.</em></p> <blockquote> <h2>v4.5.53</h2> <h2>[4.5.53] - 2025-11-19</h2> <h3>Features</h3> <ul> <li>Add <code>default_values_if</code>, <code>default_values_ifs</code></li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's changelog</a>.</em></p> <blockquote> <h2>[4.5.53] - 2025-11-19</h2> <h3>Features</h3> <ul> <li>Add <code>default_values_if</code>, <code>default_values_ifs</code></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/clap-rs/clap/commit/3716f9f4289594b43abec42b2538efd1a90ff897"><code>3716f9f</code></a> chore: Release</li> <li><a href="https://github.com/clap-rs/clap/commit/613b69a6b7bff729b7a363fa0c91fd03f48d12c3"><code>613b69a</code></a> docs: Update changelog</li> <li><a href="https://github.com/clap-rs/clap/commit/d117f7acdeedebaf5fd7847debb15c834423f159"><code>d117f7a</code></a> Merge pull request <a href="https://redirect.github.com/clap-rs/clap/issues/6028">#6028</a> from epage/arg</li> <li><a href="https://github.com/clap-rs/clap/commit/cb8255d2f3c7f12ebf07ec1c55ac98b6848599a9"><code>cb8255d</code></a> feat(builder): Allow quoted id's for arg macro</li> <li><a href="https://github.com/clap-rs/clap/commit/1036060f1319412d3d50d821a7b39a0a0122f0f7"><code>1036060</code></a> Merge pull request <a href="https://redirect.github.com/clap-rs/clap/issues/6025">#6025</a> from AldaronLau/typos-in-faq</li> <li><a href="https://github.com/clap-rs/clap/commit/2fcafc0aee6380e1f0c44a3e927cef1bfc88930e"><code>2fcafc0</code></a> docs: Fix minor grammar issues in FAQ</li> <li><a href="https://github.com/clap-rs/clap/commit/a380b65fe9eceade90bce8aeb13c205265fcceee"><code>a380b65</code></a> Merge pull request <a href="https://redirect.github.com/clap-rs/clap/issues/6023">#6023</a> from epage/template</li> <li><a href="https://github.com/clap-rs/clap/commit/4d7ab1483cd0f0849668d274aa2fb6358872eca9"><code>4d7ab14</code></a> chore: Update from _rust/main template</li> <li><a href="https://github.com/clap-rs/clap/commit/b8a7ea49d973a35bb6b3f43506b8319f340a20a4"><code>b8a7ea4</code></a> chore(deps): Update Rust Stable to v1.87 (<a href="https://redirect.github.com/clap-rs/clap/issues/18">#18</a>)</li> <li><a href="https://github.com/clap-rs/clap/commit/f9842b3b3f920ef64c5fc06298b4762018d88809"><code>f9842b3</code></a> chore: Avoid MSRV problems out of the box</li> <li>Additional commits viewable in <a href="https://github.com/clap-rs/clap/compare/clap_complete-v4.5.52...clap_complete-v4.5.53">compare view</a></li> </ul> </details> <br /> Updates `indexmap` from 2.12.0 to 2.12.1 <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/indexmap-rs/indexmap/blob/main/RELEASES.md">indexmap's changelog</a>.</em></p> <blockquote> <h2>2.12.1 (2025-11-20)</h2> <ul> <li>Simplified a lot of internals using <code>hashbrown</code>'s new bucket API.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/indexmap-rs/indexmap/commit/cfad7589c88e298e97449afb838c6a4b08c58394"><code>cfad758</code></a> Merge pull request <a href="https://redirect.github.com/indexmap-rs/indexmap/issues/424">#424</a> from cuviper/buckets</li> <li><a href="https://github.com/indexmap-rs/indexmap/commit/a96b9c7fca6af946f17ecc38e7ee4dfd449a957f"><code>a96b9c7</code></a> Release 2.12.1</li> <li><a href="https://github.com/indexmap-rs/indexmap/commit/6245ee54fa6e864de5f16a801d67a5f849eccb44"><code>6245ee5</code></a> Use the bucket API from hashbrown v0.16.1</li> <li>See full diff in <a href="https://github.com/indexmap-rs/indexmap/compare/2.12.0...2.12.1">compare view</a></li> </ul> </details> <br /> Updates `insta` from 1.43.2 to 1.44.1 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/mitsuhiko/insta/releases">insta's releases</a>.</em></p> <blockquote> <h2>1.44.1</h2> <h2>Release Notes</h2> <ul> <li>Add <code>--dnd</code> alias for <code>--disable-nextest-doctest</code> flag to make it easier to silence the deprecation warning. <a href="https://redirect.github.com/mitsuhiko/insta/issues/822">#822</a></li> <li>Update cargo-dist to 0.30.2 and fix Windows runner to use windows-2022. <a href="https://redirect.github.com/mitsuhiko/insta/issues/821">#821</a></li> </ul> <h2>Install cargo-insta 1.44.1</h2> <h3>Install prebuilt binaries via shell script</h3> <pre lang="sh"><code>curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/insta/releases/download/1.44.1/cargo-insta-installer.sh | sh </code></pre> <h3>Install prebuilt binaries via powershell script</h3> <pre lang="sh"><code>powershell -ExecutionPolicy Bypass -c &quot;irm https://github.com/mitsuhiko/insta/releases/download/1.44.1/cargo-insta-installer.ps1 | iex&quot; </code></pre> <h2>Download cargo-insta 1.44.1</h2> <table> <thead> <tr> <th>File</th> <th>Platform</th> <th>Checksum</th> </tr> </thead> <tbody> <tr> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.44.1/cargo-insta-aarch64-apple-darwin.tar.xz">cargo-insta-aarch64-apple-darwin.tar.xz</a></td> <td>Apple Silicon macOS</td> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.44.1/cargo-insta-aarch64-apple-darwin.tar.xz.sha256">checksum</a></td> </tr> <tr> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.44.1/cargo-insta-x86_64-apple-darwin.tar.xz">cargo-insta-x86_64-apple-darwin.tar.xz</a></td> <td>Intel macOS</td> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.44.1/cargo-insta-x86_64-apple-darwin.tar.xz.sha256">checksum</a></td> </tr> <tr> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.44.1/cargo-insta-x86_64-pc-windows-msvc.zip">cargo-insta-x86_64-pc-windows-msvc.zip</a></td> <td>x64 Windows</td> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.44.1/cargo-insta-x86_64-pc-windows-msvc.zip.sha256">checksum</a></td> </tr> <tr> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.44.1/cargo-insta-x86_64-unknown-linux-gnu.tar.xz">cargo-insta-x86_64-unknown-linux-gnu.tar.xz</a></td> <td>x64 Linux</td> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.44.1/cargo-insta-x86_64-unknown-linux-gnu.tar.xz.sha256">checksum</a></td> </tr> <tr> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.44.1/cargo-insta-x86_64-unknown-linux-musl.tar.xz">cargo-insta-x86_64-unknown-linux-musl.tar.xz</a></td> <td>x64 MUSL Linux</td> <td><a href="https://github.com/mitsuhiko/insta/releases/download/1.44.1/cargo-insta-x86_64-unknown-linux-musl.tar.xz.sha256">checksum</a></td> </tr> </tbody> </table> <h2>1.44.0</h2> <h2>Release Notes</h2> <h2>Changes in 1.44.0</h2> <ul> <li>Added non-interactive snapshot review and reject modes for use in non-TTY environments (LLMs, CI pipelines, scripts) <a href="https://redirect.github.com/mitsuhiko/insta/issues/815">#815</a></li> <li>Add `--disable-nextest-doctest` flag with deprecation warning <a href="https://redirect.github.com/mitsuhiko/insta/issues/803">#803</a></li> <li>Add ergonomic `--test-runner-fallback` / `--no-test-runner-fallback` flags <a href="https://redirect.github.com/mitsuhiko/insta/issues/811">#811</a></li> <li>Apply redactions to snapshot metadata <a href="https://redirect.github.com/mitsuhiko/insta/issues/813">#813</a></li> <li>Remove confusing 'previously unseen snapshot' message <a href="https://redirect.github.com/mitsuhiko/insta/issues/812">#812</a></li> <li>Speed up JSON float rendering <a href="https://redirect.github.com/mitsuhiko/insta/issues/806">#806</a> (<a href="https://github.com/nyurik"><code>@​nyurik</code></a>)</li> <li>Allow globset version up to 0.4.16 <a href="https://redirect.github.com/mitsuhiko/insta/issues/810">#810</a> (<a href="https://github.com/g0hl1n"><code>@​g0hl1n</code></a>)</li> <li>Improve documentation <a href="https://redirect.github.com/mitsuhiko/insta/issues/814">#814</a> (<a href="https://github.com/tshepang"><code>@​tshepang</code></a>)</li> <li>Enforce starting newlines in assertions <a href="https://redirect.github.com/mitsuhiko/insta/issues/563">#563</a></li> </ul> <hr /> <h2>Install</h2> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md">insta's changelog</a>.</em></p> <blockquote> <h2>1.44.1</h2> <ul> <li>Add <code>--dnd</code> alias for <code>--disable-nextest-doctest</code> flag to make it easier to silence the deprecation warning. <a href="https://redirect.github.com/mitsuhiko/insta/issues/822">#822</a></li> <li>Update cargo-dist to 0.30.2 and fix Windows runner to use windows-2022. <a href="https://redirect.github.com/mitsuhiko/insta/issues/821">#821</a></li> </ul> <h2>1.44.0</h2> <ul> <li>Added non-interactive snapshot review and reject modes for use in non-TTY environments (LLMs, CI pipelines, scripts). <code>cargo insta review --snapshot &lt;path&gt;</code> and <code>cargo insta reject --snapshot &lt;path&gt;</code> now work without a terminal. Enhanced <code>pending-snapshots</code> output with usage instructions and workspace-relative paths. <a href="https://redirect.github.com/mitsuhiko/insta/issues/815">#815</a></li> <li>Add <code>--disable-nextest-doctest</code> flag to <code>cargo insta test</code> to disable running doctests with nextest. Shows a deprecation warning when nextest is used with doctests without this flag, to prepare <code>cargo insta</code> to no longer run a separate doctest process when using nextest in the future. <a href="https://redirect.github.com/mitsuhiko/insta/issues/803">#803</a></li> <li>Add ergonomic <code>--test-runner-fallback</code> / <code>--no-test-runner-fallback</code> flags to <code>cargo insta test</code>. <a href="https://redirect.github.com/mitsuhiko/insta/issues/811">#811</a></li> <li>Apply redactions to snapshot metadata. <a href="https://redirect.github.com/mitsuhiko/insta/issues/813">#813</a></li> <li>Remove confusing 'previously unseen snapshot' message. <a href="https://redirect.github.com/mitsuhiko/insta/issues/812">#812</a></li> <li>Speed up JSON float rendering. <a href="https://redirect.github.com/mitsuhiko/insta/issues/806">#806</a> (<a href="https://github.com/nyurik"><code>@​nyurik</code></a>)</li> <li>Allow globset version up to 0.4.16. <a href="https://redirect.github.com/mitsuhiko/insta/issues/810">#810</a> (<a href="https://github.com/g0hl1n"><code>@​g0hl1n</code></a>)</li> <li>Improve documentation. <a href="https://redirect.github.com/mitsuhiko/insta/issues/814">#814</a> (<a href="https://github.com/tshepang"><code>@​tshepang</code></a>)</li> <li>We no longer trim starting newlines during assertions, which allows asserting the number of leading newlines match. Existing assertions with different leading newlines will pass and print a warning suggesting running with <code>--force-update-snapshots</code>. They may fail in the future. (Note that we still currently allow differing <em>trailing</em> newlines, though may adjust this in the future). <a href="https://redirect.github.com/mitsuhiko/insta/issues/563">#563</a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/mitsuhiko/insta/commit/ba9ea5148c248a875d3a410bd2c7f746f65a3ca7"><code>ba9ea51</code></a> Prepare release 1.44.1 (<a href="https://redirect.github.com/mitsuhiko/insta/issues/823">#823</a>)</li> <li><a href="https://github.com/mitsuhiko/insta/commit/92342f9bb230db41ee78cc34fb35011127a5606b"><code>92342f9</code></a> Add --dnd alias for --disable-nextest-doctest flag (<a href="https://redirect.github.com/mitsuhiko/insta/issues/822">#822</a>)</li> <li><a href="https://github.com/mitsuhiko/insta/commit/c1ca488a4ab668ab3f5f46eddc60ce088b020715"><code>c1ca488</code></a> Update cargo-dist to 0.30.2 and fix Windows runner (<a href="https://redirect.github.com/mitsuhiko/insta/issues/821">#821</a>)</li> <li><a href="https://github.com/mitsuhiko/insta/commit/5da894d55ea3003b341bdf3efdf5d27cd046150b"><code>5da894d</code></a> Prepare release 1.44.0 (<a href="https://redirect.github.com/mitsuhiko/insta/issues/820">#820</a>)</li> <li><a href="https://github.com/mitsuhiko/insta/commit/d8deb2fc0f20d9100b6e764a627e1b827323fd8e"><code>d8deb2f</code></a> Add LLM-friendly non-interactive snapshot management (<a href="https://redirect.github.com/mitsuhiko/insta/issues/815">#815</a>)</li> <li><a href="https://github.com/mitsuhiko/insta/commit/783ebc2b84fdc01c59b1127eeffef40bf0865884"><code>783ebc2</code></a> feat(vscode-ext): support source opening (<a href="https://redirect.github.com/mitsuhiko/insta/issues/817">#817</a>)</li> <li><a href="https://github.com/mitsuhiko/insta/commit/dd34e41e72991e22a784a67bd61afcdb7aee9aa7"><code>dd34e41</code></a> chore: update <code>ron</code> to 0.12 (<a href="https://redirect.github.com/mitsuhiko/insta/issues/819">#819</a>)</li> <li><a href="https://github.com/mitsuhiko/insta/commit/af48633167e052da8a609f2f8274c50734ad8580"><code>af48633</code></a> Support <code>-r</code> shorthand for <code>--release</code>, for compatibility with <code>cargo test</code> (...</li> <li><a href="https://github.com/mitsuhiko/insta/commit/7de4930adad8e9b0485d0e9e67b907e06dc82b30"><code>7de4930</code></a> Apply redactions to snapshot metadata (<a href="https://redirect.github.com/mitsuhiko/insta/issues/813">#813</a>)</li> <li><a href="https://github.com/mitsuhiko/insta/commit/90f6ad8df5af489dae3f00694e25fa325f433a5f"><code>90f6ad8</code></a> Fix backward compatibility for --test-runner-fallback true syntax (<a href="https://redirect.github.com/mitsuhiko/insta/issues/816">#816</a>)</li> <li>Additional commits viewable in <a href="https://github.com/mitsuhiko/insta/compare/1.43.2...1.44.1">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
main
15 days ago
Add constraint violation calculation methods (#680) ## Summary Adds methods to calculate constraint violations for individual constraints and aggregate violations across all constraints in a solution. ## Changes ### Rust SDK **`EvaluatedConstraint::violation()` method** (`rust/ommx/src/constraint.rs`): - Calculates individual constraint violation: - For `f(x) = 0`: returns `|f(x)|` - For `f(x) ≤ 0`: returns `max(0, f(x))` - Returns `0.0` if the constraint is satisfied **`Solution` methods** (`rust/ommx/src/solution.rs`): - `total_violation_l1()`: L1 norm (sum of absolute violations) - `total_violation_l2()`: L2 norm squared (sum of squared violations) - Both methods include all constraints (including removed constraints) ### Python SDK **PyO3 bindings**: - Exposed `violation()` method for `EvaluatedConstraint` - Exposed `total_violation_l1()` and `total_violation_l2()` methods for `Solution` **Python wrapper methods** (`python/ommx/ommx/v1/__init__.py`): - Added wrapper methods with proper type hints and documentation - Regenerated stub files for type checking ### Tests Added comprehensive test suite (`python/ommx-tests/tests/test_violation.py`): - Individual constraint violation tests (equality and inequality) - Total violation L1 and L2 tests - Tests with mixed satisfied/violated constraints - Tests with empty constraint sets All tests passing (115 passed, 1 warning). ## Test plan - [x] Rust SDK unit tests pass (326 tests) - [x] Python SDK tests pass (115 tests) - [x] Type checking passes (pyright) - [x] Linting passes (ruff) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude <noreply@anthropic.com>
main
22 days ago
Add pyodide (wasm32-unknown-emscripten) support (#679) This PR adds support for building and running OMMX in pyodide (WebAssembly) by making network-related features optional while preserving local OCI artifact operations. ## Changes ### 1. Infrastructure - Add `task rust:check:wasm32-emscripten` for local testing - Add GitHub Actions CI jobs for wasm32-emscripten target testing (Rust and Python) - Consolidate WASM environment setup in shared action - Integrate pyodide build into release workflow ### 2. Dependency Updates - Update to ocipkg 0.4.0 with conditional remote features - Update to oci-spec 0.7.1: - `Digest::new()` → `digest.parse()` - Updated digest/size return types - Import `MediaType` from `oci_spec::image` directly ### 3. Rust SDK - Add `remote-artifact` feature (enabled by default) - Make network-dependent code conditional: - `Artifact::push()` for OciArchive and OciDir - `Artifact::from_remote()` and `Artifact::pull()` - `dataset` module - `ommx` CLI binary - Local operations (OciArchive save/load) remain available in wasm builds ### 4. Python SDK - Add `remote-artifact` feature (enabled by default) - Make network-dependent code conditional: - `ArtifactArchive::push()` and `ArtifactDir::push()` - `ArtifactDir::from_image_name()` - Dataset functions - Add `task python:ommx:build:pyodide` for building wasm wheels - Add `task python:ommx:test:pyodide` for testing in Node.js + pyodide ### 5. Testing & Release - Add pyodide test suite using Node.js + pyodide - Verify basic functionality (DecisionVariable creation) in WebAssembly environment - CI testing for both Rust SDK and Python SDK pyodide builds - Pyodide wheel automatically built and tested in release workflow - Pyodide wheel uploaded to GitHub Release on python-* tags ## Build Commands **Normal build** (with network features): ```bash cargo check -p ommx task python:ommx:build ``` **Pyodide build** (without network features): ```bash cargo +nightly check -p ommx --target wasm32-unknown-emscripten --no-default-features task python:ommx:build:pyodide task python:ommx:test:pyodide ``` ## Verification All builds tested and working: - ✅ Rust SDK with remote-artifact feature - ✅ Rust SDK for wasm32-emscripten without remote-artifact - ✅ Python SDK with remote-artifact feature - ✅ Python SDK for wasm32-emscripten (pyodide wheel) - ✅ OMMX functionality in Node.js + pyodide environment ## Version This PR introduces new features and adds a new Cargo feature to Rust SDK: - **Rust SDK**: 2.2.1 → **2.3.0** (minor version bump) - New feature: `remote-artifact` (breaking for users who depend on feature flags) - New capability: wasm32-unknown-emscripten support - **Python SDK**: 2.2.1 → **2.3.0** (minor version bump) - New feature: pyodide (WebAssembly) support - New build target: wasm32-unknown-emscripten wheels --------- Co-authored-by: Claude <noreply@anthropic.com>
main
22 days ago

Active Branches

No pull requests foundAs pull requests are created, their performance will appear here.
© 2025 CodSpeed Technology
Home Terms Privacy Docs