-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[jinja] Jinja Transformation #4943
Conversation
Could you please add your "Signed-off-by" :) |
@@ -0,0 +1,2 @@ | |||
eclipse.preferences.version=1 |
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.
Please don't commit eclipse settings
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.
I am used to more .gitirnore entries....
lib/jackson-core-2.9.8.jar, | ||
lib/jackson-databind-2.9.8.jar, | ||
lib/jackson-annotations-2.9.8.jar, | ||
lib/commons-lang3-3.8.1.jar |
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 dependency list is just quite huge, but there is nothing we can do about that, I guess? Maybe you are only using a subset of "jinjava" and we can reduce this 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.
I checked again and all are needed to run the simple test examples :-(
* Home assistant [templating](https://www.home-assistant.io/docs/configuration/templating/). | ||
|
||
|
||
## Copyright |
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.
Remove that part from the readme, please. It is sufficient to have NOTICE.
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.
done
* <p> | ||
* The implementation of {@link TransformationService} which transforms the input by Jinja2 Expressions. | ||
* | ||
* @author Jochen Klein |
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.
For all author tags: We have the pattern: "author name - Initial contribution"
The static checker will also error out on this detail
@@ -0,0 +1 @@ | |||
Bundle resources go in here! |
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.
You don't need that.
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.
It was in copy template (javascript tranformer) :-)
|
||
## Further Reading | ||
|
||
* Wikipedia on [Jinja](https://en.wikipedia.org/wiki/Jinja_(template_engine). |
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 is a ")" missing at the end
d9f4ff8
to
3617edc
Compare
Signed-off-by: Jochen Klein <git@jochen.susca.de>
Thanks :) |
@@ -0,0 +1,107 @@ | |||
/** | |||
* Copyright (c) 2014,2018 Contributors to the Eclipse Foundation |
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 Jenkins build is failing because of wrong license headers. Can you please run mvn license:format
in the root directory of this project and come up with a new PR for your fixed headers? Thanks.
You mayb want to take care about the warning too.
[ERROR] Code Analysis Tool has found:
4 error(s)!
2 warning(s)
0 info(s)
[ERROR] org.openhab.transform.jinja.internal.profiles.JinjaTransformationProfileFactory.java:[2]
Header line doesn't match pattern ^ \* Copyright \(c\) 2010-2019 Contributors to the openHAB project$
[ERROR] org.openhab.transform.jinja.internal.profiles.JinjaTransformationProfile.java:[2]
Header line doesn't match pattern ^ \* Copyright \(c\) 2010-2019 Contributors to the openHAB project$
[ERROR] org.openhab.transform.jinja.internal.JinjaTransformationService.java:[2]
Header line doesn't match pattern ^ \* Copyright \(c\) 2010-2019 Contributors to the openHAB project$
[WARNING] .transform.jinja/ESH-INF/config/jinjaProfile.xml:[3]
There were whitespace characters used for indentation. Please use tab characters instead
[ERROR] .transform.jinja/ESH-INF/config/jinjaProfile.xml:[0]
The file ESH-INF/config/jinjaProfile.xml isnt included in the build.properties file. Good approach is to include all files by adding `ESH-INF/` value to the bin.includes property.
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.
Oh my word, I haven't caught that as well (probably because I'm also compiling without tests and checks at the moment). Should we revert this PR?
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.
Should we revert this PR?
No, we should come up with a follow-up PR to fix 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 wasn't an issue if it the addon was reviewed by 2 maintainers:
New add-on contributions should be reviewed by 2 maintainers - always feel free to ping
@kaikreuzer
to do a second/final approval.
There's now https://github.com/openhab/openhab2-addons/pull/4984
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.
True. I'm just eager to get the required parts in for full MQTT HomeAssistant support and I know that you guys are busy with the build system and IDE setup.
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/next-generation-design-a-paper-ui-replacement-proposal/64930/206 |
Signed-off-by: Jochen Klein <git@jochen.susca.de> Signed-off-by: Pshatsillo <pshatsillo@gmail.com>
Signed-off-by: Jochen Klein <git@jochen.susca.de> Signed-off-by: Maximilian Hess <mail@ne0h.de>
This is a new transform using jinja.
This transform is needed to fully support mqtt homeassistant discovery.
See also #4927