Changelog#

Major changes are listed below. Each release likely contains fiddling with back-end code, updates to latest fwdpp version, etc.

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 #1288

  • Remove 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 to main.

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

0.21.6#

Behavior changes:

  • Set time_units to generations 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:

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

  • Minor updates to manual. Some formatting issues fixed. PR #1222 PR #1223

Python back end

  • Use tskit.NODE_IS_SAMPLE constant instead of relying on the numeric value when exporting to tskit. 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

Fixes

New features

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 into main.

  • 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

  • Fix attribute errors when validating recombination intervals. PR #1155 Issue #1153

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

  • Disable LTO during CI PR #1147

  • Improve rust handling during CI PR #1146

  • Bump demes-forward-capi dependency. PR #1145

  • Bump demes-spec submodule. PR #1144

0.20.0a1#

New features

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

0.20.0a0#

New features

Deprecations

Breaking changes

  • Drop support for Python 3.7 PR #1108

  • Removed deprecated discrete demography API PR #1101 PR #1116

Documentation

  • Give link to examples of lists of “gvalue” objects PR #1127

  • Rewrite demes-related documentation PR #1124

0.19.10#

Documentation

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)

0.19.7#

Bug fix

  • Fix bug in ModelParams processing of non-Poisson crossover regions. PR #1106 Issue #1105

0.19.6#

Bug fix

  • Fix error in conditional models when sampling ancient samples throughout the focal mutation sojourn. PR #1094 Issue #1093

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

  • Greatly improve the performance of recombination maps. PR #1087. Issue #1082.

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

  • Prepare to refactor C++ code to evolve directly from demes graphs. PR #1063. PR #1067.

  • Boolean flags affecting simulation behavior collected into struct. PR #1061.

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 #1031

  • Docker 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.

  • Add cancel actions to all work flows. PR #982. PR #985.

  • Wheels are now based on manylinux_2_28 PR #994.

  • move fwdpy11/src to cpp/ 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

  • Remove many C++ files from tests/ PR #976.

  • Test that we can load YAML files from demes-spec into our rust-based ForwardDemesGraph. PR #975.

  • move fwdpy11.ezparams module to tests/ PR #977.

  • Add C++ tests of our new “forward demes graph”. PR #980. PR #983. PR #984. PR #989. PR #999.

0.18.3#

Bug fixes:

  • Fix error in mapping population names to integer IDs when importing demes models. Issue #990. PR #991.

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

  • Pinned pybind11 to 2.9.1. PR #955.

  • Use build for wheels. PR #958.

  • Bump tskit to =~ 0.5.0. PR #959.

Build system and CI

  • Fix dependency caching for Ubuntu tests. PR #957.

  • Fix wheel builds for macosx. PR #941.

0.18.1#

Bug fixes

  • Fix display of weight for distribution-of-effect-size classes. Issue #885. PR #943.

0.18.0#

Breaking changes

  • fwdpy11.TableCollection.fs() no longer accepts more than two sample sets. This change allowed us to drop sparse as a dependency that was causing headaches when new Python point releases come out. PR #924. Issues #876, #919.

  • fwdpy11.evolvets(): the default for suppress_table_indexing has changed from False to True. 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 of pybind11. PR #921. Issue #920.

  • Fixed handling of non-integer times in demes models. PR #930. Issue #929.

User interface improvements

  • Region coordinates are now validated before starting the simulation. PR #909. Issue #908.

Testing

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 #931

  • Added infrastructure to separate out back end from Python-specific C++ code. PR #936.

Dependencies

  • Removed use of pip-tools in favor of a single requirements/development.txt file with loose pinning. Issue #877, PR #896

  • Bump minimum pybind11 to 2.9.0. PR #922.

Build System

  • setup.cfg now pins minimum and maximum Python versions. PR #923. Issue #914.

Deployment

  • Update Docker work flow for building wheels to correctly locate requirements file and build for Python 3.10 PR #927

  • Update GitHub actions to build wheels for Python 3.10. PR #928

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 #894

    Miscellaneous

  • 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

  • pin numpy in setup.cfg. This change fixes issues with docker images. PR #880 Issue #879

0.17.0a4#

Dependencies:

  • Clean up pinning of demes and demesdraw. PR #869

  • Update to demes ~=0.2.0. PR #873

  • Update to tskit ~=0.4.0 PR #874

0.17.0a3#

