diff --git a/.github/workflows/package-release.yml b/.github/workflows/package-release.yml
new file mode 100644
index 0000000..21c5069
--- /dev/null
+++ b/.github/workflows/package-release.yml
@@ -0,0 +1,67 @@
+name: Package Release
+on:
+ push:
+ branches:
+ - 'main'
+ paths:
+ - 'package.json'
+permissions:
+ contents: write
+jobs:
+ Package-Artifacts:
+ runs-on: ubuntu-latest
+ steps:
+ # Checkout source code
+ - id: checkout-code
+ name: Checkout code
+ uses: actions/checkout@v3
+ with:
+ path: package
+ # Extract package json
+ - id: json
+ name: Extract package json
+ run: |
+ package_json=`cat package/package.json`
+ package_json="${package_json//$'\n'/''}"
+ package_json="${package_json//$'\r'/''}"
+ echo "package_json=$package_json" >> $GITHUB_OUTPUT
+ # Extract package version
+ - id: version
+ name: Extract version
+ run: |
+ echo ${{ steps.json.outputs.package_json }}
+ package_version="${{fromJson(steps.json.outputs.package_json).version}}"
+ package_name="${{fromJson(steps.json.outputs.package_json).name}}"
+ echo "package_version=$package_version" >> $GITHUB_OUTPUT
+ echo "package_tag=v$package_version" >> $GITHUB_OUTPUT
+ echo "package_name=$package_name" >> $GITHUB_OUTPUT
+ if [[ $package_version == 0.* ]] ;
+ then
+ echo "prerelease=true" >> $GITHUB_OUTPUT
+ else
+ echo "prerelease=false" >> $GITHUB_OUTPUT
+ fi
+ - id: latesttag
+ name: Get latest tag
+ working-directory: ./package
+ run: |
+ latest_tag=$(git tag -l | sort -V --reverse | sed -n 2p)
+ echo "latest_tag=$latest_tag" >> $GITHUB_OUTPUT
+ # Rename and tar package
+ - id: prepare-package
+ name: Prepare package
+ if: ${{ steps.latesttag.outputs.latest_tag != steps.version.outputs.package_tag }}
+ run: |
+ tar -czvf "${{steps.version.outputs.package_name}}.tgz" package
+ # Upload artifact
+ - id: create-release
+ name: GH Release
+ if: ${{ steps.latesttag.outputs.latest_tag != steps.version.outputs.package_tag }}
+ uses: softprops/action-gh-release@v0.1.15
+ with:
+ name: Release ${{ steps.version.outputs.package_version }}
+ tag_name: ${{ steps.version.outputs.package_tag }}
+ generate_release_notes: true
+ prerelease: ${{ steps.version.outputs.prerelease }}
+ files: |
+ ${{steps.version.outputs.package_name}}.tgz
diff --git a/Runtime/Libs/Dev.Dres.ClientApi.dll b/Runtime/Libs/Dev.Dres.ClientApi.dll
index 949d9c5..d820b0a 100755
Binary files a/Runtime/Libs/Dev.Dres.ClientApi.dll and b/Runtime/Libs/Dev.Dres.ClientApi.dll differ
diff --git a/Runtime/Libs/Dev.Dres.ClientApi.xml b/Runtime/Libs/Dev.Dres.ClientApi.xml
index f41aff7..dbb695d 100644
--- a/Runtime/Libs/Dev.Dres.ClientApi.xml
+++ b/Runtime/Libs/Dev.Dres.ClientApi.xml
@@ -2089,7 +2089,7 @@
Initializes a new instance of the class.
-
+
Initializes a new instance of the class.
@@ -2864,7 +2864,7 @@
Initializes a new instance of the class.
-
+
Initializes a new instance of the class.
@@ -2874,8 +2874,7 @@
description.
path.
dataType.
- mediaItem.
- mediaItemName.
+ item.
range.
@@ -2903,14 +2902,9 @@
Gets or Sets DataType
-
-
- Gets or Sets MediaItem
-
-
-
+
- Gets or Sets MediaItemName
+ Gets or Sets Item
@@ -3262,7 +3256,7 @@
Initializes a new instance of the class.
-
+
Initializes a new instance of the class.
@@ -3277,6 +3271,7 @@
teams (required).
teamGroups (required).
judges (required).
+ viewers (required).
@@ -3333,6 +3328,11 @@
Gets or Sets Judges
+
+
+ Gets or Sets Viewers
+
+
Returns the string presentation of the object
@@ -4659,7 +4659,7 @@
ApiClientAnswer
-
+
Initializes a new instance of the class.
@@ -4970,14 +4970,14 @@
Initializes a new instance of the class.
-
+
Initializes a new instance of the class.
type (required).
target.
range.
- name.
+ item.
@@ -4989,9 +4989,9 @@
Gets or Sets Range
-
+
- Gets or Sets Name
+ Gets or Sets Item
@@ -6081,40 +6081,6 @@
Represents a collection of functions to interact with the API endpoints
-
-
- Endpoint to accept submissions
-
-
- This has been the submission endpoint for version 1. Please refrain from using it and migrate to the v2 endpoint.
-
- Thrown when fails to make API call
- Collection identifier. Optional, in which case the default collection for the run will be considered. (optional)
- Identifier for the actual media object or media file. (optional)
- Text to be submitted. ONLY for tasks with target type TEXT. If this parameter is provided, it superseeds all athers. (optional)
- Frame number for media with temporal progression (e.g., video). (optional)
- Shot number for media with temporal progression (e.g., video). (optional)
- Timecode for media with temporal progression (e.g,. video). (optional)
- Session Token (optional)
- SuccessfulSubmissionsStatus
-
-
-
- Endpoint to accept submissions
-
-
- This has been the submission endpoint for version 1. Please refrain from using it and migrate to the v2 endpoint.
-
- Thrown when fails to make API call
- Collection identifier. Optional, in which case the default collection for the run will be considered. (optional)
- Identifier for the actual media object or media file. (optional)
- Text to be submitted. ONLY for tasks with target type TEXT. If this parameter is provided, it superseeds all athers. (optional)
- Frame number for media with temporal progression (e.g., video). (optional)
- Shot number for media with temporal progression (e.g., video). (optional)
- Timecode for media with temporal progression (e.g,. video). (optional)
- Session Token (optional)
- ApiResponse of SuccessfulSubmissionsStatus
-
Endpoint to accept submissions.
@@ -6124,7 +6090,7 @@
Thrown when fails to make API call
The ID of the evaluation the submission belongs to.
-
+ Some notes regarding the submission format. At least one answerSet is required, taskId, taskName are inferred if not provided, at least one answer is required, mediaItemCollectionName is inferred if not provided, start and end should be provided in milliseconds.For most evaluation setups, an answer is built in one of the three following ways: A) only text is required: just provide the text property with a meaningful entry B) only a mediaItemName is required: just provide the mediaItemName, optionally with the collection name. C) a specific portion of a mediaItem is required: provide mediaItemName, start and end, optionally with collection name
Session Token (optional)
SuccessfulSubmissionsStatus
@@ -6137,46 +6103,10 @@
Thrown when fails to make API call
The ID of the evaluation the submission belongs to.
-
+ Some notes regarding the submission format. At least one answerSet is required, taskId, taskName are inferred if not provided, at least one answer is required, mediaItemCollectionName is inferred if not provided, start and end should be provided in milliseconds.For most evaluation setups, an answer is built in one of the three following ways: A) only text is required: just provide the text property with a meaningful entry B) only a mediaItemName is required: just provide the mediaItemName, optionally with the collection name. C) a specific portion of a mediaItem is required: provide mediaItemName, start and end, optionally with collection name
Session Token (optional)
ApiResponse of SuccessfulSubmissionsStatus
-
-
- Endpoint to accept submissions
-
-
- This has been the submission endpoint for version 1. Please refrain from using it and migrate to the v2 endpoint.
-
- Thrown when fails to make API call
- Collection identifier. Optional, in which case the default collection for the run will be considered. (optional)
- Identifier for the actual media object or media file. (optional)
- Text to be submitted. ONLY for tasks with target type TEXT. If this parameter is provided, it superseeds all athers. (optional)
- Frame number for media with temporal progression (e.g., video). (optional)
- Shot number for media with temporal progression (e.g., video). (optional)
- Timecode for media with temporal progression (e.g,. video). (optional)
- Session Token (optional)
- Cancellation Token to cancel request (optional)
- Task of SuccessfulSubmissionsStatus
-
-
-
- Endpoint to accept submissions
-
-
- This has been the submission endpoint for version 1. Please refrain from using it and migrate to the v2 endpoint.
-
- Thrown when fails to make API call
- Collection identifier. Optional, in which case the default collection for the run will be considered. (optional)
- Identifier for the actual media object or media file. (optional)
- Text to be submitted. ONLY for tasks with target type TEXT. If this parameter is provided, it superseeds all athers. (optional)
- Frame number for media with temporal progression (e.g., video). (optional)
- Shot number for media with temporal progression (e.g., video). (optional)
- Timecode for media with temporal progression (e.g,. video). (optional)
- Session Token (optional)
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (SuccessfulSubmissionsStatus)
-
Endpoint to accept submissions.
@@ -6186,7 +6116,7 @@
Thrown when fails to make API call
The ID of the evaluation the submission belongs to.
-
+ Some notes regarding the submission format. At least one answerSet is required, taskId, taskName are inferred if not provided, at least one answer is required, mediaItemCollectionName is inferred if not provided, start and end should be provided in milliseconds.For most evaluation setups, an answer is built in one of the three following ways: A) only text is required: just provide the text property with a meaningful entry B) only a mediaItemName is required: just provide the mediaItemName, optionally with the collection name. C) a specific portion of a mediaItem is required: provide mediaItemName, start and end, optionally with collection name
Session Token (optional)
Cancellation Token to cancel request (optional)
Task of SuccessfulSubmissionsStatus
@@ -6200,7 +6130,7 @@
Thrown when fails to make API call
The ID of the evaluation the submission belongs to.
-
+ Some notes regarding the submission format. At least one answerSet is required, taskId, taskName are inferred if not provided, at least one answer is required, mediaItemCollectionName is inferred if not provided, start and end should be provided in milliseconds.For most evaluation setups, an answer is built in one of the three following ways: A) only text is required: just provide the text property with a meaningful entry B) only a mediaItemName is required: just provide the mediaItemName, optionally with the collection name. C) a specific portion of a mediaItem is required: provide mediaItemName, start and end, optionally with collection name
Session Token (optional)
Cancellation Token to cancel request (optional)
Task of ApiResponse (SuccessfulSubmissionsStatus)
@@ -6267,71 +6197,13 @@
Header field value.
-
-
- Endpoint to accept submissions This has been the submission endpoint for version 1. Please refrain from using it and migrate to the v2 endpoint.
-
- Thrown when fails to make API call
- Collection identifier. Optional, in which case the default collection for the run will be considered. (optional)
- Identifier for the actual media object or media file. (optional)
- Text to be submitted. ONLY for tasks with target type TEXT. If this parameter is provided, it superseeds all athers. (optional)
- Frame number for media with temporal progression (e.g., video). (optional)
- Shot number for media with temporal progression (e.g., video). (optional)
- Timecode for media with temporal progression (e.g,. video). (optional)
- Session Token (optional)
- SuccessfulSubmissionsStatus
-
-
-
- Endpoint to accept submissions This has been the submission endpoint for version 1. Please refrain from using it and migrate to the v2 endpoint.
-
- Thrown when fails to make API call
- Collection identifier. Optional, in which case the default collection for the run will be considered. (optional)
- Identifier for the actual media object or media file. (optional)
- Text to be submitted. ONLY for tasks with target type TEXT. If this parameter is provided, it superseeds all athers. (optional)
- Frame number for media with temporal progression (e.g., video). (optional)
- Shot number for media with temporal progression (e.g., video). (optional)
- Timecode for media with temporal progression (e.g,. video). (optional)
- Session Token (optional)
- ApiResponse of SuccessfulSubmissionsStatus
-
-
-
- Endpoint to accept submissions This has been the submission endpoint for version 1. Please refrain from using it and migrate to the v2 endpoint.
-
- Thrown when fails to make API call
- Collection identifier. Optional, in which case the default collection for the run will be considered. (optional)
- Identifier for the actual media object or media file. (optional)
- Text to be submitted. ONLY for tasks with target type TEXT. If this parameter is provided, it superseeds all athers. (optional)
- Frame number for media with temporal progression (e.g., video). (optional)
- Shot number for media with temporal progression (e.g., video). (optional)
- Timecode for media with temporal progression (e.g,. video). (optional)
- Session Token (optional)
- Cancellation Token to cancel request (optional)
- Task of SuccessfulSubmissionsStatus
-
-
-
- Endpoint to accept submissions This has been the submission endpoint for version 1. Please refrain from using it and migrate to the v2 endpoint.
-
- Thrown when fails to make API call
- Collection identifier. Optional, in which case the default collection for the run will be considered. (optional)
- Identifier for the actual media object or media file. (optional)
- Text to be submitted. ONLY for tasks with target type TEXT. If this parameter is provided, it superseeds all athers. (optional)
- Frame number for media with temporal progression (e.g., video). (optional)
- Shot number for media with temporal progression (e.g., video). (optional)
- Timecode for media with temporal progression (e.g,. video). (optional)
- Session Token (optional)
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (SuccessfulSubmissionsStatus)
-
Endpoint to accept submissions.
Thrown when fails to make API call
The ID of the evaluation the submission belongs to.
-
+ Some notes regarding the submission format. At least one answerSet is required, taskId, taskName are inferred if not provided, at least one answer is required, mediaItemCollectionName is inferred if not provided, start and end should be provided in milliseconds.For most evaluation setups, an answer is built in one of the three following ways: A) only text is required: just provide the text property with a meaningful entry B) only a mediaItemName is required: just provide the mediaItemName, optionally with the collection name. C) a specific portion of a mediaItem is required: provide mediaItemName, start and end, optionally with collection name
Session Token (optional)
SuccessfulSubmissionsStatus
@@ -6341,7 +6213,7 @@
Thrown when fails to make API call
The ID of the evaluation the submission belongs to.
-
+ Some notes regarding the submission format. At least one answerSet is required, taskId, taskName are inferred if not provided, at least one answer is required, mediaItemCollectionName is inferred if not provided, start and end should be provided in milliseconds.For most evaluation setups, an answer is built in one of the three following ways: A) only text is required: just provide the text property with a meaningful entry B) only a mediaItemName is required: just provide the mediaItemName, optionally with the collection name. C) a specific portion of a mediaItem is required: provide mediaItemName, start and end, optionally with collection name
Session Token (optional)
ApiResponse of SuccessfulSubmissionsStatus
@@ -6351,7 +6223,7 @@
Thrown when fails to make API call
The ID of the evaluation the submission belongs to.
-
+ Some notes regarding the submission format. At least one answerSet is required, taskId, taskName are inferred if not provided, at least one answer is required, mediaItemCollectionName is inferred if not provided, start and end should be provided in milliseconds.For most evaluation setups, an answer is built in one of the three following ways: A) only text is required: just provide the text property with a meaningful entry B) only a mediaItemName is required: just provide the mediaItemName, optionally with the collection name. C) a specific portion of a mediaItem is required: provide mediaItemName, start and end, optionally with collection name
Session Token (optional)
Cancellation Token to cancel request (optional)
Task of SuccessfulSubmissionsStatus
@@ -6362,7 +6234,7 @@
Thrown when fails to make API call
The ID of the evaluation the submission belongs to.
-
+ Some notes regarding the submission format. At least one answerSet is required, taskId, taskName are inferred if not provided, at least one answer is required, mediaItemCollectionName is inferred if not provided, start and end should be provided in milliseconds.For most evaluation setups, an answer is built in one of the three following ways: A) only text is required: just provide the text property with a meaningful entry B) only a mediaItemName is required: just provide the mediaItemName, optionally with the collection name. C) a specific portion of a mediaItem is required: provide mediaItemName, start and end, optionally with collection name
Session Token (optional)
Cancellation Token to cancel request (optional)
Task of ApiResponse (SuccessfulSubmissionsStatus)
diff --git a/Runtime/Scripts/Dres/UnityClient/DresClient.cs b/Runtime/Scripts/Dres/UnityClient/DresClient.cs
index 8a30a8f..bc315b3 100644
--- a/Runtime/Scripts/Dres/UnityClient/DresClient.cs
+++ b/Runtime/Scripts/Dres/UnityClient/DresClient.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Threading.Tasks;
using Dev.Dres.ClientApi.Model;
using JetBrains.Annotations;
@@ -87,31 +86,6 @@ public Task SubmitTextualResultV2(string text, [Can
return DresWrapper.SubmitTextV2(UserDetails.SessionId, evaluationId, text);
}
-
- ///
- /// Submits the given item (and optionally frame informaiton) to the DRES instance as current user.
- ///
- /// The item name or identifier to submit
- /// Optional, the item's frame number. This can likely be omitted, if there is no such
- /// concept as frames for the given item (e.g. for videos, a frame is reasonable while for images it isn't.
- /// The success / failure state of the operation
- [Obsolete("Obsolete")]
- public Task SubmitResult(string item, int? frame = null)
- {
- return DresWrapper.Submit(item, UserDetails.SessionId, frame);
- }
-
- ///
- /// Submits the given text to the DRES instance as current user
- ///
- /// The text to submit (this can be anything).
- /// The success / failure state of the operation
- [Obsolete("Obsolete")]
- public Task SubmitTextualResult(string text)
- {
- return DresWrapper.SubmitText(text, UserDetails.SessionId);
- }
-
///
/// Sends the given results as result log to the DRES instance as current user.
/// For further information on the logging format, please consider visiting the
diff --git a/Runtime/Scripts/Dres/UnityClient/DresWrapper.cs b/Runtime/Scripts/Dres/UnityClient/DresWrapper.cs
index 4575953..3af1322 100644
--- a/Runtime/Scripts/Dres/UnityClient/DresWrapper.cs
+++ b/Runtime/Scripts/Dres/UnityClient/DresWrapper.cs
@@ -79,7 +79,7 @@ internal static Task SubmitV2(string session, strin
{
new(answers: new List
{
- new(mediaItemName: item, start: start.GetValueOrDefault(), end: end.GetValueOrDefault())
+ new(mediaItemName: item, start: start, end: end)
})
};
var apiClientSubmission = new ApiClientSubmission(answerSets);
@@ -100,39 +100,6 @@ internal static Task SubmitTextV2(string session, s
return SubmissionApi.PostApiV2SubmitByEvaluationIdAsync(evaluationId, apiClientSubmission, session);
}
- // TODO: Once the functionality of the new API is confirmed, implement bulk submission
-
- ///
- /// Submits an item to the DRES endpoint.
- /// Submissions are only allowed during active competitions (inferred from the given sesssion id)
- ///
- /// The name of the item (or identifier) to submit
- /// The session id to which this submission belongs
- /// Optionally a frame number to specify which frame of the item.
- /// If no notion of frames exist for the item, this can likely be omitted.
- /// The submission state on success / failure.
- /// A 404 if there is no ongoing competition for this session, a 403 if there is no such user
- [Obsolete("Obsolete")]
- internal static Task Submit(string item, string session, int? frame = null)
- {
- return SubmissionApi.GetApiV1SubmitAsync(item: item, frame: frame, session: session);
- }
-
- ///
- /// Submits given TEXT to the DRES endpoint.
- /// Submissions are only allowed during active competitions (inferred from the given sesssion id)
- ///
- /// The submission in textual form (might also be a number) submit
- /// The session id to which this submission belongs
- /// The submission state on success / failure.
- /// A 404 if there is no ongoing competition for this session, a 403 if there is no such user
- [Obsolete("Obsolete")]
- internal static Task SubmitText(string text, string session)
- {
- return SubmissionApi.GetApiV1SubmitAsync(text: text, session: session);
- }
-
-
///
/// Send result logs to the DRES endpoint.
/// For further information on the logging format, please consider visiting the
@@ -164,7 +131,8 @@ internal static Task LogResults(long timestamp, string sortType,
/// The session id to which this log belongs
/// The state of success / failure of the log sending.
/// A 404 if there is no ongoing competition for this session, a 403 if there is no such user
- internal static Task LogQueryEvents(long timestamp, List events, string session, string evaluationId)
+ internal static Task LogQueryEvents(long timestamp, List events, string session,
+ string evaluationId)
{
var queryEventLog = new QueryEventLog(timestamp, events);
return LogApi.PostApiV2LogQueryByEvaluationIdAsync(evaluationId, session, queryEventLog);
diff --git a/package.json b/package.json
index b02cfc2..145c1fe 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "dev.dres.unityclient",
- "version": "1.3.0",
+ "version": "1.4.0",
"displayName": "DRES Unity Client",
"description": "An all-unity client for [DRES](https://github.com/dres-dev/DRES)",
"unity": "2020.3",