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

studentenportal / web / 495

Build:
Build:
LAST BUILD BRANCH: scss
DEFAULT BRANCH: master
Ran 21 Jan 2020 12:48PM UTC
Jobs 1
Files 0
Run time –
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
495

push

travis-ci

The-Compiler
Python 3: Fix rounding of lecturer ratings

On Python 2, round() with a x.5 number always rounds up.

On Python 3, "banker's rounding" / "round to even" is done, which always rounds
to even numbers in order to not accumulate rounding errors.

However, for ratings that's not what we want, instead we always need to round
up. Doing int(x + 0.5) is the easiest way to do so. It only works for positive
numbers, but that's fine for ratings.

For more than you'd ever wanted to know about rounding in Python, see:

https://realpython.com/python-rounding/
https://stackoverflow.com/questions/33019698/
Jobs
ID Job ID Ran Files Coverage
1 495.1 (CONTAINER_COVERAGE_HOME_DIR=/srv/www/studentenportal RELEASE=`git describe --tags` DOCKER_TAGS="studentenportal/studentenportal:latest studentenportal/studentenportal:${RELEASE}" UID=`id -u` GID=`id -g`) 21 Jan 2020 12:48PM UTC 0
Travis Job 495.1
Source Files on build 495
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #495
  • 8e6282e7 on github
  • Prev Build on py3 (#494)
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