Vorbereitung Release 03.0 #94

Merged
tpeetz merged 115 commits from develop/0.3.0 into main 2026-08-25 06:01:18 +00:00
6 changed files with 90 additions and 593 deletions
Showing only changes of commit f0cf98d36e - Show all commits
+34 -6
View File
@@ -1,11 +1,6 @@
/*
* This file was generated by the Gradle 'init' task.
*
* This is a general purpose Gradle build.
* Learn more about Gradle by exploring our Samples at https://docs.gradle.org/9.4.1/samples
*/
plugins {
id("base")
id("maven-publish")
id("de.infolektuell.typst") version "0.8.0"
}
@@ -16,6 +11,39 @@ typst.sourceSets {
val main by registering {
// The files to compile (without .typ extension) in src/main/typst
documents = listOf("kontor") // src/main/typst/document.typst
inputs.put("version", version.toString())
}
}
tasks.withType<AbstractPublishToMaven>().configureEach {
dependsOn(tasks.named("compileTypst"))
}
publishing {
publications {
create<MavenPublication>("maven") {
artifactId = "kontor"
artifact(file("build/typst/main/pdf/kontor.pdf")) {
classifier = "docs"
extension = "pdf"
}
}
}
repositories {
maven {
// Determine URL based on version
url = uri(
if (version.toString().endsWith("SNAPSHOT")) {
"https://nexus.thpeetz.de/repository/maven-snapshots/"
} else {
"https://nexus.thpeetz.de/repository/maven-releases/"
}
)
// Credentials
credentials {
username = project.findProperty("nexusUsername") as String? ?: System.getenv("NEXUS_USERNAME")
password = project.findProperty("nexusPassword") as String? ?: System.getenv("NEXUS_PASSWORD")
}
}
}
}
+3 -1
View File
@@ -1,5 +1,7 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties
description='Kontor Documentation'
version=0.3.0-SNAPSHOT
group=de.thpeetz
org.gradle.configuration-cache=true
+5 -6
View File
@@ -1,5 +1,6 @@
#let version = sys.inputs.at("version", default: "0.0.1")
//#set page("a4")
#import "@preview/basic-report:0.4.0": *
#import "@preview/basic-report:0.5.0": *
#import "@preview/in-dexter:0.7.2": *
#import "@preview/pintorita:0.1.4"
@@ -8,14 +9,12 @@
#show: it => basic-report(
doc-category: "Entwicklungs- und Projekthandbuch",
doc-title: "Projekt kontor",
doc-title: "Projekt kontor\nVersion " + version,
author: "Thomas Peetz",
//affiliation: "MouseTec, Entenhausen",
//logo: image("assets/aerospace-engineering.png", width: 2cm),
// <a href="https://www.flaticon.com/free-icons/aerospace" title="aerospace icons">Aerospace icons created by gravisio - Flaticon</a>
language: "de",
compact-mode: false,
it
show-outline: true,
it,
)
= Allgemeines
+43 -29
View File
@@ -1,63 +1,76 @@
"""
read file with URLs and store in DB
"""
import json
import logging.config
from pathlib import Path
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
import requests
import yaml
import json
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
from pathlib import Path
from platformdirs import PlatformDirs
from proton import Message, Event
from proton.handlers import MessagingHandler
from proton.reactor import Container
parser = ArgumentParser(formatter_class=ArgumentDefaultsHelpFormatter)
parser.add_argument('-u', '--url', help='link')
parser.add_argument('--video', help='store Url as VideoFile', action="store_true")
parser.add_argument("-u", "--url", help="link")
parser.add_argument("--video", help="store Url as VideoFile", action="store_true")
parser.add_argument("--api", help="use Kontor API", action="store_true")
parser.add_argument('--config', '-c', default='kontor-docker')
parser.add_argument('--verbose', '-v', action='count', default=0)
parser.add_argument("--config", "-c", default="kontor-docker")
parser.add_argument("--verbose", "-v", action="count", default=0)
parser.add_argument("--server", "-s", default="127.0.0.1")
args = parser.parse_args()
def get_logger(level: int, config: str):
"""
create Logger with configuration from config file
"""
dirs = PlatformDirs(config)
logging_config = Path(dirs.user_config_dir, 'logging-config.yaml')
with open(logging_config, 'rt') as f:
configDict = yaml.safe_load(f.read())
logging.config.dictConfig(configDict)
logger = logging.getLogger('development')
logging_config = Path(dirs.user_config_dir, "logging-config.yaml")
with open(logging_config, "rt", encoding="UTF-8") as f:
config_dict = yaml.safe_load(f.read())
logging.config.dictConfig(config_dict)
log = logging.getLogger("development")
if level is not None:
match level:
case 0:
logger.setLevel(logging.INFO)
log.setLevel(logging.INFO)
case 1:
logger.setLevel(logging.DEBUG)
log.setLevel(logging.DEBUG)
case _:
logger.setLevel(logging.CRITICAL)
return logger
log.setLevel(logging.CRITICAL)
return log
class AddLinkMessage(MessagingHandler):
def __init__(self, server, url, log):
"""
Create message for queue add_link_file
"""
def __init__(self, server, message, log):
super(AddLinkMessage, self).__init__()
log.info("create AddLinkMessage")
self.server = server
self.address = "add_link_media"
self.url = url
self.message = message
self.log = log
def on_start(self, event: Event):
def on_start(self, event):
self.log.info("Connection...")
conn = event.container.connect(self.server, user="artemis", password="artemis")
event.container.create_sender(conn, self.address)
def on_connection_error(self, event: Event) -> None:
def on_connection_error(self, event) -> None:
self.log.info(f"error: {event}")
def on_sendable(self, event: Event):
def on_sendable(self, event):
self.log.info("send message")
json_content = json.dumps(self.url)
event.sender.send(Message(body=json_content, address=self.address, content_type="text/json"))
json_content = json.dumps(self.message)
event.sender.send(
Message(body=json_content, address=self.address, content_type="text/json")
)
event.connection.close()
event.sender.close()
@@ -65,19 +78,20 @@ class AddLinkMessage(MessagingHandler):
self.log.info(f"accepted: {event}")
if __name__ == '__main__':
if __name__ == "__main__":
logger = get_logger(args.verbose, args.config)
logger.info('kontor.add_link started')
logger.info("kontor.add_link started")
link: str = args.url
data = {"url": link}
server_url: str = f"amqp://{args.server}:5672"
if args.api:
if args.video:
request: str = "http://127.0.0.1:8800/api/video/files"
else:
request: str = "http://127.0.0.1:8800/api/media/files"
response = requests.post(request, json=data)
logger.info(f"Status: {response.status_code}")
response = requests.post(request, json=data, timeout=5)
logger.info("Status: %s", response.status_code)
data = response.json()
else:
Container(AddLinkMessage("amqp://127.0.0.1:5672", data, logger)).run()
logger.info('kontor.add_link finished')
Container(AddLinkMessage(server=server_url, message=data, log=logger)).run()
logger.info("kontor.add_link finished")
+5 -42
View File
@@ -94,10 +94,11 @@ dependencies {
//asciidoctorGems libs.diagram
}
def pdfFile = layout.buildDirectory.file("docs/asciidocPdf/kontor-spring.pdf")
def pdfArtifact = artifacts.add('archives', pdfFile.get().asFile) {
type 'pdf'
builtBy asciidoctorPdf
dependencyManagement {
imports {
mavenBom libs.vaadin.bom.get().toString()
mavenBom libs.camel.bom.get().toString()
}
}
publishing {
@@ -129,44 +130,6 @@ publishing {
}
}
final BUILD_DATE = new Date().format('dd.MM.yyyy').toString()
asciidoctorPdf {
dependsOn asciidoctorGemsPrepare
baseDirFollowsSourceFile()
asciidoctorj {
modules {
diagram.use()
}
requires 'rouge'
attributes 'build-gradle': file('build.gradle'),
'endpoint-url': 'https://www.thpeetz.de',
'source-highlighter': 'rouge',
'imagesdir': './images',
'toc': 'left',
'toc-title': 'Inhaltsverzeichnis',
'revdate': BUILD_DATE,
'revnumber': { project.version.toString() },
'revremark': 'Entwurf',
'chapter-label': '',
'icons': 'font',
'idprefix': 'id_',
'idseparator': '-',
'docinfo1': ''
}
}
build.dependsOn asciidoctorPdf
dependencyManagement {
imports {
mavenBom libs.vaadin.bom.get().toString()
mavenBom libs.camel.bom.get().toString()
}
}
application {
mainClass = 'de.thpeetz.kontor.Application'
}
@@ -1,509 +0,0 @@
= Projektbeschreibung kontor-spring: Entwicklungs- und Projekthandbuch
:author: Thomas Peetz
:email: <thomas.peetz@thpeetz.de>
:doctype: book
:sectnums:
:sectnumlevels: 4
:toc:
:toclevels: 4
:table-caption!:
:counter: table-number: 0
[title="Dokumenthistorie", id="Table-{counter:table-number}", options="header"]
|===
| Version | Datum | Autor | Änderungsgrund / Bemerkungen
| 1.0.0 | 16.05.2022 | Thomas Peetz | Ersterstellung
|===
== Allgemeines
=== Zweck des Dokumentes
Das Entwicklungshandbuch beschreibt die Werkzeuge und die Vorgehensweise bei der Entwicklung
im Projekt kontor-spring und der Erstellung der Dokumentation.
=== Verwendete Tools
==== Gitea
Für die Verwaltung des Sourcecode kommt ((Gitea))<<gitea>> zum Einsatz.
Mit Gitea werden auch die Projektaufgaben verwaltet.
Das Projekt und das dazugehörige Git Repository sind unter der Adresse
https://gitea.thpeetz.de/kontor/kontor-spring
zu finden.
== Erstellung der Dokumentation
Die Dokumentation des Projektes wird mit ((Asciidoctor))<<asciidoctor>> geschrieben.
Die Dokumente erhalten ihre Namen nach dem jeweiligen Hauptdokument.
=== Quellcode Verwaltung
Die Asciidoctor-Dateien haben die Endung `.adoc`.
=== Buildsystem
Zur Erstellung der PDF-Dateien aus den Asciidoctor-Dateien wird das Buildsystem ((Gradle))<<gradle>> verwendet.
Die Dateien für die Dokumente liegen im Verzeichnis `src/docs/asciidoc`.
Der Gradle Build wird über die Datei `build.gradle` definiert.
== Einführung
=== Zweck
=== Stakeholder des Systems
=== Systemumfang
==== Zielsetzung des Systems
=== Systemübersicht
==== Systemkontext
==== Systemarchitektur
==== Systemschnittstellen
===== Realisierte Schnittstellen
===== Verwendete Schnittstellen
==== Logisches Datenmodell
===== Benutzer ER-Diagramm
[mermaid, kontor-user-er, png]
.Benutzer ER-Diagramm
....
erDiagram
user {
string id PK
datetime created_date
datetime last_modified_date
int version
string email
boolean enabled
string firstName
string lastName
string password
string token
boolean tokenExpired
string userName UNIQUE
}
role {
string id PK
datetime created_date
datetime last_modified_date
int version
string name
}
authorization_matrix {
string id PK
datetime created_date
datetime last_modified_date
int version
string user_id FK
string role_id FK
}
module_data {
string id PK
datetime created_date
datetime last_modified_date
int version
boolean import_data
string module_name UNIQUE
}
user ||--o{ authorization_matrix : "matrix"
role ||--o{ authorization_matrix : "matrix"
....
===== Comics ER-Diagramm
[mermaid, kontor-comics-er, png]
.Comics ER-Diagramm
....
erDiagram
comic {
string id PK
datetime created_date
datetime last_modified_date
int version
boolean completed
boolean currentOrder
string title
string publisher_id FK
}
volume {
string id PK
datetime created_date
datetime last_modified_date
int version
string name
string comic_id FK
}
issue {
string id PK
datetime created_date
datetime last_modified_date
int version
boolean in_stock
boolean is_read
string issue_number
string comic_id FK
string volume_id FK
}
publisher {
string id PK
datetime created_date
datetime last_modified_date
int version
string name
}
artist {
string id PK
datetime created_date
datetime last_modified_date
int version
string name
}
story_arc {
string id PK
datetime created_date
datetime last_modified_date
int version
string name
string comic_id FK
}
trade_paperback {
string id PK
datetime created_date
datetime last_modified_date
int version
int issueStart
int issueEnd
string name
string comic_id FK
}
worktype {
string id PK
datetime created_date
datetime last_modified_date
int version
string name
}
comic_work {
string id PK
datetime created_date
datetime last_modified_date
int version
string artist_id FK
string comic_id FK
string worktype_id FK
}
comic ||--o{ comic_work : "1"
artist ||--o{ comic_work : "1"
worktype ||--o{ comic-work : "1"
publisher ||--o{ comic : "1"
comic ||--o{ issue : "1"
comic ||--o{ volume : "1"
comic ||--o{ story_arc : "1"
comic ||--o{ trade_paperback : "1"
volume ||--o{ issue : "1"
....
===== TYSC ER-Diagramm
[mermaid, kontor-tysc-er, png]
.TYSC ER-Diagramm
....
erDiagram
sport {
string id PK
datetime created_date
datetime last_modified_date
int version
string name
}
team {
string id PK
datetime created_date
datetime last_modified_date
int version
string name
string short_name
string sport_id FK
}
field_position {
string id PK
datetime created_date
datetime last_modified_date
int version
string name
string short_name
string sport_id FK
}
rooster {
string id PK
datetime created_date
datetime last_modified_date
int version
int year
string player_id FK
string position_id FK
string team_id FK
}
player {
string id PK
datetime created_date
datetime last_modified_date
int version
string first_name
string last_name
}
vendor {
string id PK
datetime created_date
datetime last_modified_date
int version
string name
}
card_set {
string id PK
datetime created_date
datetime last_modified_date
int version
boolean insert_set
string name
boolean parallel_set
string vendor_id FK
}
card {
string id PK
datetime created_date
datetime last_modified_date
int version
int cardNumber
int year
string card_set FK
string rooster_id FK
string vendor_id FK
}
sport ||--o{ team : "1"
sport ||--o{ field_position : "1"
field_position ||--o{ rooster : "1"
player ||--o{ rooster : "1"
team ||--o{ rooster : "1"
vendor ||--o{ card : "1"
card_set ||--o{ card : "1"
rooster ||--o{ card : "1"
....
===== Bookshelf ER-Diagramm
[mermaid, kontor-bookshelf-er, png]
.Bookshelf ER-Diagramm
....
erDiagram
article {
string id PK
datetime created_date
datetime last_modified_date
int version
string title
}
book {
string id PK
datetime created_date
datetime last_modified_date
int version
string isbn UNIQUE
string title
int year
string publisher_id FK
}
bookshelf_publisher {
string id PK
datetime created_date
datetime last_modified_date
int version
string name UNIQUE
}
author {
string id PK
datetime created_date
datetime last_modified_date
int version
string first_name
string last_name
}
article_author {
string id PK
datetime created_date
datetime last_modified_date
int version
string article_id FK
string author_id FK
}
book_author {
string id PK
datetime created_date
datetime last_modified_date
int version
string book_id FK
string author_id FK
}
publisher ||--o{ book : "1"
article ||--o{ article_author : "1"
author ||--o{ article_author : "1"
book ||--o{ book_author : "1"
author ||--o{ book_author : "1"
....
===== Mail ER-Diagramm
[mermaid, kontor-mail-er, png]
.Mail ER-Diagramm
....
erDiagram
mail {
string id PK
datetime created_date
datetime last_modified_date
int version
string subject
string content
datetime received_date
datetime sent_date
}
mail_account {
string id PK
datetime created_date
datetime last_modified_date
int version
string host
string password
int port
string protocol
boolean start_tls
string user_name
}
mail_address {
string id PK
datetime created_date
datetime last_modified_date
int version
string internet_address UNIQUE
string personal
string user_id FK
}
user ||--o{ mail_address : "1"
....
==== Einschränkungen
== Anforderungen der Domäne
=== Systemfunktionen
==== Anwendungsfälle
==== Akteure
==== Zielgruppen
=== Anforderungen
==== Anforderungen an externe Schnittstellen
==== Funktionale Anforderungen
==== Qualitätsanforderungen
==== Randbedingungen
==== Weitere Anforderungen
==== Wartungs- und Supportinformationen
=== Verifikation
== Projektbeschreibung
=== Ausgangslage
//==== Rechtliche Vorgaben und Rahmenbedingungen
//=== Rahmenbedingungen
//==== Vorhandene Regelungen
=== Projektziele
=== Projektabgrenzung
//=== Voraussichtliche Kosten
//=== Projektrisiken
//==== Produktivität
//==== Finanzielle Risiken
//==== Akzeptanz
== Projektorganisation
=== Projekt-Aufbauorganisation
=== Rollendefinition
//==== Projektauftraggeber
//==== Projektausschuss
//==== Beratung / Qualitätssicherung
==== Projekteiter
==== Projektteam
==== Liste der Stakeholder
=== Projektablauforganisation
==== Projekt-Phasen
===== Erstellung der Projektdokumentation
== Verschiedenes
=== Erreichbarkeiten
[bibliography]
== Referenzen
- [[[asciidoctor]]] http://asciidoctor.org
- [[[gitea]]] http://www.gitea.org
- [[[gradle]]] http://www.gradle.org
- [[[jenkins]]] http://jenkins-ci.org
[glossary]
== Glossar
[index]
== Index
== Verzeichnisse
=== Abbildungsverzeichnis
=== Tabellenverzeichnis
<<Table-1, Tabelle 1>> <<Table-1>>