Merged
Conversation
Co-authored-by: HyperCodec <72839119+HyperCodec@users.noreply.github.com>
Co-authored-by: HyperCodec <72839119+HyperCodec@users.noreply.github.com>
…rver impl Co-authored-by: HyperCodec <72839119+HyperCodec@users.noreply.github.com>
…implementation Add observer layering API via `LayeredObserver` and `FitnessObserver::layer`
Co-authored-by: HyperCodec <72839119+HyperCodec@users.noreply.github.com>
…on-docs-rs Fix feature docs not showing up on docs.rs
Owner
Author
|
need to test the docs part before I actually release. |
Co-authored-by: HyperCodec <72839119+HyperCodec@users.noreply.github.com>
Co-authored-by: HyperCodec <72839119+HyperCodec@users.noreply.github.com>
…-mutable-reference Allow `FitnessObserver::observe` and `Repopulator::repopulate` to take `&mut self`
There was a problem hiding this comment.
Pull request overview
This PR updates the genetic-rs workspace from version 1.2.2 to 1.3.0. It fixes docs.rs feature badge rendering, changes trait method receivers from &self to &mut self for Eliminator, Repopulator, and FitnessObserver, and adds a LayeredObserver QoL API for composing multiple FitnessObserver implementations.
Changes:
&self→&mut selfforEliminator::eliminate,Repopulator::repopulate, andFitnessObserver::observetraits and all built-in implementations.- New
LayeredObservertype andFitnessObserver::layercombinator method for sequentially chaining observers, with integration tests. - docs.rs configuration fixes: switched from per-feature
features = [...]toall-features = true, addeddocsrscfg support in all three crates, and removed all#[cfg_attr(docsrs, doc(cfg(...)))]annotations.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
Cargo.toml |
Version bump to 1.3.0 workspace-wide |
Cargo.lock |
Updated lock file reflecting version bump |
genetic-rs/src/lib.rs |
Added #![cfg_attr(docsrs, feature(doc_cfg))] |
genetic-rs/Cargo.toml |
Added [package.metadata.docs.rs] config and updated docsrs in unexpected_cfgs |
genetic-rs-macros/Cargo.toml |
Added [package.metadata.docs.rs], [lints.rust], updated dependency version |
genetic-rs-common/Cargo.toml |
Changed to all-features = true for docs.rs, added [lints.rust] |
genetic-rs-common/src/lib.rs |
Changed Eliminator and Repopulator trait methods to &mut self; removed feature-gated cfg_attr(docsrs, ...) annotations |
genetic-rs-common/src/builtin/eliminator.rs |
Changed FitnessObserver::observe to &mut self; added LayeredObserver struct and layer combinator; updated all eliminate impls; removed doc(cfg(...)) annotations |
genetic-rs-common/src/builtin/repopulator.rs |
Updated all repopulate impls to &mut self; removed doc(cfg(...)) annotations |
genetic-rs/tests/eliminator.rs |
New integration tests for LayeredObserver composability |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
small changes, namely fixing doc feature badges on docs.rs, passing
&mut selfto a lot of the traits for objects owned byGeneticSim, and adding a QoL observer layering API.