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

allegro / ralph_pricing / 2003
77%

Build:
DEFAULT BRANCH: develop
Ran 24 Nov 2016 02:24PM UTC
Jobs 2
Files 201
Run time 56s
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
2003

push

travis-ci

mkurek
Notifications about anomalies in usages (#544)

Detect missing values and unusually big changes in uploaded usage types and notify their owners.

This PR adds management command which should be launched on daily basis (e.g. from cron). It analyzes usage types uploaded during the month-wide window, which ends on the date give via -e argument.

It looks for two types of anomalies: missing usage types for given day, and unusually big changes of values between two consecutive days, where by "unusually big" it understands a relative change calculated with (d1 - d2) / d2, compared to the value stored in UsageType.change_tolerance (0.2 by default). In case of detecting any of such anomalies, all the owners of a given usage type will be notified by e-mail.

It also implements a "tolerance margin" for missing values, accounting for the cases where usage types are not expected due to longer upload frequency (e.g. monthly instead of daily), and/or where the owners shouldn't receive e-mails because they won't be able to react anyway (e.g. during the weekends).

299 of 299 new or added lines in 7 files covered. (100.0%)

8865 of 10496 relevant lines covered (84.46%)

1.69 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
100.0
src/ralph_scrooge/templatetags/joinby.py
7
100.0
src/ralph_scrooge/templatetags/percentage.py
148
100.0
src/ralph_scrooge/management/commands/detect_usage_anomalies.py
Jobs
ID Job ID Ran Files Coverage
1 2003.1 (DJANGO_VERSION=1.10.2 TEST_DATABASE_ENGINE=mysql) 24 Nov 2016 02:25PM UTC 0
84.44
Travis Job 2003.1
2 2003.2 (DJANGO_VERSION=1.10.2 TEST_DATABASE_ENGINE=sqlite) 24 Nov 2016 02:24PM UTC 0
84.45
Travis Job 2003.2
Source Files on build 2003
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2003
  • 1ffc40e8 on github
  • Prev Build on develop (#2002)
  • Next Build on develop (#2007)
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