• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

LoLab-VU / pysb / 552 / 1
79%
master: 79%

Build:
DEFAULT BRANCH: master
Ran 01 May 2017 09:09PM UTC
Files 86
Run time 8s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 May 2017 08:58PM UTC coverage: 71.758% (+0.1%) from 71.658%
552.1

push

travis-ci

jmuhlich
Fix PysbFlatExporter with compartmental models (#254)

* Fix PysbFlatExporter with compartmental models
* Fix `is_equivalent_to` for compartmental models

## Original commit messages

* Fix PysbFlatExporter with compartmental models

The PysbFlatExporter fails with compartmental models due to `Compartment`'s
`repr()` implementation, which means parameters and parent compartments
get printed in full rather than just their name, which leads to a
`ComponentDuplicateNameError` with compartmental models when using the
PysbFlatExporter. This commit fixes the issue.

Resolves: pysb/pysb#210

* Fix `is_equivalent_to` for compartmental models

Currently, the `is_equivalent_to` method does not consider species
with a defined Monomer compartment, species compartment or both to
be equivalent, i.e. the following are all different:

 * A() ** C1 # monomer compartment
 * ComplexPattern([A()], compartment=C1) # species compartment
 * ComplexPattern([A() ** C1, compartment=C1) # species and monomer
                                              # compartments

These should all be equivalent, which is fixed in this patch.

I've also added a check in the `is_equivalent_to` method to check
that the ComplexPatterns are concrete, i.e. species, and not
abstract patterns, as the matching rules are subtly different.

Resolves: pysb/pysb#257

* Add error to prevent compartment override with **

In the following scenario with two compartments C1 and C2:

    In [95]: (A() ** C1) ** C2
    Out[95]: A() ** C2

This syntax should throw an error, rather than override the existing
compartment.

See also: pysb/pysb#258

* Deprecate is_equivalent_to with non-concrete pats

* Fix synthesis initials with compartmental models

One initial condition based on __source should be generated for each
compartment. A unit test has been added to check for this.

4632 of 6455 relevant lines covered (71.76%)

0.72 hits per line

Source Files on job 552.1
  • Tree
  • List 0
  • Changed 3
  • Source Changed 3
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 552
  • Travis Job 552.1
  • 43ecfa60 on github
  • Prev Job for on master (#551.1)
  • Next Job for on master (#553.2)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc