From 32e8aeee72a44b55dc8e17d21e5795872511257b Mon Sep 17 00:00:00 2001 From: "Kittl, Chris" Date: Thu, 5 Nov 2020 15:27:56 +0100 Subject: [PATCH 1/4] Adapting and adding information about contributions and contributing --- AUTHORS.md | 6 ++-- CHANGELOG.md | 12 ++++++++ CONTRIBUTING.md | 74 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+), 3 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 CONTRIBUTING.md diff --git a/AUTHORS.md b/AUTHORS.md index d60a980..e159d5b 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -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) diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..4e7a8c2 --- /dev/null +++ b/CHANGELOG.md @@ -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 XXX +- 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, ...) \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..0d3bbd3 --- /dev/null +++ b/CONTRIBUTING.md @@ -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 `/#-`. +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: \ No newline at end of file From 0aa154100c533e4599a9645425cf1682d80a4ee1 Mon Sep 17 00:00:00 2001 From: "Kittl, Chris" Date: Thu, 5 Nov 2020 15:35:14 +0100 Subject: [PATCH 2/4] Adapting gradle scripts --- CHANGELOG.md | 2 +- CONTRIBUTING.md | 2 +- build.gradle | 11 ++++------- gradle/scripts/spotless.gradle | 3 +-- gradle/wrapper/gradle-wrapper.properties | 2 +- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e7a8c2..344e566 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,4 +9,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### 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 XXX - 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, ...) \ No newline at end of file +- Basic editing functionality (Renaming, moving around nodes to alter their geographical position, ...) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0d3bbd3..9f429fb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -71,4 +71,4 @@ Before marking the pull request as 'ready to review', take these precautionary a * [Johannes (@johanneshiry)](https://github.com/johanneshiry) or * [Chris (@ckittl)](https://github.com/ckittl) -We are happy to help! :smiley: \ No newline at end of file +We are happy to help! :smiley: diff --git a/build.gradle b/build.gradle index adec25d..3b36bf3 100644 --- a/build.gradle +++ b/build.gradle @@ -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' @@ -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' @@ -107,7 +104,7 @@ dependencies { } wrapper { - gradleVersion = '6.4.1' + gradleVersion = '6.7' } javafx { diff --git a/gradle/scripts/spotless.gradle b/gradle/scripts/spotless.gradle index f8b6938..44b75cb 100644 --- a/gradle/scripts/spotless.gradle +++ b/gradle/scripts/spotless.gradle @@ -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() @@ -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() diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a4f0001..be52383 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 From d8ecb0d75dfc25978323971463570a9a8a1a5603 Mon Sep 17 00:00:00 2001 From: "Kittl, Chris" Date: Thu, 5 Nov 2020 15:55:45 +0100 Subject: [PATCH 3/4] Remove most of the logging from console --- .../edu/ie3/netpad/map/GridPaintLayer.java | 6 +-- src/main/resources/log4j2.xml | 42 ++++++++++++++++--- src/test/resources/log4j2-test.xml | 8 ++-- 3 files changed, 45 insertions(+), 11 deletions(-) diff --git a/src/main/java/edu/ie3/netpad/map/GridPaintLayer.java b/src/main/java/edu/ie3/netpad/map/GridPaintLayer.java index 62c53aa..9825abc 100644 --- a/src/main/java/edu/ie3/netpad/map/GridPaintLayer.java +++ b/src/main/java/edu/ie3/netpad/map/GridPaintLayer.java @@ -143,7 +143,7 @@ private void addNode(NodeInput node, Set systemParticipa paintElement(node.getUuid(), gridNodeGraphic); - log.info("Added node {}", node.getId()); + log.trace("Added node {}", node.getId()); } else { throw gridPaintLayerException(node); } @@ -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); } @@ -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); diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml index 9aa184b..16fea71 100644 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml @@ -1,6 +1,6 @@ @@ -10,13 +10,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - - - diff --git a/src/test/resources/log4j2-test.xml b/src/test/resources/log4j2-test.xml index 845346b..973bb4e 100644 --- a/src/test/resources/log4j2-test.xml +++ b/src/test/resources/log4j2-test.xml @@ -1,15 +1,16 @@ - - + + @@ -26,6 +27,7 @@ + From a41faa4fb42ae8ff4dfbbd45453fdc70bd1fef97 Mon Sep 17 00:00:00 2001 From: "Kittl, Chris" Date: Thu, 5 Nov 2020 16:38:17 +0100 Subject: [PATCH 4/4] Improve code quality --- CHANGELOG.md | 4 ++-- CONTRIBUTING.md | 52 ++++++++++++++++++++++++------------------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 344e566..5066e75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,9 @@ 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 +## **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 XXX +- 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, ...) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9f429fb..70cbfc7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,14 +4,14 @@ 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](#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. @@ -20,22 +20,22 @@ Until now we have a good lack of high level documentation, therefore please chec 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_**. +* **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_**. +* **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! @@ -49,9 +49,9 @@ Before opening it for review, please [finalise your pull request](#finalising-yo ### 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**. +* 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). @@ -61,14 +61,14 @@ We have good experiences using [Spock](http://spockframework.org/) as a testing 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` +* 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) +* [Johannes (@johanneshiry)](https://github.com/johanneshiry) or +* [Chris (@ckittl)](https://github.com/ckittl) We are happy to help! :smiley: