You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@streampipes.apache.org by "flomickl (via GitHub)" <gi...@apache.org> on 2023/02/11 21:33:06 UTC

[PR] [#1040] misc changes in runtime names, ad missing fields in schema (streampipes)

flomickl opened a new pull request, #1268:
URL: https://github.com/apache/streampipes/pull/1268

   <!--
     ~ Licensed to the Apache Software Foundation (ASF) under one or more
     ~ contributor license agreements.  See the NOTICE file distributed with
     ~ this work for additional information regarding copyright ownership.
     ~ The ASF licenses this file to You under the Apache License, Version 2.0
     ~ (the "License"); you may not use this file except in compliance with
     ~ the License.  You may obtain a copy of the License at
     ~
     ~    http://www.apache.org/licenses/LICENSE-2.0
     ~
     ~ Unless required by applicable law or agreed to in writing, software
     ~ distributed under the License is distributed on an "AS IS" BASIS,
     ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     ~ See the License for the specific language governing permissions and
     ~ limitations under the License.
     ~
     -->
     
     <!--
   Thanks for contributing! Here are some tips you can follow to help us incorporate your contribution quickly and easily:
   1. If this is your first time, please read our contributor guidelines:
       - https://streampipes.apache.org/getinvolved.html
       - https://cwiki.apache.org/confluence/display/STREAMPIPES/Getting+Started
   2. Make sure the PR title is formatted like: `[#<GitHub issue id>] PR title ...`
   3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., `[WIP][#<GitHub issue id>] PR title ...`.
   4. Please write your PR title to summarize what this PR proposes/fixes.
   5. Link the PR to the corresponding GitHub issue (if present) in the `Development` section in the right menu bar. 
   6. Be sure to keep the PR description updated to reflect all changes.
   7. If possible, provide a concise example to reproduce the issue for a faster review.
   8. Make sure tests pass via `mvn clean install`.
   9. (Optional) If the contribution is large, please file an Apache ICLA
       - http://apache.org/licenses/icla.pdf
   -->
   
   ### Purpose
   #1040  improve naming of runtime names and add missing epsg field in trajectory
   
   ### Remarks
   
   PR introduces (a) breaking change(s): yes
   tested with all changes according to 
   https://cwiki.apache.org/confluence/x/QZBbDg
   https://cwiki.apache.org/confluence/x/RpBbDg
   https://cwiki.apache.org/confluence/x/SZBbDg
   https://cwiki.apache.org/confluence/x/U5BbDg
   https://cwiki.apache.org/confluence/x/XJBbDg
   
   
   
   PR introduces (a) deprecation(s): no
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#1040] rework schema definitions in geo processors (streampipes)

Posted by "flomickl (via GitHub)" <gi...@apache.org>.
flomickl commented on code in PR #1268:
URL: https://github.com/apache/streampipes/pull/1268#discussion_r1107775880


##########
streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latlngtojtspoint/LatLngToJtsPointProcessor.java:
##########
@@ -101,7 +101,11 @@ public void onEvent(Event event, SpOutputCollector collector) throws SpRuntimeEx
     Point geom = SpGeometryBuilder.createSPGeom(lng, lat, epsg);
 
     if (!geom.isEmpty()) {
-      event.addField(WKT_RUNTIME, geom.toString());
+      // if activated the stream fails at all
+      //event.removeFieldBySelector(latitudeMapper);
+      //event.removeFieldBySelector(longitudeMapper);

Review Comment:
   Yes, it's good that you care so much about clean code. I have removed it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#1040] rework schema definitions in geo processors (streampipes)

Posted by "bossenti (via GitHub)" <gi...@apache.org>.
bossenti commented on PR #1268:
URL: https://github.com/apache/streampipes/pull/1268#issuecomment-1434973571

   Sure, just go ahead :) 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#1040] rework schema definitions in geo processors (streampipes)

Posted by "bossenti (via GitHub)" <gi...@apache.org>.
bossenti commented on code in PR #1268:
URL: https://github.com/apache/streampipes/pull/1268#discussion_r1105418934


##########
streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latlngtojtspoint/LatLngToJtsPointProcessor.java:
##########
@@ -101,7 +101,11 @@ public void onEvent(Event event, SpOutputCollector collector) throws SpRuntimeEx
     Point geom = SpGeometryBuilder.createSPGeom(lng, lat, epsg);
 
     if (!geom.isEmpty()) {
-      event.addField(WKT_RUNTIME, geom.toString());
+      // if activated the stream fails at all
+      //event.removeFieldBySelector(latitudeMapper);
+      //event.removeFieldBySelector(longitudeMapper);

Review Comment:
   Frankly speaking, I don't think it's a good idea to commit commented code for several reasons.
   Alternatively, if you want to have a reference for your discussion you could create a gist, simply paste the code snippet into the discussion, or create a dedicate branch for it.
   But I don't want to get too hung up on two lines of code here right now ✌🏼 
   So if you want to do it that way, feel free 🙂 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#1040] rework schema definitions in geo processors (streampipes)

Posted by "flomickl (via GitHub)" <gi...@apache.org>.
flomickl merged PR #1268:
URL: https://github.com/apache/streampipes/pull/1268


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#1040] rework schema definitions in geo processors (streampipes)

Posted by "flomickl (via GitHub)" <gi...@apache.org>.
flomickl commented on code in PR #1268:
URL: https://github.com/apache/streampipes/pull/1268#discussion_r1104390375


##########
streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latlngtojtspoint/LatLngToJtsPointProcessor.java:
##########
@@ -101,7 +101,11 @@ public void onEvent(Event event, SpOutputCollector collector) throws SpRuntimeEx
     Point geom = SpGeometryBuilder.createSPGeom(lng, lat, epsg);
 
     if (!geom.isEmpty()) {
-      event.addField(WKT_RUNTIME, geom.toString());
+      // if activated the stream fails at all
+      //event.removeFieldBySelector(latitudeMapper);
+      //event.removeFieldBySelector(longitudeMapper);

Review Comment:
   it's not dead, it is in discussion :)
   https://github.com/apache/streampipes/discussions/1276
   it is not working currently but should be part of the processor



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#1040] rework schema definitions in geo processors (streampipes)

Posted by "bossenti (via GitHub)" <gi...@apache.org>.
bossenti commented on code in PR #1268:
URL: https://github.com/apache/streampipes/pull/1268#discussion_r1104668601


##########
streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latlngtojtspoint/LatLngToJtsPointProcessor.java:
##########
@@ -101,7 +101,11 @@ public void onEvent(Event event, SpOutputCollector collector) throws SpRuntimeEx
     Point geom = SpGeometryBuilder.createSPGeom(lng, lat, epsg);
 
     if (!geom.isEmpty()) {
-      event.addField(WKT_RUNTIME, geom.toString());
+      // if activated the stream fails at all
+      //event.removeFieldBySelector(latitudeMapper);
+      //event.removeFieldBySelector(longitudeMapper);

Review Comment:
   Well then this PR isn't ready to be merged right? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#1040] rework schema definitions in geo processors (streampipes)

Posted by "flomickl (via GitHub)" <gi...@apache.org>.
flomickl commented on code in PR #1268:
URL: https://github.com/apache/streampipes/pull/1268#discussion_r1104390375


##########
streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latlngtojtspoint/LatLngToJtsPointProcessor.java:
##########
@@ -101,7 +101,11 @@ public void onEvent(Event event, SpOutputCollector collector) throws SpRuntimeEx
     Point geom = SpGeometryBuilder.createSPGeom(lng, lat, epsg);
 
     if (!geom.isEmpty()) {
-      event.addField(WKT_RUNTIME, geom.toString());
+      // if activated the stream fails at all
+      //event.removeFieldBySelector(latitudeMapper);
+      //event.removeFieldBySelector(longitudeMapper);

Review Comment:
   @bossenti 
   it's not dead, it is in discussion :)
   https://github.com/apache/streampipes/discussions/1276
   it is not working currently but should be part of the processor



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#1040] rework schema definitions in geo processors (streampipes)

Posted by "flomickl (via GitHub)" <gi...@apache.org>.
flomickl commented on code in PR #1268:
URL: https://github.com/apache/streampipes/pull/1268#discussion_r1104909241


##########
streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latlngtojtspoint/LatLngToJtsPointProcessor.java:
##########
@@ -101,7 +101,11 @@ public void onEvent(Event event, SpOutputCollector collector) throws SpRuntimeEx
     Point geom = SpGeometryBuilder.createSPGeom(lng, lat, epsg);
 
     if (!geom.isEmpty()) {
-      event.addField(WKT_RUNTIME, geom.toString());
+      // if activated the stream fails at all
+      //event.removeFieldBySelector(latitudeMapper);
+      //event.removeFieldBySelector(longitudeMapper);

Review Comment:
   It is ready to merge. The pull request is for renaming the runtime names.
   This code snipped is just a reference for the discussion.
   Everything else is still working like before.
   It is only a nice to have implementation but not required and can be resolved in a new PR after the discussion is finished :)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#1040] rework schema definitions in geo processors (streampipes)

Posted by "flomickl (via GitHub)" <gi...@apache.org>.
flomickl commented on PR #1268:
URL: https://github.com/apache/streampipes/pull/1268#issuecomment-1432811832

   @bossenti ok to merge?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#1040] rework schema definitions in geo processors (streampipes)

Posted by "flomickl (via GitHub)" <gi...@apache.org>.
flomickl commented on code in PR #1268:
URL: https://github.com/apache/streampipes/pull/1268#discussion_r1103859520


##########
streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/TrajectoryFromPointsProcessor.java:
##########
@@ -51,8 +51,9 @@ public class TrajectoryFromPointsProcessor extends StreamPipesDataProcessor {
   private static final String SUBPOINTS_KEY = "subpoints-key";
   private static final String DESCRIPTION_KEY = "description-key";
   private static final String TRAJECTORY_KEY = "trajectory-key";
-  private static final String TRAJECTORY_RUNTIME = "trajectoryWKT";
-  private static final String DESCRIPTION_RUNTIME = "trajectoryDescription";
+  private static final String TRAJECTORY_GEOMETRY_RUNTIME = "trajectory-geometry";
+  private static final String TRAJECTORY_EPSG_RUNTIME = "trajectory-epsg";
+  private static final String DESCRIPTION_RUNTIME = "trajectory-description";

Review Comment:
   @bossenti 
   so far I never implemented the runtime names to the string.en file
   What would be the benefit of it?
   
   
   All necessary descriptions for the user are already written down:
   ![traj_elements](https://user-images.githubusercontent.com/16739072/218331455-295f6d5d-f16c-4d64-9ca4-8fefc68f23d5.png)
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#1040] rework schema definitions in geo processors (streampipes)

Posted by "bossenti (via GitHub)" <gi...@apache.org>.
bossenti commented on code in PR #1268:
URL: https://github.com/apache/streampipes/pull/1268#discussion_r1103833478


##########
streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/TrajectoryFromPointsProcessor.java:
##########
@@ -51,8 +51,9 @@ public class TrajectoryFromPointsProcessor extends StreamPipesDataProcessor {
   private static final String SUBPOINTS_KEY = "subpoints-key";
   private static final String DESCRIPTION_KEY = "description-key";
   private static final String TRAJECTORY_KEY = "trajectory-key";
-  private static final String TRAJECTORY_RUNTIME = "trajectoryWKT";
-  private static final String DESCRIPTION_RUNTIME = "trajectoryDescription";
+  private static final String TRAJECTORY_GEOMETRY_RUNTIME = "trajectory-geometry";
+  private static final String TRAJECTORY_EPSG_RUNTIME = "trajectory-epsg";
+  private static final String DESCRIPTION_RUNTIME = "trajectory-description";

Review Comment:
   Do you not want to provide labels via the `strings.en` file?



##########
streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/latlngtojtspoint/LatLngToJtsPointProcessor.java:
##########
@@ -101,7 +101,11 @@ public void onEvent(Event event, SpOutputCollector collector) throws SpRuntimeEx
     Point geom = SpGeometryBuilder.createSPGeom(lng, lat, epsg);
 
     if (!geom.isEmpty()) {
-      event.addField(WKT_RUNTIME, geom.toString());
+      // if activated the stream fails at all
+      //event.removeFieldBySelector(latitudeMapper);
+      //event.removeFieldBySelector(longitudeMapper);

Review Comment:
   Can we please refrain from committing dead code? :) 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [#1040] rework schema definitions in geo processors (streampipes)

Posted by "bossenti (via GitHub)" <gi...@apache.org>.
bossenti commented on code in PR #1268:
URL: https://github.com/apache/streampipes/pull/1268#discussion_r1103861869


##########
streampipes-extensions/streampipes-processors-geo-jvm/src/main/java/org/apache/streampipes/processors/geo/jvm/jts/processor/trajectory/TrajectoryFromPointsProcessor.java:
##########
@@ -51,8 +51,9 @@ public class TrajectoryFromPointsProcessor extends StreamPipesDataProcessor {
   private static final String SUBPOINTS_KEY = "subpoints-key";
   private static final String DESCRIPTION_KEY = "description-key";
   private static final String TRAJECTORY_KEY = "trajectory-key";
-  private static final String TRAJECTORY_RUNTIME = "trajectoryWKT";
-  private static final String DESCRIPTION_RUNTIME = "trajectoryDescription";
+  private static final String TRAJECTORY_GEOMETRY_RUNTIME = "trajectory-geometry";
+  private static final String TRAJECTORY_EPSG_RUNTIME = "trajectory-epsg";
+  private static final String DESCRIPTION_RUNTIME = "trajectory-description";

Review Comment:
   Ah sorry, my bad 🙈
   Messed up the variables



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@streampipes.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org