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

Clean up size_function semantics. #278

Merged
merged 1 commit into from Apr 19, 2021

Conversation

grahamgower
Copy link
Member

Closes #262.

@grahamgower grahamgower force-pushed the size_function branch 2 times, most recently from 7fa6bf2 to d624dbc Compare April 16, 2021 12:29
@codecov
Copy link

codecov bot commented Apr 16, 2021

Codecov Report

Merging #278 (433f9e2) into main (69d4f0d) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #278   +/-   ##
=======================================
  Coverage   97.51%   97.51%           
=======================================
  Files           8        8           
  Lines        1410     1410           
=======================================
  Hits         1375     1375           
  Misses         35       35           
Impacted Files Coverage Δ
demes/demes.py 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 69d4f0d...433f9e2. Read the comment docs.

Copy link
Member

@apragsdale apragsdale left a comment

Choose a reason for hiding this comment

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

This is looking good - I like the documentation you've added. Just one question about always defaulting to "exponential" here, but maybe I'm missing something..

demes/demes.py Show resolved Hide resolved
Copy link
Member

@jeromekelleher jeromekelleher left a comment

Choose a reason for hiding this comment

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

This looks good. Reading through the thread, here's my suggestion:

  1. If start_size == end_size and no size function is specified, default to "constant"
  2. If start_size != end_size and size_function == "constant" raise an error

That is, hard equality rather than math.isclose. It's hard to imagine cases where the values would differ if the size function really was constant and it's not an error.

demes/demes.py Outdated Show resolved Hide resolved
@grahamgower grahamgower force-pushed the size_function branch 2 times, most recently from 9901eab to c95d411 Compare April 19, 2021 12:05
@grahamgower grahamgower merged commit f417a4c into popsim-consortium:main Apr 19, 2021
@grahamgower grahamgower deleted the size_function branch April 19, 2021 12:37
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.

nail down semantics for size_function
4 participants