Initial py specification
This commit is contained in:
parent
bbe327c73b
commit
6f78225559
BIN
_requirements_/specification.pdf
Normal file
BIN
_requirements_/specification.pdf
Normal file
Binary file not shown.
82
_requirements_/specification.py
Normal file
82
_requirements_/specification.py
Normal file
@ -0,0 +1,82 @@
|
||||
def specification(req_spec):
|
||||
req_spec.add_title("Module media")
|
||||
|
||||
#
|
||||
# Section
|
||||
#
|
||||
sec_uuid = req_spec.add(
|
||||
itemtype="SEC",
|
||||
id=1,
|
||||
heading="Metadata",
|
||||
)
|
||||
|
||||
# Requirement
|
||||
req_spec.add(
|
||||
parent=sec_uuid,
|
||||
itemtype="REQ",
|
||||
id=1,
|
||||
heading="Method to get Metadata",
|
||||
description="A Method shall return the metadata for a given media filename.",
|
||||
)
|
||||
#
|
||||
# Section
|
||||
#
|
||||
sec_uuid = req_spec.add(
|
||||
itemtype="SEC",
|
||||
id=2,
|
||||
heading="Image",
|
||||
)
|
||||
|
||||
# Requirement
|
||||
req_spec.add(
|
||||
parent=sec_uuid,
|
||||
itemtype="REQ",
|
||||
id=2,
|
||||
heading="Load from File",
|
||||
description="The class {\\tt image} shall have a method {\\tt load\\_from\\_file}, which creates a copy of an image to the instance. Load from file can handle a filename, but also pil images and media images. The method returns {\\tt True} on success and {\\tt False} on failures.",
|
||||
)
|
||||
|
||||
# Requirement
|
||||
req_spec.add(
|
||||
parent=sec_uuid,
|
||||
itemtype="REQ",
|
||||
id=3,
|
||||
heading="Save",
|
||||
description="The class {\\tt image} shall have a method {\\tt save}, which stores the modified image to a given filename. The method returns {\\tt True} on success and {\\tt False} on failures.",
|
||||
)
|
||||
|
||||
# Requirement
|
||||
req_spec.add(
|
||||
parent=sec_uuid,
|
||||
itemtype="REQ",
|
||||
id=4,
|
||||
heading="Image data",
|
||||
description="The class {\\tt image} shall have a method {\\tt image\\_data}, which returns the raw data of the modified image.",
|
||||
)
|
||||
|
||||
# Requirement
|
||||
req_spec.add(
|
||||
parent=sec_uuid,
|
||||
itemtype="REQ",
|
||||
id=5,
|
||||
heading="Resize",
|
||||
description="The class {\\tt image} shall have a method {\\tt resize}, which resizes the image. The method returns {\\tt True} on success and {\\tt False} on failures.",
|
||||
)
|
||||
|
||||
# Requirement
|
||||
req_spec.add(
|
||||
parent=sec_uuid,
|
||||
itemtype="REQ",
|
||||
id=6,
|
||||
heading="Rotate",
|
||||
description="The class {\\tt image} shall have a method {\\tt rotate\\_by\\_orientation}, which rotates the image by an exif orientation. If no parameter is given, the orientation will be taken out of the loaded image. The method returns {\\tt True} on success and {\\tt False} on failures.",
|
||||
)
|
||||
|
||||
# Requirement
|
||||
req_spec.add(
|
||||
parent=sec_uuid,
|
||||
itemtype="REQ",
|
||||
id=7,
|
||||
heading="Join",
|
||||
description="The class {\\tt image} shall have a method {\\tt join}, which joins an image to the loaded image. The method returns {\\tt True} on success and {\\tt False} on failures.",
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user