opentimelineio / opentimelineio-java-bindings Goto Github PK
View Code? Open in Web Editor NEWJava bindings for the OpenTimelineIO Library (http://opentimeline.io)
Home Page: http://opentimeline.io
License: Apache License 2.0
Java bindings for the OpenTimelineIO Library (http://opentimeline.io)
Home Page: http://opentimeline.io
License: Apache License 2.0
This was added in the PR (AcademySoftwareFoundation/OpenTimelineIO#1181) to RationalTime
There is no build failure and CI failure when there is a test exception.
Refer: #27 (comment)_
Currently, since the bindings are "down to the metal", many of the APIs accept an ErrorStatus
that must be checked. To better fall in line with Java conventions, like the Python bindings, these ErrorStatus
objects should not be exposed to users. Instead they should be checked internally and rewrapped as exceptions.
Here is an example of current usage:
ErrorStatus err = new ErrorStatus();
final String firstImageUrl = outImages.getTargetURLForImageNumber(0, err);
if (err.getOutcome() != ErrorStatus.Outcome.OK) {
... do some error handling
}
Ideally, this would look something more like:
try {
final String firstImageUrl = outImages.getTargetURLForImageNumber(0);
catch (IndexOutOfBoundsException error) {
... do some error handling
}
The Python ErrorStatus to Exception mappers are good reference.
Also, of note, the Java ErrorStatus
bindings only expose outcome
, they fail to include the other helpful fields.
We should wrap spatial coordinates in media reference.
Merged to OTIO main branch in #1219
We should have dependabot to make sure we're keeping our main OTIO version up to date.
Update bindings to add enabled flag as per #1175
Right now, the bindings reimplement eachChild/eachClip
.
This PR introduces these functions in the C++ core (each_child
renamed to children_if
& each_clip
renamed to clip_if
). Also, these functions return std::vector
instead of iterators.
We should wrap these functions to maintain consistency.
The OTIO dependency with this change was landed in #20
OTIO classes like Composition and Item can be wrapped in Java interfaces or abstract class instead of classes to make it explicit that they are not to be used directly, but through subclasses. If there's any useful logic in these base classes we can provide default
implementation in the interface as shown here.
We should migrate from using the "master" branch to the "main" branch.
This discussion begain in #57
We should adopt BDD Testing, atleast for complicated test cases, requiring some documentation.
The BDD specification would be like:
given: "An item is created"
when: "Item is disabled"
then: "Item does not contribute to the composition"
And the code would be like:
given: "An item is created"
def item = new Item()
verify {
item.enabled() == true
}
when: "Item is disabled"
item.setEnabled(false)
then: "Item does not contribute to the composition"
verifyAll {
item.isEnabled() == false
}
BDD tests can be written using the spock framework.
Spock also has an extension spock-reports that generates nice HTML test reports.
This is a post-documentation of some of the work to get OpenTimelineIO publishing to maven central.
Here was the sonatype issue we used: https://issues.sonatype.org/browse/OSSRH-64444?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel&focusedCommentId=1016349
From @KarthikRIyer, here were the steps we started with for GPG key generation:
sudo apt install gnupg2
gpg2 --gen-key
gpg2 --keyserver hkp://keys.openpgp.org --send-keys {KEY}
The key is then exported to be stored as a github secret using: gpg2 --export-secret-keys 'Key ID' | base64 > private.key
Here is the template settings.xml
that is added as a secret to our build (replacing username, password and gpg passphrase):
<?xml version="1.0" encoding="UTF-8"?>
<settings
xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<pluginGroups></pluginGroups>
<proxies></proxies>
<servers>
<server>
<id>ossrh</id>
<username>username</username>
<password>password</password>
</server>
</servers>
<mirrors></mirrors>
<profiles>
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>gpg2</gpg.executable>
<gpg.passphrase></gpg.passphrase>
</properties>
</profile>
</profiles>
</settings>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.