WIP: Cleans up ManualDClient and adds some more document strings.
Some checks failed
CI / Linux Tests (push) Failing after 7m3s
Some checks failed
CI / Linux Tests (push) Failing after 7m3s
This commit is contained in:
@@ -15,7 +15,7 @@ extension DependencyValues {
|
||||
/// Useful helper utilities for project's.
|
||||
///
|
||||
/// This is primarily used for implementing logic required to get the needed data
|
||||
/// for the view controller client to render views.
|
||||
/// for the view controller to render views.
|
||||
@DependencyClient
|
||||
public struct ProjectClient: Sendable {
|
||||
public var calculateDuctSizes: @Sendable (Project.ID) async throws -> DuctSizes
|
||||
@@ -28,7 +28,6 @@ public struct ProjectClient: Sendable {
|
||||
@Sendable (User.ID, Project.Create) async throws -> CreateProjectResponse
|
||||
|
||||
public var frictionRate: @Sendable (Project.ID) async throws -> FrictionRateResponse
|
||||
public var generatePdf: @Sendable (Project.ID) async throws -> Response
|
||||
}
|
||||
|
||||
extension ProjectClient: TestDependencyKey {
|
||||
|
||||
@@ -67,7 +67,7 @@ extension ManualDClient {
|
||||
round: sizes.finalSize,
|
||||
height: rectangularSize.height
|
||||
)
|
||||
rectangularWidth = response.width.rawValue
|
||||
rectangularWidth = response.width
|
||||
}
|
||||
|
||||
retval.append(
|
||||
@@ -119,10 +119,10 @@ extension ManualDClient {
|
||||
var width: Int? = nil
|
||||
if let height = trunk.height {
|
||||
let rectangularSize = try await self.rectangularSize(
|
||||
round: .init(rawValue: sizes.finalSize),
|
||||
round: sizes.finalSize,
|
||||
height: height
|
||||
)
|
||||
width = rectangularSize.width.rawValue
|
||||
width = rectangularSize.width
|
||||
}
|
||||
|
||||
retval.append(
|
||||
@@ -131,7 +131,7 @@ extension ManualDClient {
|
||||
ductSize: .init(
|
||||
designCFM: designCFM,
|
||||
sizes: sizes,
|
||||
height: trunk.height?.rawValue,
|
||||
height: trunk.height,
|
||||
width: width
|
||||
)
|
||||
)
|
||||
@@ -146,7 +146,7 @@ extension ManualDClient {
|
||||
extension DuctSizes.SizeContainer {
|
||||
init(
|
||||
designCFM: DuctSizes.DesignCFM,
|
||||
sizes: ManualDClient.DuctSizeResponse,
|
||||
sizes: ManualDClient.DuctSize,
|
||||
height: Int?,
|
||||
width: Int?
|
||||
) {
|
||||
@@ -164,7 +164,7 @@ extension DuctSizes.SizeContainer {
|
||||
|
||||
init(
|
||||
designCFM: DuctSizes.DesignCFM,
|
||||
sizes: ManualDClient.DuctSizeResponse,
|
||||
sizes: ManualDClient.DuctSize,
|
||||
rectangularSize: Room.RectangularSize?,
|
||||
width: Int?
|
||||
) {
|
||||
|
||||
@@ -19,7 +19,7 @@ extension ManualDClient {
|
||||
.init(
|
||||
externalStaticPressure: details.equipmentInfo.staticPressure,
|
||||
componentPressureLosses: details.componentLosses,
|
||||
totalEffectiveLength: Int(totalEquivalentLength)
|
||||
totalEquivalentLength: Int(totalEquivalentLength)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -47,7 +47,7 @@ extension ManualDClient {
|
||||
.init(
|
||||
externalStaticPressure: staticPressure,
|
||||
componentPressureLosses: componentLosses,
|
||||
totalEffectiveLength: Int(totalEquivalentLength)
|
||||
totalEquivalentLength: Int(totalEquivalentLength)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user