Skip to content

Commit

Permalink
Merge pull request #10 from ivoa/alternativeSubmitted
Browse files Browse the repository at this point in the history
make submitted proposal subtype of observing proposal
  • Loading branch information
pahjbo authored Nov 25, 2024
2 parents 211e920 + b4b64e7 commit 432eb4f
Show file tree
Hide file tree
Showing 16 changed files with 138 additions and 154 deletions.
54 changes: 0 additions & 54 deletions .github/workflows/build.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
distribution: 'adopt'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
uses: gradle/actions/setup-gradle@v4

- name: Run the tests
run: |
Expand Down
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@

plugins {
id("net.ivoa.vo-dml.vodmltools") version "0.5.10"
id("net.ivoa.vo-dml.vodmltools") version "0.5.12"
`maven-publish`
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
signing

}

group = "org.javastro.ivoa.dm"
version = "0.6.1-SNAPSHOT"
version = "0.6.2-SNAPSHOT"


vodml {
Expand Down Expand Up @@ -120,7 +120,7 @@ dependencies {

testImplementation("com.h2database:h2:2.1.214") // try out h2
// testImplementation("org.apache.derby:derby:10.14.2.0")
testImplementation("org.javastro:jaxbjpa-utils:0.1.2")
testImplementation("org.javastro:jaxbjpa-utils:0.2.3")

testRuntimeOnly("org.postgresql:postgresql:42.3.3")
}
Expand Down
19 changes: 5 additions & 14 deletions src/main/vo-dml/proposalManagement.vo-dml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<title>Proposal Management</title>
<author>Paul Harrison</author>
<version>0.6</version>
<lastModified>2024-10-29T12:22:58Z</lastModified>
<lastModified>2024-11-18T20:47:38Z</lastModified>
<import>
<name>null</name><!--should not be needed in modern vo-dml -->
<url>IVOA-v1.0.vo-dml.xml</url>
Expand Down Expand Up @@ -683,18 +683,9 @@
<vodml-id>SubmittedProposal</vodml-id>
<name>SubmittedProposal</name>
<description>an instance of a proposal that has been submitted</description>
<reference>
<vodml-id>SubmittedProposal.proposal</vodml-id>
<name>proposal</name>
<description>the proposal that was submitted</description>
<datatype>
<vodml-ref>proposal:ObservingProposal</vodml-ref>
</datatype>
<multiplicity>
<minOccurs>1</minOccurs>
<maxOccurs>1</maxOccurs>
</multiplicity>
</reference>
<extends>
<vodml-ref>proposal:AbstractProposal</vodml-ref>
</extends>
<composition>
<vodml-id>SubmittedProposal.config</vodml-id>
<name>config</name>
Expand Down Expand Up @@ -751,7 +742,7 @@
<vodml-ref>proposalManagement:ProposalReview</vodml-ref>
</datatype>
<multiplicity>
<minOccurs>1</minOccurs>
<minOccurs>0</minOccurs>
<maxOccurs>-1</maxOccurs>
</multiplicity>
</composition>
Expand Down
58 changes: 27 additions & 31 deletions src/main/vo-dml/proposaldm.vo-dml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<title>Proposal</title>
<author>Paul Harrison</author>
<version>0.6</version>
<lastModified>2024-11-01T15:05:39Z</lastModified>
<lastModified>2024-11-19T14:08:21Z</lastModified>
<import>
<name>null</name><!--should not be needed in modern vo-dml -->
<url>IVOA-v1.0.vo-dml.xml</url>
Expand Down Expand Up @@ -196,12 +196,12 @@
</multiplicity>
</attribute>
</dataType>
<objectType>
<vodml-id>ObservingProposal</vodml-id>
<name>ObservingProposal</name>
<description>a complete proposal</description>
<objectType abstract="true">
<vodml-id>AbstractProposal</vodml-id>
<name>AbstractProposal</name>
<description>base proposal</description>
<attribute>
<vodml-id>ObservingProposal.title</vodml-id>
<vodml-id>AbstractProposal.title</vodml-id>
<name>title</name>
<description>the proposal title</description>
<datatype>
Expand All @@ -213,7 +213,7 @@
</multiplicity>
</attribute>
<attribute>
<vodml-id>ObservingProposal.summary</vodml-id>
<vodml-id>AbstractProposal.summary</vodml-id>
<name>summary</name>
<description>a short summary/abstract of the proposal</description>
<datatype>
Expand All @@ -225,7 +225,7 @@
</multiplicity>
</attribute>
<composition>
<vodml-id>ObservingProposal.scientificJustification</vodml-id>
<vodml-id>AbstractProposal.scientificJustification</vodml-id>
<name>scientificJustification</name>
<description>scientific justification</description>
<datatype>
Expand All @@ -237,7 +237,7 @@
</multiplicity>
</composition>
<composition>
<vodml-id>ObservingProposal.technicalJustification</vodml-id>
<vodml-id>AbstractProposal.technicalJustification</vodml-id>
<name>technicalJustification</name>
<description>technical justification</description>
<datatype>
Expand All @@ -249,7 +249,7 @@
</multiplicity>
</composition>
<composition>
<vodml-id>ObservingProposal.investigators</vodml-id>
<vodml-id>AbstractProposal.investigators</vodml-id>
<name>investigators</name>
<description>the person(s) making the proposal</description>
<datatype>
Expand All @@ -261,7 +261,7 @@
</multiplicity>
</composition>
<attribute>
<vodml-id>ObservingProposal.kind</vodml-id>
<vodml-id>AbstractProposal.kind</vodml-id>
<name>kind</name>
<description>the type of proposal</description>
<datatype>
Expand All @@ -273,7 +273,7 @@
</multiplicity>
</attribute>
<composition>
<vodml-id>ObservingProposal.relatedProposals</vodml-id>
<vodml-id>AbstractProposal.relatedProposals</vodml-id>
<name>relatedProposals</name>
<description></description>
<datatype>
Expand All @@ -285,7 +285,7 @@
</multiplicity>
</composition>
<composition>
<vodml-id>ObservingProposal.supportingDocuments</vodml-id>
<vodml-id>AbstractProposal.supportingDocuments</vodml-id>
<name>supportingDocuments</name>
<description>any additional documents</description>
<datatype>
Expand All @@ -298,7 +298,7 @@
<isOrdered>true</isOrdered>
</composition>
<composition>
<vodml-id>ObservingProposal.targets</vodml-id>
<vodml-id>AbstractProposal.targets</vodml-id>
<name>targets</name>
<description>the targets of the proposal</description>
<datatype>
Expand All @@ -310,7 +310,7 @@
</multiplicity>
</composition>
<composition>
<vodml-id>ObservingProposal.fields</vodml-id>
<vodml-id>AbstractProposal.fields</vodml-id>
<name>fields</name>
<description>the fields observed in the proposal</description>
<datatype>
Expand All @@ -322,7 +322,7 @@
</multiplicity>
</composition>
<composition>
<vodml-id>ObservingProposal.technicalGoals</vodml-id>
<vodml-id>AbstractProposal.technicalGoals</vodml-id>
<name>technicalGoals</name>
<description>the technical goals of the proposal</description>
<datatype>
Expand All @@ -335,7 +335,7 @@
<isOrdered>true</isOrdered>
</composition>
<composition>
<vodml-id>ObservingProposal.observations</vodml-id>
<vodml-id>AbstractProposal.observations</vodml-id>
<name>observations</name>
<description>the proposed observations</description>
<datatype>
Expand All @@ -347,18 +347,14 @@
</multiplicity>
<isOrdered>true</isOrdered>
</composition>
<attribute>
<vodml-id>ObservingProposal.submitted</vodml-id>
<name>submitted</name>
<description>whether the proposal is submitted</description>
<datatype>
<vodml-ref>ivoa:boolean</vodml-ref>
</datatype>
<multiplicity>
<minOccurs>0</minOccurs>
<maxOccurs>1</maxOccurs>
</multiplicity>
</attribute>
</objectType>
<objectType>
<vodml-id>ObservingProposal</vodml-id>
<name>ObservingProposal</name>
<description>a complete proposal</description>
<extends>
<vodml-ref>proposal:AbstractProposal</vodml-ref>
</extends>
</objectType>
<objectType>
<vodml-id>RelatedProposal</vodml-id>
Expand All @@ -369,7 +365,7 @@
<name>proposal</name>
<description>the related proposal</description>
<datatype>
<vodml-ref>proposal:ObservingProposal</vodml-ref>
<vodml-ref>proposal:AbstractProposal</vodml-ref>
</datatype>
<multiplicity>
<minOccurs>1</minOccurs>
Expand Down Expand Up @@ -504,7 +500,7 @@
<name>ivoid</name>
<description>the registry identifier for the organization</description>
<datatype>
<vodml-ref>ivoa:ivorn</vodml-ref>
<vodml-ref>ivoa:ivoid</vodml-ref>
</datatype>
<multiplicity>
<minOccurs>0</minOccurs>
Expand Down
6 changes: 3 additions & 3 deletions src/main/vodsl/proposalManagement.vodsl
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@
mode references ObservingMode "The observing mode"; //IMPL this is what allows the observation to be tied to multiple observatories.
}

