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

HumanCellAtlas / metadata-api / 34
96%
develop: 98%

Build:
Build:
LAST BUILD BRANCH: feature/geryl/1469-updated-hca
DEFAULT BRANCH: develop
Ran 24 Aug 2018 09:49PM UTC
Jobs 1
Files 9
Run time 1s
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
34

push

travis-ci

hannes-ucsc
Add helper function for accessing renamed fields

```
lookup(entity, 'new_name', 'old_name')
```

reads better than

```
entity.get('old_name') or entity['new_name']
```

because it mentions the new name first. More importantly, the latter prioritizes to the old name which may be problematic if the old name is reintroduced for yet another field in the future.

Unlike

```
entity.get('new_name') or entity['old_name']
```

the first two raise `KeyError: `new_name` which is a subtle but important difference.

570 of 594 relevant lines covered (95.96%)

0.96 hits per line

Jobs
ID Job ID Ran Files Coverage
1 34.1 24 Aug 2018 09:49PM UTC 0
95.96
Travis Job 34.1
Source Files on build 34
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #34
  • 25083074 on github
  • Next Build on feature/hannes/lookup (#35)
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