Skip to content

Adding Repro Rate Data Node - #322

Open
EliasH-E wants to merge 8 commits into
anyaevostinar:mainfrom
EliasH-E:repro_rate_data
Open

Adding Repro Rate Data Node#322
EliasH-E wants to merge 8 commits into
anyaevostinar:mainfrom
EliasH-E:repro_rate_data

Conversation

@EliasH-E

Copy link
Copy Markdown
Collaborator

Adds Repro Rate Data Node

  • Tracks # of successful reproductions by hosts and syms
  • Usable in both Default and SGP_mode
    Removed Hosts & Syms Matching on World Creation
    Changed Default SGP Mode settings to more useful defaults
    Updated tests to reflect these changes

@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.14286% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 77.13%. Comparing base (80c2445) to head (ccfaa96).

Files with missing lines Patch % Lines
source/default_mode/DataNodes.h 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #322      +/-   ##
==========================================
+ Coverage   77.09%   77.13%   +0.03%     
==========================================
  Files         108      108              
  Lines       23155    23185      +30     
  Branches     1615     1619       +4     
==========================================
+ Hits        17852    17883      +31     
+ Misses       5232     5231       -1     
  Partials       71       71              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread source/default_mode/DataNodes.h Outdated
Comment thread source/default_mode/Host.h Outdated
Comment thread source/default_mode/Symbiont.h Outdated
Comment thread source/default_mode/Symbiont.h Outdated

emp::DataMonitor<int>& data_node_sym_repro_rate = my_world->GetSymReproRateDataNode();
data_node_sym_repro_rate.AddDatum(1);
//Increase Data Repro Count by 1

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need this comment

Comment thread source/default_mode/Symbiont.h
emp::DataMonitor<double, emp::data::Histogram>& GetHostedSymInfectChanceDataNode();
emp::DataMonitor<double, emp::data::Histogram>& GetWithinHostMeanDataNode();
emp::DataMonitor<double, emp::data::Histogram>& GetWithinHostVarianceDataNode();
emp::DataMonitor<int>& GetHostReproRateDataNode();

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are there both Counts and Rates?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repro Count was/is the name for the lineage data node, and is not one that I created. GetHostReproCountDataNode in the data node file is what controls this data node though I do think that Lauren possibly renamed it?

* Purpose: To set up the file that will be used to track the number
* of reproductions of both Hosts and Symbionts
*/
emp::DataFile & SymWorld::SetupReproRateFile(const std::string & filename) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably be "count" instead of rate, since it is just a raw count, not divided over time or anything

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree and would prefer to change the name to 'count' instead of rate though that name is currently being used by a different data node. I would be happy to change either of the data nodes names.

Comment thread source/sgp_mode/SGPConfigSetup.h
Comment thread source/sgp_mode/SGPConfigSetup.h Outdated
Comment thread source/sgp_mode/SGPWorldSetup.cc Outdated
}
}

TEST_CASE("ParseJsonString()", "[sgp][sgp-unit]"){

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did these go? Why are they being removed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have absolutely no idea why these tests have been removed, this branch should not be editing any tests in this file. Will revert file since this seems to be the only change?

@anyaevostinar anyaevostinar left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few things, but mainly repro "rate" doesn't seem quite accurate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants