Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Stat calc #75

Merged
merged 5 commits into from
Jul 7, 2021
Merged

Stat calc #75

merged 5 commits into from
Jul 7, 2021

Conversation

R0flcopt3r
Copy link
Collaborator

@R0flcopt3r R0flcopt3r commented Jul 6, 2021

JobBare and Job now has a JobStat member with easily reachable statistics for the job.

Closes #54

@R0flcopt3r R0flcopt3r self-assigned this Jul 6, 2021
@codecov
Copy link

codecov bot commented Jul 6, 2021

Codecov Report

Merging #75 (3120325) into master (d9fb6a9) will increase coverage by 0.27%.
The diff coverage is 92.30%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #75      +/-   ##
==========================================
+ Coverage   78.18%   78.46%   +0.27%     
==========================================
  Files          26       27       +1     
  Lines        1866     1904      +38     
  Branches      250      255       +5     
==========================================
+ Hits         1459     1494      +35     
- Misses        364      366       +2     
- Partials       43       44       +1     
Impacted Files Coverage Δ
src/core/api/schema.py 96.11% <83.33%> (-3.89%) ⬇️
src/core/api/api.py 96.84% <100.00%> (-0.12%) ⬇️
src/core/api/utils.py 100.00% <100.00%> (ø)
src/core/model.py 98.23% <100.00%> (+0.31%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9fb6a9...3120325. Read the comment docs.

src/core/api/api.py Outdated Show resolved Hide resolved
src/core/api/schema.py Outdated Show resolved Hide resolved
src/core/api/schema.py Show resolved Hide resolved
tests/unit/core/integration/test_schema.py Outdated Show resolved Hide resolved
tests/unit/core/unit/test_job.py Outdated Show resolved Hide resolved
@MindTooth MindTooth marked this pull request as draft July 7, 2021 10:01
@R0flcopt3r
Copy link
Collaborator Author

@MindTooth why did you mark this as a draft?

@MindTooth
Copy link
Collaborator

@MindTooth why did you mark this as a draft?

Bunch of commits.

@R0flcopt3r
Copy link
Collaborator Author

@MindTooth why did you mark this as a draft?

Bunch of commits.

They will all be squashed when merging.

@R0flcopt3r R0flcopt3r marked this pull request as ready for review July 7, 2021 12:56
JobStats is the pydantic version for model.Job.stats.

Also converts labels from `int` to `str` for `JobStat`. A bug surfaced
from this where `convert_labels` happens twice. We simply ignore and
return if every key is a valid `str` that cannot be cast to an int.
Tests model.Job.stats property, as well as the (de)serialization with
pydantic.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2. Move stats calculation to core
3 participants