Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To/#2 time range configuration #123

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -283,3 +283,4 @@ local.properties
# .nfs files are created when an open file is removed but is still being accessed
.nfs*

docs/readthedocs/_build/
21 changes: 21 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-20.04
tools:
python: "3.9"

# Configure python
python:
install:
- requirements: docs/readthedocs/requirements.txt

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/readthedocs/conf.py
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ the whole area.
|vertical levels | 60 level |
|upper boundary | 22.5km |

![](doc/img/icon-eu-nest.png)
![](docs/readthedocs/_static/img/icon-eu-nest.png)


In contrast, the converter area can be set in the code to the area of interest.
Expand All @@ -88,7 +88,7 @@ In the future it would make sense to provide the
coordinates via a config file instead of hard-coding them into the binary.
If you want to provide this future feel free to hand in an issue or a pull request.

![](doc/img/converter_covered_area.jpg)
![](docs/readthedocs/_static/img/converter_covered_area.jpg)


### Requirements
Expand Down
18 changes: 14 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer
import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer

plugins {
id "com.jfrog.artifactory" version "4.24.20" //artifactory support
id 'groovy' // groovy support
Expand All @@ -11,6 +14,8 @@ plugins {
id 'com.github.onslip.gradle-one-jar' version '1.0.6' // pack a self contained jar
id 'jacoco' // java code coverage plugin
id "org.sonarqube" version "3.3" // sonarqube
id "kr.motd.sphinx" version "2.10.0"
id "com.github.johnrengelman.shadow" version "6.1.0" // fat jar
}

ext {
Expand All @@ -31,13 +36,11 @@ defaultTasks 'build'
sourceCompatibility = javaVersion
targetCompatibility = javaVersion


apply from: scriptsLocation + 'pmd.gradle'
apply from: scriptsLocation + 'spotbugs.gradle'
apply from: scriptsLocation + 'spotless.gradle'
apply from: scriptsLocation + 'modernizer.gradle'
apply from: scriptsLocation + 'checkJavaVersion.gradle'
apply from: scriptsLocation + 'fatJar.gradle'
apply from: scriptsLocation + 'tests.gradle'
apply from: scriptsLocation + 'jacoco.gradle' // jacoco java code coverage
apply from: scriptsLocation + 'sonarqube.gradle' // sonarqube config
Expand Down Expand Up @@ -125,7 +128,7 @@ publishing {
from components.java
artifact sourcesJar
artifact javadocJar
artifact fatJar
artifact shadowJar
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
Expand All @@ -151,7 +154,7 @@ tasks.withType(JavaCompile) {
}

application {
mainClassName = mainClass
mainClassName = "edu.ie3.tools.Main"
}

jar {
Expand All @@ -166,3 +169,10 @@ run {
// Gradle uses an empty Input as default, leading to a non-blocking behaviour and thus an immediate shutdown
standardInput = System.in
}

shadowJar {
transform(AppendingTransformer) {
resource = 'reference.conf'
}
zip64 = true
}
20 changes: 20 additions & 0 deletions docs/readthedocs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= python3 -msphinx
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
13 changes: 13 additions & 0 deletions docs/readthedocs/_static/css/theme_override.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* Suppress spacing after multi-line entries in tables
* Inspired by this issue: https://github.com/readthedocs/sphinx_rtd_theme/issues/117 */
.wy-table-responsive table td div.line-block {
margin-bottom: 0;
font-size: 90%;
}
.wy-table-responsive table th div.line-block {
margin-bottom: 0;
font-size: 90%;
}
.wy-table-responsive table th p {
margin-bottom: 0;
}
72 changes: 72 additions & 0 deletions docs/readthedocs/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))


# -- Project information -----------------------------------------------------

project = 'DWDWeatherTools'
copyright = u'2022. TU Dortmund University, Institute of Energy Systems, Energy Efficiency and Energy Economics, Research group Distribution grid planning and operation '
author = 'Johannes Hiry, Debopama Sen Sarma, Chris Kittl, Sebastian Peter, Thomas Oberließen'

# The full version, including alpha/beta/rc tags
version = '0.1.'
release = '0.1.1-SNAPSHOT'

pygments_style = 'tango'
add_function_parentheses = True
# Will point sphinx to use 'index.rst' as the master document
master_doc = 'index'

# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autosectionlabel',
'myst_parser'
]

# Prefix all autogenerated labels wit the document to get unique labels (e.g. `index:Hello`)
autosectionlabel_prefix_document = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'venv']

source_encoding = 'utf-8-sig'

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'sphinx_rtd_theme'
html_short_title = "DWDWeatherTools"
htmlhelp_basename = 'DWDWeatherTools-doc'
html_use_index = True
html_show_sourcelink = False

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']


def setup(app):
app.add_css_file("css/theme_override.css")
31 changes: 31 additions & 0 deletions docs/readthedocs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Documentation of the DWDTools
=========================================

Hello weather!

.. toctree::
:maxdepth: 2
:caption: Contents:

user/users



Contact the (Main) Maintainers
------------------------------
If you feel, something is missing, wrong or misleading, please contact one of our main contributors:

* `@sensarmad <https://github.com/sensarmad>`_
* `@johanneshiry <https://github.com/johanneshiry>`_
* `@ckittl <https://github.com/ckittl>`_
* `@t-ober <https://github.com/t-ober>`_
* `@sebastian-peter <https://github.com/sebastian-peter>`_

Hat tip to all other contributors!

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
35 changes: 35 additions & 0 deletions docs/readthedocs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
3 changes: 3 additions & 0 deletions docs/readthedocs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
myst-parser==0.16.1
Sphinx==4.2.0
sphinx-rtd-theme==1.0.0
3 changes: 3 additions & 0 deletions docs/readthedocs/user/users.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Users Guide

You got this!
13 changes: 0 additions & 13 deletions gradle/scripts/fatJar.gradle

This file was deleted.

Loading