-
-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce metadata for all add-ons #3050
Conversation
fe597df
to
69c1d71
Compare
I don’t see a PR for updating the developer documentation / binding template etc. Am I overlooking something? I hope so. |
The i18n-plugin also needs to be updated as it reads Binding XML info for generating translations. It will probably still compile locally because its bundle dependency still exists in your local and the OH snapshot repo. |
df18b8c
to
5ff40dc
Compare
The i18n-maven-plugin changes are already part of this PR. |
bdd6312
to
c42eecf
Compare
What is the next step for this PR? Perhaps now would be a good time to get it finished so we have a full release cycle for testing, assuming it would make it into the first 4.0 milestone. Before asking @J-N-K to resolve merge conflicts (also in related PR's) and preparing a PR for the Zigbee binding, perhaps a @openhab/core-maintainers could have a look and write some kind of statement about "conditional approval", so that Jan won't have to resolve conflicts and rebase too many times? @kaikreuzer - it seems this was suggested by you in #2058, so perhaps you could have a look and comment? 🙂 |
aa66498
to
d0c9b97
Compare
99caab2
to
e16aac6
Compare
Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Jan N. Klug <github@klug.nrw>
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few first (very small) findings - more to come tomorrow!
....io.rest.core/src/main/java/org/openhab/core/io/rest/core/internal/addons/AddonResource.java
Outdated
Show resolved
Hide resolved
...hab.core.addon.xml/src/main/java/org/openhab/core/addon/xml/internal/AddonInfoConverter.java
Outdated
Show resolved
Hide resolved
xstream.alias("name", NodeValue.class); | ||
xstream.alias("description", NodeValue.class); | ||
xstream.alias("author", NodeValue.class); | ||
xstream.alias("service-id", NodeValue.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What has happened to the service-id
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally I planned to change it to config-id
and later decided against that. I have reverted this changed (same answer below).
...penhab.core.addon.xml/src/main/java/org/openhab/core/addon/xml/internal/AddonInfoReader.java
Outdated
Show resolved
Hide resolved
...hab.core.addon.xml/src/main/java/org/openhab/core/addon/xml/internal/AddonInfoConverter.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core.test.magic/src/main/resources/OH-INF/addon/addon.xml
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core/src/main/java/org/openhab/core/addon/AddonI18nLocalizationService.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core/src/main/java/org/openhab/core/addon/AddonI18nLocalizationService.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core/src/main/java/org/openhab/core/addon/AddonI18nLocalizationService.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Jan N. Klug <github@klug.nrw>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks @J-N-K!
Looks all perfect to me - all I could find are afew remaining missed replacements in the Javadoc.
bundles/org.openhab.core/src/main/java/org/openhab/core/addon/AddonInfo.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core/src/main/java/org/openhab/core/addon/AddonInfo.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core/src/main/java/org/openhab/core/addon/AddonInfo.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core/src/main/java/org/openhab/core/addon/AddonInfo.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core/src/main/java/org/openhab/core/addon/AddonInfo.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.core/src/main/java/org/openhab/core/addon/AddonInfo.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Jan N. Klug <github@klug.nrw>
Thanks, I also prepared the missing PR for zwave and zigged (which are quite straight-forward) and updated the PR in openhab-addons (which is also mostly copying and addition of the new add-ons like persistence). What is missing is a proper review of the webui-PR regarding the changes in MainUI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is missing is a proper review of the webui-PR regarding the changes in MainUI.
I can't really review the code, but I will test if it still works in general. If there are small things to correct, I guess @ghys can also comment/fix it later on.
So would you say that from your pov everything should then be ready to be merged today already?
I think it's fine now, I removed some leftovers in addons, otherwise I would say: Go! If something comes up I can fix it on short notice. |
Excellent, then let us go for it! |
@kaikreuzer Can you upload the XSD so it is available for validation? I'll prepare a PR to change the static analysis. |
It is all in git. :-) |
<xs:element name="author" type="xs:string" minOccurs="0"> | ||
<xs:annotation> | ||
<xs:documentation>The organization maintaining the add-on (e.g. openHAB). Individual developer names should be avoided.</xs:documentation> | ||
</xs:annotation> | ||
</xs:element> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for commenting code already merged, but thought it would be easiest for proper context. Should it be mentioned that it's not needed to use "openHAB" as author here? At least it seems none of the add-ons in the openhab-addons repository have this, and the skeleton script doesn't create it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would be the right time to drop this field now altogether - we more or less only kept it for backward-compatibility, but as we are breaking this now anyhow, I think we could remove it from the XSD.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or are we using it for Marketplace entries, @ghys?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The marketplace add-on service will build the add-on with what Discourse returns as the author of the topic as the add-on author:
Lines 334 to 336 in 8d64ecf
return Addon.create(id).withType(type).withContentType(contentType).withImageLink(topic.imageUrl) | |
.withAuthor(author).withProperties(properties).withLabel(title).withInstalled(installed) | |
.withMaturity(maturity).withCompatible(compatible).withLink(link).build(); |
and the Karaf add-on service will put the constant "openHAB" in that field (and set it as "verified"):
Lines 133 to 134 in 8f9dafd
Addon.Builder addon = Addon.create(id).withContentType(ADDONS_CONTENT_TYPE).withType(type) | |
.withVersion(feature.getVersion()).withAuthor(ADDONS_AUTHOR, true).withInstalled(isInstalled); |
The author and the checkmark are displayed in the UI, notably in the information tables in each add-on page. For "verified" add-ons it's also displayed in the list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
* Introduce addon.xml Signed-off-by: Jan N. Klug <github@klug.nrw> GitOrigin-RevId: 3d54ee5
Closes #2058
Depends on #2994
This removes the
binding.xml
and replaces it with anaddon.xml
which allows to provide metadata for all add-ons. Also contains necessary changes in other components.