Skip to content

Commit ccc6b1a

Browse files
authored
Merge pull request #33 from spatial-data-lab/main
Pre-release test merge
2 parents 35f4869 + c809171 commit ccc6b1a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2834
-2004
lines changed

CONTRIBUTING.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,39 +25,40 @@ We use [SonarLint](https://www.sonarsource.com/python/) for linting.
2525

2626
This is a short step by step guide on how to setup your development environment to get started with the node development.
2727

28+
2829
1. [Download](https://www.knime.com/nightly-build-downloads) and install the latest KNIME nightly build
2930

30-
2. Install KNIME extension: Open the downloaded KNIME Analytics Platform nightly build and click KNIME -> File-> Install KNIME Extensions, Search for 'Python' and select `KNIME Python Extension Development (Labs)`,`KNIME Python Integration (Labs) `, Disable the “Group items by category” option and search for 'geo' and select `KNIME Geospatial Nodes`.
31+
2. Install KNIME extension: Open the downloaded KNIME Analytics Platform nightly build and click KNIME -> File-> Install KNIME Extensions, Search for 'Python' and select `KNIME Python Extension Development (Labs)`,`KNIME Python Integration (Labs) `, Disable the “Group items by category” option and search for 'geo' and select `KNIME Geospatial Extension`. The KNIME Geospatial Extension contains the Java and Python representation of the geometry data types.
3132

32-
3. Follow the instruction in the Tutorials section of the [Create a New Python based KNIME Extension guide](https://docs.knime.com/latest/pure_python_node_extensions_guide/index.html#_tutorials). When building the new Python environment for Geospatial node development also install the `geopandas` package as following:
33+
5. Clone this repository
3334
```bash
34-
conda create -n my_python_env python=3.9 knime-python-base knime-extension geopandas -c knime -c conda-forge
35+
git clone https://github.com/spatial-data-lab/knime-geospatial-extension.git
36+
37+
```
38+
39+
3. Before proceeding in KNIME Analytics Platform we have to create the Python environment with all required packages e.g. `geopandas` to do so execute the following command that uses the [geospatial_env.yml](https://github.com/spatial-data-lab/knime-geospatial-extension/blob/main/knime_extension/geospatial_env.yml) file in the local repository clone:
40+
```bash
41+
#browse to the folder where the geospatial_env.yml file of the local repository clone is located and then execute
42+
conda env create -f geospatial_env.yml
3543

36-
conda activate my_python_env
3744

38-
conda install libpysal scipy # if you use these packages, please install here too
45+
conda activate geospatial_env
3946

4047
conda info
41-
# Record the env location path such as D:\ProgramData\Anaconda3\envs\my_python_env
48+
# Record the env location path such as D:\ProgramData\Anaconda3\envs\geospatial_env
4249
```
4350

44-
4. Configure the following KNIME Python settings:
45-
* KNIME -> File-> Preference> KNIME> Conda Choose anaconda directory
46-
* KNIME -> File-> Preference> KNIME> Python(Labs) Choose my_python_env
51+
4. Make a copy of the `config.yml` file e.g. `config_YOURNAME.yml`. Adapt the copied file to point to the `knime_extension` folder on your local hard drive as described [here](https://docs.knime.com/latest/pure_python_node_extensions_guide/index.html#tutorial-writing-first-py-node). The file tells the KNIME Analytics Platform where to search for the Python extension on your local hard drive during development and debugging.
4752

48-
5. Clone this repository
49-
```bash
50-
git clone https://github.com/spatial-data-lab/knime-geospatial-extension.git
51-
52-
```
53-
54-
6. Adapt the `config.yml` file to point to the `knime_extension` folder on your local hard drive as described [here](https://docs.knime.com/latest/pure_python_node_extensions_guide/index.html#tutorial-writing-first-py-node). The file tells the KNIME Analytics Platform where to search for the Python extension on your local hard drive during development and debugging.
53+
5. Add the following line to your `knime.ini`, located in the KNIME nightly root folder, to point to your adjusted `config_YOURNAME.yml` file e.g. `-Dknime.python.extension.config=D:\Software\knime_470\knimespace\geo\config_YOURNAME.yml`
5554

56-
7. Add the following line to your `knime.ini`, located in the KNIME nightly root folder, to point to your adjusted `config.yml` file e.g. `-Dknime.python.extension.config=D:\Software\knime_470\knimespace\geo\config.yml`
55+
6. Go back to the KNIME Analytics Platform and configure the following KNIME Python settings:
56+
* KNIME -> File-> Preference> KNIME> Conda Choose anaconda directory
57+
* KNIME -> File-> Preference> KNIME> Python(Labs) Choose geospatial_env
5758

58-
8. Reopen the KNIME Analytics Platform and you should see the Geospatial extension in your KNIME node repository.
59+
7. Reopen the KNIME Analytics Platform and you should see the Geospatial Analytics extension in your KNIME node repository.
5960

60-
9. If you do not see the extension have a look at the KNIME log file via View -> Open KNIME log. One common problem is that not all required Python packages are install in you Python environment (for example `libpysal` or `geopandas`)
61+
8. If you do not see the extension have a look at the KNIME log file via View -> Open KNIME log.
6162

6263

6364
## Testing

knime_extension/geospatial_env.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ dependencies:
1919
- pip
2020
- pip:
2121
- pyecharts
22-
- pyDataverse
108 Bytes
Loading
Lines changed: 1 addition & 0 deletions
Loading
727 Bytes
Loading
Lines changed: 1 addition & 0 deletions
Loading
594 Bytes
Loading
Lines changed: 1 addition & 0 deletions
Loading
565 Bytes
Loading
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)