Skip to content

Commit 14da87c

Browse files
committed
added initial code base
1 parent 12c9107 commit 14da87c

File tree

86 files changed

+6204
-1
lines changed

Some content is hidden

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

86 files changed

+6204
-1
lines changed

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#
2+
# https://help.github.com/articles/dealing-with-line-endings/
3+
#
4+
# These are explicitly windows files and should use crlf
5+
*.bat text eol=crlf
6+

.gitignore

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
# Ignore Gradle project-specific cache directory
2+
.gradle
3+
4+
# Ignore Gradle build output directory
5+
build
6+
### JetBrains template
7+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
8+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
9+
10+
# User-specific stuff
11+
.idea/**/workspace.xml
12+
.idea/**/tasks.xml
13+
.idea/**/usage.statistics.xml
14+
.idea/**/dictionaries
15+
.idea/**/shelf
16+
17+
# Generated files
18+
.idea/**/contentModel.xml
19+
20+
# Sensitive or high-churn files
21+
.idea/**/dataSources/
22+
.idea/**/dataSources.ids
23+
.idea/**/dataSources.local.xml
24+
.idea/**/sqlDataSources.xml
25+
.idea/**/dynamic.xml
26+
.idea/**/uiDesigner.xml
27+
.idea/**/dbnavigator.xml
28+
29+
# Gradle
30+
.idea/**/gradle.xml
31+
.idea/**/libraries
32+
33+
# Gradle and Maven with auto-import
34+
# When using Gradle or Maven with auto-import, you should exclude module files,
35+
# since they will be recreated, and may cause churn. Uncomment if using
36+
# auto-import.
37+
# .idea/artifacts
38+
# .idea/compiler.xml
39+
# .idea/jarRepositories.xml
40+
# .idea/modules.xml
41+
# .idea/*.iml
42+
# .idea/modules
43+
# *.iml
44+
# *.ipr
45+
46+
# CMake
47+
cmake-build-*/
48+
49+
# Mongo Explorer plugin
50+
.idea/**/mongoSettings.xml
51+
52+
# File-based project format
53+
*.iws
54+
55+
# IntelliJ
56+
out/
57+
58+
# mpeltonen/sbt-idea plugin
59+
.idea_modules/
60+
61+
# JIRA plugin
62+
atlassian-ide-plugin.xml
63+
64+
# Cursive Clojure plugin
65+
.idea/replstate.xml
66+
67+
# Crashlytics plugin (for Android Studio and IntelliJ)
68+
com_crashlytics_export_strings.xml
69+
crashlytics.properties
70+
crashlytics-build.properties
71+
fabric.properties
72+
73+
# Editor-based Rest Client
74+
.idea/httpRequests
75+
76+
# Android studio 3.1+ serialized cache file
77+
.idea/caches/build_file_checksums.ser
78+
79+
### macOS template
80+
# General
81+
.DS_Store
82+
.AppleDouble
83+
.LSOverride
84+
85+
# Icon must end with two \r
86+
Icon
87+
88+
# Thumbnails
89+
._*
90+
91+
# Files that might appear in the root of a volume
92+
.DocumentRevisions-V100
93+
.fseventsd
94+
.Spotlight-V100
95+
.TemporaryItems
96+
.Trashes
97+
.VolumeIcon.icns
98+
.com.apple.timemachine.donotpresent
99+
100+
# Directories potentially created on remote AFP share
101+
.AppleDB
102+
.AppleDesktop
103+
Network Trash Folder
104+
Temporary Items
105+
.apdisk
106+
107+
### Gradle template
108+
.gradle
109+
/build/
110+
111+
# Ignore Gradle GUI config
112+
gradle-app.setting
113+
114+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
115+
!gradle-wrapper.jar
116+
117+
# Cache of project
118+
.gradletasknamecache
119+
120+
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
121+
# gradle/wrapper/gradle-wrapper.properties
122+
123+
### Java template
124+
# Compiled class file
125+
*.class
126+
127+
# Log file
128+
*.log
129+
130+
# BlueJ files
131+
*.ctxt
132+
133+
# Mobile Tools for Java (J2ME)
134+
.mtj.tmp/
135+
136+
# Package Files #
137+
*.jar
138+
*.war
139+
*.nar
140+
*.ear
141+
*.zip
142+
*.tar.gz
143+
*.rar
144+
145+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
146+
hs_err_pid*
147+
148+
### Windows template
149+
# Windows thumbnail cache files
150+
Thumbs.db
151+
Thumbs.db:encryptable
152+
ehthumbs.db
153+
ehthumbs_vista.db
154+
155+
# Dump file
156+
*.stackdump
157+
158+
# Folder config file
159+
[Dd]esktop.ini
160+
161+
# Recycle Bin used on file shares
162+
$RECYCLE.BIN/
163+
164+
# Windows Installer files
165+
*.cab
166+
*.msi
167+
*.msix
168+
*.msm
169+
*.msp
170+
171+
# Windows shortcuts
172+
*.lnk
173+
174+
### Linux template
175+
*~
176+
177+
# temporary files which can be created if a process still has a handle open of a deleted file
178+
.fuse_hidden*
179+
180+
# KDE directory preferences
181+
.directory
182+
183+
# Linux trash folder which might appear on any partition or disk
184+
.Trash-*
185+
186+
# .nfs files are created when an open file is removed but is still being accessed
187+
.nfs*
188+