otype SubmittedProposal "an instance of a proposal that has been submitted" {
proposal references proposal:ObservingProposal "the proposal that was submitted"; //IMPL this is a reference - this is a slight hack as we really want a composition to "freeze" the original proposal - this messes with the original references in the proposal as then they become contained.
otype SubmittedProposal -> proposal:AbstractProposal "an instance of a proposal that has been submitted" {
// proposal references proposal:ObservingProposal "the proposal that was submitted"; //IMPL this is a reference - this is a slight hack as we really want a composition to "freeze" the original proposal - this messes with the original references in the proposal as then they become contained.
config : ObservationConfiguration @* as composition "";
submissionDate : ivoa:datetime "the date that the proposal was submitted";
successful : ivoa:boolean "the proposal can go on to allocation";
reviewsCompleteDate : ivoa:datetime "the date when all the proposals are due";
reviews : ProposalReview @+ as composition "the reviews";
reviews : ProposalReview @* as composition "the reviews";
}


Expand Down
13 changes: 9 additions & 4 deletions src/main/vodsl/proposaldm.vodsl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ observations, although the intention is that information about targets etc. coul
Survey "Part of a large programme"
}

otype ObservingProposal "a complete proposal"
abstract otype AbstractProposal "base proposal"
{
^title: ivoa:string "the proposal title" ;
summary: ivoa:string "a short summary/abstract of the proposal" ;
Expand All @@ -35,13 +35,18 @@ observations, although the intention is that information about targets etc. coul
fields: Field @* as composition "the fields observed in the proposal";
technicalGoals: TechnicalGoal @+ as ordered composition "the technical goals of the proposal";
observations : Observation @+ as ordered composition "the proposed observations";
submitted: ivoa:boolean @? "whether the proposal is submitted"; //note that submitted proposals are not expected to be editable.. made optional to allow for not setting for not submitted proposals
// submitted: ivoa:boolean @? "whether the proposal is submitted"; //note that submitted proposals are not expected to be editable.. made optional to allow for not setting for not submitted proposals

}

otype ObservingProposal -> AbstractProposal "a complete proposal" {

}


otype RelatedProposal "a related proposal" // note that this is being done to follow the vodml aggregation pattern
{
proposal references ObservingProposal "the related proposal" ;
proposal references AbstractProposal "the related proposal" ;
//IMPL could also put information about the type of relationship
}

Expand Down Expand Up @@ -71,7 +76,7 @@ observations, although the intention is that information about targets etc. coul
{
name: ivoa:string "The name of the organization";
address : ivoa:string "";
ivoid : ivoa:ivorn @? "the registry identifier for the organization"; // IMPL perhaps do this more
ivoid : ivoa:ivoid @? "the registry identifier for the organization"; // IMPL perhaps do this more
wikiId : WikiDataId @? "the wikidata id for the Organization";

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,10 @@ public static ObservingProposal cloneProposal(ObservingProposal p)
private ProposalCycle doTacWork() {
final ProposalCycle cycle = ex.getCycle();
ObservingProposal prop = ex.getProposal();
SubmittedProposal sprop = ex.submitProposal(cloneProposal(prop));
ProposalModel pm = new ProposalModel();
pm.createContext();
SubmittedProposal sprop = ex.submitProposal(prop);
sprop.updateClonedReferences();
ex.allocateProposal(sprop);
return cycle;

Expand Down
Loading

0 comments on commit 432eb4f

Please sign in to comment.