8000 Update scalafmt-core to 3.11.2 by lucuma-steward[bot] · Pull Request #2857 · gemini-hlsw/seqexec · GitHub
[go: up one dir, main page]

Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ e9a0384427db7e3e54c83446a9de40a845064f07

# Scala Steward: Reformat with scalafmt 3.8.6
bf83a7896b3ba9515ee7e8cdfbaf94af27dc5594

# Scala Steward: Reformat with scalafmt 3.11.2
7aa269441f1cb9e9878add088e33a65c05cf6693
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "3.8.6"
version = "3.11.2"
style = default
runner.dialect = scala213source3

Expand Down
2 changes: 1 addition & 1 deletion modules/engine/src/main/scala/seqexec/engine/Engine.scala
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ class Engine[F[_]: MonadError[*[_], Throwable]: Logger, S, U](stateL: Engine.Sta
): HandleType[Unit] =
getS(id).flatMap(_.map { s =>
(Handle(
StateT[F, S, (Unit, Option[Stream[F, EventType]])](st => ((st, ((), f(st)))).pure[F])
StateT[F, S, (Unit, Option[Stream[F, EventType]])](st => (st, ((), f(st))).pure[F])
) *>
modifyS(id)(Sequence.State.internalStopSet(true))).whenA(Sequence.State.isRunning(s))
}.getOrElse(unit))
Expand Down
18 changes: 9 additions & 9 deletions modules/engine/src/main/scala/seqexec/engine/Event.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ object Event {
user: UserDetails,
step: StepId,
v: Boolean
): Event[F, S, U] = EventUser[F, S, U](Breakpoint(id, user.some, step, v))
): Event[F, S, U] = EventUser[F, S, U](Breakpoint(id, user.some, step, v))
def skip[F[_], S, U](
id: Observation.Id,
user: UserDetails,
step: StepId,
v: Boolean
): Event[F, S, U] = EventUser[F, S, U](SkipMark(id, user.some, step, v))
): Event[F, S, U] = EventUser[F, S, U](SkipMark(id, user.some, step, v))
def poll[F[_]](clientId: ClientId): Event[F, Nothing, Nothing] =
EventUser[F, Nothing, Nothing](Poll(clientId))
def getState[F[_], S, U](f: S => Option[Stream[F, Event[F, S, U]]]): Event[F, S, U] =
Expand All @@ -50,12 +50,12 @@ object Event {
def actionStop[F[_], S, U](
id: Observation.Id,
f: S => Option[Stream[F, Event[F, S, U]]]
): Event[F, S, U] = EventUser[F, S, U](ActionStop(id, f))
): Event[F, S, U] = EventUser[F, S, U](ActionStop(id, f))
def actionResume[F[_], S, U](
id: Observation.Id,
i: Int,
c: Stream[F, Result[F]]
): Event[F, S, U] =
): Event[F, S, U] =
EventUser[F, S, U](ActionResume(id, i, c))
def logDebugMsg[F[_], S, U](msg: String, ts: Instant): Event[F, S, U] =
EventUser[F, S, U](LogDebug(msg, ts))
Expand All @@ -77,25 +77,25 @@ object Event {
stepId: StepId,
i: Int,
r: Result.OK[R]
): Event[F, Nothing, Nothing] = EventSystem[F](Completed(id, stepId, i, r))
): Event[F, Nothing, Nothing] = EventSystem[F](Completed(id, stepId, i, r))
def stopCompleted[F[_], R <: Result.RetVal](
id: Observation.Id,
stepId: StepId,
i: Int,
r: Result.OKStopped[R]
): Event[F, Nothing, Nothing] = EventSystem[F](StopCompleted(id, stepId, i, r))
): Event[F, Nothing, Nothing] = EventSystem[F](StopCompleted(id, stepId, i, r))
def aborted[F[_], R <: Result.RetVal](
id: Observation.Id,
stepId: StepId,
i: Int,
r: Result.OKAborted[R]
): Event[F, Nothing, Nothing] = EventSystem[F](Aborted(id, stepId, i, r))
): Event[F, Nothing, Nothing] = EventSystem[F](Aborted(id, stepId, i, r))
def partial[F[_], R <: Result.PartialVal](
id: Observation.Id,
stepId: StepId,
i: Int,
r: Result.Partial[R]
): Event[F, Nothing, Nothing] =
): Event[F, Nothing, Nothing] =
EventSystem[F](PartialResult(id, stepId, i, r))
def paused[F[_]](id: Observation.Id, i: Int, c: Result.Paused[F]): Event[F, Nothing, Nothing] =
EventSystem[F](Paused[F](id, i, c))
Expand All @@ -111,7 +111,7 @@ object Event {
def singleRunCompleted[F[_], R <: Result.RetVal](
c: ActionCoords,
r: Result.OK[R]
): Event[F, Nothing, Nothing] =
): Event[F, Nothing, Nothing] =
EventSystem[F](SingleRunCompleted(c, r))
def singleRunFailed[F[_]](c: ActionCoords, e: Result.Error): Event[F, Nothing, Nothing] =
EventSystem[F](SingleRunFailed(c, e))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class SequenceSpec extends AnyFlatSpec {
pending: List[ParallelActions[IO]],
focus: Execution[IO],
done: List[NonEmptyList[Result[IO]]]
): Step.Zipper[IO] = {
): Step.Zipper[IO] = {
val rollback: (Execution[IO], List[ParallelActions[IO]]) = {
val doneParallelActions: List[ParallelActions[IO]] = done.map(_.map(const(action)))
val focusParallelActions: List[ParallelActions[IO]] = focus.toParallelActionsList
Expand Down
34 changes: 18 additions & 16 deletions modules/engine/src/test/scala/seqexec/engine/packageSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -353,13 +353,14 @@ class packageSpec extends AnyFlatSpec with NonImplicitAssertions {
Sequence.State.init(
Sequence(
id = Observation.Id.unsafeFromString("GS-2018B-Q-0-8"),
steps = List(
Step.init(id = 1, executions = executions),
Step.init(id = 2, executions = executions).copy(skipMark = Step.SkipMark(true)),
Step.init(id = 3, executions = executions).copy(skipMark = Step.SkipMark(true)),
Step.init(id = 4, executions = executions).copy(skipMark = Step.SkipMark(true)),
Step.init(id = 5, executions = executions)
)
steps =
List(
Step.init(id = 1, executions = executions),
Step.init(id = 2, executions = executions).copy(skipMark = Step.SkipMark(true)),
Step.init(id = 3, executions = executions).copy(skipMark = Step.SkipMark(true)),
Step.init(id = 4, executions = executions).copy(skipMark = Step.SkipMark(true)),
Step.init(id = 5, executions = executions)
)
)
)
)
Expand Down Expand Up @@ -464,15 +465,16 @@ class packageSpec extends AnyFlatSpec with NonImplicitAssertions {
Sequence.State.init(
Sequence(
Observation.Id.unsafeFromString("GS-2019A-Q-3"),
steps = List(
Step.init(id = 1, executions = executions).copy(skipped = Step.Skipped(true)),
Step
.init(id = 2, executions = executions)
.copy(skipMark = Step.SkipMark(true), breakpoint = Step.BreakpointMark(true)),
Step
.init(id = 2, executions = executions)
.copy(skipMark = Step.SkipMark(true), breakpoint = Step.BreakpointMark(true))
)
steps =
List(
Step.init(id = 1, executions = executions).copy(skipped = Step.Skipped(true)),
Step
.init(id = 2, executions = executions)
.copy(skipMark = Step.SkipMark(true), breakpoint = Step.BreakpointMark(true)),
Step
.init(id = 2, executions = executions)
.copy(skipMark = Step.SkipMark(true), breakpoint = Step.BreakpointMark(true))
)
)
)
)
Expand Down
4 changes: 2 additions & 2 deletions modules/server/src/main/scala/seqexec/server/OdbProxy.scala
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ object OdbProxy {
obsId: Observation.Id,
dataId: DataId,
fileId: ImageFileId
): F[Boolean] = true.pure[F]
): F[Boolean] = true.pure[F]
override def datasetComplete(
obsId: Observation.Id,
dataId: DataId,
fileId: ImageFileId
): F[Boolean] = true.pure[F]
): F[Boolean] = true.pure[F]
override def obsAbort(obsId: Observation.Id, reason: String): F[Boolean] = false.pure[F]
override def sequenceEnd(obsId: Observation.Id): F[Boolean] = false.pure[F]
override def sequenceStart(obsId: Observation.Id, dataId: DataId): F[Boolean] = false.pure[F]
Expand Down
2 changes: 1 addition & 1 deletion modules/server/src/main/scala/seqexec/server/Systems.scala
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ object Systems {

(igrins2Client, igrins2GDS(httpClient)).mapN(Igrins2Controller(_, _))
}
def gws: IO[GwsKeywordReader[IO]] =
def gws: IO[GwsKeywordReader[IO]] =
if (settings.systemControl.gws.realKeywords)
GwsEpics.instance[IO](service, tops).map(GwsKeywordsReaderEpics[IO])
else DummyGwsKeywordsReader[IO].pure[IO]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ object GmosKeywordReaderEpics {
override def gratingAdjustedWavelength: F[Double] = sys.disperserWavel
override def gratingOrder: F[Int] = sys.disperserOrder
override def gratingTilt: F[Double] = sys.gratingTilt
override def gratingStep: F[Double] =
override def gratingStep: F[Double] =
// Set the value to the epics channel if inBeam is 1
sys.disperserInBeam.map(_ === 1).ifM(sys.reqGratingMotorSteps, doubleDefault[F])
override def dtaX: F[Double] = sys.dtaX
Expand Down
2 changes: 1 addition & 1 deletion modules/server/src/main/scala/seqexec/server/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ package server {
sequences: Map[Observation.Id, SequenceData[F]]
)

object EngineState {
object EngineState {
def default[F[_]]: EngineState[F] =
EngineState[F](
Map(CalibrationQueueId -> ExecutionQueue.init(CalibrationQueueName)),
Expand Down
2 changes: 1 addition & 1 deletion modules/server/src/main/scala/seqexec/server/tcs/Tcs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ object Tcs {
def calcGuiderConfig(
inUse: Boolean,
guideWith: Option[StandardGuideOptions.Value]
): GuiderConfig =
): GuiderConfig =
guideWith
.flatMap(v => inUse.option(GuiderConfig(v.toProbeTracking, v.toGuideSensorOption)))
.getOrElse(defaultGuiderConf)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class TcsNorth[F[_]: Sync: Logger] private (
val defaultGuiderConf: GuiderConfig = GuiderConfig(ProbeTrackingConfig.Parked, GuiderSensorOff)
def calcGuiderConfig(
guideWith: Option[StandardGuideOptions.Value]
): GuiderConfig =
): GuiderConfig =
guideWith
.map(v => GuiderConfig(v.toProbeTracking, v.toGuideSensorOption))
.getOrElse(defaultGuiderConf)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class TcsSouthControllerSim[F[_]: Applicative: Logger] private extends TcsSouthC

override def notifyObserveStart: F[Unit] = sim.notifyObserveStart

override def notifyObserveEnd: F[Unit] = sim.notifyObserveEnd
override def notifyObserveEnd: F[Unit] = sim.notifyObserveEnd
override def nod(
subsystems: NonEmptySet[Subsystem],
tcsConfig: TcsSouthConfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package handlers {
trait Handlers[M, T] { this: ActionHandler[M, T] =>
implicit def pfMonoid[A, B]: Monoid[PartialFunction[A, B]] =
new Monoid[PartialFunction[A, B]] {
override def empty = PartialFunction.empty[A, B]
override def empty = PartialFunction.empty[A, B]
override def combine(
x: PartialFunction[A, B],
y: PartialFunction[A, B]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ object Formatting {
)
}
.foldLeft((0.0, 0.0, 0.0)) { case ((ow1, aw1, nw1), (ow2, aw2, nw2)) =>
((ow1.max(ow2), aw1.max(aw2), nw1.max(nw2)))
(ow1.max(ow2), aw1.max(aw2), nw1.max(nw2))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ final case class SequencesOnDisplay(tabs: Zipper[SeqexecTab]) {
// PreviewSequenceTab.tableState.modify(tsUpd) >>>
PreviewSequenceTab.currentSequence.replace(s) >>>
PreviewSequenceTab.stepConfig.replace(None)
val q = withPreviewTab(s).tabs
val q = withPreviewTab(s).tabs
.findFocus(_.isPreview)
.map(_.modify(SeqexecTab.previewTab.modify(update)))
q
Expand Down
Loading
0