Skip to content

Commit

Permalink
csharpier 0.29
Browse files Browse the repository at this point in the history
  • Loading branch information
wuzzeb committed Aug 20, 2024
1 parent 24e36c7 commit cb2b696
Show file tree
Hide file tree
Showing 72 changed files with 2,183 additions and 2,146 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"csharpier": {
"version": "0.28.2",
"version": "0.29.0",
"commands": [
"dotnet-csharpier"
]
Expand Down
30 changes: 15 additions & 15 deletions server/debug-mock/DebugMock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public static void Main()
AllowChangeWorkorderAtLoadStation = true,
UsingLabelPrinterForSerials = true,
AddRawMaterial = AddRawMaterialType.RequireBarcodeScan,
AddInProcessMaterial = AddInProcessMaterialType.RequireExistingMaterial
AddInProcessMaterial = AddInProcessMaterialType.RequireExistingMaterial,
};

string tempDbFile = null;
Expand Down Expand Up @@ -290,7 +290,7 @@ public ScannedMaterial ParseBarcode(string barcode, Uri referer)
Serial = barcode,
Workorder = "work1",
//PossibleCastings = ImmutableList.Create("part1", "part2"),
PossibleJobs = ImmutableList.Create("aaa-offline-2018-01-01", "bbb-offline-2018-01-01")
PossibleJobs = ImmutableList.Create("aaa-offline-2018-01-01", "bbb-offline-2018-01-01"),
},
};
}
Expand Down Expand Up @@ -323,7 +323,7 @@ public DebugCellState CalculateCellState(IRepository db)
{
CurrentStatus = CurrentStatus with
{
Alarms = ImmutableList.Create("Test alarm " + _curStatusLoadCount.ToString(), "Another alarm")
Alarms = ImmutableList.Create("Test alarm " + _curStatusLoadCount.ToString(), "Another alarm"),
};
}
}
Expand All @@ -332,7 +332,7 @@ public DebugCellState CalculateCellState(IRepository db)
{
CurrentStatus = CurrentStatus,
TimeUntilNextRefresh = TimeSpan.FromMinutes(1),
StateUpdated = changed
StateUpdated = changed,
};
}

Expand Down Expand Up @@ -393,7 +393,7 @@ public ImmutableList<ProgramRevision> ProgramRevisionsInDecendingOrderOfRevision
ProgramName = programName,
Revision = start - i,
Comment = $"programName comment {start - i}",
CellControllerProgramName = "cell " + programName
CellControllerProgramName = "cell " + programName,
})
.ToImmutableList();
}
Expand Down Expand Up @@ -538,10 +538,10 @@ private void LoadEvents(string sampleDataPath, TimeSpan offset)
Process = e.Material[0].Process,
Path = e.Material[0].Path,
FaceNum = e.Material[0].Face,
ActiveOperationTime = e.ActiveOperationTime
}
]
}
ActiveOperationTime = e.ActiveOperationTime,
},
],
},
],
pallet: e.Pallet,
timeUTC: e.EndTimeUTC.Add(offset)
Expand Down Expand Up @@ -691,7 +691,7 @@ private void LoadStatus(string sampleDataPath, TimeSpan offset)
AssignedWorkorders = j.AssignedWorkorders,
}
)
.ToImmutableDictionary(j => j.UniqueStr, j => j)
.ToImmutableDictionary(j => j.UniqueStr, j => j),
};
Statuses.Add(name, curSt);
}
Expand Down Expand Up @@ -724,13 +724,13 @@ path with
SimulatedStartingUTC = path.SimulatedStartingUTC.Add(offset),
SimulatedProduction = path
.SimulatedProduction.Select(prod => prod with { TimeUTC = prod.TimeUTC.Add(offset) })
.ToImmutableList()
.ToImmutableList(),
}
)
.ToImmutableList()
.ToImmutableList(),
}
)
.ToImmutableList()
.ToImmutableList(),
};
// not converted: hold patterns
}
Expand Down Expand Up @@ -768,7 +768,7 @@ public void LoadStatusFromLog(string logPath)
{
ProgramName = (string)prog["MainProgram"],
CellControllerProgramName = (string)prog["MainProgram"],
Comment = (string)prog["Comment"]
Comment = (string)prog["Comment"],
})
.ToList();
}
Expand All @@ -786,7 +786,7 @@ public void LoadStatusFromLog(string logPath)
Pallets = ImmutableDictionary<int, PalletStatus>.Empty,
Material = ImmutableList<InProcessMaterial>.Empty,
Alarms = ImmutableList<string>.Empty,
Queues = ImmutableDictionary<string, QueueInfo>.Empty
Queues = ImmutableDictionary<string, QueueInfo>.Empty,
};
}

Expand Down
2 changes: 1 addition & 1 deletion server/lib/BlackMaple.MachineFramework/api/CellStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public enum QueueRole
RawMaterial,
InProcessTransfer,
Quarantine,
Other
Other,
}

public record QueueInfo
Expand Down
8 changes: 4 additions & 4 deletions server/lib/BlackMaple.MachineFramework/api/JobPlan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,11 @@ public static Job AdjustPath(this Job job, int proc, int path, Func<ProcPathInfo
i == proc - 1
? p with
{
Paths = p.Paths.Select((pa, j) => j == path - 1 ? f(pa) : pa).ToImmutableList()
Paths = p.Paths.Select((pa, j) => j == path - 1 ? f(pa) : pa).ToImmutableList(),
}
: p
)
.ToImmutableList()
.ToImmutableList(),
};
}

Expand All @@ -278,7 +278,7 @@ public static Job AdjustAllPaths(this Job job, Func<ProcPathInfo, ProcPathInfo>
{
Processes = job
.Processes.Select(p => p with { Paths = p.Paths.Select(f).ToImmutableList() })
.ToImmutableList()
.ToImmutableList(),
};
}

Expand All @@ -290,7 +290,7 @@ public static Job AdjustAllPaths(this Job job, Func<int, int, ProcPathInfo, Proc
.Processes.Select(
(p, i) => p with { Paths = p.Paths.Select((pa, j) => f(i + 1, j + 1, pa)).ToImmutableList() }
)
.ToImmutableList()
.ToImmutableList(),
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion server/lib/BlackMaple.MachineFramework/api/Material.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public enum ActionType
Loading,
UnloadToInProcess, // unload, but keep the material around because more processes must be machined
UnloadToCompletedMaterial, // unload and the material has been completed
Machining
Machining,
}

public required ActionType Type { get; init; }
Expand Down
2 changes: 1 addition & 1 deletion server/lib/BlackMaple.MachineFramework/api/PalletStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public enum PalletLocationEnum

Buffer,

Cart
Cart,
}

public record PalletLocation
Expand Down
2 changes: 1 addition & 1 deletion server/lib/BlackMaple.MachineFramework/api/Workorders.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public enum WorkorderSerialCloseout
{
None,
ClosedOut,
CloseOutFailed
CloseOutFailed,
}

public record WorkorderMaterial
Expand Down
Loading

0 comments on commit cb2b696

Please sign in to comment.