Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
Requirement Formalization Tool
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thodoris Nestoridis
Requirement Formalization Tool
Commits
d8af2e11
Commit
d8af2e11
authored
Jan 21, 2021
by
Thodoris Nestoridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add M5-M16 (need explanation on M11,M12,M13)
parent
60f5e7fa
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1090 additions
and
7 deletions
+1090
-7
main_req.py
reqtool/reqman/api/reqman/apps/reqtool/models/main_req.py
+352
-2
main_req.py
.../api/reqman/apps/reqtool/rest_api/serializers/main_req.py
+105
-1
urls.py
reqtool/reqman/api/reqman/apps/reqtool/rest_api/urls.py
+40
-4
main_req_views.py
.../api/reqman/apps/reqtool/rest_api/views/main_req_views.py
+593
-0
No files found.
reqtool/reqman/api/reqman/apps/reqtool/models/main_req.py
View file @
d8af2e11
This diff is collapsed.
Click to expand it.
reqtool/reqman/api/reqman/apps/reqtool/rest_api/serializers/main_req.py
View file @
d8af2e11
from
rest_framework
import
serializers
from
rest_framework
import
serializers
from
reqman.apps.reqtool.models.main_req
import
Main
,
Main_M1
,
Main_M2
,
Main_M3
,
Main_M4
from
reqman.apps.reqtool.models.main_req
import
Main
,
Main_M1
,
Main_M2
,
Main_M3
,
Main_M4
from
reqman.apps.reqtool.models.main_req
import
Main_M5
,
Main_M6
,
Main_M7
,
Main_M8
from
reqman.apps.reqtool.models.main_req
import
Main_M9
,
Main_M10
,
Main_M11
,
Main_M12
from
reqman.apps.reqtool.models.main_req
import
Main_M13
,
Main_M14
,
Main_M15
,
Main_M16
class
MainSerializer
(
serializers
.
ModelSerializer
):
class
MainSerializer
(
serializers
.
ModelSerializer
):
boilerplate_of_main
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
boilerplate_of_main
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
...
@@ -39,3 +43,103 @@ class Main_M4Serializer(serializers.ModelSerializer):
...
@@ -39,3 +43,103 @@ class Main_M4Serializer(serializers.ModelSerializer):
class
Meta
:
class
Meta
:
model
=
Main_M4
model
=
Main_M4
fields
=
(
'id'
,
'boilerplate_of_m4'
,
'main_owner_of_m4'
,
'sys_fun_m4'
,
'shall_m4'
,
'quantifier_m4'
,
'numerical_m4'
,
'mumerical_units_m4'
,
'item_m4'
)
fields
=
(
'id'
,
'boilerplate_of_m4'
,
'main_owner_of_m4'
,
'sys_fun_m4'
,
'shall_m4'
,
'quantifier_m4'
,
'numerical_m4'
,
'mumerical_units_m4'
,
'item_m4'
)
class
Main_M5Serializer
(
serializers
.
ModelSerializer
):
boilerplate_of_m5
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
main_owner_of_m5
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
class
Meta
:
model
=
Main_M5
fields
=
(
'id'
,
'boilerplate_of_m5'
,
'main_owner_of_m5'
,
'sys_fun_m5'
,
'shall_m5'
,
'flow_m5'
)
class
Main_M6Serializer
(
serializers
.
ModelSerializer
):
boilerplate_of_m6
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
main_owner_of_m6
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
class
Meta
:
model
=
Main_M6
fields
=
(
'id'
,
'boilerplate_of_m6'
,
'main_owner_of_m6'
,
'sys_fun_m6'
,
'shall_m6'
,
'flow_m6'
)
class
Main_M7Serializer
(
serializers
.
ModelSerializer
):
boilerplate_of_m7
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
main_owner_of_m7
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
class
Meta
:
model
=
Main_M7
fields
=
(
'id'
,
'boilerplate_of_m7'
,
'main_owner_of_m7'
,
'system_m7'
,
'shall_m7'
,
'function_m7'
)
class
Main_M8Serializer
(
serializers
.
ModelSerializer
):
boilerplate_of_m8
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
main_owner_of_m8
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
class
Meta
:
model
=
Main_M8
fields
=
(
'id'
,
'boilerplate_of_m8'
,
'main_owner_of_m8'
,
'function_1_m8'
,
'shall_m8'
,
'function_2_m8'
)
class
Main_M9Serializer
(
serializers
.
ModelSerializer
):
boilerplate_of_m9
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
main_owner_of_m9
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
class
Meta
:
model
=
Main_M9
fields
=
(
'id'
,
'boilerplate_of_m9'
,
'main_owner_of_m9'
,
'system_1_m9'
,
'shall_m9'
,
'interface_m9'
,
'system_2_m9'
)
class
Main_M10Serializer
(
serializers
.
ModelSerializer
):
boilerplate_of_m10
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
main_owner_of_m10
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
class
Meta
:
model
=
Main_M10
fields
=
(
'id'
,
'boilerplate_of_m10'
,
'main_owner_of_m10'
,
'sys_inter_m10'
,
'shall_m10'
,
'flow_item_m9'
)
class
Main_M11Serializer
(
serializers
.
ModelSerializer
):
boilerplate_of_m11
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
main_owner_of_m11
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
class
Meta
:
model
=
Main_M11
fields
=
(
'id'
,
'boilerplate_of_m11'
,
'main_owner_of_m11'
,
'system_1_m11'
,
'shall_m11'
,
'system_2_m11'
,
'connection_m11'
)
class
Main_M12Serializer
(
serializers
.
ModelSerializer
):
boilerplate_of_m12
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
main_owner_of_m12
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
class
Meta
:
model
=
Main_M12
fields
=
(
'id'
,
'boilerplate_of_m12'
,
'main_owner_of_m12'
,
'system_m12'
,
'shall_m12'
,
'state_m12'
)
class
Main_M13Serializer
(
serializers
.
ModelSerializer
):
boilerplate_of_m13
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
main_owner_of_m13
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
class
Meta
:
model
=
Main_M13
fields
=
(
'id'
,
'boilerplate_of_m13'
,
'main_owner_of_m13'
,
'system_m13'
,
'state_1_m13'
,
'statevalue_m13'
,
'shall_m13'
,
'state_2_m13'
)
class
Main_M14Serializer
(
serializers
.
ModelSerializer
):
boilerplate_of_m14
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
main_owner_of_m14
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
class
Meta
:
model
=
Main_M14
fields
=
(
'id'
,
'boilerplate_of_m14'
,
'main_owner_of_m14'
,
'system_m14'
,
'item_m14'
,
'shall_m14'
)
class
Main_M15Serializer
(
serializers
.
ModelSerializer
):
boilerplate_of_m15
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
main_owner_of_m15
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
class
Meta
:
model
=
Main_M15
fields
=
(
'id'
,
'boilerplate_of_m15'
,
'main_owner_of_m15'
,
'system_m15'
,
'item_1_m15'
,
'shall_m15'
,
'item_2_m15'
)
class
Main_M16Serializer
(
serializers
.
ModelSerializer
):
boilerplate_of_m16
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
main_owner_of_m16
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
class
Meta
:
model
=
Main_M16
fields
=
(
'id'
,
'boilerplate_of_m16'
,
'main_owner_of_m16'
,
'system_1_m16'
,
'shall_m16'
,
'system_2_m16'
)
reqtool/reqman/api/reqman/apps/reqtool/rest_api/urls.py
View file @
d8af2e11
...
@@ -31,16 +31,52 @@ urlpatterns = [
...
@@ -31,16 +31,52 @@ urlpatterns = [
path
(
'requirements/<int:boilerplate>/main/'
,
main_req_views
.
MainListCreateAPIView
.
as_view
(),
name
=
'api-main-list'
),
path
(
'requirements/<int:boilerplate>/main/'
,
main_req_views
.
MainListCreateAPIView
.
as_view
(),
name
=
'api-main-list'
),
path
(
'requirements/<int:boilerplate>/main/<int:pk>/'
,
main_req_views
.
MainDetailsAPIView
.
as_view
(),
name
=
'api-main-details'
),
path
(
'requirements/<int:boilerplate>/main/<int:pk>/'
,
main_req_views
.
MainDetailsAPIView
.
as_view
(),
name
=
'api-main-details'
),
#'''M1'''
#'''M1'''
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m1'
,
main_req_views
.
Main_M1ListCreateAPIView
.
as_view
(),
name
=
'api-main-m1-list'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m1
/
'
,
main_req_views
.
Main_M1ListCreateAPIView
.
as_view
(),
name
=
'api-main-m1-list'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m1/<int:pk>/'
,
main_req_views
.
Main_M1DetailsAPIView
.
as_view
(),
name
=
'api-main-m1-details'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m1/<int:pk>/'
,
main_req_views
.
Main_M1DetailsAPIView
.
as_view
(),
name
=
'api-main-m1-details'
),
#'''M2'''
#'''M2'''
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m2'
,
main_req_views
.
Main_M2ListCreateAPIView
.
as_view
(),
name
=
'api-main-m2-list'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m2
/
'
,
main_req_views
.
Main_M2ListCreateAPIView
.
as_view
(),
name
=
'api-main-m2-list'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m2/<int:pk>/'
,
main_req_views
.
Main_M2DetailsAPIView
.
as_view
(),
name
=
'api-main-m2-details'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m2/<int:pk>/'
,
main_req_views
.
Main_M2DetailsAPIView
.
as_view
(),
name
=
'api-main-m2-details'
),
#'''M3'''
#'''M3'''
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m3'
,
main_req_views
.
Main_M3ListCreateAPIView
.
as_view
(),
name
=
'api-main-m3-list'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m3
/
'
,
main_req_views
.
Main_M3ListCreateAPIView
.
as_view
(),
name
=
'api-main-m3-list'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m3/<int:pk>/'
,
main_req_views
.
Main_M3DetailsAPIView
.
as_view
(),
name
=
'api-main-m3-details'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m3/<int:pk>/'
,
main_req_views
.
Main_M3DetailsAPIView
.
as_view
(),
name
=
'api-main-m3-details'
),
#'''M4'''
#'''M4'''
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m4'
,
main_req_views
.
Main_M4ListCreateAPIView
.
as_view
(),
name
=
'api-main-m4-list'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m4
/
'
,
main_req_views
.
Main_M4ListCreateAPIView
.
as_view
(),
name
=
'api-main-m4-list'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m4/<int:pk>/'
,
main_req_views
.
Main_M4DetailsAPIView
.
as_view
(),
name
=
'api-main-m4-details'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m4/<int:pk>/'
,
main_req_views
.
Main_M4DetailsAPIView
.
as_view
(),
name
=
'api-main-m4-details'
),
#'''M5'''
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m5/'
,
main_req_views
.
Main_M5ListCreateAPIView
.
as_view
(),
name
=
'api-main-m5-list'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m5/<int:pk>/'
,
main_req_views
.
Main_M5DetailsAPIView
.
as_view
(),
name
=
'api-main-m5-details'
),
#'''M6'''
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m6/'
,
main_req_views
.
Main_M6ListCreateAPIView
.
as_view
(),
name
=
'api-main-m6-list'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m6/<int:pk>/'
,
main_req_views
.
Main_M6DetailsAPIView
.
as_view
(),
name
=
'api-main-m6-details'
),
#'''M7'''
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m7/'
,
main_req_views
.
Main_M7ListCreateAPIView
.
as_view
(),
name
=
'api-main-m7-list'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m7/<int:pk>/'
,
main_req_views
.
Main_M7DetailsAPIView
.
as_view
(),
name
=
'api-main-m7-details'
),
#'''M8'''
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m8/'
,
main_req_views
.
Main_M8ListCreateAPIView
.
as_view
(),
name
=
'api-main-m8-list'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m8/<int:pk>/'
,
main_req_views
.
Main_M8DetailsAPIView
.
as_view
(),
name
=
'api-main-m8-details'
),
#'''M9'''
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m9/'
,
main_req_views
.
Main_M9ListCreateAPIView
.
as_view
(),
name
=
'api-main-m9-list'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m9/<int:pk>/'
,
main_req_views
.
Main_M9DetailsAPIView
.
as_view
(),
name
=
'api-main-m9-details'
),
#'''M10'''
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m10/'
,
main_req_views
.
Main_M10ListCreateAPIView
.
as_view
(),
name
=
'api-main-m10-list'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m10/<int:pk>/'
,
main_req_views
.
Main_M10DetailsAPIView
.
as_view
(),
name
=
'api-main-m10-details'
),
#'''M11'''
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m11/'
,
main_req_views
.
Main_M11ListCreateAPIView
.
as_view
(),
name
=
'api-main-m11-list'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m11/<int:pk>/'
,
main_req_views
.
Main_M11DetailsAPIView
.
as_view
(),
name
=
'api-main-m11-details'
),
#'''M12'''
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m12/'
,
main_req_views
.
Main_M12ListCreateAPIView
.
as_view
(),
name
=
'api-main-m12-list'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m12/<int:pk>/'
,
main_req_views
.
Main_M12DetailsAPIView
.
as_view
(),
name
=
'api-main-m12-details'
),
#'''M13'''
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m13/'
,
main_req_views
.
Main_M13ListCreateAPIView
.
as_view
(),
name
=
'api-main-m13-list'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m13/<int:pk>/'
,
main_req_views
.
Main_M13DetailsAPIView
.
as_view
(),
name
=
'api-main-m13-details'
),
#'''M14'''
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m14/'
,
main_req_views
.
Main_M14ListCreateAPIView
.
as_view
(),
name
=
'api-main-m14-list'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m14/<int:pk>/'
,
main_req_views
.
Main_M14DetailsAPIView
.
as_view
(),
name
=
'api-main-m14-details'
),
#'''M15'''
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m15/'
,
main_req_views
.
Main_M15ListCreateAPIView
.
as_view
(),
name
=
'api-main-m15-list'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m15/<int:pk>/'
,
main_req_views
.
Main_M15DetailsAPIView
.
as_view
(),
name
=
'api-main-m15-details'
),
#'''M16'''
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m16/'
,
main_req_views
.
Main_M16ListCreateAPIView
.
as_view
(),
name
=
'api-main-m16-list'
),
path
(
'requirements/<int:boilerplate>/main/<int:mains>/m16/<int:pk>/'
,
main_req_views
.
Main_M16DetailsAPIView
.
as_view
(),
name
=
'api-main-m16-details'
),
]
]
\ No newline at end of file
reqtool/reqman/api/reqman/apps/reqtool/rest_api/views/main_req_views.py
View file @
d8af2e11
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment