Skip to content

Commit

Permalink
Merge pull request #32 from 3D-e-Chem/knime43
Browse files Browse the repository at this point in the history
Drop Python nodes
  • Loading branch information
sverhoeven authored Feb 12, 2021
2 parents 19d101b + 68dc3f9 commit 02cb22c
Show file tree
Hide file tree
Showing 123 changed files with 114 additions and 7,818 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
push:
pull_request:
types:
- "opened"
- "reopened"

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml', '**/MANIFEST.MF', 'targetplatform/*.target') }}
restore-keys: ${{ runner.os }}-m2
- name: OS dependencies
run: sudo apt-get install xvfb
- name: Build with Maven
run: mvn -B package
- name: Run tests
run: xvfb-run mvn verify -B
- name: Set up JDK 11 for SonarCloud analysis
uses: actions/setup-java@v1
with:
java-version: 11
- name: SonarCloud analysis
run: mvn sonar:sonar -Dsonar.login=$SONAR_TOKEN
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

31 changes: 29 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# Change Log

All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
The file is formatted as described on http://keepachangelog.com/.

## Unreleased

## [3.0.0] - 2021-02-12

## Removed

- Python based nodes in favour of web service nodes ([#25](https://github.com/3D-e-Chem/knime-kripodb/issues/25))

## [2.5.0] - 2019-09-25

### Deprecated
Expand Down Expand Up @@ -51,7 +58,7 @@ The file is formatted as described on http://keepachangelog.com/.

### Added

- Pure Java nodes to fetch fragment information and similarites from web service (#17)
- Pure Java nodes to fetch fragment information and similarites from web service (#17)

## Changed

Expand Down Expand Up @@ -94,7 +101,7 @@ Retracted due to unresolved compilation problems.

- Nest Kripo nodes under /community/3D-e-Chem (#7)

## [2.1.0] - 2016-07-14
## [2.1.0] - 2016-07-14

### Added

Expand Down Expand Up @@ -163,3 +170,23 @@ Version >= 2.0.0 uses KripoDB Knime node which have there own dialog with combo

- Python templates to use KripoDB package
- Example workflow on Github repo.

[unreleased]: https://github.com/3D-e-Chem/knime-kripodb/compare/v2.5.0...HEAD
[2.5.0]: https://github.com/3D-e-Chem/knime-kripodb/compare/v2.4.2...v2.5.0
[2.4.2]: https://github.com/3D-e-Chem/knime-kripodb/compare/v2.3.1...v2.4.2
[2.4.1]: https://github.com/3D-e-Chem/knime-kripodb/compare/v2.3.0...v2.3.1
[2.3.0]: https://github.com/3D-e-Chem/knime-kripodb/compare/v2.2.1...v2.3.0
[2.2.1]: https://github.com/3D-e-Chem/knime-kripodb/compare/v2.2.0...v2.2.1
[2.2.0]: https://github.com/3D-e-Chem/knime-kripodb/compare/v2.1.5...v2.2.0
[2.1.5]: https://github.com/3D-e-Chem/knime-kripodb/compare/v2.1.4...v2.1.5
[2.1.4]: https://github.com/3D-e-Chem/knime-kripodb/compare/v2.1.3...v2.1.4
[2.1.3]: https://github.com/3D-e-Chem/knime-kripodb/compare/v2.1.2...v2.1.3
[2.1.2]: https://github.com/3D-e-Chem/knime-kripodb/compare/v2.1.1...v2.1.2
[2.1.1]: https://github.com/3D-e-Chem/knime-kripodb/compare/v2.1.0...v2.1.1
[2.1.0]: https://github.com/3D-e-Chem/knime-kripodb/compare/v2.0.1...v2.1.0
[2.0.1]: https://github.com/3D-e-Chem/knime-kripodb/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/3D-e-Chem/knime-kripodb/compare/v1.0.3...v2.0.0
[1.0.3]: https://github.com/3D-e-Chem/knime-kripodb/compare/v1.0.2...v1.0.3
[1.0.2]: https://github.com/3D-e-Chem/knime-kripodb/compare/v1.0.1...v1.0.2
[1.0.1]: https://github.com/3D-e-Chem/knime-kripodb/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/3D-e-Chem/knime-kripodb/releases/tag/v1.0.0
54 changes: 30 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ KRIPO stands for [Key Representation of Interaction in POckets](http://dx.doi.or

[KNIME](http://www.knime.org) nodes for KripoDB (https://github.com/3D-e-Chem/kripodb).

[![Build Status](https://travis-ci.org/3D-e-Chem/knime-kripodb.svg?branch=master)](https://travis-ci.org/3D-e-Chem/knime-kripodb)
[![Build status](https://ci.appveyor.com/api/projects/status/3way61l0ojtbhcrv?svg=true)](https://ci.appveyor.com/project/3D-e-Chem/knime-kripodb)
[![Java CI with Maven](https://github.com/3D-e-Chem/knime-kripodb/workflows/Java%20CI%20with%20Maven/badge.svg)](https://github.com/3D-e-Chem/knime-kripodb/actions?query=workflow%3A%22Java+CI+with+Maven%22)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=nl.esciencecenter.e3dchem.kripodb%3Anl.esciencecenter.e3dchem.kripodb&metric=alert_status)](https://sonarcloud.io/dashboard?id=nl.esciencecenter.e3dchem.kripodb%3Anl.esciencecenter.e3dchem.kripodb)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=nl.esciencecenter.e3dchem.kripodb%3Anl.esciencecenter.e3dchem.kripodb&metric=coverage)](https://sonarcloud.io/dashboard?id=nl.esciencecenter.e3dchem.kripodb%3Anl.esciencecenter.e3dchem.kripodb)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.597262.svg)](https://doi.org/10.5281/zenodo.597262)
Expand All @@ -14,11 +13,11 @@ KRIPO stands for [Key Representation of Interaction in POckets](http://dx.doi.or

Requirements:

* KNIME, https://www.knime.org, version 4.0 or higher
- KNIME, https://www.knime.org, version 4.0 or higher

Optionally:

* KripoDB Python package & data files, https://github.com/3D-e-Chem/kripodb,
- KripoDB Python package & data files, https://github.com/3D-e-Chem/kripodb,
required to start local running kripo web service instead of the public [one](http://3d-e-chem.vu-compmedchem.nl/kripodb/ui).

Steps to get KripoDB nodes inside KNIME:
Expand All @@ -42,7 +41,7 @@ Other workflows using the KripoDB nodes can be found at https://github.com/3D-e-

Development requirements:

* Maven, https://maven.apache.org
- Maven, https://maven.apache.org

Steps to get development environment setup based on https://github.com/knime/knime-sdk-setup#sdk-setup:

Expand All @@ -57,7 +56,7 @@ During import the Tycho Eclipse providers must be installed.

## Build

```
```shell
mvn package
```

Expand All @@ -66,7 +65,7 @@ An Eclipse update site will be made in `p2/target/repository` repository.

## Tests

```
```shell
mvn verify
```

Expand All @@ -78,18 +77,21 @@ See https://github.com/3D-e-Chem/knime-testflow for more information about workf

The web service client is generated using [Swagger Code Generator](https://github.com/swagger-api/swagger-codegen) and stored inside `plugin/src/java/nl/esciencecenter/e3dchem/kripodb/ws/client/` directory.

1. Start KripoDB webservice
```
1. Start [KripoDB webservice](https://github.com/3D-e-Chem/kripodb#web-service)

```shell
kripodb serve data/similarities.frozen.h5 data/fragments.sqlite data/pharmacophores.h5
```

2. Download swagger code generator
```

```shell
wget http://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.2.3/swagger-codegen-cli-2.2.3.jar
```

3. Generate a client for KripoDB web service
```

```shell
java -jar swagger-codegen-cli-2.2.3.jar generate \
--input-spec http://localhost:8084/kripo/swagger.json \
--output client \
Expand All @@ -98,13 +100,15 @@ java -jar swagger-codegen-cli-2.2.3.jar generate \
```

4. Compile client
```

```shell
cd client
mvn package
```

5. Populate plugin with client source code and dependencies
```

```shell
mkdir ../plugin/lib
cp target/lib/gson-* target/lib/logging-interceptor-* target/lib/ok* target/lib/swagger-annotations-* ../plugin/lib/
rm -r ../plugin/src/java/nl/esciencecenter/e3dchem/kripodb/ws/client
Expand All @@ -120,22 +124,23 @@ cp -r src/main/java/nl/esciencecenter/e3dchem/kripodb/ws/client ../plugin/src/ja
3. Create package with `mvn package`, will create update site in `p2/target/repository`
4. Test node by installing it from local update site
5. Append new release to 3D-e-Chem update site
1. Make clone of https://github.com/3D-e-Chem/3D-e-Chem.github.io repo
2. Append release to 3D-e-Chem update site with `mvn install -Dtarget.update.site=<3D-e-Chem repo/updates>`
6. Commit and push changes in this repo and 3D-e-Chem.github.io repo
7. Create a Github release
8. Update Zenodo entry
1. Correct authors
2. To Related/alternate identifiers section add http://dx.doi.org/10.1186/1758-2946-6-S1-O26 as `is cited by this upload` entry.
9. Make nodes available to 3D-e-Chem KNIME feature by following steps at https://github.com/3D-e-Chem/knime-node-collection#new-release
10. Update CITIATION.cff with new DOI
6. Make clone of https://github.com/3D-e-Chem/3D-e-Chem.github.io repo
7. Append release to 3D-e-Chem update site with `mvn install -Dtarget.update.site=<3D-e-Chem repo/updates>`
8. Commit and push changes in this repo and 3D-e-Chem.github.io repo
9. Create a Github release
10. Update Zenodo entry
11. Correct authors
12. To Related/alternate identifiers section add http://dx.doi.org/10.1186/1758-2946-6-S1-O26 as `is cited by this upload` entry.
13. Make nodes available to 3D-e-Chem KNIME feature by following steps at https://github.com/3D-e-Chem/knime-node-collection#new-release
14. Update CITIATION.cff with new DOI

# Create stub recordings for integration tests

The test workflow are tested against a mocked web server and not the actual http://3d-e-chem.vu-compmedchem.nl/kripodb site.
The mock server is called [WireMock](http://WireMock.org/) and normally gives empty responses.
To have WireMock server return filled responses, stubs stored in `tests/src/test/resources/` directory must be provided.
The stubs can be recorded by starting a WireMock server in recording mode by:

```
java -jar tests/lib/wiremock-standalone-2.5.0.jar --proxy-all="http://3d-e-chem.vu-compmedchem.nl/" \
--port=8089 --record-mappings --verbose --root-dir=tests/src/test/resources/
Expand All @@ -144,11 +149,12 @@ java -jar tests/lib/wiremock-standalone-2.5.0.jar --proxy-all="http://localhost:
```

Then in a KNIME workflow in the KripoDB nodes set the base path to http://localhost:8089.
Executing the workflow will fetch data from http://3d-e-chem.vu-compmedchem.nl/kripodb via the WireMock server and cause new stubs to be recorded in the `tests/src/test/resources/` directory.
Executing the workflow will fetch data from http://3d-e-chem.vu-compmedchem.nl/kripodb via the WireMock server and cause new stubs to be recorded in the `tests/src/test/resources/` directory.

To run the test workflows from inside KNIME desktop enviroment start the WireMock server in mock mode by:

```
```shell
java -jar tests/lib/wiremock-standalone-2.5.0.jar --port=8089 --verbose --root-dir=tests/src/test/resources/
```

Then import the test workflows in `tests/src/knime/` directory, select the workflow in the KNIME explorer and in the context menu (right-click) select `Run as workflow test`.
30 changes: 0 additions & 30 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="nl.esciencecenter.e3dchem.kripodb.feature"
label="KripoDB nodes for KNIME"
version="2.5.0.qualifier"
version="3.0.0.qualifier"
provider-name="Netherlands eScience Center">

<description url="https://github.com/3D-e-Chem/knime-kripodb">
Expand Down
2 changes: 1 addition & 1 deletion feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>nl.esciencecenter.e3dchem.kripodb</groupId>
<artifactId>nl.esciencecenter.e3dchem.kripodb</artifactId>
<version>2.5.0-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>
</parent>

<artifactId>nl.esciencecenter.e3dchem.kripodb.feature</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion p2/category.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature id="nl.esciencecenter.e3dchem.kripodb.feature" version="2.5.0.qualifier">
<feature id="nl.esciencecenter.e3dchem.kripodb.feature" version="3.0.0.qualifier">
<category name="nl.esciencecenter.3D-e-Chem"/>
</feature>
<category-def name="nl.esciencecenter.3D-e-Chem" label="KNIME 3D-e-Chem Contributions">
Expand Down
2 changes: 1 addition & 1 deletion p2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>nl.esciencecenter.e3dchem.kripodb</artifactId>
<groupId>nl.esciencecenter.e3dchem.kripodb</groupId>
<version>2.5.0-SNAPSHOT</version>
<version>3.0.0-SNAPSHOT</version>
</parent>
<artifactId>nl.esciencecenter.e3dchem.kripodb.p2</artifactId>
<packaging>eclipse-repository</packaging>
Expand Down
4 changes: 1 addition & 3 deletions plugin/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: 3D-e-Chem KNIME KripoDB nodes
Bundle-SymbolicName: nl.esciencecenter.e3dchem.kripodb.plugin;singleton:=true
Bundle-Version: 2.5.0.qualifier
Bundle-Version: 3.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Activator: nl.esciencecenter.e3dchem.kripodb.Activator
Require-Bundle: org.knime.core;bundle-version="[4.0.0,5.0.0)",
org.knime.base;bundle-version="[4.0.0,5.0.0)",
org.knime.chem.types;bundle-version="[4.0.0,5.0.0)",
org.rdkit.knime.types,
nl.esciencecenter.e3dchem.python.plugin;bundle-version="[2.0.1,3.0.0)",
nl.esciencecenter.e3dchem.plugin;bundle-version="[1.0.0,2.0.0)",
nl.esciencecenter.e3dchem.knime.pharmacophore.plugin;bundle-version="[1.0.0,2.0.0)"
Bundle-Vendor: Netherlands eScience Center
Expand All @@ -23,4 +22,3 @@ Bundle-ClassPath: lib/gson-2.8.1.jar,
Export-Package: nl.esciencecenter.e3dchem.kripodb,
nl.esciencecenter.e3dchem.kripodb.fragments,
nl.esciencecenter.e3dchem.kripodb.fragmentsbysimilarity
Import-Package: org.knime.python2.config
22 changes: 0 additions & 22 deletions plugin/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@
locked="false"
name="KripoDB"
path="/community/3d-e-chem"/>
<category
description="Category containing Kripo nodes for using local files"
icon="nl/esciencecenter/e3dchem/kripodb/kripo.png"
level-id="local"
locked="false"
name="For local files"
path="/community/3d-e-chem/kripodb"/>
</extension>

<extension point="org.knime.workbench.repository.nodes">
Expand All @@ -34,20 +27,5 @@
deprecated="false"
factory-class="nl.esciencecenter.e3dchem.kripodb.ws.pharmacophores.PharmacophoresFactory">
</node>
<node
category-path="/community/3d-e-chem/kripodb/local"
deprecated="true"
factory-class="nl.esciencecenter.e3dchem.kripodb.fragmentsbysimilarity.FragmentBySimilarityFactory">
</node>
<node
category-path="/community/3d-e-chem/kripodb/local"
deprecated="true"
factory-class="nl.esciencecenter.e3dchem.kripodb.fragments.FragmentByIdFactory">
</node>
<node
category-path="/community/3d-e-chem/kripodb/local"
deprecated="true"
factory-class="nl.esciencecenter.e3dchem.kripodb.local.pharmacophores.PharmacophoresFactory">
</node>
</extension>
</plugin>
Loading

0 comments on commit 02cb22c

Please sign in to comment.