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

Edinburgh-Genome-Foundry / DnaChisel / 14225166311

02 Apr 2025 04:53PM UTC coverage: 90.508% (+0.5%) from 90.054%
14225166311

push

github

veghp
Switch to Sphinx

2994 of 3308 relevant lines covered (90.51%)

0.91 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

71.43
/dnachisel/Specification/SpecEvaluation/ProblemObjectivesEvaluations.py
1
from .SpecEvaluations import SpecEvaluations
1✔
2

3

4
class ProblemObjectivesEvaluations(SpecEvaluations):
1✔
5
    """Special multi-evaluation class for all objectives of a same problem.
6

7
    See submethod ``.from_problem``
8

9
    """
10

11
    color_lightness = 0.8
1✔
12
    color_shift = 0.14
1✔
13

14
    specifications_role = "objective"
1✔
15

16
    @staticmethod
1✔
17
    def from_problem(problem):
1✔
18
        """Create an instance by evaluating all objectives in the problem.
19

20
        The ``problem`` is a DnaChisel DnaOptimizationProblem.
21

22
        """
23
        return ProblemObjectivesEvaluations(
1✔
24
            [specification.evaluate(problem) for specification in problem.objectives],
25
            problem=problem,
26
        )
27

28
    def success_failure_color(self, evaluation):
1✔
29
        """Return color #cbf960 if evaluation is optimal else #f9a260."""
30
        return "#cbf960" if evaluation.is_optimal else "#f9a260"
×
31

32
    def text_summary_message(self):
1✔
33
        """Return a TOTAL SCORE message."""
34
        if len(self.evaluations) == 0:
×
35
            return "No specifications"
×
36
        return "TOTAL OBJECTIVES SCORE: " + self.scores_sum(as_text=True)
×
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

© 2025 Coveralls, Inc