Uninett / zinolib

Python library for zino
Apache License 2.0
1 stars 3 forks source link

Add method to determine whether event is down #61

Closed podliashanyk closed 4 weeks ago

podliashanyk commented 4 weeks ago

As suggested by @hmpf in https://github.com/Uninett/Howitz/pull/81

...

Even better would be to have a method on each event-type that returns a bool if that event is considered "down".

if event.is_down():
  if event.adm_state == AdmState.OPEN:
    return 4
  if event.adm_state in [AdmState.WORKING, AdmState.WAITING]:
    return 3
codecov[bot] commented 4 weeks ago

Codecov Report

Attention: Patch coverage is 54.54545% with 5 lines in your changes missing coverage. Please review.

Project coverage is 70.49%. Comparing base (d97de03) to head (ddfbd8c). Report is 17 commits behind head on main.

Files Patch % Lines
src/zinolib/event_types.py 54.54% 5 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #61 +/- ## ========================================== - Coverage 71.52% 70.49% -1.03% ========================================== Files 13 13 Lines 1366 1427 +61 ========================================== + Hits 977 1006 +29 - Misses 389 421 +32 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 4 weeks ago

Test results

    3 files      3 suites   41s :stopwatch:   66 tests   66 :heavy_check_mark: 0 :zzz: 0 :x: 198 runs  198 :heavy_check_mark: 0 :zzz: 0 :x:

Results for commit ddfbd8c4.

:recycle: This comment has been updated with latest results.

sonarcloud[bot] commented 4 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud