Skip to content

Commit

Permalink
Preparation for PIT 2024B
Browse files Browse the repository at this point in the history
  • Loading branch information
cquiroz committed Jan 22, 2024
1 parent 6556401 commit 6be40b7
Show file tree
Hide file tree
Showing 10 changed files with 232 additions and 46 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@ metals.sbt

#FR IDE
.Trash-3906/
bundle/*/project
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),
v2023A(ov, pv),
v2023B(ov, pv),
v2024A(ov, pv)
v2024A(ov, pv),
v2024B(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))

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

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

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

4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name := "ocs"
organization in Global := "edu.gemini.ocs"

// true indicates a test release, and false indicates a production release
ocsVersion in ThisBuild := OcsVersion("2023B", true, 1, 1, 1)
ocsVersion in ThisBuild := OcsVersion("2024A", true, 1, 1, 2)

pitVersion in ThisBuild := OcsVersion("2024A", false, 1, 1, 0)
pitVersion in ThisBuild := OcsVersion("2024B", true, 1, 1, 0)

// 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 = 2024
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("2024.1.1")
proposal.schemaVersion must beEqualTo("2024.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" -> "2024", "half" -> "A")
xml must \\("semester", "year" -> "2024", "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" -> "2024.1.1")
xml must \\("proposal", "schemaVersion" -> "2024.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", "2024.1.1")
System.setProperty("edu.gemini.model.p1.schemaVersion", "2024.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(2024, SemesterOption.A))
Semester.current must beEqualTo(Semester(2024, 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(2024, SemesterOption.A))
proposal.semester must beEqualTo(Semester(2024, 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>smtp.hi.gemini.edu</smtp>

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

<type name="FastTurnaround">
<dir>/home/software/proposals/fast_turnaround/proposals/2023A</dir>
<to>[email protected]</to>
</type>

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

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

<type name="DemoScience">
<dir>/home/software/proposals/demo_science/proposals/2023A</dir>
<to>[email protected]</to>
</type>

<type name="SystemVerification">
<dir>/home/software/proposals/system_verification/proposals/2023A</dir>
<to>[email protected]</to>
</type>

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

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

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

<type name="ar">
<dir>/home/software/proposals/ar/proposals/2023A</dir>
<to>[email protected]</to>
</type>

<type name="br">
<dir>/home/software/proposals/br/proposals/2023A</dir>
<to>[email protected]</to>
</type>

<type name="ca">
<dir>/home/software/proposals/ca/proposals/2023A</dir>
<to>[email protected]</to>
</type>

<type name="cfh">
<dir>/home/software/proposals/cfh/proposals/2023A</dir>
<to>[email protected]</to>
</type>

<type name="cl">
<dir>/home/software/proposals/cl/proposals/2023A</dir>
<to>[email protected]</to>
<template>cl</template>
</type>

<type name="kr">
<dir>/home/software/proposals/kr/proposals/2023A</dir>
<to>[email protected]</to>
</type>

<type name="uh">
<dir>/home/software/proposals/uh/proposals/2023A</dir>
<to>[email protected]</to>
</type>

<type name="us">
<dir>/home/software/proposals/us/proposals/2023A</dir>
<to>[email protected]</to>
</type>

<type name="subaru">
<dir>/home/software/proposals/subaru/proposals/2023A</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>

0 comments on commit 6be40b7

Please sign in to comment.