Changelog#
Major changes are listed below. Each release likely contains fiddling with back-end code,
updates to latest fwdpp
version, etc.
0.24.3#
Bug fix:
Raise error when simulating neutral mutations and tracking mutation counts suppresses table indexing. (PR #1342)
0.24.2#
Back end changes:
Remove unintended print statement from C++ code. (PR #1339)
0.24.1#
Bug fixes:
Fix bug in handling fixation removal in generations when simplification occurs. (PR #1326)
Back end changes:
0.24.0#
Bug fixes:
Fix bug in handling fixation removal (PR #1323)
In effect, flags to remove fixations were ignored. This likely occurred when modifying the back end to support demes graphs, but I have not bothered to bisect out the source of the error.
Added explicit C++ and Python tests of removing fixations
Updated Python tests of selective sweeps, including fixing some logic errors in the tests that led them to pass “by luck” rather than by design.
This bug does not affect simulation results for multiplicative models. For such models, relative fitness is what matters and not removing fixations still maintains relative fitness.
0.23.0#
Bug fixes:
For multiplicative fitness models, “super lethal” mutations (“s” < -1.0) could results in positive fitness values. This is now fixed, and the fitness function returns as soon as “w” <= 0. PR #1319
Deprecations
All previous deprecations have been removed. PR #1301
Site frequency spectrum calculations from tables are now deprecated. PR #1292
Redundant methods for loading demes graphs are now deprecated. PR #1304
UI improvements
Add
fwdpy11.ForwardDemesGraph.demes_graph
. PR #1297. PR #1298.Improve early detection of invalid optimum values. See issue #1217 for context. PR #1299.
C++ back end:
Code for genetic value calculations extracted into a location available for C++ unit testing. PR #1319
Run c++ test suite through valgrind in CI. PR #1296
Dependencies
0.22.2#
Maintenance release
C++ back end:
Clear table collection indexes early each generation. PR #1272
Build system
Use scikit-build as the build backend. PR #1284
Remove boutique arguments from
setup.py
. PR #1288Remove
setup.py
. PR #1291
CI and deployment
Several PRs resulted in the following changes:
macos CI now runs on Apple Silicon runners
macos wheels are now built for two recent Python versions for both x86 and arm64 platforms
cibuildwheel is used to build wheels.
docker
images are only pushed for releases and not for each commit tomain
.
0.22.0#
Bug fixes:
Fixed incorrect handling of models with end times > 0 in a demes Graph. When exporting to tskit, alive node times were treated as 0.0, causing potential problems for some use cases. Issue #1253 PR #1255
Deprecations
Deprecate the
demes_graph
argument tofwdpy11.DiploidPopulation.dump_tables_to_tskit()
PR #1265Deprecate using a dict for the the
model_params
argument tofwdpy11.DiploidPopulation.dump_tables_to_tskit()
PR #1265
0.21.6#
Behavior changes:
Set
time_units
togenerations
when exporting to tskit PR #1242
The other changes in this release are various documentation updates and some changes to undocumented Python types that are used to model pleiotropic effects.
0.21.5#
Add support for Python 3.12
0.21.4#
Behavior changes:
fwdpy11.DiploidPopulation.add_mutation()
now considers the overlap with the desired interval when calculating weights. PR #1228 Issue #1180Raise warnings when removing selected fixations may not be the right thing to do during a simulation. PR #1235
Documentation
Remove deprecated API use from manual. PR #1233
0.21.3#
Deprecations
Constructing
fwdpy11.ModelParams
without a demographic object is now deprecated and raises a warning. This will be a hard error in a future release. PR #1219
Documentation
Python back end
Use
tskit.NODE_IS_SAMPLE
constant instead of relying on the numeric value when exporting totskit
. PR #1218
0.21.2#
Bug fixes
Fix internal error validating distributions of effect sizes for multi-deme models with correlations in effect sizes between demes. PR #1210.
Examples
Update examples to latest API and run them in CI. PR #1211.
Dependencies
Bump pybind11 to 2.11.11. PR #1172.
Require tskit >= 0.5.6 PR #1206.
Add cmake dependency to pyproject.toml. PR #1177.
Bump
demes-forward-capi
to depend on latest version. PR #1182.
Deprecations
The following are deprecated:
fwdpy11.GSS
fwdpy11.GSSmo
fwdpy11.MutivariateGSS
fwdpy11.MutivariateGSSmo
Their functionality is replaced with fwdpy11.GaussianStabilizingSelection
.
PR #1166.
Issue {issue}{463
}.
0.21.0#
Breaking changes
Refactor
fwdpy11.conditional_models.SimulationStatus
as an enum. This change makes correct use much easier. PR #1161. Issue #934.
Fixes
fwdpy11.conditional_models.ConditionalModelOutput
now contains fields allowing one to distinguish if the tracked mutation is still present infwdpy11.DiploidPopulation.mutations
and/orfwdpy11.DiploidPopulation.fixations
PR #1163. Issue #1160.
New features
fwdpy11.DiploidPopulation.create_from_tskit()
is now able to restore individual metadata, populatingfwdpy11.DiploidPopulation.diploid_metadata
andfwdpy11.DiploidPopulation.ancient_sample_metadata
. PR #1157. Issue #1130.
CI changes
Remove tests using
conda
environments. This removal was a pragmatic decision to speed up CI time.Test macOS/x86 using brew instead of
conda
Reduce number of work flows run for PRs into the
dev
branch. Several work flows are only needed when merging intomain
.Reduce number of work flows running upon push to
main
/dev
. We now use branch protection, so in theory any changes merging have passed their CI requirements.
0.20.1#
Bug fixes
Build system and CI.
Update pip usage and ensure reproducible builds of rust code. PR #1156
0.20.0#
Documentation
Update docs on user environments. PR #1148
Back end
0.20.0a1#
New features
Add
fwdpy11.BinomialIntervalMap
. PR #1142
Back end
Improve test suite run times. PR #1136
Refactor some C++ test fixtures. PR #1139
Python tests now treat warnings as errors. PR #1135
Documentation
Improve docs related to
fwdpy11.ForwardDemesGraph
. PR #1133 PR #1137
0.20.0a0#
New features
fwdpy11.DiploidPopulation.create_from_tskit()
now uses thegeneration
field from top-level metadata to restore all times to their forward-in-time values. PR #1129Discrete demographic models are now managed by
fwdpy11.ForwardDemesGraph
See here. PR #1101 PR #1103 PR #1121 PR #1123 PR #1124Add support for Python 3.11 PR #1108
Allow suppressing of residual selfing. See here. PR #1117 PR #1118
Deprecations
Deprecate use of
fwdpy11.Region
for recombination PR #1126
Breaking changes
Documentation
0.19.10#
Documentation
Rewrite Importing mutations from tskit. PR #1119 Issue #1104
0.19.9#
Big fix
Use the mutation’s time field rather than the metadata “origin” time when creating a DiploidPopulation from a tskit tree sequence. PR #1113
0.19.8#
Big fix/new feature (take your pick)
fwdpy11.DiploidPopulation.create_from_tskit()
now handles tree sequences were all mutations come from adding them “manually” in tskit (see Importing mutations from tskit) OR from a previous run of fwdpy11. PR #1110 Issue #1109
0.19.7#
Bug fix
0.19.6#
Bug fix
0.19.5#
Bug fix
Fix error in BinomialInterval and BinomialPoint where they always returned a breakpoint. This bug was introduced in 0.19.4. PR #1088
0.19.4#
Performance
Python API
Add :class:
fwdpy11.ForwardDemesGraph
. PR #1077.
Back end changes
0.19.3#
Deprecations
The low-level Python API for defining demographic events is now deprecated and will raise warnings. No action has to be taken yet. There is no replacement API to migrate to. PR #1064.
Back end changes
0.19.2#
Documentation
Add link between vignettes regarding importing tree sequences from tskit. PR #1054.
Force notebooks to be executed during doc builds. PR #1058.
Testing/CI
Docs workflow updated to run with Python 3.10. PR #1056.
0.19.1#
Dependencies
Bump jupyter-book to 0.13.1 PR #1052
Deployment
Fix source dist generation during wheel building PR #1051
0.19.0#
Differences from the last stable release also include entries for all alpha releases listed below
Documentation
Bug fix
Add runtime checks for invalid models where effect sizes vary across demes. PR #1047
Testing
Disable wheel build workflow for PRs PR #1048
0.19.0a5#
Deployment
Add missing , to docker tag names PR #1042
Testing
Remove stray return statement in a test. PR #1043
0.19.0a4#
Deployment
Add a version name tag to releases PR #1041
Documentation
Describe podman and give singularity example in deployment section. PR #1040
Testing
Fix logic error in testing mutation import from tskit. PR #1039
0.19.0a3#
Deployment
Update docker base image to
ubuntu:jammy
. PR #1031Docker images now installs into a venv rather than globablly. PR #1031
Fix docker tags so that
latest
means the latest release. PR #1036
Documentations
Document how to build core library in isolation. PR #1038
Document
cbindgen
requirement for development. PR #1030
Back end changes
C++ back ends of Region/Sregion now validate their coordinates at run time. PR #1032
Add wrapper to
gsl_ran_flat
to avoid returning max value. PR #1035
Testing
Separate Python tests requiring compiled C++ modules to another directory. PR #1037
0.19.0a2#
Documentation
0.19.0a1#
New features
Ability to import tree sequences with mutations from tskit. A new vignette describes the procedure. PR #1026.
Bug fixes
Fix bug in sweep models. The fix in PR #1020 was incomplete. Tree span is now accounted for. PR #1026.
Fix Python-side constructors in Mutation re: integer types. No previous results were affected. PR #1023.
Documentation
Update developer docs. PR #1021.
0.19.0a0#
Bug fixes
Fix bug in sweep models. The previous implementation chose acceptable branches for mutation placement uniformly. The new method chooses proportionally to branch length. PR #1020.
API changes
Remove deprecated
WrappedTreeSeqeuence
PR #978.Add Python-level checks that “regions” don’t contain positions extending past the genome ends. PR #987.
Dependencies
Bump pybind11 to 2.10.0 PR #986.
Build system and CI
Remove all use of automake/autoconf. PR #971.
Build core library as shared library. PR #961.
Allow for standalone cmake builds. PR #966.
Add rust crate
demes-forward-capi
to core lib. PR #962. PR #1001.Build C++ tests with cmake. PR #967.
Use
python -m build .
for Ubuntu CI. PR #970.Build all C++ targets in one command on Ubuntu CI. PR #972.
Test docker work flow on CI. PR #979.
Wheels are now based on
manylinux_2_28
PR #994.move
fwdpy11/src
tocpp/
PR #996.Add dependabot for GitHub actions PR #1002.
Fix warnings from
python -m build .
PR #1018.
Back end changes
Move evolve code to core library. PR #974.
Clean up implementation of individual and mutation metadata decoding. PR #1015.
Tidy up a lot of
mypy
errors. PR #1016.
Testing
0.18.3#
Bug fixes:
0.18.2#
Back end changes
Simplify the back-end behind
fwdpy11.MutationDominance
. PR #947.Refactor a class decorator used to pickle/unpickle
attrs
-based classes. PR #948.Reject any
demes
models that involve multiple pulse events into the same source deme at the same time. Such models are better written in a different way. PR #953
Bug fixes
Fixed edge case when importing demes models with burn-in time of 0. PR #949.
Dependencies
Build system and CI
0.18.1#
Bug fixes
0.18.0#
Breaking changes
fwdpy11.TableCollection.fs
no longer accepts more than two sample sets. This change allowed us to dropsparse
as a dependency that was causing headaches when new Python point releases come out. PR #924. Issues #876, #919.fwdpy11.evolvets()
: the default forsuppress_table_indexing
has changed fromFalse
toTrue
. This change will generally result in faster simulations, but will break work flows that relied on accessing the trees during simulation.Removed deprecated attributes from distribution of effect size types. These attributes have been undocumented for so long that no one’s code should break. PR #938. Issue #886.
Behavior changes
fwdpy11.DemographyDebugger.report
raises a warning to state that it has not been implemented. It returns a string with a message to that effect.
Bug fixes
Fixed a bug in event time handling from
demes
models. This bug did not lead to incorrect results as the C++ back end caught the invalid models at run time. PR #891. Issue #881. @apragsdale, @molpopgen.Fix lambda capture in
examples/plugin/gvalue_recorder.cc
. The previous code was not compatible with current versions ofpybind11
. PR #921. Issue #920.Fixed handling of non-integer times in
demes
models. PR #930. Issue #929.
User interface improvements
Testing
Added many more tests related to models defined using
demes
PR #891. PR #931. Issue #890. @apragsdale, @molpopgen.
Back end changes
Add new Python class intended to help validate demographic models and aid in importing models from
demes
. PR #900. PR #904.Completely rebuild
fwdpy11.DemographyDebugger
. PR #906.Added infrastructure to separate out back end from Python-specific C++ code. PR #936.
Assert that epochs from
demes
models are at least 1 generation long. PR #931Added infrastructure to separate out back end from Python-specific C++ code. PR #936.
Dependencies
Removed use of
pip-tools
in favor of a singlerequirements/development.txt
file with loose pinning. Issue #877, PR #896Bump minimum
pybind11
to 2.9.0. PR #922.
Build System
Deployment
0.17.1#
Bug fixes
Fix bug in fixation checking in
fwdpy11.conditional_models
. Previous results were not incorrect. Rather, they took too long to be obtained because some simulations did not terminate early enough. Issue #893 PR #894Miscellaneous
Improved exception message for invalid migrations during a simulation. PR #892
0.17.0#
New release! This release contains everything from the alpha release series plus the changes noted below.
Documentation:
Add basic documentation for
fwdpy11.conditional_models
. PR #878.
Breaking changes with respect to previous alpha releases:
Change attribute names in object returned by conditional models. PR #878.
Dependencies
0.17.0a4#
Dependencies:
0.17.0a3#
Changes to fwdpy11.conditional_models
:
Return evolved instance of
fwdpy11.ModelParams
. PR #866
Bug fixes
Fixed bug in updating
fwdpy11.MultivariateGSSmo
. PR #867.
Back end changes:
fwdpy11.GSSmo
andfwdpy11.MultivariateGSSmo
now handle cases where population start time is greater than zero. PR #867.
Build system:
Update requirements.txt and doc/requirements.txt. PR #864.
Documentation:
Manual is now built with “nitpick” enabled. PR #865.
Updated Initializing with ancestry from msprime to latest
msprime
API. Moved “recapitation” concept into a shorter vignette. PR #868.
0.17.0a2#
Changes to fwdpy11.conditional_models
:
Change name of
kwarg
totrack_added_mutation
. PR #858
Back end changes:
Remove extra copies of tskit table collections from the implementation of
fwdpy11.tskit_tools.iterate_timepoints_with_individuals()
. PR #859 Issue #851
Bug fixes:
0.17.0a1#
Changes to fwdpy11.conditional_models
:
Rename
track_mutation
totrack_added_mutation
. PR #856
0.17.0a0#
Bug fixes
Fix error initializing the founder genome of
fwdpy11.DiploidPopulation
Issue #836 PR #838Fix bug in handling mutation counts when final generation was recorded as “ancient samples”. This bug resulted in an exception being raised. Thus, previous exception-free results were not affected. Issue #844 PR #845 PR #847
New features
Add module
fwdpy11.conditional_models
. PR #828
Deprecations
Back end changes:
Add more runtime checks to
fwdpy11.DiploidPopulation.add_mutation()
PR #837Remove unnecessary copying of table collections in
fwdpy11.tskit_tools
. PR #842Move back-end for ancient sample recording to the population classes. Add
fwdpy11.DiploidPopulation._record_ancient_samples
. #853
0.16.2#
Documentation
Packaging
0.16.1#
New features:
Mutation.__str__
is now more informative. PR #825
0.16.0#
Bug fixes
An integer type in the infinitely-many sites mutation model was changed from unsigned to signed. This does not affect previous results because unsigned overflow doing the “right thing” ended up with final values being correct. PR #766 Issue #765
Fix a bug where stopping/restarting the evolution of demographic models at time points where a deme goes extinct. It is not possible that this bug affected results from earlier versions, as attempting to stop/start at these time points raised exceptions. Issue #775 PR #774
Fix bugs in C++ back-end for discrete demographic models. In some cases, we were using the wrong vector of deme sizes to update the model, leading to runtime exceptions. PR #802 PR #803
Fix error in
demes
models where “replacement” models had 1 generation of overlap between ancestral/derived demes. Issue #814 PR #815 @apragsdale @molpopgen
Behavior changes
If a demographic model is evolved, pickled, unpickled, and then used to evolve, it is now possible that exceptions will raise. This change is due to the fix for Issue #775 introduced in PR #774. See issue #777 for more background.
Mass migration events implemented via
fwdpy11.copy_individuals
andfwdpy11.move_individuals
now occur after sampling within a generation.
This change makes the timings consistent with all other events and also makes certain operations easier/feasible. #809Calling
fwdpy11.infinite_sites()
during a simulation now raisesRuntimeError
. #820 #769Models imported from
demes
now start the forward-time portion of the model 1 (one) generation before the most ancient end time of an ancestral deme. #818 @apragsdale @molpopgen
New features
Add
fwdpy11.DiploidPopulation.add_mutation()
. PR #764 PR #799Add
fwdpy11.NewMutationData
. PR #764Add
__copy__
and__deepcopy__
tofwdpy11.DiploidPopulation
. PR #770Add
__deepcopy__
tofwdpy11.DiscreteDemograpy
. PR #773
C++ back-end
A population can now be checked that it is- or is not- being simulated. PR #762
fwdpy11.discrete_demography.DiscreteDemography
now stores the migration matrix as a stack-allocated object and not aunique_ptr
. PR #785 #781
Build system
All GCC builds and CI tests on Ubuntu + GCC now apply a much stricter set of compiler options. #779 #778
Dependencies
0.15.2#
Point release
Bug fixes
fwdpy11.SetMigrationRates
now uses a tolerance when checking that rates sum to 0 or 1. #787 @apragsdale @molpopgenFix bug where the number of rows in a
tskit.PopulationTable
were incorrect upon export viafwdpy11.DiploidPopulation.dump_tables_to_tskit()
. Issue #792. Fixed in PR #793.
Minor changes
Remove use of deprecated
numpy
dtype
in tests. Issue #789. Fixed in PR #794Added more tests of
demes
-generated models with symmetric migration and individual demes going extinct. Issue #758 Closed by #797
Dependencies
0.15.1#
Point release
Bug fixes
Fix error in decoding provenance rows when initializing
fwdpy11.tskit_tools.WrappedTreeSequence
. #760
Dependencies:
demes
bumped to>=0.1.2
in requirements files. This change is fordemesdraw
and the manual. It is still>= 0.1.1
in setup.cfg. #761
0.15.0#
This release is mostly about tskit.
All changes and issues are collected under the 0.15.0
milestone on GitHub
.
Breaking changes:
Dropped support for Python 3.6. Now, we support 3.7, 3.8, and 3.9. #735
New documentation:
Rewrote vignette on exporting data to
tskit
.Added new vignette on working with data exported to
tskit
These docs were added in #745.
New features:
fwdpy11.DiploidPopulation.dump_tables_to_tskit()
may now return aWrappedTreeSequence
. #748Allow row/slice semantics for decoding
tskit
metadata. #734Top-level metadata for
tskit
objects is now filled. See here for details.Custom deme names can now be added to
tskit
population tables. #742
Fixes:
Tables are now indexed after calling
fwdpy11.DiploidPopulation.load_from_file()
. #739Various fields of
fwdpy11.tskit_tools.DiploidMetadata
are now populated asbool
as documented. #742Mutation metadata for
tskit
changed so that exported tree sequences are compatible withmsprime.sim_mutations
. #731.
0.14.1#
This is a point release adding more documentation:
Demes vignette updated.
fwdpy11.TableCollection.fs
docstring updated regarding some perhaps unexpected behavior ofsparse.COO
.
0.14.0#
In addition to the changes listed below, several documentation, CI, and deployment changes also happened.
These are collected under the 0.14.0
milestone on GitHub
.
New features:
Initial support for demographic models using the
demes
spec. See here. #710 #712 #713 @apragsdalefwdpy11.DiploidPopulation.dump_tables_to_tskit()
has a new option to “destructively” dump tables, which may save a lot of memory. #695
Python changes:
Deprecated
popsizes
andpself
keyword arguments removed fromfwdpy11.ModelParams
. #703Fixed a design issue in how
fwdpy11.DemographyDebugger
parsed input event lists. #693
C++ back-end changes:
0.13.2#
Point release
Small fix to wheel building action. @c31420a
0.13.1#
Point release
Attempt to fix deployment of various deliverables upon release. #682
0.13.0#
API changes
The
demesizes
keyword is no longer accepted to initialize instances offwdpy11.DiploidPopulation
. #676fwdpy11.TreeIterator.nodes()
no longer takes an argument. #678The type of
fwdpy11.Mutation.g
changed from an unsigned integer to a signed integer. This change has no practical consequence to user code written in Python. #656 #667 #670
New features
The dominance of a mutation may now be specified by a function. See Mutations with variable dominance. #590 #629 #630
Improved IDE and editor integration
Several key classes and functions were reimplemented. They are now Python layers on top of the C++. These changes allow better type hinting and make the docstrings more easily discoverable, resulting in
jedi
, etc., being better able to use them for auto completion and other tasks. #676 #677 #678
Packaging changes
Bug fixes
Fixed bugs in experimental features involving simulating neutral mutations during simulations recording ancient samples. These fixes make these features less experimental and part of the API now. #643 #647 #650
Improved input parameter validation for
fwdpy11.evolvets()
. #649Fixed a bug where mutations on branches generated by
msprime
had invalid origin times, leading to exceptions when callingfwdpy11.DiploidPopulation.dump_tables_to_tskit()
. #656 #670
Deployment changes
Pushes to
main
and new releases now trigger updates to a Docker image. See Deployment tools. #652 #663 #671 #672Binary wheels are automatically deployed for macOS and Linux for new releases. #669
Documentation changes
The manual is now built with jupyter book. #653.
The manual is now longer hosted on Read The Docs.
It has been moved here and is automatically deployed by GitHub actions. #654.
0.12.0#
API breakage:
Simulation without tree sequence recording is no longer supported. #607
Bug fixes:
This release fixes two bugs. Neither bug would affect results. Rather, they affect the behavior of some advanced features.
Explicit initialization of a data structure used for simplification is now always done. #626 #627
Simplification is now allowed to occur after a single generation. #624 #627
New features:
Recombination breakpoints can be restricted to integer positions. #612
Improved methods for decoding
tskit
meta data. #609.
This release also includes several updates to dependencies, documentation, and CI testing.
These changes are collected under the 0.12.0
milestone on GitHub
.
0.11.0#
Point release.
Behavior changes:
The events passed to
fwdpy11.DiscreteDemograpy
are now sorted stably by time. #598
Documentation changes:
Fixed documentation for
fwdpy11.SetMigrationRates
. #603
Back end changes:
0.10.1#
Point release.
Bug fixes:
Fix some errors in
fwdpy11.DemographyDebugger
. #594
Testing changes:
We now use GitHub actions instead of Travis. #593
Documentation changes:
We now use
jupyter-sphinx
to execute code in the manual. #597
0.10.0#
Interface changes:
When dumping tables to
tskit
viafwdpy11.DiploidPopulation.dump_tables_to_tskit()
, we now use the latest metadata methods. See here. #588Most arguments to
fwdpy11.evolvets()
are now keyword-only. #584Added
fwdpy11.DiscreteDESD
. #587
Dependency updates:
Minimum
tskit
version is now 0.3.2.Minimum
attrs
version is now 0.19.2.Sphinx
version pinned to 3.1.The warnings for deprecated features got promoted to
FutureWarning
. #583
C++ back-end changes:
0.9.0#
This release enables custom genetic value models to be implemented in Python. To do so, the back-end for C++ genetic values was changed in a way that (hopefully!) future-proofs the API against future changes. The approach taken to allowing Python genetic value types evolved quite a bit during development, so we won’t refer to individual pull requests here. Anyone interested can look at the 0.9.0 milestone on GitHub.
See here for the documentation on Python genetic values.
0.8.3#
fwdpy11.DiploidPopulation.dump_tables_to_tskit()
now populates the provenance table. #542Improve checking migration rates in
fwdpy11.DemographyDebugger
. #545fwdpy11.DemographyDebugger
now makes a deep copy of input. #546The C++ back-ends for Gaussian stabilizing selection classes got streamlined without changing the user interface. #547
Manual got overhauled. #543
Snowdrift example reimplemented using
attrs
. #548
0.8.2#
Fix issue where
fwdpy11.DemographyDebugger
failed to catch populations with empty migration matrix rows after mass migration. #539fwdpy11.DemographyDebugger
is now implemented withattrs
. #540. This change changes a keyword argument for this class. See upgrade guide.
0.8.1#
0.8.0#
Stable release. In addition to what is in the previous alpha releases:
Memory use is substantially reduced due to some improvements in
fwdpp
. #533 brings in two changes fromfwdpp
, molpopgen/fwdpp#287 and molpopgen/fwdpp#288.
This release includes some minor API
changes.
See the upgrade guide for details.
0.8.0a1#
Second alpha release of 0.8.0:
0.8.0a0#
This is the first alpha release of 0.8.0.
In addition to what is below, this release contains
a smattering of build system changes, documentation changes,
etc., that are collected under the 0.8.0 milestone on Github
.
API
/UI
changes:
This release brings Python classes that have been reimplemented using attrs. These changes have a lot of benefits:
A lot of C++ code got removed (yay!) because we can use
attrs
for the pickling machinery,__repr__
, etc..We now get much nicer
__repr__
for all of the types that get sent into instances offwdpy11.ModelParams
.
However, these changes required some simplification to the __init__
methods,
which meant some API
breakage. See the upgrade guide
for details.
This release also removes features deprecated in previous releases. #482
Performance improvements:
Sorting edge tables prior to tree sequence simplification has been replaced by an efficient buffering algorithm. #526.
New demographic models:
The [^cite_tennessen2012] model is added via
fwdpy11.demographic_models.human.tennessen
. #479
Improved behavior:
Improved warnings about demographic events scheduled to happen before the population’s current generation. #495
Built-in demographic models now return instances of
fwdpy11.demographic_models.DemographicModelDetails
. Such instances can be passed as thedemography
keyword argument to initializefwdpy11.ModelParams
. #509.The “individual” column of a node table is now populated when exporting to a
tskit.TableCollection
. #488
Changes to implementation of Python classes
fwdpy11.ModelParams
has been reimplemented using attrs. #484, #486, #487.Demographic model types are now implemented using attrs and inherit from the C++ back-end class. #492
Region types are now implemented using attrs and inherit from the C++ back-end class. #497
Genetic value types are now implemented using attrs and inherit from the C++ back-end class. #504
Genetic map unit types are now implemented using attrs and inherit from the C++ back-end class. #506
C++ back end changes:
0.7.1#
Maintenance release and one new feature:
Allow the first generation of a simulation to be preserved. PR #470 See Finishing a simulation with msprime.
Parameterizing classes like
fwdpy11.GSSmo
is now more Pythonic, and some existinginit
methods are deprecated in favor of the new approach. PR #461.
This release include several other improvements to documentation and user interface.
All changes are backwards-compatible, and deprecation warnings are issued when
necessary. See the 0.7.1 milestone on GitHub
for details.
0.7.0#
Major feature release allowing mutations to have different effect sizes in different demes.
Bugs fixed:
Temporal samplers now get the correct offspring metadata in simulations with tree sequence recording. #444
New features:
Added
fwdpy11.mvDES
, which allows multivariate distributions of effect sizes such that mutations have different effect sizes in different demes. See Different effect sizes of mutations in different demes for details. PR #443 PR #452fwdpy11.GeneticValueToFitnessMap
now records whether or not genetic values are mapped to fitness or are a trait value viafwdpy11.GeneticValueToFitnessMap.maps_to_fitness
andfwdpy11.GeneticValueToFitnessMap.maps_to_trait_value
. PR #447
Other changes (see the 0.7.0 milestone on GitHub)
This release deprecates several features that are no longer sensible given that most simulations will use tree sequence recording. You will see warnings pop up if you use these features (or run the unit tests). These features will be removed in 0.8.0.
Many back-end changes to the C++ code simplify things in various places.
0.6.4#
Fixes a bug where the timing of updates to stateful genetic values was off by one generation:
0.6.3#
Maintenance release.
This release fixes three bugs. The first two are related to internal details of book-keeping various data structures:
Other changes:
sparse
is added toinstall_requires
insetup.py
. #421fwdpy11.TableCollection
’s validation of genome lengths is improved. PR #428The C++ base class for a population is now a concrete class rather than a template alias. This change enables forward declarations in header files. PR #427
0.6.2#
This release changes the migration code to model juvenile migration. These changes simplify the back end and give the same results (in distribution). The relevant PRs are:
0.6.1#
This is a maintenance release that clears up a few issues:
The following features are added:
0.6.0#
This is a major feature release. The changes include all those listed for the various release candidates (see below) plus the following:
fwdpy11.TableCollection.fs
added. Seetablefs
. PR #387 PR #399Creating populations from
msprime
input improved. PR #395Added
PendingDeprecationWarning
tofwdpy11.evolve_genomes
. PR #396
Note
This is the first stable release with support for flexible demographic modeling.
See softselection
for details as well as IMexample
. Currently,
support for different fitness effects in different demes is limited, which
will be addressed in 0.7.0. However, this version does support adaptation
of quantitative traits to different optima. See localadaptation
.
0.6.0rc2#
Third release candidate of version 0.6.0!
Kind of a big release:
Fixes a bug in the mechanics of generating offspring metadata. The bug doesn’t affect anyone not using custom “genetic value” calculations. #371
Big reductions in memory requirements for simulations with tree sequence recording. PR #383
Better defaults for models with migration. PR #376 PR #375 PR #370
Improvements to the C++ back-end of demographic models PR #379 PR #368 PR #367 PR #366
Add
fwdpy11.DemographyDebugger
PR #384Add some pre-computed demographic models, see
demographic-models
.New examples added:
IMexample
Many improvements/additions to the test suite and the manual.
0.6.0rc1#
This is the same as 0.6.0rc0 except that it is based on a master branch that’s been rebased to have the bug fixes from 0.5.5 included.
0.6.0rc0#
Support for demographic events involving discrete demes. This is a release candidate with minimal documentation beyond the examples (see below).
API changes:
fwdpy11.Node.population
renamedfwdpy11.Node.deme
PR #340
This API change won’t affect anyone because previous versions didn’t support individuals in different demes.
New features:
Support for
fwdpy11.DiscreteDemograpy
in simulations with tree sequences. PR #342 PR #346 PR #358Support for different genetic value functions in different demes. PR #357
Miscellaneous changes:
Improve how tree sequence nodes are retrieved for “alive” individuals during simulation. PR #344
New documentation
Examples of simulations using the
fwdpy11.DiscreteDemograpy
classes. PR #359 Seelocaladaptation
andmigtest
.
Changes to the build system and dependencies:
Minimum pybind11 version is 2.4.3
The
-Weffc++
flag is now optional during compilation.
0.5.5#
This release fixes a rather serious bug.
The latter is the bad one. For workflows involving simulate, write to file, read in and add neutral mutations, that results may now differ. In practice, we’ve seen few cases where that has happened (1 in about 10,0000 simulations), but the bug was due to not properly populating a lookup table of mutation positions after reading the simulation back in from disk. Thus, there is the chance that the procedure of putting down neutral mutations now differs.
0.5.4#
Bug fix release.
Fixes #350
0.5.3#
New features:
Allow neutral mutations during simulations with tree sequences. PR #328
Add C++ back end and Python classes for discrete demographic events. PR #237
Miscellaneous changes:
Links in the manual are now validated via CI. PR #331
0.5.2#
The following bugs are fixed:
Mutations were not being recycled properly during simulations with tree sequences, resulting in excessive memory consumption. PR #317
Several interface issues with
fwdpy11.MultivariateGSSmo
are fixed. PR #313Fix a bug that could lead to fixations with tree sequences not “pruning” selected fixations when that behavior is desired. #287, fixed in PR #289
A memory safety issue was fixed in the implementation of
fwdpy11.TreeIterator.samples_below
. PR #300. #299
The following new features are added:
Allow for preserved samples to be “forgotten” during tree sequence simulations. PR #306.
Several performance fixes:
Extinct genomes are purged at the end of simulations with tree sequences. PR #319.
Improve algorithm to purge extinct variants at the end of a simulation with tree sequences. PR #318.
fwdpy11.infinite_sites()
now returns earlier if possible #293.Improve performance of mutation counting with ancient samples PR #289.
0.5.1#
This release fixes three bugs:
fwdpy11.IndexedEdge
is now exposed to Python. Previously, attempting to accessfwdpy11.TableCollection.input_left
orfwdpy11.TableCollection.output_right
would give an error because the class contained in these lists wasn’t visible. PR #266fwdpy11.TreeIterator.roots()
now returns the array of roots on the current tree. Previously, empty arrays were returned. PR #267Corruption of the samples list using the standalone simplify function. PR #270
The following features are new:
A streamlined API to traverse samples at different time points using
fwdpy11.DiploidPopulation.sample_timepoints()
. PR #279fwdpy11.TreeIterator
now allows iteration over sites and mutations in the current tree viafwdpy11.TreeIterator.sites()
andfwdpy11.TreeIterator.mutations()
. PR #275Preorder traversal of nodes in the current tree is possible via
fwdpy11.TreeIterator.nodes()
. Addedfwdpy11.TreeIterator.samples()
andfwdpy11.TreeIterator.samples_below()
. PR #272
0.5.0#
This is an intermediate release as we are still working towards supporting more general demographic models.
Major changes include:
Updating the fwdpp back-end to the pre-release code for fwdpp 0.8.0. Almost none of these changes are “user facing”.
Add
fwdpy11.SiteTable
,fwdpy11.Site
and new fields tofwdpy11.MutationRecord
. PR #258 These changes affect the API for some function calls. See Upgrade path for details.
Even though this release changes some of the tree sequence data structures, we are still able to read in files generated by version 0.4.5! (This is actually unit tested.)
Minor changes include:
Add
fwdpy11.gsl_version
. PR #256fwdpy11.Mutation.g
is converted to the mutation’s age when dumping table collections to tskit’s format. PR #257New exception types from fwdpp registered as Python exceptions. PR #260
Several updates to documentation and to continuous integration testing.
0.4.5#
fwdpy11.DataMatrixIterator
now correctly handles nested window coordinates. PR #244.
0.4.4#
Add
fwdpy11.DataMatrixIterator
. PR #243.Reduce time needed to execute unit tests of tree sequence functions.
0.4.3#
Minor fixes to packaging of source distrubition.
Add a YCM config file to source repo
Allow mutation and recombination regions to be empty. PR #239.
0.4.2#
Minor release:
fwdpy11.VariantIterator
may now skip neutral or selected sites during iteration. The behavior is specified by parameters passed to the class upon construction.Documentation updates
0.4.1#
Minor release:
Added position ranges to tree traversal. PR #232.
Changed default type for range arguments for VariantIterator and data matrix generation. PR #233.
Skipping fixations is now optional in
fwdpy11.data_matrix_from_tables()
.The C++ back-end for population classes was changed to avoid deleting move constructors. PR #231.
Documentation updates
0.4.0#
This is a major refactoring:
The package is now contained in a single namespace,
fwdpy11
.The
MlocusPop
concept from previous versions is removed, andfwdpy11.DiploidPopulation
is the only population class now.Many Python class names are changed to reflect that there is only one population type now.
The manual has been rewritten.
The details for this release are best tracked via the cards in Project 9 on GitHub.
0.3.1#
Minor bugfix release:
Preserved nodes are now recorded as samples when table collections are saved to
tskit
The fwdpp submodule is updated to include fixes to some debugging code
Minor updates to the C++ backend of VariantIterator
0.3.0#
Deprecations of note#
fwdpy11.MlocusPop
is tentatively deprecated. The new features described ingeneticmapunit
make this class obsolete, but we will await a final verdict pending more testing.
Bug fixes#
A bug in handling fixations during simulations with tree sequence recording is fixed. This bug is GitHub #200 and the fix is PR #201.
Updates to the fwdpp submodule fix a bug in
fwdpy11.ts.infinite_sites
. Previously, if the genome size was not 1.0, then the number of mutations would be off by a factor of the genome size divided by 1.0. The error was due to a bug upstream in fwdpp.A bug in how diploid metadata were updated by genetic value types has been fixed. It is unlikely that this bug affected anyone unless they had written custom genetic value calculations where the offspring’s genetic value depended on the parental metadata. PR #173.
Support for multivariate mutational effects#
PR #164 introduced support for multidimensional mutational effects. This pull request introduced several changes:
The following new types are added:
fwdpy11.MultivariateGaussianEffects
, which is a new “region” typefwdpy11.genetic_values.SlocusPopMultivariateGeneticValueWithMapping
, which is a new ABC for multivariate genetic valuesfwdpy11.genetic_values.MultivariateGeneticValueToFitnessMap
, which is a new ABC mapping multivariate trait values down to a (single) fitness value.fwdpy11.genetic_values.MultivariateGSS
, which is GSS based on the Euclidean distance from multiple optimafwdpy11.genetic_values.MultivariateGSSmo
, which is the multi-dimensional analog to the existing GSSmofwdpy11.genetic_values.SlocusMultivariateEffectsStrictAdditive
, which is a new genetic value class for pleiotropic traits.
PR #175 adds tracking of genetic values during simulation as numpy
arrays via fwdpy11.Population.genetic_values
and fwdpy11.Population.ancient_sample_genetic_values
.
Currently, filling these arrays is only supported for simulations with tree sequence recording.
Changes to the C++ back end:
The API for the C++ class fwdpy11::SlocusPopGeneticValue was slightly changed in order to accommodate the new types. The old operator() is renamed calculate_gvalue().
Analogous changes were made to fwdpy11::MlocusPopGeneticValue.
Dependency changes#
Change minimum GSL version required to 2.3
Other changes in this release include#
It may be helpful to look at the following documentation pages:
savingsimstodisk
geneticmapunit
Detailed changes:
Add new function to pickle populations while using less memory. PR #195, PR #201
Improved performance of simulations tracking lots of ancient samples. PR #194
Generalized genetic maps for single-locus simulations. You can now do much of the “multi-locus” stuff with
SlocusPop
now. PR #189Tree sequence recording now possible for mulit-locus simulations. PR #185
Position and key properties added to
fwdpy11.ts.VariantIterator
. PR #180 PR #181fwdpy11.ts.TreeIterator
is added, which provides much faster tree traversal. PR #176, PR #177fwdpy11.ts.simplify
no longer retains ancient samples present in the input by default. To do so, explicitly label any ancient samples to retain as part of the the samples list passed to the function. PR #169The types
fwdpy11.Region
andfwdpy11.Sregion
have be re-implemented as C++-based classes, replacing the previous pure Python classes. PR #163, PR #174fwdpy11.model_params.ModelParams.nregions
now defaults to an empty list, which simplifies setup for simulations with tree sequences. @b557c41.When simulating with tree sequences, it is no longer an error to attempt to record ancient samples from the last generation of a simulation. PR #162
Changes to the C++ back-end include:
The genetic value types now store a vector of genetic values. The idea is to generalize the type to handle both uni- and multi- variate genetic values. PR #172
Version 0.2.1#
This is a point release fixing some minor packaging problems in 0.2.0.
Version 0.2.0#
This release represents major changes to the calclations of genetic values and to how simulations are parameterized. Please see Upgrade path.
The major feature addition is support for tree sequence recording. See Data structures related to tree sequences and Conceptual overview of tree sequence recording for details.
Warning:#
This version breaks pickle format compatibility with files generated with version 0.1.4 and earlier. Sorry, but we had to do it.
Dependency changes:#
GSL >= 2.2 is now required.
cmake is now required to build the package.
Bug fixes:#
Fixed bug in
fwdpy11.util.sort_gamete_keys
. The function was working on a copy, meaning data were not being modified. PR #93Fix a bug in updating a population’s mutation lookup table. This bug was upstream in fwdpp (fwdpp issue 130). While definitely a bug, I could never find a case where simulation outputs were adversely affected. In other words, simulation output remained the same after the fix, due to the rarity of the bug. PR #98
API changes/new features:#
Added support for tree sequence recording. PR #142
Populations may now be dumped/loaded to/from files. See
fwdpy11.SlocusPop.dump_to_file
andfwdpy11.SlocusPop.load_from_file
. Analagous functions exist for MlocusPop. PR #148fwdpy11.SlocusPop.sample
andfwdpy11.MlocusPop.sample
now return afwdpy11.sampling.DataMatrix
. PR #118fwdpy11.sampling.DataMatrix
is refactored to match updates to fwdpp. PR #139fwdpy11.sampling.matrix_to_sample
now return a tuple with the neutral and selected data, respectively, as the two elements. PR #128Diploids have been refactored into two separate classes,
fwdpy11.DiploidGenotype
andfwdpy11.DiploidMetadata
. Both classes are valid NumPy dtypes. PR #108fwdpy11.model_params.ModelParams
is massively simpilfied. There is now only one class! Seemodel-params
. PR #108The design of objects related to calculating genetic values is vastly simplified. PR #108
Populations now contain functions to add mutations, replacing previous functions in fwdpy11.util. PR #94
fwdpy11.MlocusPop
now requires thatfwdpy11.MlocusPop.locus_boundaries
be initialized upon construction. PR #96The mutation position lookup table of a population is now a read-only property. PR #103
The mutation position lookup table is now represented as a dict of lists. PR #121
A mutation or fixation can now be rapidy found by its “key”. See
fwdpy11.Population.find_mutation_by_key
andfwdpy11.Population.find_fixation_by_key
. PR #106
Back-end changes#
Most uses of C’s assert macro are replaced with c++ exceptions. PR #141
The C++ back-end of classes no longer contain any Python objects. PR #114
PR #108 changes the back-end for representing diploids and for calculating genetic values.
PR #98 changes the definition of the populaton lookup table, using the same model as fwdpp PR #132
Refactored class hierarchy for populations. :pr
85
Updated to the fwdpp 0.6.x API and cleanup various messes that resulted. PR #76, PR #84, PR #90, PR #109, PR #110
The position of extinct variants is set to the max value of a C++ double. PR #105
An entirely new mutation type was introduced on the C++ side. It is API compatible with the previous type (fwdpp’s “popgenmut”), but has extra fields for extra flexibility. PR #77, PR #88
Replaced
std::bind
with lambda closures for callbacks. PR #80Fast exposure to raw C++ buffers improved for population objects. PR #89
Refactored long unit tests. PR #91
The GSL error handler is now turned off when fwdpy11 is imported and replaced with a custom handler to propagate GSL errors to C++ exceptions. PR #140
Population mutation position lookup table changed to an unordered multimap. PR #102
When a mutation is fixed or lost, its position is now set to the max value of a C++ double. This change gets rid of some UI oddities when tracking mutations over time. PR #106 and this @96e8b6e.
Version 0.1.4#
Bug fixes:#
API changes/new features:#
Population objects have new member functions
sample
andsample_ind
. These replacefwdpy11.sampling.sample_separate
, which is now deprecated. For example, see~fwdpy11.SlocusPop.sample
for more info. (The same member functions exist for all population objects.) PR #62Improved support for pickling lower-level types. See the unit test file
tests/test_pickling.py
for examples of directly pickling things like mutations and containers of mutations. PR #55__main__.py
added. The main use is to help writing python modules based on fwdpy11. See Developer’s guide for details. PR #54Attributes
popdata
andpopdata_user
added to all population objects. PR #52fwdpy11.SingleLocusDiploid.parental_data
added as read-only field. PR #51fwdpy11.MlocusPop.locus_boundaries
is now writeable.fwdpy11.sampling.DataMatrix.neutral
andfwdpy11.sampling.DataMatrix.selected
are now writeable buffers.fwdpy11.sampling.DataMatrix.ndim_neutral
andfwdpy11.sampling.DataMatrix.ndim_selected
have been changed from functions to read-only properties. PR #45The ‘label’ field of
fwdpy11.Region
(andfwdpy11.Sregion
) now populate the label field of a mutation. PR #32 See tests/test_mutation_labels.py for an example.Population objects may now be constructed programatically. PR #36
Back-end changes#
The numpy dtype for
fwdpy11.Mutation
has been refactored so that it generates tuples useable to construct object instances. This PR also removes some helper functions in favor of C++11 uniform initialization for these dtypes. PR #72The documentation building process is greatly streamlined. PR #60
Object namespaces have been refactored. The big effect is to streamline the manual. PR #59
Travis CI now tests several Python versions using GCC 6 on Linux. PR #44
fwdpy11.wright_fisher_qtrait.evolve
has been updated to allow “standard popgen” models of multi-locus evolution. This change is a stepping stone to a future global simplification of the API. PR #42The
fwdpy11.Sregion
now store their callback data differently. The result is a type that can be pickled in Python 3.6. PR #39Travis builds are now Linux only and test many Python/GCC combos. PR #38
Update to
fwdpp
0.5.7 PR #35The method to keep fixations sorted has been updated so that the sorting is by position and fixation time. PR #33
The doctests are now run on Travis. PR #30
Removed all uses of placement new in favor of pybind11::pickle. PR #26.
fwdpy11 are now based on the @property/@foo.setter idiom for safety and code reuse. PR #21
Version 0.1.3.post1#
Version 0.1.3#
Bug fixes:#
API changes/new features:#
fwdpy11.Sregion
may now model distrubitions of effect sizes on scales other than the effect size itself. A scaling parameter allows the DFE to be functions of N, 2N, 4N, etc. [PR #16]Github issues 7, 8, and 9 resolved. All are relatively minor usability tweaks.
fwdpy11.util.change_effect_size
added, allowing the “s” and “h” fields offwdpy11.Mutation
to be changed. @ba4841e.The attributes of
fwdpy11.Mutation
are now read-only, addressing #5 on GitHub. @f376d40Trait-to-fitness mapping functions for quantitative trait simulations now take the entire population, rather than just the generation. This allows us to model things like truncation selection, etc. @fa37cb8
Back-end changes#
fwdpy11.model_params
has been refactored, addressing #4. The new code base is more idiomatic w.r.to Python’s OO methods. @1b811c3Many of the C++-based types can now be pickled, making model parameter objects easier to serialize. Most of the changes are in @d0a3602. This mostly addresses #3
Added magic numbers to keep track of compatibility changes to serialization formats.
str changed to repr for region types @2df859d
fwdpy11.model_params now uses try/except rather than isinstance to check that rates are float-like types. @37112a6
Version 0.1.2#
Bug fixes:#
Fixed bug in setting the number of loci after deserializing a multi-locus population object. @4e4a547
API and back-end changes:#
The C++ data structures are connected to NumPy via Python buffer protocol. @48e3925
fwdpy11.sampling.separate_samples_by_loci
changed to take a list of positions as first argument, and not a population object.
Version 0.1.1#
Bug fixes:#
Fixed bug in
fwdpy11.sampling.DataMatrix.selected
that returned wrong data in best case scenario and could have caused crash in worst case. @e715fb7.Fix bug recording fixation times. If a population was evolved multiple times, fixation times from the later rounds of evolution were incorrect. @9db14d8
Fix #1, related to fixations in quantitative trait sims. @6a27386
The “label” field of a diploid is now initialized upon constructing a population.
API and back-end changes:#
Added
fwdpy11.sampling.matrix_to_sample
andfwdpy11.sampling.separate_samples_by_loci
. @639c8deCustom stateless fitness/genetic value calculations may now be implemented with a minimal amount of C++ code. @a75166d
Custom fitness/genetic value calculations now allowed in pure Python, but they are quite slow (for now). @5549286
Stateful trait value models enabled for qtrait sims. @161dfce
Refactor evolution functions so that stateful fitness models behave as expected. Enable compiling in a debug mode. Fix bug in operator== for diploid type. @a726c05
fwdpy11.util added, providing
fwdpy11.util.add_mutation
. @17b92dbSimulations now parameterized using classes in fwdpy11.model_params. @18e261c and @eda7390
Added multi-locus simulation of quantitative traits. @fcad8de
Refactoring of type names. @632477c
Refactoring internals of single-region fitness/trait value types. @d55d636
Allow selected mutations to be retained in fwdpy11.wright_fisher.evolve_regions_sampler_fitness. @dcc1f2f
Note: the refactoring of type names will break scripts based on earlier versions. Sorry, but things are rapidly changing here. Please note that you can reassign class and function names in Python, allowing quick hacks to preserve compatibility:
import fwdpy11
Spop = fwdpy11.SlocusPop
Alternately:
from fwdpy11 import SlocusPop as Spop