Skip to content

Commit

Permalink
Merge branch 'master-forge' into blueskyGephi
Browse files Browse the repository at this point in the history
  • Loading branch information
eduramiba committed Nov 14, 2023
2 parents 49995c5 + 55fa3f9 commit 3206ecb
Show file tree
Hide file tree
Showing 1,240 changed files with 149,714 additions and 34 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: PR

on:
pull_request:
branches:
- master-forge

jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'temurin'
- name: Build project with Maven
run: mvn -B package --file pom.xml
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: release

on:
push:
branches: [ master-forge ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Maven Central Repository
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'temurin'
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE

- name: Get NBM Keystore
run: |
echo "${{ secrets.NBM_KEYSTORE }}" > keystore.ks.asc
gpg -d --passphrase "${{ secrets.NBM_KEYSTORE_ENC_PASSPHRASE }}" --batch keystore.ks.asc > keystore.ks
- name: Build and publish package Linux
run: mvn --batch-mode -Djava.awt.headless=true -Dkeystore.password=${{ secrets.KEYSTORE_PASSWD }} package -P release
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Configure Git user
run: |
git config --global user.email "github-action@users.noreply.github.com"
git config --global user.name "GitHub Actions"
- name: Update autoupdate content on gh-pages
run: mvn scm-publish:publish-scm -P release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ fabric.properties

### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
.idea

*.iml
.idea/
Expand Down Expand Up @@ -178,4 +179,4 @@ nbdist/

# End of https://www.gitignore.io/api/maven,eclipse,netbeans,intellij

.java-version
.java-version
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "modules/OpenSeadragonPlugin/src/main/resources/org/gephi/plugins/openseadragon"]
path = modules/OpenSeadragonPlugin/src/main/resources/org/gephi/plugins/openseadragon
url = https://github.com/totetmatt/gephi-openseadragon-plugin-frontend.git
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ To debug Gephi with your plugin, right click on the `gephi-plugins` project and

To run Gephi with your plugin pre-installed when you click `Run`, create a `Maven` run configuration and enter `org.gephi:gephi-maven-plugin:run` in the command field. The working directory is simply the current project directory.

To debug Gephi with your plugin, create a `Remote` configuration and switch the `Debugger mode` option to `Listen`. Then create a `Maven` run configuration like abobe but add `-Drun.params.debug="-J-Xdebug -J-Xnoagent -J-Xrunjdwp:transport=dt_socket,suspend=n,server=n,address=5005"` into the `Runner` > `VM Options` field. Then, go to the `Run` menu and first run debug with the remote configuration and then only run debug with the Maven configuration.
To debug Gephi with your plugin, create a `Remote` configuration and switch the `Debugger mode` option to `Listen`. Then create a `Maven` run configuration like above but add `-Drun.params.debug="-J-Xdebug -J-Xnoagent -J-Xrunjdwp:transport=dt_socket,suspend=n,server=n,address=5005"` into the `Runner` > `VM Options` field. Then, go to the `Run` menu and first run debug with the remote configuration and then only run debug with the Maven configuration.

When you make changes to your plugin and want to run Gephi with the changes, make sure to build the `gephi-plugins` root module, and not only your module. Otherwise, your changes won't be reflected.

Expand Down
4 changes: 4 additions & 0 deletions modules/AgensGraphPlugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## AgensGraph Plugin

