Skip to content

Commit

Permalink
Use demes graphs directly during simulation: (#1101)
Browse files Browse the repository at this point in the history
* Add ForwardDemesGraph to Python public API
* bump demes to require 0.2.2 in all requirements
  files
* Add extensive new C++-side tests
* ModelParams demography field is now an Optional defaulting to None

    The optional type is:

    typing.Union[fwdpy11.ForwardDemesGraph,
                 fwdpy11.demographic_models.DemographicModelDetails]
* remove unused AmbiguousPulses exception
* Refactor imports of types related to demographic models.
* Remove deprecated API for demographic models
* Remove tests and docs related to removed API

NOTE: this is a rebase of several PR.
The rebase is necessary due to use of
rust depencencies on git.  Such use breaks
any future 'git bisect', so we squash down
to a commit using crates.io versions of all
rust depencencies.
  • Loading branch information
molpopgen committed Mar 14, 2023
1 parent 453b176 commit 2ebe9e0
Show file tree
Hide file tree
Showing 127 changed files with 1,928 additions and 14,766 deletions.
7 changes: 0 additions & 7 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,6 @@ set(EVOLVE_POPULATION_SOURCES evolve_population/init.cc
evolve_population/no_stopping.cc)

set(DISCRETE_DEMOGRAPHY_SOURCES discrete_demography/init.cc
discrete_demography/MigrationMatrix.cc
discrete_demography/MassMigration.cc
discrete_demography/SetDemeSize.cc
discrete_demography/SetExponentialGrowth.cc
discrete_demography/SetSelfingRate.cc
discrete_demography/SetMigrationRates.cc
discrete_demography/DiscreteDemography.cc
discrete_demography/exceptions.cc)

set (ARRAY_PROXY_SOURCES array_proxies/init.cc)
Expand Down
6 changes: 4 additions & 2 deletions cpp/demes/forward_graph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ void
init_forward_graph(py::module &m)
{
py::class_<fwdpy11_core::ForwardDemesGraph>(m, "_ForwardDemesGraph")
.def(py::init<const std::string & /*yaml*/, std::uint32_t /*burnin*/>(),
py::arg("yaml"), py::arg("burnin"), py::kw_only());
.def(py::init<const std::string & /*yaml*/, std::uint32_t /*burnin*/,
bool /*round_epoch_sizes*/>(),
py::arg("yaml"), py::arg("burnin"), py::arg("round_epoch_sizes"),
py::kw_only());
}
216 changes: 0 additions & 216 deletions cpp/discrete_demography/DiscreteDemography.cc

This file was deleted.

40 changes: 0 additions & 40 deletions cpp/discrete_demography/MassMigration.cc

This file was deleted.

43 changes: 0 additions & 43 deletions cpp/discrete_demography/MigrationMatrix.cc

This file was deleted.

35 changes: 0 additions & 35 deletions cpp/discrete_demography/SetDemeSize.cc

This file was deleted.

33 changes: 0 additions & 33 deletions cpp/discrete_demography/SetExponentialGrowth.cc

This file was deleted.

0 comments on commit 2ebe9e0

Please sign in to comment.