Skip to content

Commit

Permalink
Merge pull request #3 from ie3-institute/ck/#2-prepareRelease
Browse files Browse the repository at this point in the history
Prepare release v 0.1
  • Loading branch information
johanneshiry authored Nov 6, 2020
2 parents f324502 + a41faa4 commit 2ea4966
Show file tree
Hide file tree
Showing 9 changed files with 140 additions and 24 deletions.
6 changes: 3 additions & 3 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
- Johannes Hiry

### Main Contributers:
- Johannes Hiry - https://github.com/johanneshiry
- Chris Kittl - https://github.com/ckittl
- [Johannes Hiry](https://github.com/johanneshiry)
- [Chris Kittl](https://github.com/ckittl)
- Christian Mahr

### Coordination:
- Johannes Hiry
- [Johannes Hiry](https://github.com/johanneshiry)
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## **0.1.0** - 2020-11-05

### Added
- 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
- Visualisation of the grid model including system participants (e.g. loads, pv plants, ...)
- Basic editing functionality (Renaming, moving around nodes to alter their geographical position, ...)
74 changes: 74 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Contributing to NetPad++
Welcome dear fellow of sophisticated power system modelling! :wave:
And thank you for considering your contribution to this project!
With this document we would like to give you some orientation on how you can contribute.

## Table of contents
* [Testing and reporting bugs](#testing-and-reporting-bugs)
* [Suggest extensions](#suggest-extensions)
* [Contributing code](#contributing-code)
* [Branching and handing in pull requests](#branching-and-handing-in-pull-requests)
* [General (software) design guidelines](#general-software-design-guidelines)
* [Testing](#testing)
* [Finalising your pull request](#finalising-your-pull-request)
* [For any doubts](#for-any-doubts)

## Testing and reporting bugs
We really appreciate your usage of this project.
Whenever you find a bug, it would be nice to check, if this isn't a feature to us. :wink:
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/).
If not, please raise one for us.
Considering the following aspects in your inquiry, assists us in helping you:

* **Is there already an issue addressing your problem?**
* Try to **locate the error** as precise as possible.
* What has to be done to **reproduce the error**?
* **Provide stack trace, logs etc.** and further helpful information
* **What would do you expect to happen?**
* Mark the issue with the **label _bug_**.

## Suggest extensions
We use issues as well to keep track of enhancement suggestions.
Considering the following aspects, assists us in understanding your needs properly:

* **Is there already an issue addressing your request?**
* **What would do you desire for?**
* If possible provide an **example or sketch**.
* Show a **use case**, that should be as versatile as possible.
* Mark the issue with the **label _enhancement_**.

## Contributing code
If you intend to produce some lines of code, pick an issue and get some hands on!

### Branching and handing in pull requests
We try to follow a branch naming strategy of the form `<initials>/#<issueId>-<description>`.
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`.
Please hand in a _draft_ pull request as early as possible to allow other to keep track on your changes.
Before opening it for review, please [finalise your pull request](#finalising-your-pull-request).

### General (software) design guidelines
In order to maintain a consistent project, we thought of some general design guidlines, we kindly ask you to take care of:

* We :heart: **immutability**. Therefore, please don't provide setters and use proper instantiation instead.
* `double a = b * pow(x, j)`? :hand: Please **be expressive** in what you code!
* Document your code with **javadoc**.

### Testing
Ensure the proper function of your code by [test driven development (TDD)](https://www.guru99.com/test-driven-development.html).
We have good experiences using [Spock](http://spockframework.org/) as a testing framework for [Groovy](https://groovy-lang.org/).

### Finalising your pull request
Some automated checks assist us in delivering a pretty fair quality of software.
Before marking the pull request as 'ready to review', take these precautionary actions:

* Are all tests passing? Run `gradle test`
* Is your code properly formatted? Run `gradle spotlessApply`

`gradle finalizePR` summarizes all of these steps .

## For any doubts
... please contact
* [Johannes (@johanneshiry)](https://github.com/johanneshiry) or
* [Chris (@ckittl)](https://github.com/ckittl)

We are happy to help! :smiley:
11 changes: 4 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@ ext {
//version (changing these should be considered thoroughly!)
javaVersion = JavaVersion.VERSION_11

unitsOfMeasurementVersion = '1.0.10'
javaFxVersion = '15-ea+1'
slf4jVersion = '1.7.26'

scriptsLocation = 'gradle' + File.separator + 'scripts' + File.separator //location of script plugins

}

group = 'com.github.ie3-institute'
description = 'NetPad++'
version = '0.0.1-SNAPSHOT'
version = '0.1'

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

Expand All @@ -51,15 +49,14 @@ repositories {
}

dependencies {

// ie³ github repository
compile ('com.github.ie3-institute:PowerSystemDataModel:1.1-SNAPSHOT') {
compile ('com.github.ie3-institute:PowerSystemDataModel:1.1.0') {
/* Exclude nested logging and ie³ related dependencies */
exclude group: 'org.slf4j'
exclude group: 'com.github.ie3-institute'
}

compile ('com.github.ie3-institute:PowerSystemUtils:1.3.2-SNAPSHOT') {
compile ('com.github.ie3-institute:PowerSystemUtils:1.3.2') {
/* Exclude nested logging and ie³ related dependencies */
exclude group: 'org.slf4j'
exclude group: 'com.github.ie3-institute'
Expand Down Expand Up @@ -107,7 +104,7 @@ dependencies {
}

wrapper {
gradleVersion = '6.4.1'
gradleVersion = '6.7'
}

javafx {
Expand Down
3 changes: 1 addition & 2 deletions gradle/scripts/spotless.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ spotless {
groovy {
licenseHeader ie3LicHead
excludeJava() // excludes all Java sources within the Groovy source dirs from formatting
paddedCell() // Avoid cyclic ambiguities
// the Groovy Eclipse formatter extends the Java Eclipse formatter,
// so it formats Java files by default (unless `excludeJava` is used).
greclipse()
Expand All @@ -32,7 +31,7 @@ spotless {

// removes unnecessary whitespace, indents with tabs and ends on new line for gradle, md and gitignore files and config-XMLs
format 'misc', {
target '**/*.gradle', '**/*.md', '**/.gitignore', 'configs/**'
target '**/*.md', '**/.gitignore', 'configs/**'
trimTrailingWhitespace()
indentWithTabs()
endWithNewline()
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 3 additions & 3 deletions src/main/java/edu/ie3/netpad/map/GridPaintLayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private void addNode(NodeInput node, Set<SystemParticipantInput> systemParticipa

paintElement(node.getUuid(), gridNodeGraphic);

log.info("Added node {}", node.getId());
log.trace("Added node {}", node.getId());
} else {
throw gridPaintLayerException(node);
}
Expand All @@ -157,7 +157,7 @@ private void addLine(LineInput line) {

paintElement(line.getUuid(), lineGraphic);

log.info("Added line {}", line.getId());
log.trace("Added line {}", line.getId());
} else {
throw gridPaintLayerException(line);
}
Expand All @@ -177,7 +177,7 @@ private void addTransformer2W(

paintElement(transformer2WInput.getUuid(), trafo2WGraphic);

log.info("Added transformer {}", transformer2WInput.getUuid());
log.trace("Added transformer {}", transformer2WInput.getUuid());

} else {
throw gridPaintLayerException(transformer2WInput);
Expand Down
42 changes: 37 additions & 5 deletions src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2019. TU Dortmund University,
~ Copyright (c) 2020. TU Dortmund University,
~ Institute of Energy Systems, Energy Efficiency and Energy Economics,
~ Research group Distribution grid planning and operation
-->
Expand All @@ -10,13 +10,45 @@
<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}"/>
</Console>

<RollingRandomAccessFile name="RF" fileName="logs/netpadplusplus/netpadplusplus.log"
filePattern="logs/netpadplusplus/archive/netpadplusplus-%d{yyyyMMdd-HHmmss}.log">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
<Policies>
<OnStartupTriggeringPolicy minSize="2 MB"/>
</Policies>
<DefaultRolloverStrategy>
<Delete basePath="logs/netpadplusplus/archive" maxDepth="1">
<IfAccumulatedFileCount exceeds="10"/>
</Delete>
</DefaultRolloverStrategy>
</RollingRandomAccessFile>

<RollingRandomAccessFile name="RF-psdm" fileName="logs/netpadplusplus/psdm.log"
filePattern="logs/netpadplusplus/archive/psdm-%d{yyyyMMdd-HHmmss}.log">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
<Policies>
<OnStartupTriggeringPolicy minSize="2 MB"/>
</Policies>
<DefaultRolloverStrategy>
<Delete basePath="logs/netpadplusplus/archive" maxDepth="1">
<IfAccumulatedFileCount exceeds="10"/>
</Delete>
</DefaultRolloverStrategy>
</RollingRandomAccessFile>
</Appenders>
<Loggers>
<asyncRoot level="debug">
<AppenderRef ref="Console" level="info"/>
<AppenderRef ref="RF" level="debug"/>
</asyncRoot>
<logger name="edu.ie3.datamodel" additivity="false">
<AppenderRef ref="Console" level="off"/>
<AppenderRef ref="RF-psdm" level="debug"/>
</logger>
<logger name="com.sothawo.mapjfx" additivity="false">
<AppenderRef ref="Console" level="trace"/>
<AppenderRef ref="Console" level="off"/>
<AppenderRef ref="RF" level="trace"/>
</logger>
<asyncRoot level="all">
<AppenderRef ref="Console" level="trace"/>
</asyncRoot>
</Loggers>
</Configuration>
8 changes: 5 additions & 3 deletions src/test/resources/log4j2-test.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2019. TU Dortmund University,
~ Copyright (c) 2020. TU Dortmund University,
~ Institute of Energy Systems, Energy Efficiency and Energy Economics,
~ Research group Distribution grid planning and operation
-->

<Configuration>
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<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}"/>
<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}"/>
</Console>

<RollingRandomAccessFile name="RF" fileName="testLogs/netpadplusplus/netpadplusplus.log"
filePattern="testLogs/netpadplusplus/archive/netpadplusplus-%d{yyyyMMdd-HHmmss}.log">
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
Expand All @@ -26,6 +27,7 @@
<Loggers>
<asyncRoot level="debug">
<AppenderRef ref="Console" level="info"/>
<AppenderRef ref="RF" level="debug"/>
</asyncRoot>
</Loggers>

Expand Down

0 comments on commit 2ea4966

Please sign in to comment.