Re: Website Updates
Sounds good, thanks! I'll try to remember the magic words, "silent consensus in 48h." :) On Tue, Jul 12, 2016 at 1:35 PM Stian Soiland-Reyeswrote: > "Silent consensus in 48h" is often a good option :-) > > I think you can update at will right away if you want - the 'embargo' > was because of the download pages before the release was public. > > On 12 July 2016 at 19:24, Gale Naylor wrote: > > If there is a need NOT to publish changes to web pages, please let me > know. > > Otherwise, I will start publishing changes in 48 hours. > > > > Thanks! > > > > Gale > > > > On Mon, Jul 11, 2016 at 5:31 PM Gale Naylor > > > wrote: > > > >> I know for a while we were not publishing website updates because we had > >> pages that needed to stay "staged." > >> > >> Is it okay to publish pages now? I've made a few minor corrections. > >> > >> Thanks, > >> > >> Gale > >> > > > > -- > Stian Soiland-Reyes > Apache Taverna (incubating), Apache Commons > http://orcid.org/-0001-9842-9718 >
Re: Website Updates
"Silent consensus in 48h" is often a good option :-) I think you can update at will right away if you want - the 'embargo' was because of the download pages before the release was public. On 12 July 2016 at 19:24, Gale Naylorwrote: > If there is a need NOT to publish changes to web pages, please let me know. > Otherwise, I will start publishing changes in 48 hours. > > Thanks! > > Gale > > On Mon, Jul 11, 2016 at 5:31 PM Gale Naylor > wrote: > >> I know for a while we were not publishing website updates because we had >> pages that needed to stay "staged." >> >> Is it okay to publish pages now? I've made a few minor corrections. >> >> Thanks, >> >> Gale >> -- Stian Soiland-Reyes Apache Taverna (incubating), Apache Commons http://orcid.org/-0001-9842-9718
[GitHub] incubator-taverna-common-activities issue #12: Docker activity start contain...
Github user stain commented on the issue: https://github.com/apache/incubator-taverna-common-activities/pull/12 As this pull request seems to be a smaller part of #9, see my comments there. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-taverna-common-activities issue #11: Docker activity list containe...
Github user stain commented on the issue: https://github.com/apache/incubator-taverna-common-activities/pull/11 As this pull request seems to be a smaller part of #9, see my comments there. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-taverna-common-activities issue #10: Docker activity create contai...
Github user stain commented on the issue: https://github.com/apache/incubator-taverna-common-activities/pull/10 As this pull request seems to be a smaller part of #9, see my comments there. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-taverna-common-activities issue #13: Taverna 3
Github user stain commented on the issue: https://github.com/apache/incubator-taverna-common-activities/pull/13 Thank you for showing your progress! I've left lots of comments under "Files changed" in the pull request - don't be discouraged! Sorry I hadn't reviewed many of the files in this detail before. As for the Taverna 3 upgrade your activity is almost there - but the activity-ui is still using the old imports, which means it's now kind of "in between". :-) I think once you get the right `` and `import`s added it would show up better in Eclipse what needs to be changed - but I guess you will have more questions after that. Just yesterday I helped our local student @edikaradumi in updating https://github.com/apache/incubator-taverna-plugin-gis/tree/master/taverna-gis-activity-ui/src/main/java/org/apache/taverna/gis/ui/serviceprovider to Taverna 3 - I must admit we didn't get to tested it in the T3 workbench yet, but it should compile. :) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-taverna-common-activities pull request #13: Taverna 3
Github user stain commented on a diff in the pull request: https://github.com/apache/incubator-taverna-common-activities/pull/13#discussion_r70513304 --- Diff: taverna-cwl-utilities/src/test/java/org/apache/taverna/cwl/utilities/CWLUtilTest.java --- @@ -0,0 +1,122 @@ +/*** + * 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. + ***/ +package org.apache.taverna.cwl.utilities; + +import static org.junit.Assert.*; + +import java.io.FileInputStream; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; + +import org.junit.Before; +import org.junit.Test; +import org.yaml.snakeyaml.Yaml; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; + +public class CWLUtilTest { + JsonNode cwlFile; + CWLUtil cwlUtil; + JsonNode input; + + @Before + public void setUp() throws Exception { + Yaml reader = new Yaml(); + Path path = Paths.get("CWLFiles", "customtool1.cwl"); + ObjectMapper mapper = new ObjectMapper(); + cwlFile = mapper.valueToTree(reader.load(new FileInputStream(path.toFile(; + + cwlUtil = new CWLUtil(cwlFile); + input = cwlFile.get("inputs").get(0); + } + + @Test + public void processNameSpaceTest() { + JsonNode nameSpace = cwlUtil.getNameSpace(); + + assertEquals(1, nameSpace.size()); + assertTrue(nameSpace.has("edam")); + assertEquals("http://edamontology.org/;, nameSpace.get("edam").asText()); + } + + @Test + public void extractLabelTest() { + PortDetail detail = new PortDetail(); + + cwlUtil.extractLabel(null, detail); + assertEquals(null, detail.getLabel()); + + cwlUtil.extractLabel(input, detail); + assertEquals("input 1 testing label", detail.getLabel()); + + } + + @Test + public void extractDescriptionTest() { + PortDetail detail = new PortDetail(); + + cwlUtil.extractDescription(null, detail); + assertEquals(null, detail.getDescription()); + + cwlUtil.extractDescription(input, detail); + assertEquals("this is a short description of input 1", detail.getDescription()); + + } + + @Test + public void figureOutFormatsTest() { + PortDetail detail = new PortDetail(); + detail.setFormat(new ArrayList()); + cwlUtil.figureOutFormats("edam:1245", detail); + assertEquals("http://edamontology.org/1245;, detail.getFormat().get(0)); + + cwlUtil.figureOutFormats("$formatExpression", detail); + assertEquals("$formatExpression", detail.getFormat().get(1)); + + // format that doesn't defined in the name space + + cwlUtil.figureOutFormats("formatkey: not Defined", detail); + assertEquals("formatkey: not Defined", detail.getFormat().get(2)); + } + + @Test + public void processTest() { --- End diff -- Great! --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-taverna-common-activities pull request #13: Taverna 3
Github user stain commented on a diff in the pull request: https://github.com/apache/incubator-taverna-common-activities/pull/13#discussion_r70512965 --- Diff: taverna-cwl-utilities/src/main/java/org/apache/taverna/cwl/utilities/CWLUtil.java --- @@ -0,0 +1,216 @@ +package org.apache.taverna.cwl.utilities; --- End diff -- Could you add the ASF header..? Thanks! :-) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-taverna-common-activities pull request #13: Taverna 3
Github user stain commented on a diff in the pull request: https://github.com/apache/incubator-taverna-common-activities/pull/13#discussion_r70512846 --- Diff: taverna-cwl-utilities/CWLFiles/customtool1.cwl --- @@ -0,0 +1,67 @@ + --- End diff -- Could we move `CWLFiles/` to `src/test/resources` to avoid dependency on correct relative paths? (E.g. so it works in both the IDE and Maven). Then within the test you can try to use `getClass().getResource()` to retrieve it.. or perhaps that is awkward for methods that need a `Path`? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-taverna-common-activities pull request #13: Taverna 3
Github user stain commented on a diff in the pull request: https://github.com/apache/incubator-taverna-common-activities/pull/13#discussion_r70512633 --- Diff: taverna-cwl-activity/src/main/resources/META-INF/spring/cwl-activity-context.xml --- @@ -0,0 +1,29 @@ + + +http://www.springframework.org/schema/beans; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd;> + + + --- End diff -- +1, this looks correct to me --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-taverna-common-activities pull request #13: Taverna 3
Github user stain commented on a diff in the pull request: https://github.com/apache/incubator-taverna-common-activities/pull/13#discussion_r70512455 --- Diff: taverna-cwl-activity/src/main/java/org/apache/taverna/cwl/CwlActivityFactory.java --- @@ -0,0 +1,102 @@ +/* +* 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. +*/ +package org.apache.taverna.cwl; + +import java.net.URI; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Set; + +import org.apache.log4j.Logger; +import org.apache.taverna.cwl.utilities.CWLUtil; +import org.apache.taverna.workflowmodel.Edits; +import org.apache.taverna.workflowmodel.processor.activity.Activity; +import org.apache.taverna.workflowmodel.processor.activity.ActivityConfigurationException; +import org.apache.taverna.workflowmodel.processor.activity.ActivityFactory; +import org.apache.taverna.workflowmodel.processor.activity.ActivityInputPort; +import org.apache.taverna.workflowmodel.processor.activity.ActivityOutputPort; + +import com.fasterxml.jackson.databind.JsonNode; + +public class CwlActivityFactory implements ActivityFactory { + private static Logger logger = Logger.getLogger(CwlActivityFactory.class); + private static final int DEPTH_0 = 0; + private static final int DEPTH_1 = 1; + private Edits edits; + + @Override + public Activity createActivity() { + CwlDumyActivity activity = new CwlDumyActivity(); + activity.setEdits(edits); + return activity; + } + + @Override + public URI getActivityType() { + return null; + } + + @Override + public JsonNode getActivityConfigurationSchema() { + return null; + } + + @Override + public Set getInputPorts(JsonNode configuration) throws ActivityConfigurationException { + CWLUtil cwlUtil = new CWLUtil(configuration.path("map")); + + Set inputs = new HashSet<>(); + + + //get the processed data + HashMapprocessedInputs= cwlUtil.processInputDepths(); --- End diff -- It's not common for API methods in Java to be so specific about which implementation they return, but rather use the interface. Perhaps change `processInputDepths()` and friends to return/accept `Map ` rather than `HashMap`? Similar for `ArrayList` -> `List`. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-taverna-common-activities pull request #13: Taverna 3
Github user stain commented on a diff in the pull request: https://github.com/apache/incubator-taverna-common-activities/pull/13#discussion_r70512153 --- Diff: taverna-cwl-activity/src/main/java/org/apache/taverna/cwl/CwlActivityFactory.java --- @@ -0,0 +1,102 @@ +/* +* 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. +*/ +package org.apache.taverna.cwl; + +import java.net.URI; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Set; + +import org.apache.log4j.Logger; +import org.apache.taverna.cwl.utilities.CWLUtil; +import org.apache.taverna.workflowmodel.Edits; +import org.apache.taverna.workflowmodel.processor.activity.Activity; +import org.apache.taverna.workflowmodel.processor.activity.ActivityConfigurationException; +import org.apache.taverna.workflowmodel.processor.activity.ActivityFactory; +import org.apache.taverna.workflowmodel.processor.activity.ActivityInputPort; +import org.apache.taverna.workflowmodel.processor.activity.ActivityOutputPort; + +import com.fasterxml.jackson.databind.JsonNode; + +public class CwlActivityFactory implements ActivityFactory { + private static Logger logger = Logger.getLogger(CwlActivityFactory.class); + private static final int DEPTH_0 = 0; + private static final int DEPTH_1 = 1; + private Edits edits; + + @Override + public Activity createActivity() { + CwlDumyActivity activity = new CwlDumyActivity(); + activity.setEdits(edits); + return activity; + } + + @Override + public URI getActivityType() { + return null; + } + + @Override + public JsonNode getActivityConfigurationSchema() { + return null; + } + + @Override + public Set getInputPorts(JsonNode configuration) throws ActivityConfigurationException { --- End diff -- Yes, great! This also uses CWLUtil, so that is nice. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-taverna-common-activities pull request #13: Taverna 3
Github user stain commented on a diff in the pull request: https://github.com/apache/incubator-taverna-common-activities/pull/13#discussion_r70511985 --- Diff: taverna-cwl-activity/src/main/java/org/apache/taverna/cwl/CwlActivityFactory.java --- @@ -0,0 +1,102 @@ +/* +* 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. +*/ +package org.apache.taverna.cwl; + +import java.net.URI; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Set; + +import org.apache.log4j.Logger; +import org.apache.taverna.cwl.utilities.CWLUtil; +import org.apache.taverna.workflowmodel.Edits; +import org.apache.taverna.workflowmodel.processor.activity.Activity; +import org.apache.taverna.workflowmodel.processor.activity.ActivityConfigurationException; +import org.apache.taverna.workflowmodel.processor.activity.ActivityFactory; +import org.apache.taverna.workflowmodel.processor.activity.ActivityInputPort; +import org.apache.taverna.workflowmodel.processor.activity.ActivityOutputPort; + +import com.fasterxml.jackson.databind.JsonNode; + +public class CwlActivityFactory implements ActivityFactory { + private static Logger logger = Logger.getLogger(CwlActivityFactory.class); + private static final int DEPTH_0 = 0; + private static final int DEPTH_1 = 1; + private Edits edits; + + @Override + public Activity createActivity() { + CwlDumyActivity activity = new CwlDumyActivity(); + activity.setEdits(edits); + return activity; + } + + @Override + public URI getActivityType() { + return null; + } + + @Override + public JsonNode getActivityConfigurationSchema() { + return null; --- End diff -- I'm not sure if this would pass with `null`. An example minimal schema which you could potentially adapt: https://github.com/apache/incubator-taverna-plugin-gis/blob/master/taverna-gis-activity/src/main/resources/schema.json returned as: https://github.com/apache/incubator-taverna-plugin-gis/blob/master/taverna-gis-activity/src/main/java/org/apache/taverna/gis/GisActivityFactory.java#L55 ```java /* * * 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. * */ package org.apache.taverna.gis; import static org.apache.taverna.gis.GisActivity.*; import java.io.IOException; import java.net.URI; import java.util.HashSet; import java.util.Set; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.taverna.workflowmodel.Edits; import org.apache.taverna.workflowmodel.processor.activity.ActivityFactory; import org.apache.taverna.workflowmodel.processor.activity.ActivityInputPort; import org.apache.taverna.workflowmodel.processor.activity.ActivityOutputPort; /** * Gis ActivityFactory. */ public class GisActivityFactory implements ActivityFactory { private Edits edits; @Override public GisActivity createActivity() { return new GisActivity(); } @Override public URI getActivityType() {
[GitHub] incubator-taverna-common-activities pull request #13: Taverna 3
Github user stain commented on a diff in the pull request: https://github.com/apache/incubator-taverna-common-activities/pull/13#discussion_r70511457 --- Diff: taverna-cwl-activity-ui/src/main/java/org/apache/taverna/cwl/ui/serviceprovider/Testing.java --- @@ -18,141 +18,63 @@ import java.io.File; import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FilenameFilter; -import java.util.ArrayList; -import java.util.HashMap; +import java.io.IOException; +import java.io.Writer; +import java.util.Arrays; +import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; -import org.apache.taverna.cwl.CwlActivityConfigurationBean; +import org.apache.jena.atlas.iterator.Iter; +import org.openjena.atlas.json.JsonObject; +import org.springframework.util.SystemPropertyUtils; import org.yaml.snakeyaml.Yaml; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.ObjectWriter; +import com.fasterxml.jackson.databind.node.ObjectNode; + public class Testing { --- End diff -- If this class is for testing, can we move it to same package, but under `src/test/java` ? I'm not sure what it is testing.. is it more for experimenting? If it can be rewritten to a junit test with `@Test` methods, that would be ideal. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-taverna-common-activities pull request #13: Taverna 3
Github user stain commented on a diff in the pull request: https://github.com/apache/incubator-taverna-common-activities/pull/13#discussion_r70511075 --- Diff: taverna-cwl-activity-ui/src/main/java/org/apache/taverna/cwl/ui/serviceprovider/CwlServiceProvider.java --- @@ -16,72 +16,103 @@ ***/ package org.apache.taverna.cwl.ui.serviceprovider; -import java.io.File; import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FilenameFilter; +import java.io.IOException; import java.net.URI; -import java.util.ArrayList; +import java.nio.file.DirectoryStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Arrays; import java.util.List; import java.util.Map; +import java.util.stream.Stream; +import java.util.stream.StreamSupport; import javax.swing.Icon; +import org.apache.log4j.Logger; import org.yaml.snakeyaml.Yaml; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ObjectNode; + import net.sf.taverna.t2.servicedescriptions.AbstractConfigurableServiceProvider; import net.sf.taverna.t2.servicedescriptions.ConfigurableServiceProvider; public class CwlServiceProvider extends AbstractConfigurableServiceProvider implements ConfigurableServiceProvider { - + + public static final String TOOL_NAME="toolName"; + public static final String MAP ="map"; + private static Logger logger = Logger.getLogger(CwlServiceProvider.class); + CwlServiceProvider() { super(new CwlServiceProviderConfig()); } - private static final String providerName ="CWL Services"; - private static final URI providerId = URI - .create("http://cwl.com/2016/service-provider/cwlcommandlinetools;); - private File cwlFilesLocation; + + private static final String providerName = "CWL Services"; + private static final URI providerId = URI.create("http://cwl.com/2016/service-provider/cwlcommandlinetools;); @Override public void findServiceDescriptionsAsync(FindServiceDescriptionsCallBack callBack) { // get the location of the cwl tool from the workbench - cwlFilesLocation = new File(getConfiguration().getPath()); - // This is holding the CWL configuration beans - List result = new ArrayList(); - - File[] cwlFiles = getCwlFiles(); - - // Load the CWL file using SnakeYaml lib - Yaml cwlReader = new Yaml(); - - for (File file : cwlFiles) { - Map cwlFile = null; - - try { - cwlFile = (Map) cwlReader.load(new FileInputStream(file)); - } catch (FileNotFoundException e) { - e.printStackTrace(); - } - if (cwlFile != null) { - // Creating CWl service Description - CwlServiceDesc cwlServiceDesc = new CwlServiceDesc(); - cwlServiceDesc.setCwlConfiguration(cwlFile); - cwlServiceDesc.setToolName(file.getName().split("\\.")[0]); - - // add to the result - result.add(cwlServiceDesc); - // return the service description - callBack.partialResults(result); - } - + Path path = Paths.get(getConfiguration().getPath()); + //figure out the dots in the path ex: /maanadev/../cwltools + Path normalizedPath = path.normalize(); + + DirectoryStream stream = null; + try { + stream = Files.newDirectoryStream(normalizedPath, "*.cwl"); + } catch (IOException e) { + logger.warn("Path is not correct !"); + return; } + //create stream with parallel capabilities + Stream paralleStream = StreamSupport.stream(stream.spliterator(), true); + + paralleStream.forEach(p -> { + Yaml reader = getYamlReader(); + + Map cwlFile; + try { + cwlFile = (Map) reader.load(new FileInputStream(path.toFile())); + JsonNode config = createJsonNode(p,cwlFile); +
[GitHub] incubator-taverna-common-activities pull request #13: Taverna 3
Github user stain commented on a diff in the pull request: https://github.com/apache/incubator-taverna-common-activities/pull/13#discussion_r70509966 --- Diff: taverna-cwl-activity-ui/src/main/java/org/apache/taverna/cwl/ui/serviceprovider/CwlServiceDesc.java --- @@ -16,79 +16,67 @@ ***/ package org.apache.taverna.cwl.ui.serviceprovider; -import java.util.Arrays; import java.util.List; -import java.util.Map; import javax.swing.Icon; -import org.apache.taverna.cwl.CwlActivityConfigurationBean; import org.apache.taverna.cwl.CwlDumyActivity; +import com.fasterxml.jackson.databind.JsonNode; + import net.sf.taverna.t2.servicedescriptions.ServiceDescription; import net.sf.taverna.t2.workflowmodel.processor.activity.Activity; -public class CwlServiceDesc extends ServiceDescription { +public class CwlServiceDesc extends ServiceDescription { private static final String DESCRIPTION = "description"; @Override public String getDescription() { - String description = (String) cwlConfiguration.get(DESCRIPTION); + //see whether description is too long - if (description == null || (description.length()>40)) - return ""; + if (cwlConfiguration.has(DESCRIPTION)){ + String description = cwlConfiguration.path(DESCRIPTION).asText(); + if((description.length()<40))return description; + else return ""; + } else - return description; + return ""; } - private Map cwlConfiguration; - private String toolName; + private JsonNode cwlConfiguration; - @Override - public Class> getActivityClass() { - return (Class>) CwlDumyActivity.class; + public void setCwlConfiguration(JsonNode cwlConfiguration) { + //set yaml parse CWL tool content + this.cwlConfiguration = cwlConfiguration; } + private String toolName; + @Override - public CwlActivityConfigurationBean getActivityConfiguration() { - // Creating the CWL configuration bean - CwlActivityConfigurationBean configurationBean = new CwlActivityConfigurationBean(); - configurationBean.setCwlConfigurations(cwlConfiguration); - configurationBean.setToolName(toolName); - return configurationBean; + public Class> getActivityClass() { --- End diff -- This should be replaced in Taverna 3 with the [`getActivityType()`](https://github.com/apache/incubator-taverna-workbench/blob/master/taverna-activity-palette-api/src/main/java/org/apache/taverna/servicedescriptions/ServiceDescription.java#L45) method returning an URI which must match the `CWLActivityFactory` URI. (This URI is used to match up the corresponding `ActivityFactory`) I would suggest an URI like https://taverna.apache.org/ns/2016/activity/cwl for both. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-taverna-common-activities pull request #13: Taverna 3
Github user stain commented on a diff in the pull request: https://github.com/apache/incubator-taverna-common-activities/pull/13#discussion_r70509151 --- Diff: taverna-cwl-activity-ui/src/main/java/org/apache/taverna/cwl/ui/serviceprovider/CwlServiceDesc.java --- @@ -16,79 +16,67 @@ ***/ package org.apache.taverna.cwl.ui.serviceprovider; -import java.util.Arrays; import java.util.List; -import java.util.Map; import javax.swing.Icon; -import org.apache.taverna.cwl.CwlActivityConfigurationBean; import org.apache.taverna.cwl.CwlDumyActivity; +import com.fasterxml.jackson.databind.JsonNode; + import net.sf.taverna.t2.servicedescriptions.ServiceDescription; --- End diff -- These `import`s need to be updated to their `org.apache.taverna` equivalents. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[GitHub] incubator-taverna-common-activities pull request #13: Taverna 3
Github user stain commented on a diff in the pull request: https://github.com/apache/incubator-taverna-common-activities/pull/13#discussion_r70508895 --- Diff: taverna-cwl-activity-ui/pom.xml --- @@ -65,27 +60,45 @@ + - org.yaml - snakeyaml - 1.17 + org.apache.taverna.commonactivities + taverna-cwl-utilities + ${project.version} + bundle + taverna-cwl-activity + ${project.groupId} + ${project.version} + + + net.sf.taverna.t2.ui-api activity-palette-api ${t2.ui.api.version} - - taverna-cwl-activity - ${project.groupId} - ${project.version} + net.sf.taverna.t2.ui-api + menu-api + ${t2.ui.api.version} + + + net.sf.taverna.t2.ui-api + contextual-views-api + ${t2.ui.api.version} + net.sf.taverna.t2.ui-impl + activity-tools + ${t2.ui.impl.version} + + + net.sf.taverna.t2.taverna-workbench workbench-dev ${t2.workbench.version} - test --- End diff -- `workbench-dev` must be commented out as it does not exist in Taverna 3 :-( -- and anyway it should stay in `test` --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
College Internship Evaluation Form
Hi Folks, Stain, Ian, and Alan, As Rajan Maurya said during introducing me to the community. It will be my internship project. I will continue this project after my two-month internship also. In my college, we have to evaluate our self by his mentor, In which mentor have to fill some question related to internship and give us marks accordingly. The evaluation form has been provided from the college. But I am confused, by whom I will be evaluated. I talk to Rajan Maurya, He told me to ask you first. -- *With warm regards * *Sincerely yours* Sagar *Student ,(6th Semester )B.Tech IT and mathematical innovation* *Cluster Innovation Centre* *University of Delhi *
[GitHub] incubator-taverna-mobile pull request #22: Redesigning Favourite Workflow Li...
Github user sagar15795 commented on a diff in the pull request: https://github.com/apache/incubator-taverna-mobile/pull/22#discussion_r70439444 --- Diff: app/src/main/java/org/apache/taverna/mobile/data/local/DBHelper.java --- @@ -184,6 +186,24 @@ public boolean updateFavouriteWorkflow(String id) { return false; } +public ObservablegetFavouriteWorkflow() { +return Observable.create(new Observable.OnSubscribe
() { +@Override +public void call(Subscriber> subscriber) { +if (subscriber.isUnsubscribed()) return; --- End diff -- This is necessary if we use create operator. For further info please refer issue [#12 ](https://github.com/ribot/ribot-app-android/issues/12) at ribot android app --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---