Changes to fwdpy11.conditional_models:

Bug fixes

  • Fixed bug in updating fwdpy11.MultivariateGSSmo. PR #867.

Back end changes:

  • fwdpy11.GSSmo and fwdpy11.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:

0.17.0a2#

Changes to fwdpy11.conditional_models:

  • Change name of kwarg to track_added_mutation. PR #858

Back end changes:

Bug fixes:

  • Fixed a “use after move” error in C++ code used to pickle fwdpy11.DiscreteDemograpy. It looks like this bug was introduced back in #791, which was part of the 0.16.0 release. PR #857

0.17.0a1#

Changes to fwdpy11.conditional_models:

  • Rename track_mutation to track_added_mutation. PR #856

0.17.0a0#

Bug fixes

  • Fix error initializing the founder genome of fwdpy11.DiploidPopulation Issue #836 PR #838

  • Fix 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

Deprecations

  • Deprecate fwdpy11.tskit_tools.WrappedTreeSequence PR #841 PR #848

Back end changes:

0.16.2#

Documentation

  • Document that virtual envs should upgrade pip. PR #834 Issue #833

Packaging

  • Fix import of functions in fwdpy11.demographic_models.human. PR #835 Issue #832

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 and fwdpy11.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. #809

  • Calling fwdpy11.infinite_sites() during a simulation now raises RuntimeError. #820 #769

  • Models 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

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 a unique_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

  • Bump pillow version in doc/requirements.txt. #763 #811

  • Bump all lib dependencies and some doc dependencies. #807

0.15.2#

Point release

Bug fixes

Minor changes

  • Remove use of deprecated numpy dtype in tests. Issue #789. Fixed in PR #794

  • Added more tests of demes-generated models with symmetric migration and individual demes going extinct. Issue #758 Closed by #797

Dependencies

  • Pinned demesdraw in doc/requirements.txt Issue #790. Fixed in PR #795.

  • Pin demes to == 0.1.2 in setup.cfg. Issue #796. Fixed in PR #795.

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 for demesdraw 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:

Fixes:

0.14.1#

This is a point release adding more documentation:

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:

Python changes:

C++ back-end changes:

  • Several C++ source files were changed to no longer include pybind11 headers. #705 #704 #702

  • Removed unused C++ header files #689

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

New features

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

  • The build system is now PEP 517/518 compliant. @cfd95f5

  • setup.py no longer imports pybind11. #634

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(). #649

  • Fixed a bug where mutations on branches generated by msprime had invalid origin times, leading to exceptions when calling fwdpy11.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 #672

  • Binary 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:

  • Cleanup some parts of the code base. #604

  • Make the C++ back-end of fwdpy11.MassMigration have the same initialization semantics as other demographic events. #605.

0.10.1#

Point release.

Bug fixes:

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:

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:

  • New method to handle GSL errors. #574

  • Table collections are now managed by shared pointers. #582

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#

0.8.2#

0.8.1#

  • Fixed a back-end bug that could have led to corrupt sample lists for simplification. #536.

  • Made improvements to memory handling of data structures when simulations end. #537.

  • Added the three-deme model of Jouganous et al. (2017). See fwdpy11.demographic_models.human.jouganous_three_deme. #534

0.8.0#

Stable release. In addition to what is in the previous alpha releases:

This release includes some minor API changes. See the upgrade guide for details.

0.8.0a1#

Second alpha release of 0.8.0:

  • Update the fwdpp submodule. #529

  • Update documentation related to genetic maps. #530

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 of fwdpy11.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 the demography keyword argument to initialize fwdpy11.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:

  • The default C++ language standard is now C++14. #517.

  • Custom exceptions now have default symbol visibility. #519.

  • The back-end code for discrete demography got cleaned up. #521.

  • The fwdpp submodule was updated a few times. #489 #523 #525

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 existing init 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:

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 to install_requires in setup.py. #421

  • fwdpy11.TableCollection’s validation of genome lengths is improved. PR #428

  • The 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:

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 #384

  • Add 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:

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 #358

  • Support 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 See localadaptation and migtest.

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.

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 #313

  • Fix 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:

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 access fwdpy11.TableCollection.input_left or fwdpy11.TableCollection.output_right would give an error because the class contained in these lists wasn’t visible. PR #266

  • fwdpy11.TreeIterator.roots() now returns the array of roots on the current tree. Previously, empty arrays were returned. PR #267

  • Corruption of the samples list using the standalone simplify function. PR #270

