Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KappaSimulator #447

Merged
merged 8 commits into from Oct 7, 2019

Conversation

@alubbock
Copy link
Member

alubbock commented Apr 26, 2019

A simulation engine for Kappa built on the PySB Simulator class.
Supports multiple realizations, and multiple initial condition
and parameter sets.

This PR is rebased off #445 which is required for tests to pass.

@coveralls

This comment has been minimized.

Copy link

coveralls commented Apr 26, 2019

Coverage Status

Coverage increased (+0.2%) to 78.822% when pulling c3da02d on alubbock:kappa_simulator into 4f9f4a1 on pysb:master.

alubbock added 3 commits Apr 26, 2019
A simulation engine for Kappa built on the PySB Simulator class.
Supports multiple realizations, and multiple initial condition
and parameter sets.
@alubbock alubbock force-pushed the alubbock:kappa_simulator branch from 9b47443 to ef4ac75 Jun 28, 2019
alubbock added 2 commits Jul 9, 2019
Kappa simulator (and other network-free simulators) should work
regardless of whether generate_equations() has been called on
the model.
Copy link
Member

jmuhlich left a comment

Looks good, not much to say except on the issue of deprecating pysb.kappa.run_simulation.

stderr=subprocess.PIPE,
cwd=base_directory)

for line in iter(p.stdout.readline, b''):

This comment has been minimized.

Copy link
@jmuhlich

jmuhlich Oct 7, 2019

Member

Does this do something different here than the shorter for line in p.stdout ?

This comment has been minimized.

Copy link
@alubbock

alubbock Oct 7, 2019

Author Member

No, for line in p.stdout seems to work too. I'll switch to that.



def test_kappa_sim_michment():
orig_sim = run_simulation(michment.model, time=100, points=100, seed=123)

This comment has been minimized.

Copy link
@jmuhlich

jmuhlich Oct 7, 2019

Member

I figured we would deprecate pysb.kappa.run_simulation as part of this change. If we do that, it probably doesn't make sense to test against it. Thoughts?

This comment has been minimized.

Copy link
@alubbock

alubbock Oct 7, 2019

Author Member

I've now added perturbation support to KappaSimulator and deprecated pysb.kappa.run_simulation. I don't think there's any need to add flux map support, since users can use the dedicated function for that.

I'd suggest leaving the unit tests in place for deprecated code until it's actually removed.

This comment has been minimized.

Copy link
@jmuhlich

jmuhlich Oct 8, 2019

Member

I didn't mean tests for the deprecated code itself, I meant the test for your new KappaSimulator that uses the results from the deprecated code as a reference to compare to.

This comment has been minimized.

Copy link
@alubbock

alubbock Oct 8, 2019

Author Member

I see; apologies for the misunderstanding. I'll work on a new PR to remove the tests' dependence on deprecated code before the PySB 2 update.

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Oct 7, 2019

Codecov Report

❗️ No coverage uploaded for pull request base (master@9a552c8). Click here to learn what that means.
The diff coverage is 98.55%.

Impacted file tree graph

@@           Coverage Diff            @@
##             master    #447   +/-   ##
========================================
  Coverage          ?   79.9%           
========================================
  Files             ?      98           
  Lines             ?   10034           
  Branches          ?       0           
========================================
  Hits              ?    8018           
  Misses            ?    2016           
  Partials          ?       0
Impacted Files Coverage Δ
pysb/simulator/base.py 91.06% <100%> (ø)
pysb/generator/kappa.py 89.85% <100%> (ø)
pysb/tests/test_simulator_kappa.py 100% <100%> (ø)
pysb/simulator/__init__.py 100% <100%> (ø)
pysb/kappa.py 84.02% <100%> (ø)
pysb/simulator/kappa.py 97.56% <97.56%> (ø)

Continue to review full report at Codecov.

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

@alubbock alubbock merged commit 86651c4 into pysb:master Oct 7, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@alubbock alubbock deleted the alubbock:kappa_simulator branch Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.