New Make concept and requirement specification update

This commit is contained in:
Dirk Alders 2025-08-06 22:57:17 +02:00
parent f1ebc46a04
commit f5178b72d2
13 changed files with 587 additions and 1690 deletions

6
.gitmodules vendored
View File

@ -13,9 +13,9 @@
[submodule "users"] [submodule "users"]
path = users path = users
url = https://git.mount-mockery.de/django_lib/users.git url = https://git.mount-mockery.de/django_lib/users.git
[submodule "requirements/reqif"]
path = requirements/reqif
url = https://git.mount-mockery.de/pylib/reqif.git
[submodule "stringtools"] [submodule "stringtools"]
path = stringtools path = stringtools
url = https://git.mount-mockery.de/pylib/stringtools.git url = https://git.mount-mockery.de/pylib/stringtools.git
[submodule "requirements/rspec"]
path = requirements/rspec
url = https://git.mount-mockery.de/pylib/rspec.git

0
.venv_required Normal file
View File

95
Makefile Normal file
View File

@ -0,0 +1,95 @@
# git helper Makefile: Version 1.7 (2025-08-05)
default: help
.ONESHELL:
SHELL = /usr/bin/bash
.SILENT:
-include __make.d__/*.mk
GIT_FLAG = ./.git
VENV_FLAG = ./.venv_required
VENV_FOLDER = ./venv
localhelp:
help:
echo "Possible common options are:"
echo " - init - Initialise the repository and all folders below with a Makefile"
echo " - giti - Get the git status of all submodules including their submodules"
echo " - update_submodules - Set all submodules to remote master"
echo " - venv_flag - Set the venev flag for the base folder. A venv will be generated"
echo " - clean - clean up"
echo " - deepclean - clean up this and all Makefiles below"
$(MAKE) localhelp
echo "You are able to create files make.d/*.mk and add local rules there. "
echo " - localinit: print_head - Will be executed as last step in the init process."
echo " - localhelp: print_head - Will be executed in th middle of the help text generation"
echo " - localclean:print_head - Will be executed before the clean rule"
localinit:
init: print_head
# Init git repo
if [[ -e $(GIT_FLAG) ]]; then
git submodule init
git submodule update
fi
# Init submodules
for subdir in $$(find . -maxdepth 2 -mindepth 2 -name Makefile | sort); do
$(MAKE) --no-print-directory -C $$(dirname $$subdir) init
done
# Create venv if needed
if [[ -e $(VENV_FLAG) ]]; then
if [[ ! -e $(VENV_FOLDER) ]]; then
mkvenv
fi
fi
# Start local init
$(MAKE) localinit
update_submodules:
git submodule foreach "git fetch && git checkout master && git pull && git submodule init && git submodule update"
giti_this: print_head
giti
echo " Submodules:"
git submodule --quiet foreach "echo -n ' ' && giti"
giti:
git submodule --quiet foreach [ -e Makefile ] || make --no-print-directory giti_this
localclean:
clean: localclean
if [[ ! -e $(VENV_FLAG) ]]; then
if [[ -d $(VENV_FOLDER) ]]; then
rm -rf $(VENV_FOLDER)
fi
fi
cleanall: clean
for subdir in $$(find . -maxdepth 2 -mindepth 2 -name Makefile | sort); do
$(MAKE) --no-print-directory -C $$(dirname $$subdir) cleanall
done
venv_flag:
if [[ ! -e $(VENV_FLAG) ]]; then
touch $(VENV_FLAG)
if [[ -e $(GIT_FLAG) ]]; then
git add $(VENV_FLAG)
fi
fi
print_head:
DIRNAME=$$(basename $$(pwd))
DIRLENGTH=$${#DIRNAME}
echo -ne "\n\n\033[1;34m╔═"
for i in $$(seq 1 $$DIRLENGTH); do echo -n "═"; done
echo -e "═╗"
echo -e "$$DIRNAME ║"
echo -ne "╚═"
for i in $$(seq 1 $$DIRLENGTH); do echo -n "═"; done
echo -e "═╝\033[00m"

Binary file not shown.

View File

@ -0,0 +1,485 @@
def specification(req_spec):
req_spec.add_title("Project And Teamorganisation Tool (PATT)")
#
# Section
#
sec_uuid = req_spec.add(
itemtype="SEC",
id=1,
heading="General",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=1,
heading="Task",
description="The application shall have multiple tasks",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=2,
heading="User",
description="The application shall have multiple users",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=3,
heading="Project",
description="The application shall have multiple projects",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=13,
heading="Userinterface",
description="The application shall have a userinterface",
)
#
# Section
#
sec_uuid = req_spec.add(
itemtype="SEC",
id=2,
heading="Definitions for user",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=4,
heading="Username",
description="A user shall have a username",
reason="Authentification",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=5,
heading="Password",
description="A user shall have a password",
reason="Authentification",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=6,
heading="E-Mail",
description="A user shall have an emailadress",
reason="Give information to a user which is not currently using the userinterface",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=38,
heading="threshold_very_soon",
description="The user_profile object shall be able to hold the Infomation threshold_very_soon with the following values: 1 day, 2 days, 3 days, 4 days, 5 days, 7 days, 9 days, 12 days",
reason="Information for the sorting criteria warning_group",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=39,
heading="threshold_soon",
description="The user object shall be able to hold the Infomation threshold_soon with the following values: 1 day, 2 days, 3 days, 5 days, 7 days, 10 days, 14 days, 21 days",
reason="Information for the sorting criteria warning_group",
)
#
# Section
#
sec_uuid = req_spec.add(
itemtype="SEC",
id=3,
heading="project Fields",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=7,
heading="Projectname",
description="A project shall have a projectname",
reason="Definition of a short identification for the Project.",
fitcriterion="projectname exists in project and can hold a string",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=8,
heading="Projectdescription",
description="A project shall have a projectdescription",
reason="Definition of additional information for the Project.",
fitcriterion="projectdescription exists in project and can hold a string",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=26,
heading="State",
description="A project shall have a projectstate with the following possible values: \"TBD, \\dots\"",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=9,
heading="Projectrole Leader",
description="A project shall have the projectrole role_leader",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=12,
heading="Projectrole Member",
description="A project shall have the projectrole role_member",
reason="Default value for Task generation",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=33,
heading="Projectrole Visitor",
description="A project shall have the projectrole role_visitor",
)
#
# Section
#
sec_uuid = req_spec.add(
itemtype="SEC",
id=4,
heading="Description for projectrole",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=11,
heading="Userlist",
description="A projectrole shall hold multiple users",
reason="Define Members for the different projectroles",
)
#
# Section
#
sec_uuid = req_spec.add(
itemtype="SEC",
id=5,
heading=" task Fields",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=14,
heading="state",
description="A task shall have a state with the following possible values: \"open, in progress, finished, closed\"",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=15,
heading="priority",
description="A task shall have a priority with the following possible values: 1, 2, 3, 4, 5 ,6, 7",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=16,
heading="targetdate",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=17,
heading="progress",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=18,
heading="description",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=19,
heading="comments",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=20,
heading="appraisals",
description="Just for Projectleader or Superuser (TBD)",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=31,
heading="assigned_user",
description="A task shall have one assigned_user. The assigned_user needs to have a role in the related project.",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=32,
heading="History",
description="The tasks change history shall be fully stored.",
reason="Implementation of a view for the projectleaders to inspect all changes from creation till now.",
)
#
# Section
#
sec_uuid = req_spec.add(
itemtype="SEC",
id=6,
heading="Permission definitions for tasks",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=27,
heading="read permission",
description="If the user has read permissions, all task fields (except of the appraisals) shall be visible.",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=24,
heading="limited_modify permission",
description="If the user has limited_modify permission, the fields progress, description, comment shall be fully editable and the filed state shall be editable, if the state is one of \"open, closed\", and the targetstates shall be limited to \"open, closed\".",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=23,
heading="add_comment permission",
description="The user shall be able to add a comment, if add_comment permissions are given.",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=25,
heading="create permission",
description="The user shall be able to create a task, if create permissions are given.",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=28,
heading="modify permission",
description="All task fields (except of the comment, appraisal) shall be editable, if the user has modify permission.",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=29,
heading="modify_comment permission",
description="The task field comment shall be editable, if the user has modify_comment permission.",
)
#
# Section
#
sec_uuid = req_spec.add(
itemtype="SEC",
id=7,
heading="Access rules for task",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=34,
heading="read permissions",
description="A user shall have read permission, if he is a superuser or (user is the assigned_user and the current task state is one of \"open, closed\") or (has a role in the related project and is a staffuser).",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=35,
heading="limited_modify permission",
description="A user shall have limited_modify permission, if he is the assigned_user and is a staffuser and the current task state is one of \"open, closed\".",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=22,
heading="modify permission",
description="A user shall have modify permission, if he is a superuser or (has the has the role role_leader in the related project and is a staffuser).",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=30,
heading="add_comment permission",
description="A user shall have add_comment permission, if he is a superuser or (has one of the roles role_leader, role_member in the related project and is a staffuser and the current task state is one of \"open, closed\").",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=36,
heading="create permission",
description="A user shall have create permission, if he has at least in one project a role and is staffuser.",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=37,
heading="modify_comment permission",
description="A user shall have modify_comment permission, if he is a superuser or (has the has the role role_leader in the related project and is a staffuser).",
)
#
# Section
#
sec_uuid = req_spec.add(
itemtype="SEC",
id=8,
heading="task sorting",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=41,
heading="Sorting criterias and prioreties",
description="A tasklist shall be sorted by the following documented sorting criterias. The sorting order shall be the same as the criteria order in this document.",
reason="Tasklist shall be be sorted in a user friendly order.",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=40,
heading="1st sort criteria shall be warning_group",
description="The sorting shalll be in the order as the listed warning_groups:\n\\begin{itemize}\n \\item {\\bf overdue}: If the days_before_targetdate = 0\n \\item {\\bf very_soon}: If the days_before_targetdate = assigned_user.threshold_very_soon\n \\item {\\bf soon:} If the days_before_targetdate = assigned_user.threshold_soon\n \\item {\\bf default}: In all other cases\n \\item {\\bf done:} If the task is in one of the following states: \"canceled, closed, finished\" (independent from the other group definitions)\n\\end{itemize}",
reason="Tasklist shall be be sorted in a user friendly order.",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=42,
heading="2nd sort criteria shall be priority",
description="Highest priority (1) first.",
reason="Tasklist shall be be sorted in a user friendly order.",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=43,
heading="3rd sort criteria shall be days_before_targetdate",
description="Lowesr value of days_before_targetdate first.",
reason="Tasklist shall be be sorted in a user friendly order.",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=46,
heading="4th sort criteria progress",
description="Lowest progresss first.",
reason="Tasklist shall be be sorted in a user friendly order.",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=47,
heading="5th sort criteria name",
description="Alphabetic sorting.",
reason="Tasklist shall be be sorted in a user friendly order.",
)
#
# Section
#
sec_uuid = req_spec.add(
itemtype="SEC",
id=9,
heading="Userinterface",
)
# Requirement
req_spec.add(
parent=sec_uuid,
itemtype="REQ",
id=21,
heading="State Types",
description="REQ-21",
)

View File

@ -1,8 +0,0 @@
#!/bin/bash
#
echo "* Initialising Submodules"
git submodule init
git submodule update
echo "* Creating virtual env"
mkvenv

View File

@ -1,17 +0,0 @@
SPEC_FILENAME=requirements
.PHONY: specification
specification:
venv/bin/python reqif/__init__.py $(SPEC_FILENAME).reqif
@$(MAKE) --no-print-directory clean
xdg-open $(SPEC_FILENAME).pdf
clean:
@echo Removing generated files for target
@rm -f $(SPEC_FILENAME).tex $(SPEC_FILENAME).aux $(SPEC_FILENAME).log $(SPEC_FILENAME).out $(SPEC_FILENAME).toc *~
cleanall: clean
@echo Removing target
@rm -f $(SPEC_FILENAME).pdf

1
requirements/Makefile Symbolic link
View File

@ -0,0 +1 @@
rspec/Makefile

1
requirements/patt Symbolic link
View File

@ -0,0 +1 @@
..

@ -1 +0,0 @@
Subproject commit d24a1280fc8ea7518a503503f4254690ff2f581f

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1 @@
jinja2

1
requirements/rspec Submodule

@ -0,0 +1 @@
Subproject commit 48030f24a35bcb89bd43b4ed66078a2ba9c16b1b