The following features are new:

0.5.0#

This is an intermediate release as we are still working towards supporting more general demographic models.

Major changes include:

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 #256

  • fwdpy11.Mutation.g is converted to the mutation’s age when dumping table collections to tskit’s format. PR #257

  • New exception types from fwdpp registered as Python exceptions. PR #260

  • Several updates to documentation and to continuous integration testing.

0.4.5#

0.4.4#

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, and fwdpy11.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 in geneticmapunit 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” type

  • fwdpy11.genetic_values.SlocusPopMultivariateGeneticValueWithMapping, which is a new ABC for multivariate genetic values

  • fwdpy11.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 optima

  • fwdpy11.genetic_values.MultivariateGSSmo, which is the multi-dimensional analog to the existing GSSmo

  • fwdpy11.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 #189

  • Tree sequence recording now possible for mulit-locus simulations. PR #185

  • fwdpy11.ts.count_mutations added. PR #183, PR #196, PR #199

  • Position and key properties added to fwdpy11.ts.VariantIterator. PR #180 PR #181

  • fwdpy11.ts.TreeIterator is added, which provides much faster tree traversal. PR #176, PR #177

  • fwdpy11.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 #169

  • The types fwdpy11.Region and fwdpy11.Sregion have be re-implemented as C++-based classes, replacing the previous pure Python classes. PR #163, PR #174

  • fwdpy11.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 #93

  • Fix 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 and fwdpy11.SlocusPop.load_from_file. Analagous functions exist for MlocusPop. PR #148

  • fwdpy11.SlocusPop.sample and fwdpy11.MlocusPop.sample now return a fwdpy11.sampling.DataMatrix. PR #118

  • fwdpy11.sampling.DataMatrix is refactored to match updates to fwdpp. PR #139

  • fwdpy11.sampling.matrix_to_sample now return a tuple with the neutral and selected data, respectively, as the two elements. PR #128

  • Diploids have been refactored into two separate classes, fwdpy11.DiploidGenotype and fwdpy11.DiploidMetadata. Both classes are valid NumPy dtypes. PR #108

  • fwdpy11.model_params.ModelParams is massively simpilfied. There is now only one class! See model-params. PR #108

  • The 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 that fwdpy11.MlocusPop.locus_boundaries be initialized upon construction. PR #96

  • The 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 and fwdpy11.Population.find_fixation_by_key. PR #106

Back-end changes#

  • The build system now uses cmake. PR #151 and #152

  • 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. :pr85

  • 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 #80

  • Fast 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:#

  • A bug affecting retrieval of multi-locus diploid key data as a buffer for numpy arrays is now fixed. PR #72

  • fwdpy11.SingleLocusDiploid.label is now pickled. PR #34

API changes/new features:#

  • Population objects have new member functions sample and sample_ind. These replace fwdpy11.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 #62

  • Improved 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 #54

  • Attributes popdata and popdata_user added to all population objects. PR #52

  • fwdpy11.SingleLocusDiploid.parental_data added as read-only field. PR #51

  • fwdpy11.MlocusPop.locus_boundaries is now writeable.

  • fwdpy11.sampling.DataMatrix.neutral and fwdpy11.sampling.DataMatrix.selected are now writeable buffers. fwdpy11.sampling.DataMatrix.ndim_neutral and fwdpy11.sampling.DataMatrix.ndim_selected have been changed from functions to read-only properties. PR #45

  • The ‘label’ field of fwdpy11.Region (and fwdpy11.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 #72

  • The 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 #42

  • The fwdpy11.Sregion now store their callback data differently. The result is a type that can be pickled in Python 3.6. PR #39

  • Travis builds are now Linux only and test many Python/GCC combos. PR #38

  • Update to fwdpp 0.5.7 PR #35

  • The 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 of fwdpy11.Mutation to be changed. @ba4841e.

  • The attributes of fwdpy11.Mutation are now read-only, addressing #5 on GitHub. @f376d40

  • Trait-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#

  • Code base updated to work with pybind11 2.2.0. [PR #19]

  • fwdpy11.model_params has been refactored, addressing #4. The new code base is more idiomatic w.r.to Python’s OO methods. @1b811c3

  • Many 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 and fwdpy11.sampling.separate_samples_by_loci. @639c8de

  • Custom 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. @17b92db

  • Simulations 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

0.19.0a2#