Skip to content

Commit

Permalink
Merge pull request #2318 from gemini-hlsw/REL-4617
Browse files Browse the repository at this point in the history
Rel 4617
  • Loading branch information
cquiroz authored Jan 16, 2025
2 parents 8528ff2 + 43a2f94 commit 4f89bb7
Show file tree
Hide file tree
Showing 13 changed files with 234 additions and 48 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,4 @@ metals.sbt
#FR IDE
.Trash-3906/
bundle/*/project
.direnv
28 changes: 14 additions & 14 deletions app/p1-monitor/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ ocsAppManifest := {
common(ov, pv),
dev(ov, pv),
staging(ov, pv),
v2024A(ov, pv),
v2024B(ov, pv),
v2025A(ov, pv)
v2025A(ov, pv),
v2025B(ov, pv)
)
)
}
Expand Down Expand Up @@ -79,18 +79,6 @@ def staging(ov: Version, pv: Version) = AppConfig(
distribution = List(Linux32, Linux64)
) extending List(common(ov, pv))

// 2024A
def v2024A(ov: Version, pv: Version) = AppConfig(
id = "2024A",
props = Map(
"org.osgi.framework.storage" -> "${user.home}/.edu.gemini.p1monitor.2024A/felix-cache",
"p1monitor.config" -> "conf.production-2024A.xml",
"org.osgi.service.http.port" -> "9009",
"p1monitor.host" -> "phase1.gemini.edu"
),
distribution = List(Linux64)
) extending List(common(ov, pv))

// 2024B
def v2024B(ov: Version, pv: Version) = AppConfig(
id = "2024B",
Expand All @@ -115,3 +103,15 @@ def v2025A(ov: Version, pv: Version) = AppConfig(
distribution = List(Linux32, Linux64)
) extending List(common(ov, pv))

// 2025B
def v2025B(ov: Version, pv: Version) = AppConfig(
id = "2025B",
props = Map(
"org.osgi.framework.storage" -> "${user.home}/.edu.gemini.p1monitor.2025B/felix-cache",
"p1monitor.config" -> "conf.production-2025B.xml",
"org.osgi.service.http.port" -> "9009",
"p1monitor.host" -> "phase1.gemini.edu"
),
distribution = List(Linux64)
) extending List(common(ov, pv))

Binary file modified app/pit/dist/MacOS/PIT.icns
Binary file not shown.
Binary file modified app/pit/dist/Windows/PIT.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ organization in Global := "edu.gemini.ocs"
// true indicates a test release, and false indicates a production release
ocsVersion in ThisBuild := OcsVersion("2025A", true, 1, 1, 1)

pitVersion in ThisBuild := OcsVersion("2025A", true, 1, 1, 1)
pitVersion in ThisBuild := OcsVersion("2025B", true, 1, 1, 1)

// Bundles by default use the ocsVersion; this is overridden in bundles used only by the PIT
version in ThisBuild := ocsVersion.value.toOsgiVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import java.util.{Calendar, TimeZone}
object Semester {

lazy val year = 2025
lazy val semesterOption: SemesterOption = SemesterOption.A
lazy val semesterOption: SemesterOption = SemesterOption.B

lazy val current: Semester = Semester(year, semesterOption)

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ProposalSpec extends Specification with SemesterProperties with XmlMatcher
}
"use a schema version read from System properties" in {
val proposal = Proposal.empty
proposal.schemaVersion must beEqualTo("2025.1.1")
proposal.schemaVersion must beEqualTo("2025.2.1")
}
"set the band3optionChosen by default to false" in {
val proposal = Proposal.empty
Expand Down Expand Up @@ -49,15 +49,15 @@ class ProposalSpec extends Specification with SemesterProperties with XmlMatcher
val xml = XML.loadString(ProposalIo.writeToString(proposal))

// verify the exported value is set to the current semester
xml must \\("semester", "year" -> "2025", "half" -> "A")
xml must \\("semester", "year" -> "2025", "half" -> "B")
}
"set the schemaVersion to current upon saving a new proposal" in {
val proposal = Proposal.empty

val xml = XML.loadString(ProposalIo.writeToString(proposal))

// verify the exported value is set to the current semester
xml must \\("proposal", "schemaVersion" -> "2025.1.1")
xml must \\("proposal", "schemaVersion" -> "2025.2.1")
}
"be able to open latin1 encoded files" in {
val proposal = ProposalIo.read(new InputStreamReader(getClass.getResourceAsStream("proposal_with_latin1_encoding.xml")))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package edu.gemini.model.p1.immutable

trait SemesterProperties {
System.setProperty("edu.gemini.model.p1.schemaVersion", "2025.1.1")
System.setProperty("edu.gemini.model.p1.schemaVersion", "2025.2.1")
}

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import java.io.InputStreamReader
class SemesterSpec extends Specification {
"The Semester class" should {
"have a default" in {
Semester.current must beEqualTo(Semester(2025, SemesterOption.A))
Semester.current must beEqualTo(Semester(2025, SemesterOption.B))
}
"deserialize any semester" in {
val proposal = ProposalIo.read(new InputStreamReader(getClass.getResourceAsStream("proposal_with_old_semester.xml")))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class UpConverterSpec extends Specification with SemesterProperties with XmlMatc
i.visitor must beFalse
}

proposal.semester must beEqualTo(Semester(2025, SemesterOption.A))
proposal.semester must beEqualTo(Semester(2025, SemesterOption.B))
}

UpConverter.upConvert(xml) must beSuccessful.like {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
<conf>
<smtp>lscmrelay-lv1.noirlab.edu</smtp>

<bcc>[email protected]</bcc>
<bcc>[email protected]</bcc>
<bcc>[email protected]</bcc>
<bcc>[email protected]</bcc>

<type name="FastTurnaround">
<dir>/home/software/test_proposals/fast_turnaround/proposals/2025B</dir>
<to>[email protected]</to>
</type>

<type name="DirectorTime">
<dir>/home/software/test_proposals/directors_time/proposals/2025B</dir>
<to>[email protected]</to>
<template>dt</template>
</type>

<type name="PoorWeather">
<dir>/home/software/test_proposals/poor_weather/proposals/2025B</dir>
<to>[email protected]</to>
<template>pw</template>
</type>

<type name="DemoScience">
<dir>/home/software/test_proposals/demo_science/proposals/2025B</dir>
<to>[email protected]</to>
</type>

<type name="SystemVerification">
<dir>/home/software/test_proposals/system_verification/proposals/2025B</dir>
<to>[email protected]</to>
</type>

<type name="GuaranteedTime">
<dir>/home/software/test_proposals/guaranteed_time/proposals/2025B</dir>
<to>[email protected]</to>
<template>gt</template>
</type>

<type name="LargeProgram">
<dir>/home/software/test_proposals/large_program/proposals/2025B</dir>
<to>[email protected]</to>
<template>lp</template>
</type>

<type name="SIP">
<dir>/home/software/test_proposals/subaru_intensive_program/proposals/2025B</dir>
<to>[email protected]</to>
<template>sip</template>
</type>

<type name="ar">
<dir>/home/software/test_proposals/ar/proposals/2025B</dir>
<to>[email protected]</to>
</type>

<type name="br">
<dir>/home/software/test_proposals/br/proposals/2025B</dir>
<to>[email protected]</to>
</type>

<type name="ca">
<dir>/home/software/test_proposals/ca/proposals/2025B</dir>
<to>[email protected]</to>
</type>

<type name="cfh">
<dir>/home/software/test_proposals/cfh/proposals/2025B</dir>
<to>[email protected]</to>
</type>

<type name="cl">
<dir>/home/software/test_proposals/cl/proposals/2025B</dir>
<to>[email protected]</to>
<template>cl</template>
</type>

<type name="kr">
<dir>/home/software/test_proposals/kr/proposals/2025B</dir>
<to>[email protected]</to>
</type>

<type name="uh">
<dir>/home/software/test_proposals/uh/proposals/2025B</dir>
<to>[email protected]</to>
</type>

<type name="us">
<dir>/home/software/test_proposals/us/proposals/2025B</dir>
<to>[email protected]</to>
</type>

<type name="subaru">
<dir>/home/software/test_proposals/subaru/proposals/2025B</dir>
<to>[email protected]</to>
</type>

<filetranslation>
<translation>
<from>ft</from>
<to>FT</to>
</translation>
<translation>
<from>System Verification</from>
<to>SV</to>
</translation>
<translation>
<from>Guaranteed Time</from>
<to>GT</to>
</translation>
<translation>
<from>Poor Weather</from>
<to>PW</to>
</translation>
<translation>
<from>Directors Time</from>
<to>DT</to>
</translation>
<translation>
<from>Demo Science</from>
<to>DS</to>
</translation>
<translation>
<from>lp</from>
<to>LP</to>
</translation>
<translation>
<from>ar</from>
<to>AR</to>
</translation>
<translation>
<from>au</from>
<to>AU</to>
</translation>
<translation>
<from>br</from>
<to>BR</to>
</translation>
<translation>
<from>ca</from>
<to>CA</to>
</translation>
<translation>
<from>cl</from>
<to>CL</to>
</translation>
<translation>
<from>cfh</from>
<to>CFH</to>
</translation>
<translation>
<from>kr</from>
<to>KR</to>
</translation>
<translation>
<from>sip</from>
<to>SIP</to>
</translation>
<translation>
<from>us</from>
<to>US</to>
</translation>
<translation>
<from>uh</from>
<to>UH</to>
</translation>
<translation>
<from>subaru</from>
<to>SUBARU</to>
</translation>
</filetranslation>

</conf>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4f89bb7

Please sign in to comment.