Skip to content
This repository was archived by the owner on Nov 23, 2023. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 8 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

[![Build Status](https://travis-ci.org/3D-e-Chem/knime-python-node-archetype.svg?branch=master)](https://travis-ci.org/3D-e-Chem/knime-python-node-archetype)
[![Build status](https://ci.appveyor.com/api/projects/status/5dory9qjycepcmcn/branch/master?svg=true)](https://ci.appveyor.com/project/3D-e-Chem/knime-python-node-archetype/branch/master)
[![Download](https://api.bintray.com/packages/nlesc/knime-python-node-archetype/knime-python-node-archetype/images/download.svg) ](https://bintray.com/nlesc/knime-python-node-archetype/knime-python-node-archetype/_latestVersion)
[![DOI](https://zenodo.org/badge/63080247.svg)](https://zenodo.org/badge/latestdoi/63080247)

Generates [KNIME](http://www.knime.org) workflow node skeleton repository with sample code.
Expand All @@ -29,8 +28,8 @@ See https://github.com/3D-e-Chem/knime-python-wrapper for more information how t
* Java ==8
* Maven >=3.0

The archetype is hosted on a [BinTray repository](https://dl.bintray.com/nlesc/knime-python-node-archetyp).
Maven does not resolve to this BinTray repository by default so it must be added.
The archetype is hosted on a [GitHub packages repository](https://github.com/orgs/3D-e-Chem/packages?repo_name=tycho-knime-node-archetype).
Maven does not resolve to this GitHub packages repository by default so it must be added.

The ~/.m2/settings.xml should contain the following profile:

Expand All @@ -45,8 +44,8 @@ The ~/.m2/settings.xml should contain the following profile:
<id>pythonknimearchetype</id>
<repositories>
<repository>
<id>python-knime-archetype</id>
<url>https://dl.bintray.com/nlesc/knime-python-node-archetype</url>
<id>archetype</id>
<url>https://maven.pkg.github.com/3D-e-Chem</url>
</repository>
</repositories>
</profile>
Expand Down Expand Up @@ -126,21 +125,11 @@ Further instructions about generated project can be found in it's README.md file

### Deploy

To deploy current version to Bintray.
To deploy current version to GitHub Packages.

1. Add bintray API key to [~/.m2/settings.xml](https://maven.apache.org/settings.html)

```
<servers>
<server>
<id>bintray-nlesc-knime-python-node-archetype</id>
<username>************</username>
<password>********************************</password>
</server>
<servers>
```

2. Run `mvn deploy`
0. Create personal access token with write:packages scope
1. Create [~/.m2/settings.xml](https://docs.github.com/en/packages/guides/configuring-apache-maven-for-use-with-github-packages#authenticating-with-a-personal-access-token)
2. Run `mvn --batch-mode deploy`

## Attribution

Expand Down
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@
</pluginManagement>
</build>
<distributionManagement>
<repository>
<id>bintray-nlesc-knime-python-node-archetype</id>
<name>nlesc-knime-node-archetype</name>
<url>https://api.bintray.com/maven/nlesc/knime-python-node-archetype/knime-python-node-archetype/;publish=1</url>
</repository>
</distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/3D-e-Chem/knime-python-node-archetype</url>
</repository>
</distributionManagement>
</project>
6 changes: 3 additions & 3 deletions src/main/resources/META-INF/maven/archetype-metadata.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="knime.node.archetype"
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
<archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="knime.node.archetype"
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<requiredProperties>
<requiredProperty key="tycho_version">
Expand All @@ -10,7 +10,7 @@
<defaultValue>1.8</defaultValue>
</requiredProperty>
<requiredProperty key="knime_version">
<defaultValue>4.0</defaultValue>
<defaultValue>4.3</defaultValue>
</requiredProperty>
<requiredProperty key="github_organization" />
<requiredProperty key="github_repository" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,23 @@ public class ${node}Dialog extends DefaultNodeSettingsPane {
public void loadAdditionalSettingsFrom(NodeSettingsRO settings, PortObjectSpec[] specs)
throws NotConfigurableException {
super.loadAdditionalSettingsFrom(settings, specs);
config.loadFromInDialog(settings);
try {
config.loadFromInDialog(settings);
} catch (InvalidSettingsException e) {
// swallow error
}
pythonOptions.loadSettingsFrom(config);
}

@Override
public void loadAdditionalSettingsFrom(NodeSettingsRO settings, DataTableSpec[] specs)
throws NotConfigurableException {
super.loadAdditionalSettingsFrom(settings, specs);
config.loadFromInDialog(settings);
try {
config.loadFromInDialog(settings);
} catch (InvalidSettingsException e) {
// swallow error
}
pythonOptions.loadSettingsFrom(config);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<unit id="org.knime.features.js.quickforms.feature.group" version="0.0.0"/>
<unit id="org.knime.features.json.feature.group" version="0.0.0"/>
<unit id="org.knime.features.personalproductivity.feature.group" version="0.0.0"/>
<unit id="org.knime.features.testingapplication.feature.group" version="0.0.0"/>
<unit id="org.knime.features.testing.application.feature.group" version="0.0.0"/>
<unit id="org.knime.features.xml.feature.group" version="0.0.0"/>
<unit id="org.knime.features.python2.feature.group" version="0.0.0"/>
<unit id="org.knime.targetPlatform.feature.group" version="0.0.0"/>
Expand All @@ -33,7 +33,7 @@
-Dsun.java2d.d3d=false
-Dosgi.classloader.lock=classname
-XX:+UnlockDiagnosticVMOptions
-XX:+UnsyncloadClass
-XX:+UnsyncloadClass
-XX:+UseG1GC
-ea
-Dorg.eclipse.swt.internal.gtk.cairoGraphics=false
Expand Down
23 changes: 22 additions & 1 deletion src/main/resources/archetype-resources/tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</execution>
</executions>
</plugin>
<!-- the report goal of jacoco-maven-plugin plugin shows coverage of tests.
<!-- the report goal of jacoco-maven-plugin plugin shows coverage of tests.
To get coverage of ../plugin/java/src/ use the jacoco ant reporter. See https://intellectualcramps.wordpress.com/2012/03/22/jacoco-tycho-and-coverage-reports/ -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -113,6 +113,27 @@
</configuration>

</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.version}</version>
<configuration>
<dependency-resolution>
<extraRequirements>
<requirement>
<type>eclipse-feature</type>
<id>org.knime.features.core</id>
<versionRange>0.0.0</versionRange>
</requirement>
<requirement>
<type>eclipse-feature</type>
<id>org.knime.features.testing.application</id>
<versionRange>0.0.0</versionRange>
</requirement>
</extraRequirements>
</dependency-resolution>
</configuration>
</plugin>
</plugins>
</build>
<properties>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/projects/basic/archetype.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ groupId=foo.bar
artifactId=foo.bar.knime
tycho_version=1.4.0
java_version=1.8
knime_version=4.0
knime_version=4.3
github_organization=foo
github_repository=bar
node=SomeNode
Expand Down