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

nismod / digital_comms / 30
24%
master: 91%

Build:
Build:
LAST BUILD BRANCH: finish_arc_fixed
DEFAULT BRANCH: master
Ran 13 Jan 2018 06:10PM UTC
Jobs 1
Files 4
Run time 0s
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

pending completion
30

push

travis-ci

ej550
from pprint import pprint

class Exchange(object):
    """ Defines a generic exchange.

    Arguments
    ---------
    data: dict

    """
    def __init__(self, data, cabinets, dist_points, buildings):
        self.id = data["id"]
        self.exchange_type = data["exchange_type"]
        self.cabinets_per_exchange = data["cabinets_per_exchange"]
        self.lines_per_exchange = data["lines_per_exchange"]
        self.cable_type = data["cable_type"]
        self.cable_length = data["cable_length"]
        self.cable_count = data["cable_count"]

        self.cabinets = {}

        for cabinet in cabinets:
            cabinet_id = cabinet["id"]
            self.cabinets[cabinet["id"]] = Cabinet(cabinet, dist_points, buildings)

    def __repr__(self):
        return "<cabinets:{}>".format(self.cabinets)

    def population(self):

        if not self.cabinets:
            return 0

        summed_occupants = sum(
            self.cabinets[cabinet].population()
            for cabinet in self.cabinets
        )

        return summed_occupants

EXCHANGES = [
    {
        "id": 1,
        "exchange_type": "Tier 1",
        "cabinets_per_exchange": 50,
        "lines_per_exchange": 128,
        "cable_type": "fibre",
        "cable_length": 5000,
        "cable_count": 2,
    },
    {
        "id": 2,
        "exchange_type": "Tier 2",
        "cabinets_per_exchange": 80,
        "lines_per_exchange": 128,
        "cable_type": "fibre",
        "cable_length": 12000,
        "cable_count": 2,
    }
]

class Cabinet(object):
    """ Defines a generic street cabinet.

    Arguments
    ---------
    data: dict

    """
    def __init__ (self, data, dist_points, buildings):
        self.id = data["id"]
        self.cabinet_type = data["cabinet_type"]
        self.lines_per_cabinet = data["lines_per_cabinet"]
        self.cable_type = data["cable_type"]
        self.cable_length = data["cable_length"]
        self.cable_count = data["cable_count"]

       ... (continued)

29 of 170 branches covered (17.06%)

Branch coverage included in aggregate %.

101 of 362 relevant lines covered (27.9%)

0.28 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30.1 (DISTRIB="conda" PYTHON_VERSION="3.6" COVERAGE="true") 13 Jan 2018 06:10PM UTC 0
24.44
Travis Job 30.1
Source Files on build 30
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #30
  • ab243161 on github
  • Prev Build on feature/temp (#29)
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