Skip to content

Commit

Permalink
Expose production run uuid (#24)
Browse files Browse the repository at this point in the history
Closes #20
  • Loading branch information
denizs authored Nov 16, 2023
1 parent d36dc47 commit e6f56ca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/enlyze/api_clients/production_runs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class Appliance(ApiBaseModel):


class ProductionRun(ProductionRunsApiModel):
uuid: UUID
appliance: Appliance
average_throughput: Optional[float]
production_order: str
Expand Down Expand Up @@ -99,6 +100,7 @@ def to_user_model(
productivity = self.productivity.to_user_model() if self.productivity else None

return user_models.ProductionRun(
uuid=self.uuid,
appliance=appliances_by_uuid[self.appliance.uuid],
average_throughput=self.average_throughput,
production_order=self.production_order,
Expand Down
3 changes: 3 additions & 0 deletions src/enlyze/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ class ProductionRun:
"""

#: The UUID of the production run
uuid: UUID

#: The UUID of the appliance the production run was executed on.
appliance: Appliance

Expand Down
1 change: 1 addition & 0 deletions tests/enlyze/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
production_runs_strategy = st.lists(
st.builds(
production_runs_api_models.ProductionRun,
uuid=st.uuids(),
start=datetime_before_today_strategy,
end=datetime_today_until_now_strategy,
appliance=st.builds(
Expand Down

0 comments on commit e6f56ca

Please sign in to comment.