From 8b2b649d3f88dfc4e834ec81547f9ccebda34ff6 Mon Sep 17 00:00:00 2001 From: HyperCodec Date: Thu, 5 Feb 2026 22:10:58 -0500 Subject: [PATCH 1/6] change publish workflow config arg abbreviation --- .github/workflows/publish.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f090c72..96f907a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,20 +1,20 @@ name: Publish -on: ['workflow_dispatch'] +on: ["workflow_dispatch"] jobs: - publish: - runs-on: ubuntu-latest - environment: publish + publish: + runs-on: ubuntu-latest + environment: publish - steps: - - uses: actions/checkout@v4 - - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - toolchain: nightly - - name: "Publish common" - run: cargo +nightly publish -p genetic-rs-common --token ${{ secrets.CARGO_TOKEN }} - - name: "Publish macros" - run: cargo +nightly publish -p genetic-rs-macros --token ${{ secrets.CARGO_TOKEN }} - - name: "Publish main" - run: cargo +nightly publish -p genetic-rs --cfg publish --token ${{ secrets.CARGO_TOKEN }} \ No newline at end of file + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: nightly + - name: "Publish common" + run: cargo +nightly publish -p genetic-rs-common --token ${{ secrets.CARGO_TOKEN }} + - name: "Publish macros" + run: cargo +nightly publish -p genetic-rs-macros --token ${{ secrets.CARGO_TOKEN }} + - name: "Publish main" + run: cargo +nightly publish -p genetic-rs --config publish --token ${{ secrets.CARGO_TOKEN }} From b3f3c237a8b7cc2b8542c019888c02fc97899749 Mon Sep 17 00:00:00 2001 From: HyperCodec Date: Thu, 5 Feb 2026 22:16:33 -0500 Subject: [PATCH 2/6] replace deprecated arg with env --- .github/workflows/publish.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 96f907a..e5e8cd6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,6 +2,9 @@ name: Publish on: ["workflow_dispatch"] +env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_TOKEN }} + jobs: publish: runs-on: ubuntu-latest @@ -13,8 +16,8 @@ jobs: with: toolchain: nightly - name: "Publish common" - run: cargo +nightly publish -p genetic-rs-common --token ${{ secrets.CARGO_TOKEN }} + run: cargo +nightly publish -p genetic-rs-common - name: "Publish macros" - run: cargo +nightly publish -p genetic-rs-macros --token ${{ secrets.CARGO_TOKEN }} + run: cargo +nightly publish -p genetic-rs-macros - name: "Publish main" - run: cargo +nightly publish -p genetic-rs --config publish --token ${{ secrets.CARGO_TOKEN }} + run: cargo +nightly publish -p genetic-rs --config publish From 8cbff32f37449d2942c51c4518305d471b9ee35f Mon Sep 17 00:00:00 2001 From: Tristan Murphy <72839119+HyperCodec@users.noreply.github.com> Date: Fri, 6 Feb 2026 08:42:42 -0500 Subject: [PATCH 3/6] Improve README usage instructions and examples Updated usage note for NEAT crate and clarified Vec::gen_random usage. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3e22faa..2710ffc 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ First off, this crate comes with the `builtin`, `crossover`, and `genrand` featu ### How to Use > [!NOTE] -> If you are interested in implementing NEAT with this, or just want a more complex example, try out the [neat](https://crates.io/crates/neat) crate +> If you are interested in implementing NEAT with this, or just want a more complex example, check out the [neat](https://crates.io/crates/neat) crate Here's a simple genetic algorithm: @@ -33,7 +33,7 @@ impl RandomlyMutable for MyGenome { } } -// allows us to use `Vec::gen_random` for the initial population. note that `Vec::gen_random` has a slightly different function signature depending on whether the `rayon` feature is enabled. +// allows us to use `Vec::gen_random` for the initial population. note that with the `rayon` feature, we can also use `Vec::par_gen_random`. impl GenerateRandom for MyGenome { fn gen_random(rng: &mut impl Rng) -> Self { Self { field1: rng.random() } From 96ffca9724f71397fa8a2944f4b07a10b3e2d44e Mon Sep 17 00:00:00 2001 From: Tristan Murphy <72839119+HyperCodec@users.noreply.github.com> Date: Fri, 6 Feb 2026 08:44:48 -0500 Subject: [PATCH 4/6] Update comment for clarity on repopulators --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2710ffc..25a26e2 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ fn main() { let mut rng = rand::rng(); let mut sim = GeneticSim::new( // you must provide a random starting population. - // size will be preserved in builtin nextgen fns, but it is not required to keep a constant size if you were to build your own nextgen function. + // size will be preserved in builtin repopulators, but it is not required to keep a constant size if you were to build your own. // in this case, the compiler can infer the type of `Vec::gen_random` because of the input of `my_fitness_fn`. Vec::gen_random(&mut rng, 100), FitnessEliminator::new_with_default(my_fitness_fn), From 638ec5ed520fb0d769f72da57cbb42b42fdbb0b2 Mon Sep 17 00:00:00 2001 From: Tristan Murphy <72839119+HyperCodec@users.noreply.github.com> Date: Fri, 6 Feb 2026 08:47:12 -0500 Subject: [PATCH 5/6] Update README with 'derive' feature details Added information about the 'derive' feature for macros. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 25a26e2..dffe37b 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A small framework for managing genetic algorithms. ### Features -First off, this crate comes with the `builtin`, `crossover`, and `genrand` features by default. If you want it to be parallelized (which is true in most cases), you can add the `rayon` feature. If you want your crossover to be speciated, you can add the `speciation` feature. +First off, this crate comes with the `builtin`, `crossover`, and `genrand` features by default. If you want it to be parallelized (which is true in most cases), you can add the `rayon` feature. If you want your crossover to be speciated, you can add the `speciation` feature. There are also some convenient macros with the `derive` feature. ### How to Use > [!NOTE] From 0d82e5cb1580c008c96947c632ee0474b1843547 Mon Sep 17 00:00:00 2001 From: Tristan Murphy <72839119+HyperCodec@users.noreply.github.com> Date: Fri, 6 Feb 2026 08:57:13 -0500 Subject: [PATCH 6/6] Update README features section for clarity --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dffe37b..4c90a04 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A small framework for managing genetic algorithms. ### Features -First off, this crate comes with the `builtin`, `crossover`, and `genrand` features by default. If you want it to be parallelized (which is true in most cases), you can add the `rayon` feature. If you want your crossover to be speciated, you can add the `speciation` feature. There are also some convenient macros with the `derive` feature. +First off, this crate comes with the `builtin`, `genrand`, `crossover`, `knockout`, and `speciation` features by default. If you want the simulation to be parallelized (which is most usecases), add the `rayon` feature. There are also some convenient macros with the `derive` feature. ### How to Use > [!NOTE]