Skip to content

Commit 2ea4966

Browse files
authored
Merge pull request #3 from ie3-institute/ck/#2-prepareRelease
Prepare release v 0.1
2 parents f324502 + a41faa4 commit 2ea4966

File tree

9 files changed

+140
-24
lines changed

9 files changed

+140
-24
lines changed

AUTHORS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
- Johannes Hiry
55

66
### Main Contributers:
7-
- Johannes Hiry - https://github.com/johanneshiry
8-
- Chris Kittl - https://github.com/ckittl
7+
- [Johannes Hiry](https://github.com/johanneshiry)
8+
- [Chris Kittl](https://github.com/ckittl)
99
- Christian Mahr
1010

1111
### Coordination:
12-
- Johannes Hiry
12+
- [Johannes Hiry](https://github.com/johanneshiry)

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## **0.1.0** - 2020-11-05
8+
9+
### Added
10+
- Basic input and output handling for grid models provided by csv files following the specifications of [PowerSystemDataModel](https://raw.githubusercontent.com/ie3-institute/PowerSystemDataModel) - up to version 1.3.2
11+
- Visualisation of the grid model including system participants (e.g. loads, pv plants, ...)
12+
- Basic editing functionality (Renaming, moving around nodes to alter their geographical position, ...)

CONTRIBUTING.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributing to NetPad++
2+
Welcome dear fellow of sophisticated power system modelling! :wave:
3+
And thank you for considering your contribution to this project!
4+
With this document we would like to give you some orientation on how you can contribute.
5+
6+
## Table of contents
7+
* [Testing and reporting bugs](#testing-and-reporting-bugs)
8+
* [Suggest extensions](#suggest-extensions)
9+
* [Contributing code](#contributing-code)
10+
* [Branching and handing in pull requests](#branching-and-handing-in-pull-requests)
11+
* [General (software) design guidelines](#general-software-design-guidelines)
12+
* [Testing](#testing)
13+
* [Finalising your pull request](#finalising-your-pull-request)
14+
* [For any doubts](#for-any-doubts)
15+
16+
## Testing and reporting bugs
17+
We really appreciate your usage of this project.
18+
Whenever you find a bug, it would be nice to check, if this isn't a feature to us. :wink:
19+
Until now we have a good lack of high level documentation, therefore please check, if what you've found isn't among the yet known [issues](https://guides.github.com/features/issues/).
20+
If not, please raise one for us.
21+
Considering the following aspects in your inquiry, assists us in helping you:
22+
23+
* **Is there already an issue addressing your problem?**
24+
* Try to **locate the error** as precise as possible.
25+
* What has to be done to **reproduce the error**?
26+
* **Provide stack trace, logs etc.** and further helpful information
27+
* **What would do you expect to happen?**
28+
* Mark the issue with the **label _bug_**.
29+
30+
## Suggest extensions
31+
We use issues as well to keep track of enhancement suggestions.
32+
Considering the following aspects, assists us in understanding your needs properly:
33+
34+
* **Is there already an issue addressing your request?**
35+
* **What would do you desire for?**
36+
* If possible provide an **example or sketch**.
37+
* Show a **use case**, that should be as versatile as possible.
38+
* Mark the issue with the **label _enhancement_**.
39+
40+
## Contributing code
41+
If you intend to produce some lines of code, pick an issue and get some hands on!
42+
43+
### Branching and handing in pull requests
44+
We try to follow a branch naming strategy of the form `<initials>/#<issueId>-<description>`.
45+
If for example [Prof. Dr. rer. hort. Klaus-Dieter Brokkoli](https://www.instagram.com/prof_broccoli/) would like to add some work on node models reported in issue 4711, he would open a branch `kb/#4711-extendingNodeModels`.
46+
Please hand in a _draft_ pull request as early as possible to allow other to keep track on your changes.
47+
Before opening it for review, please [finalise your pull request](#finalising-your-pull-request).
48+
49+
### General (software) design guidelines
50+
In order to maintain a consistent project, we thought of some general design guidlines, we kindly ask you to take care of:
51+
52+
* We :heart: **immutability**. Therefore, please don't provide setters and use proper instantiation instead.
53+
* `double a = b * pow(x, j)`? :hand: Please **be expressive** in what you code!
54+
* Document your code with **javadoc**.
55+
56+
### Testing
57+
Ensure the proper function of your code by [test driven development (TDD)](https://www.guru99.com/test-driven-development.html).
58+
We have good experiences using [Spock](http://spockframework.org/) as a testing framework for [Groovy](https://groovy-lang.org/).
59+
60+
### Finalising your pull request
61+
Some automated checks assist us in delivering a pretty fair quality of software.
62+
Before marking the pull request as 'ready to review', take these precautionary actions:
63+
64+
* Are all tests passing? Run `gradle test`
65+
* Is your code properly formatted? Run `gradle spotlessApply`
66+
67+
`gradle finalizePR` summarizes all of these steps .
68+
69+
## For any doubts
70+
... please contact
71+
* [Johannes (@johanneshiry)](https://github.com/johanneshiry) or
72+
* [Chris (@ckittl)](https://github.com/ckittl)
73+
74+
We are happy to help! :smiley:

build.gradle

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,15 @@ ext {
1818
//version (changing these should be considered thoroughly!)
1919
javaVersion = JavaVersion.VERSION_11
2020

21-
unitsOfMeasurementVersion = '1.0.10'
2221
javaFxVersion = '15-ea+1'
2322
slf4jVersion = '1.7.26'
2423

2524
scriptsLocation = 'gradle' + File.separator + 'scripts' + File.separator //location of script plugins
26-
2725
}
2826

2927
group = 'com.github.ie3-institute'
3028
description = 'NetPad++'
31-
version = '0.0.1-SNAPSHOT'
29+
version = '0.1'
3230

3331
mainClassName = 'edu.ie3.netpad.main.IntelliJMainLauncher'
3432

@@ -51,15 +49,14 @@ repositories {
5149
}
5250

5351
dependencies {
54-
5552
// ie³ github repository
56-
compile ('com.github.ie3-institute:PowerSystemDataModel:1.1-SNAPSHOT') {
53+
compile ('com.github.ie3-institute:PowerSystemDataModel:1.1.0') {
5754
/* Exclude nested logging and ie³ related dependencies */
5855
exclude group: 'org.slf4j'
5956
exclude group: 'com.github.ie3-institute'
6057
}
6158

62-
compile ('com.github.ie3-institute:PowerSystemUtils:1.3.2-SNAPSHOT') {
59+
compile ('com.github.ie3-institute:PowerSystemUtils:1.3.2') {
6360
/* Exclude nested logging and ie³ related dependencies */
6461
exclude group: 'org.slf4j'
6562
exclude group: 'com.github.ie3-institute'
@@ -107,7 +104,7 @@ dependencies {
107104
}
108105

109106
wrapper {
110-
gradleVersion = '6.4.1'
107+
gradleVersion = '6.7'
111108
}
112109

113110
javafx {

gradle/scripts/spotless.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ spotless {
1818
groovy {
1919
licenseHeader ie3LicHead
2020
excludeJava() // excludes all Java sources within the Groovy source dirs from formatting
21-
paddedCell() // Avoid cyclic ambiguities
2221
// the Groovy Eclipse formatter extends the Java Eclipse formatter,
2322
// so it formats Java files by default (unless `excludeJava` is used).
2423
greclipse()
@@ -32,7 +31,7 @@ spotless {
3231

3332
// removes unnecessary whitespace, indents with tabs and ends on new line for gradle, md and gitignore files and config-XMLs
3433
format 'misc', {
35-
target '**/*.gradle', '**/*.md', '**/.gitignore', 'configs/**'
34+
target '**/*.md', '**/.gitignore', 'configs/**'
3635
trimTrailingWhitespace()
3736
indentWithTabs()
3837
endWithNewline()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

src/main/java/edu/ie3/netpad/map/GridPaintLayer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private void addNode(NodeInput node, Set<SystemParticipantInput> systemParticipa
143143

144144
paintElement(node.getUuid(), gridNodeGraphic);
145145

146-
log.info("Added node {}", node.getId());
146+
log.trace("Added node {}", node.getId());
147147
} else {
148148
throw gridPaintLayerException(node);
149149
}
@@ -157,7 +157,7 @@ private void addLine(LineInput line) {
157157

158158
paintElement(line.getUuid(), lineGraphic);
159159

160-
log.info("Added line {}", line.getId());
160+
log.trace("Added line {}", line.getId());
161161
} else {
162162
throw gridPaintLayerException(line);
163163
}
@@ -177,7 +177,7 @@ private void addTransformer2W(
177177

178178
paintElement(transformer2WInput.getUuid(), trafo2WGraphic);
179179

180-
log.info("Added transformer {}", transformer2WInput.getUuid());
180+
log.trace("Added transformer {}", transformer2WInput.getUuid());
181181

182182
} else {
183183
throw gridPaintLayerException(transformer2WInput);

src/main/resources/log4j2.xml

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
~ Copyright (c) 2019. TU Dortmund University,
3+
~ Copyright (c) 2020. TU Dortmund University,
44
~ Institute of Energy Systems, Energy Efficiency and Energy Economics,
55
~ Research group Distribution grid planning and operation
66
-->
@@ -10,13 +10,45 @@
1010
<PatternLayout
1111
pattern="%highlight{%d{HH:mm:ss.SSS} %-5level - %msg%n}{FATAL=red blink, ERROR=red, WARN=yellow bright, INFO=black, DEBUG=cyan, TRACE=blue}"/>
1212
</Console>
13+
14+
<RollingRandomAccessFile name="RF" fileName="logs/netpadplusplus/netpadplusplus.log"
15+
filePattern="logs/netpadplusplus/archive/netpadplusplus-%d{yyyyMMdd-HHmmss}.log">
16+
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
17+
<Policies>
18+
<OnStartupTriggeringPolicy minSize="2 MB"/>
19+
</Policies>
20+
<DefaultRolloverStrategy>
21+
<Delete basePath="logs/netpadplusplus/archive" maxDepth="1">
22+
<IfAccumulatedFileCount exceeds="10"/>
23+
</Delete>
24+
</DefaultRolloverStrategy>
25+
</RollingRandomAccessFile>
26+
27+
<RollingRandomAccessFile name="RF-psdm" fileName="logs/netpadplusplus/psdm.log"
28+
filePattern="logs/netpadplusplus/archive/psdm-%d{yyyyMMdd-HHmmss}.log">
29+
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
30+
<Policies>
31+
<OnStartupTriggeringPolicy minSize="2 MB"/>
32+
</Policies>
33+
<DefaultRolloverStrategy>
34+
<Delete basePath="logs/netpadplusplus/archive" maxDepth="1">
35+
<IfAccumulatedFileCount exceeds="10"/>
36+
</Delete>
37+
</DefaultRolloverStrategy>
38+
</RollingRandomAccessFile>
1339
</Appenders>
1440
<Loggers>
41+
<asyncRoot level="debug">
42+
<AppenderRef ref="Console" level="info"/>
43+
<AppenderRef ref="RF" level="debug"/>
44+
</asyncRoot>
45+
<logger name="edu.ie3.datamodel" additivity="false">
46+
<AppenderRef ref="Console" level="off"/>
47+
<AppenderRef ref="RF-psdm" level="debug"/>
48+
</logger>
1549
<logger name="com.sothawo.mapjfx" additivity="false">
16-
<AppenderRef ref="Console" level="trace"/>
50+
<AppenderRef ref="Console" level="off"/>
51+
<AppenderRef ref="RF" level="trace"/>
1752
</logger>
18-
<asyncRoot level="all">
19-
<AppenderRef ref="Console" level="trace"/>
20-
</asyncRoot>
2153
</Loggers>
2254
</Configuration>

src/test/resources/log4j2-test.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
~ Copyright (c) 2019. TU Dortmund University,
3+
~ Copyright (c) 2020. TU Dortmund University,
44
~ Institute of Energy Systems, Energy Efficiency and Energy Economics,
55
~ Research group Distribution grid planning and operation
66
-->
7-
87
<Configuration>
98
<Appenders>
109
<Console name="Console" target="SYSTEM_OUT">
11-
<PatternLayout pattern="%highlight{%d{HH:mm:ss.SSS} %-5level - %msg%n}{FATAL=red blink, ERROR=red, WARN=yellow bright, INFO=black, DEBUG=cyan, TRACE=blue}"/>
10+
<PatternLayout
11+
pattern="%highlight{%d{HH:mm:ss.SSS} %-5level - %msg%n}{FATAL=red blink, ERROR=red, WARN=yellow bright, INFO=black, DEBUG=cyan, TRACE=blue}"/>
1212
</Console>
13+
1314
<RollingRandomAccessFile name="RF" fileName="testLogs/netpadplusplus/netpadplusplus.log"
1415
filePattern="testLogs/netpadplusplus/archive/netpadplusplus-%d{yyyyMMdd-HHmmss}.log">
1516
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
@@ -26,6 +27,7 @@
2627
<Loggers>
2728
<asyncRoot level="debug">
2829
<AppenderRef ref="Console" level="info"/>
30+
<AppenderRef ref="RF" level="debug"/>
2931
</asyncRoot>
3032
</Loggers>
3133

0 commit comments

Comments
 (0)