AUTHORS.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#### Copyright (c) 2020, Institute of Energy Systems, Energy Efficiency and Energy Economics (ie3) - All rights reserved.
2+
3+
### Lead Developers:
4+
- Johannes Hiry
5+
6+
### Main Contributers:
7+
- Johannes Hiry - https://github.com/johanneshiry
8+
- Chris Kittl - https://github.com/ckittl
9+
- Christian Mahr
10+
11+
### Coordination:
12+
- Johannes Hiry

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
# NetPad++
2-
A simple graphical user interface to allow manipulation of grids that are in PowerSystemDataModel format
2+
A simple graphical user interface to allow manipulation of grids that are in PowerSystemDataModel format.
3+
Currently, the editor supports read and write operations from and to .csv-file grid data.
4+
5+
The edit support is currently restricted to drag-and-drop nodes and alter their geo position as well
6+
as renaming them. It is planned to add more features in a "per-request" manner. Please feel free to
7+
use the issue tracker to submit new feature request.

build.gradle

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
plugins {
2+
id 'groovy'
3+
id 'java'
4+
id 'application' // creates a JVM executable
5+
id 'maven-publish'
6+
id 'pmd' //code check, working on source code
7+
id "com.github.spotbugs" version "4.3.0" //code check, working on byte code
8+
id "com.diffplug.gradle.spotless" version "4.3.0" //code format
9+
id 'com.github.onslip.gradle-one-jar' version '1.0.5' // pack a self contained jar
10+
id 'org.openjfx.javafxplugin' version '0.0.8' // java 11 javafx plugin for gradle
11+
id 'jacoco' // java code coverage plugin
12+
id "org.sonarqube" version "3.0" // sonarqube
13+
}
14+
15+
ext {
16+
//version (changing these should be considered thoroughly!)
17+
javaVersion = JavaVersion.VERSION_11
18+
19+
unitsOfMeasurementVersion = '1.0.10'
20+
javaFxVersion = '15-ea+1'
21+
slf4jVersion = '1.7.26'
22+
23+
scriptsLocation = 'gradle' + File.separator + 'scripts' + File.separator //location of script plugins
24+
25+
mainClass = 'edu.ie3.netpad.main.NetPadPlusPlus'
26+
}
27+
28+
apply from: scriptsLocation + 'tests.gradle'
29+
apply from: scriptsLocation + 'pmd.gradle'
30+
apply from: scriptsLocation + 'spotbugs.gradle'
31+
apply from: scriptsLocation + 'spotless.gradle'
32+
apply from: scriptsLocation + 'checkJavaVersion.gradle'
33+
apply from: scriptsLocation + 'sonarqube.gradle'
34+
apply from: scriptsLocation + 'selfContainedJar.gradle'
35+
apply from: scriptsLocation + 'jacoco.gradle'
36+
37+
38+
39+
group = 'edu.ie3'
40+
description = 'NetPad++'
41+
version = '0.0.1-SNAPSHOT'
42+
43+
sourceCompatibility = javaVersion
44+
45+
repositories {
46+
jcenter() //searches in bintray's repository 'jCenter', which contains Maven Central
47+
maven { url "https://jitpack.io" } // allows for github repos as dependencies
48+
maven { url 'https://oss.sonatype.org/service/local/repositories/snapshots/content' } // snapshot artifacts
49+
}
50+
51+
dependencies {
52+
53+
// ie³ github repository
54+
compile ('com.github.ie3-institute:PowerSystemDataModel:1.1-SNAPSHOT') {
55+
/* Exclude nested logging and ie³ related dependencies */
56+
exclude group: 'org.slf4j'
57+
exclude group: 'com.github.ie3-institute'
58+
}
59+
60+
compile ('com.github.ie3-institute:PowerSystemUtils:1.3.1') {
61+
/* Exclude nested logging and ie³ related dependencies */
62+
exclude group: 'org.slf4j'
63+
exclude group: 'com.github.ie3-institute'
64+
}
65+
66+
// gluon hq
67+
compile 'com.gluonhq:maps:2.0.0-ea+3'
68+
implementation 'com.gluonhq.attach:util:4.0.7'
69+
implementation 'com.gluonhq.attach:storage:4.0.7:desktop'
70+
71+
// JGraphT
72+
compile 'org.jgrapht:jgrapht-core:1.3.1'
73+
compile 'org.jgrapht:jgrapht-ext:1.3.1'
74+
75+
76+
// javafx
77+
compile "org.openjfx:javafx-fxml:$javaFxVersion"
78+
compile "org.openjfx:javafx-swing:$javaFxVersion"
79+
compile "org.openjfx:javafx-graphics:$javaFxVersion"
80+
compile "org.openjfx:javafx-web:$javaFxVersion"
81+
implementation 'org.controlsfx:controlsfx:11.0.1'
82+
83+
// Apache POI
84+
compile 'org.apache.poi:poi-ooxml:4.1.0'
85+
86+
// rx java
87+
compile 'io.reactivex:rxjava:1.3.8'
88+
89+
// logging
90+
compile "org.slf4j:slf4j-api:${slf4jVersion}" // slf4j wrapper
91+
compile 'com.lmax:disruptor:+' //async logging
92+
compile 'org.apache.logging.log4j:log4j-api:+' // log4j
93+
compile 'org.apache.logging.log4j:log4j-core:+' // log4j
94+
compile 'org.apache.logging.log4j:log4j-slf4j-impl:+' // log4j -> slf4j
95+
96+
97+
// testing
98+
testCompile 'junit:junit:+'
99+
testCompile 'org.spockframework:spock-core:1.3-groovy-+'
100+
testCompile 'cglib:cglib-nodep:+' //enables mocking of classes (in addition to interfaces)
101+
compile 'org.mockito:mockito-core:+' //mocking framework
102+
103+
// pbf parser //
104+
compile 'com.github.johanneshiry:OSMonaut:1.1'
105+
}
106+
107+
wrapper {
108+
gradleVersion = '6.4.1'
109+
}
110+
111+
run {
112+
// Gradle uses an empty Input as default, leading to a non-blocking behaviour and thus an immediate shutdown
113+
standardInput = System.in
114+
}
115+
116+
jar {
117+
manifest {
118+
attributes(
119+
'Main-Class': mainClass
120+
)
121+
}
122+
}
123+
124+
javafx {
125+
version = javaFxVersion
126+
// corresponding javafx modules
127+
modules = [
128+
'javafx.controls',
129+
'javafx.fxml',
130+
'javafx.swing',
131+
'javafx.graphics',
132+
'javafx.web'
133+
]
134+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Enforces the correct Java version, as some parts of the project may malfunction under a wrong version
2+
// If this task fails, try changing your JAVA_HOME to the required version
3+
tasks.register("checkJavaVersion") {
4+
group = 'Verification'
5+
description = 'Enforces correct Java version'
6+
7+
doLast {
8+
def foundVersion = JavaVersion.current()
9+
if (foundVersion != javaVersion)
10+
throw new IllegalStateException("Wrong Java version: required is "
11+
+ javaVersion + ", but found " + foundVersion)
12+
}
13+
}
14+
compileJava.dependsOn(checkJavaVersion)

0 commit comments

Comments
 (0)