This README supports Markdown, see [syntax](https://help.github.com/articles/markdown-basics/)

123 changes: 123 additions & 0 deletions modules/AgensGraphPlugin/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>gephi-plugin-parent</artifactId>
<groupId>org.gephi</groupId>
<version>0.10.0</version>
</parent>

<groupId>bitnine-global</groupId>
<artifactId>agensgraph-plugin</artifactId>
<version>1.0.0</version>
<packaging>nbm</packaging>

<name>AgensGraph Plugin</name>

<dependencies>
<!-- Insert dependencies here -->
<dependency>
<groupId>org.gephi</groupId>
<artifactId>db-drivers</artifactId>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>io-importer-api</artifactId>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>ui-utils</artifactId>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-windows</artifactId>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util</artifactId>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-filesystems</artifactId>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util-lookup</artifactId>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-dialogs</artifactId>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-modules</artifactId>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util-ui</artifactId>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-awt</artifactId>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-api-progress-nb</artifactId>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-api-progress</artifactId>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-api-annotations-common</artifactId>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-nodes</artifactId>
</dependency>
<dependency>
<groupId>net.bitnine</groupId>
<artifactId>agensgraph-jdbc</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-netbeans-modules-settings</artifactId>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>io-importer-plugin</artifactId>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>graph-api</artifactId>
</dependency>
<dependency>
<groupId>org.gephi</groupId>
<artifactId>project-api</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.netbeans.utilities</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<configuration>
<licenseName>Apache 2.0</licenseName>
<author>Dehowe Feng</author>
<authorEmail></authorEmail>
<authorUrl></authorUrl>
<sourceCodeUrl>https://github.com/bitnine-oss/gephi-plugins/tree/agensgraph-plugin</sourceCodeUrl>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
</project>


Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
package org.bitnine.importer;

import org.gephi.io.importer.api.AbstractDatabase;
import org.gephi.io.importer.api.PropertiesAssociations.EdgeProperties;
import org.gephi.io.importer.api.PropertiesAssociations.NodeProperties;

/**
*
* @author dehowefeng
*/
public class AgensGraphDatabaseImpl extends AbstractDatabase{

private String nodeQuery;
private String edgeQuery;
private String nodeAttributesQuery;
private String edgeAttributesQuery;
private String graphPath;

public AgensGraphDatabaseImpl() {

//Default node associations
properties.addNodePropertyAssociation(NodeProperties.ID, "id");
properties.addNodePropertyAssociation(NodeProperties.LABEL, "label");
properties.addNodePropertyAssociation(NodeProperties.X, "x");
properties.addNodePropertyAssociation(NodeProperties.Y, "y");
properties.addNodePropertyAssociation(NodeProperties.SIZE, "size");
properties.addNodePropertyAssociation(NodeProperties.COLOR, "color");
properties.addNodePropertyAssociation(NodeProperties.START, "start");
properties.addNodePropertyAssociation(NodeProperties.END, "end");
properties.addNodePropertyAssociation(NodeProperties.START, "start_open");
properties.addNodePropertyAssociation(NodeProperties.END_OPEN, "end_open");

//Default edge associations
properties.addEdgePropertyAssociation(EdgeProperties.ID, "id");
properties.addEdgePropertyAssociation(EdgeProperties.SOURCE, "source");
properties.addEdgePropertyAssociation(EdgeProperties.TARGET, "target");
properties.addEdgePropertyAssociation(EdgeProperties.LABEL, "label");
properties.addEdgePropertyAssociation(EdgeProperties.WEIGHT, "weight");
properties.addNodePropertyAssociation(NodeProperties.COLOR, "color");
properties.addEdgePropertyAssociation(EdgeProperties.START, "start");
properties.addEdgePropertyAssociation(EdgeProperties.END, "end");
properties.addEdgePropertyAssociation(EdgeProperties.START, "start_open");
properties.addEdgePropertyAssociation(EdgeProperties.END_OPEN, "end_open");
}

public String getGraphPath() {
return graphPath;
}

public void setGraphPath(String graphPath) {
this.graphPath = graphPath;
}

public String getEdgeAttributesQuery() {
return edgeAttributesQuery;
}

public void setEdgeAttributesQuery(String edgeAttributesQuery) {
this.edgeAttributesQuery = edgeAttributesQuery;
}

public String getEdgeQuery() {
return edgeQuery;
}

public void setEdgeQuery(String edgeQuery) {
this.edgeQuery = edgeQuery;
}

public String getNodeAttributesQuery() {
return nodeAttributesQuery;
}

public void setNodeAttributesQuery(String nodeAttributesQuery) {
this.nodeAttributesQuery = nodeAttributesQuery;
}

public String getNodeQuery() {
return nodeQuery;
}

public void setNodeQuery(String nodeQuery) {
this.nodeQuery = nodeQuery;
}
}

0 comments on commit 3206ecb

Please sign in to comment.