Releases: popsim-consortium/demes-python
0.2.3
- Fixed the use of numpy strings for deme names.
(@terhorst, @grahamgower, #495, #505) - Added
Graph.rename_demes()
method to return a graph with renamed demes.
(@aabiddanda, #499)
0.2.2
Better conformance to the spec. Minor discrepancies between demes-python and the reference implementation have been resolved.
- Dropped support for Python 3.6
(@grahamgower, #445, #446) - Reject bad defaults, even if they're not used.
(@grahamgower, #443, #430) - Set encoding to UTF-8 explicitly. This fixes unicode deme names on Windows.
(@grahamgower, #430) Graph.description
andDeme.description
can no longer beNone
. A missing description will now be resolved to the empty string.
(@grahamgower, #429, #430)Graph.generation_time
can no longer beNone
. Whentime_units
are generations, a missinggeneration_time
will now be resolved to 1 and other values are an error.
(@grahamgower, #429, #430)- Permit selfing_rate + cloning_rate >= 1. Both values must be between zero and one (inclusive), but the selfing_rate is now defined as conditional on sexual reproduction (which occurs at rate
1 - cloning_rate
).
(@grahamgower, #425, #423)
0.2.1
New features:
- Support for the
metadata
field at the toplevel of a YAML file.
The is a dictionary that may contain arbitrary nested data.
(@grahamgower, #275, #392).
Bug fixes:
- The string "Infinity" is now accepted when using
load_all()
,
just like forload()
andloads()
.
This fixes loading fully-resolved models with the CLI.
(@grahamgower, #394, #395).
Breaking changes:
- The
demes.hypothesis_strategies.graphs()
function for generating
a randomGraph
has been removed. This was buggy and not usable
as originally intended.
(@grahamgower, #360, #397).
0.2.0
New features:
- Add
load_all()
/dump_all()
to support multi-document YAML.
(@grahamgower, #239, #335) - Add CLI.
(@grahamgower, #339
) - Add
to_ms()
function.
(@grahamgower, #74, #354) - Allow for "Infinity" as start times for demes and migrations in input
YAMLs and dicts.
(@apragsdale, #358, #386)
Breaking changes:
- A pulse event now allows for simultaneous sources and takes arguments
sources
andproportions
instead ofsource
andproportion
. The
sources and proportions must be provided as a list, even when there is
only a single source deme.
(@apragsdale, #353) - Disallow null values and blank entries in input YAML models.
(@apragsdale, #340, #387)
Bug fixes:
- Fix various issues in
from_ms()
with-es
/-ej
commands.
(@grahamgower, #350, #351, #352) - Fix some pulse edge cases when pulse events occur at the same time.
(@grahamgower, #328, #357, #362) todict_simplified()
now properly handles symmetric migrations when the
end times of the demes involved differ.
(@apragsdale, #384, #385)
0.1.2
New features:
- Add
Graph.migration_matrices()
to get the migration matrices for a graph. (@grahamgower, #309, #320) - Add
Deme.size_at()
to get the size of a deme at a given time. (@grahamgower, #312, #314) - Support "linear" as an
Epoch.size_function
. (@noscode, #296, #310) - Downstream test code can now use the
demes.hypothesis_strategies.graphs()
hypothesis strategy to generate a randomGraph
. This is preliminary, and as such is not yet documented, but is used for testing internally with some success. The API may change in the future in response to requests from downstream application authors. (@grahamgower, #217, #294) - The string representation for a graph,
Graph.__str__()
, is now the simplified YAML output. (@grahamgower, #235, #293)
Breaking changes:
- The undocumented msprime and stdpopsim converters have been removed. (@grahamgower, #313, #316)
- The JSON spec doesn't allow serialising infinite float values (although the Python json library does support this by default). So for JSON output we instead use the string "Infinity". (@grahamgower, demes-spec#70, #311)
0.1.1
Remove the "demes" console_scripts entry point.
This isn't documented/supported and was left in accidentally.
0.1.0
First stable release of demes
.
Breaking changes:
-
The interpretation has been changed for symmetric migrations when the
start_time
(and/orend_time
) is not specified. Symmetric migrations are
now resolved separately for each pair in the list of participating demes.
To accommodate this semantic change, theSymmetricMigration
class has
been removed, and symmetric migrations are always resolved into pairs of
AsymmetricMigration
objects.
(@grahamgower, #263, #268) -
The
size_function
field can no longer be an arbitrary string.
Only the "constant" and "exponential" strings are recognised.
(#262, #278)
New features:
- The
from_ms()
function has been added to convert an ms command line
into aGraph
.
(@jeromekelleher, @grahamgower, #74, #102)
Bug fixes:
Graph.in_generations()
no longer changes time values for a graph
whentime_units == "generations"
andgeneration_time is not None
.
(@grahamgower, #273, #274)
0.1.0a4
Breaking changes:
- The deme
id
field has been renamed toname
. This applies to both
the data model (YAML files) and theDeme
class.
(#246, discussion at popsim-consortium/demes-spec#59)
Bug fixes:
- Check for multiple pulses causing ancestry proportion > 1.
(@grahamgower, #250, #251) - Check selfing_rate + cloning_rate <= 1.
(@grahamgower, #242, #251) - Check for pulse time edge cases.
(@grahamgower, #243, #249) - Check sum of migration rates entering a deme are <= 1.
(@grahamgower, #244, #249) - Fix migration.end_time in convert.from_msprime.
(@grahamgower, #241)
0.1.0a3
Bug fixes:
- Fix
Graph.in_generations()
to also convert theDeme.start_time
field.
Thanks to @apragsdale for reporting the problem.
(@grahamgower, #224, #225). - Fix
assert_close()
andis_close()
equality checks to compare the deme
start_time
.
(@grahamgower, #224, #225).
Alpha release for testing.
The API and the schema for YAML files have been largely agreed upon. Backwards-incompatible changes before the first stable release are still possible, but are considered unlikely.