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

More correct replicate! (and sample!) #832

Merged
merged 6 commits into from
Jul 17, 2023
Merged

More correct replicate! (and sample!) #832

merged 6 commits into from
Jul 17, 2023

Conversation

Tortar
Copy link
Member

@Tortar Tortar commented Jul 16, 2023

This is more correct since:

  • in both the functions now the agent is created without changing the immutable id field, I also verified that now the id field is never updated throughout the library which means that we could declare it constant in the internal macros if we want to do so
  • secondly it deepcopies also the argument given in kwargs, this could be useful to prevent bugs from the user side
  • the replicate! function is documented :D

I also verified that this doesn't change the performance of the functions, actually it improves the case where kwargs are given since it doesn't re-set the fields after the agent is created

@codecov-commenter
Copy link

codecov-commenter commented Jul 16, 2023

Codecov Report

Merging #832 (1fc811d) into main (8b5b456) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #832      +/-   ##
==========================================
+ Coverage   70.12%   70.13%   +0.01%     
==========================================
  Files          42       42              
  Lines        2718     2719       +1     
==========================================
+ Hits         1906     1907       +1     
  Misses        812      812              
Impacted Files Coverage Δ
src/simulations/sample.jl 97.05% <100.00%> (+0.08%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Tortar Tortar merged commit 489c24d into main Jul 17, 2023
5 checks passed
@Tortar Tortar deleted the correct-replicate! branch July 17, 2023 10:25
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