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

nismod / digital_comms
24%
master: 91%

Build:
Build:
LAST BUILD BRANCH: finish_arc_fixed
DEFAULT BRANCH: master
Repo Added 22 Aug 2017 12:49PM UTC
Files 8
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

LAST BUILD ON BRANCH feature/temp
branch: feature/temp
CHANGE BRANCH
x
Reset
  • feature/temp
  • adapt_for_arc
  • arc_analysis
  • arc_fixed
  • change_power_level
  • enhance_test_coverage
  • feature/add_lad_to_premises
  • feature/aggregate_to_dist_point
  • feature/auto_download_data
  • feature/ci_integration
  • feature/develop_coverage_method
  • feature/develop_interventions
  • feature/develop_metrics
  • feature/fixed_broadband_model_structure
  • feature/implement_fixed_network
  • feature/improve_docs
  • feature/integrate_nismod
  • feature/join_premises_with_postcodes
  • feature/reduce_verbosity
  • feature/refine_geotyping
  • feature/scale_preprocessing
  • feature/separate_decisions_and_operation
  • feature/test_fixed_model
  • feature/test_transmitter_module
  • feature/transmitter_module
  • feature/update_mobile_simulation
  • feature/update_mobile_tests
  • feature/update_tests
  • finish_arc_fixed
  • fix/rtd
  • fix/throw_errors
  • fixed_refactor
  • integration
  • master
  • preprocessing
  • restructure_simulator
  • retest_link_budget
  • revert-90-feature/update_mobile_simulation
  • run_simulator
  • test_link_budget
  • update_fixed_model
  • update_fixed_tests
  • update_mobile_interventions_tests
  • v0.1.0
  • v0.1.1
  • v0.1.2
  • v0.1.3
  • v0.1.4
  • v0.1.5
  • v0.1.6

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

Relevant lines Covered
Build:
Build:
362 RELEVANT LINES 101 COVERED LINES
0.28 HITS PER LINE
Source Files on feature/temp
Detailed source file information is not available for this build.

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
30 feature/temp 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.e... push 13 Jan 2018 06:10PM UTC ej550 travis-ci pending completion  
29 feature/temp temp push 12 Jan 2018 10:11AM UTC RoaldL travis-ci pending completion  
See All Builds (386)
  • Repo on GitHub
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