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

studentenportal / web

Build:
Build:
LAST BUILD BRANCH: scss
DEFAULT BRANCH: master
Repo Added 18 Dec 2013 10:25AM UTC
Files 49
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 py3
branch: py3
CHANGE BRANCH
x
Reset
  • py3
  • compass-refactoring
  • coverage
  • deployment
  • docker-production
  • download-filename
  • master
  • rss_feed
  • separate_lecturer_photo

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/
Relevant lines Covered
NO TREND HISTORY
Source Files on py3
Detailed source file information is not available for this build.

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
495 py3 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. Howe... push 21 Jan 2020 12:48PM UTC The-Compiler travis-ci pending completion  
494 py3 <a href="https://github.com/studentenportal/web/commit/33216eba3">Remove unused django-extensions dependency It was removed in </a><a class="double-link" href="https://github.com/studentenportal/web/commit/a16203deb... push 21 Jan 2020 10:39AM UTC The-Compiler travis-ci pending completion  
493 py3 Upgrade DRF 3.6 -> 3.9 See https://www.django-rest-framework.org/community/release-notes/ 3.10 and later don't support Python 2 anymore. See #229 push 21 Jan 2020 10:37AM UTC The-Compiler travis-ci pending completion  
See All Builds (407)
  • 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