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
887d0dc7
Commit
887d0dc7
authored
Jan 22, 2021
by
Thodoris Nestoridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add S1-S6, change view list
parent
d8af2e11
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
727 additions
and
56 deletions
+727
-56
settings.json
reqtool/reqman/api/.vscode/settings.json
+3
-0
requirements.py
...ool/reqman/api/reqman/apps/reqtool/models/requirements.py
+2
-5
suffix_req.py
reqtool/reqman/api/reqman/apps/reqtool/models/suffix_req.py
+232
-0
suffix_req.py
...pi/reqman/apps/reqtool/rest_api/serializers/suffix_req.py
+59
-0
user.py
...qman/api/reqman/apps/reqtool/rest_api/serializers/user.py
+2
-2
urls.py
reqtool/reqman/api/reqman/apps/reqtool/rest_api/urls.py
+46
-24
main_req_views.py
.../api/reqman/apps/reqtool/rest_api/views/main_req_views.py
+18
-18
requirements_views.py
.../reqman/apps/reqtool/rest_api/views/requirements_views.py
+7
-7
suffix_req_views.py
...pi/reqman/apps/reqtool/rest_api/views/suffix_req_views.py
+358
-0
No files found.
reqtool/reqman/api/.vscode/settings.json
0 → 100644
View file @
887d0dc7
{
"python.pythonPath"
:
"/home/nestorid/.pyenv/versions/reqman/bin/python"
}
\ No newline at end of file
reqtool/reqman/api/reqman/apps/reqtool/models/requirements.py
View file @
887d0dc7
...
...
@@ -2,6 +2,7 @@ from django.db import models
#from reqman.apps.common.models import CoreModel
from
reqman.apps.account.models
import
User
from
reqman.apps.reqtool.models.main_req
import
create_main
from
reqman.apps.reqtool.models.suffix_req
import
create_suffix
from
pygments.formatters.html
import
HtmlFormatter
from
pygments
import
highlight
...
...
@@ -37,11 +38,6 @@ def create_prefix(instance):
prefix
.
save
()
def
create_suffix
(
instance
):
'''Create the Suffix Model for the Boilerplate'''
pass
def
create_p1
(
instance
,
now_prefix
,
prev_prefix
,
series_of_prefix
):
try
:
prefix
=
LogicalExpression
.
objects
.
get
(
prefix
=
instance
,
prefix_boilerplate
=
instance
.
boilerplate
,
prefix_series
=
series_of_prefix
)
...
...
@@ -136,6 +132,7 @@ class Boilerplate(models.Model):
super
(
Boilerplate
,
self
)
.
save
(
**
kwargs
)
create_prefix
(
self
)
create_main
(
self
)
create_suffix
(
self
)
class
Meta
:
...
...
reqtool/reqman/api/reqman/apps/reqtool/models/suffix_req.py
0 → 100644
View file @
887d0dc7
This diff is collapsed.
Click to expand it.
reqtool/reqman/api/reqman/apps/reqtool/rest_api/serializers/suffix_req.py
0 → 100644
View file @
887d0dc7
from
rest_framework
import
serializers
from
reqman.apps.reqtool.models.suffix_req
import
Suffix
,
Suffix_S1
,
Suffix_S2
,
Suffix_S3
,
Suffix_S4
,
Suffix_S5
,
Suffix_S6
class
SuffixSerializer
(
serializers
.
ModelSerializer
):
boilerplate_of_suffix
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
suffix_owner
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
class
Meta
:
model
=
Suffix
fields
=
(
'id'
,
'boilerplate_of_suffix'
,
'suffix_owner'
,
'suffix_choices'
)
class
Suffix_S1Serializer
(
serializers
.
ModelSerializer
):
boilerplate_of_s1
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
suffix_owner_of_s1
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
class
Meta
:
model
=
Suffix_S1
fields
=
(
'id'
,
'boilerplate_of_s1'
,
'suffix_owner_of_s1'
,
'numerical_affirmative_s1'
,
'numerical_s1'
,
'mumerical_units_s1'
,
'time_units_s1'
)
class
Suffix_S2Serializer
(
serializers
.
ModelSerializer
):
boilerplate_of_s2
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
suffix_owner_of_s2
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
class
Meta
:
model
=
Suffix_S2
fields
=
(
'id'
,
'boilerplate_of_s2'
,
'suffix_owner_of_s2'
,
's2_s2'
,
'flow_s2'
)
class
Suffix_S3Serializer
(
serializers
.
ModelSerializer
):
boilerplate_of_s3
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
suffix_owner_of_s3
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
class
Meta
:
model
=
Suffix_S3
fields
=
(
'id'
,
'boilerplate_of_s3'
,
'suffix_owner_of_s3'
,
's3_s3'
,
'numerical_s3'
,
'time_units_s3'
,
'flow_s3'
)
class
Suffix_S4Serializer
(
serializers
.
ModelSerializer
):
boilerplate_of_s4
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
suffix_owner_of_s4
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
class
Meta
:
model
=
Suffix_S4
fields
=
(
'id'
,
'boilerplate_of_s4'
,
'suffix_owner_of_s4'
,
's4_s4'
)
class
Suffix_S5Serializer
(
serializers
.
ModelSerializer
):
boilerplate_of_s5
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
suffix_owner_of_s5
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
class
Meta
:
model
=
Suffix_S5
fields
=
(
'id'
,
'boilerplate_of_s5'
,
'suffix_owner_of_s5'
,
's5_s5'
)
class
Suffix_S6Serializer
(
serializers
.
ModelSerializer
):
boilerplate_of_s6
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
suffix_owner_of_s6
=
serializers
.
PrimaryKeyRelatedField
(
read_only
=
True
)
class
Meta
:
model
=
Suffix_S6
fields
=
(
'id'
,
'boilerplate_of_s6'
,
'suffix_owner_of_s6'
,
's6_s6'
)
reqtool/reqman/api/reqman/apps/reqtool/rest_api/serializers/user.py
View file @
887d0dc7
...
...
@@ -3,8 +3,8 @@ from reqman.apps.account.models import User
from
reqman.apps.reqtool.models.requirements
import
Boilerplate
class
UserSerializer
(
serializers
.
ModelSerializer
):
boilerplates
=
serializers
.
PrimaryKeyRelatedField
(
many
=
True
,
queryset
=
Boilerplate
.
objects
.
all
())
#
boilerplates = serializers.PrimaryKeyRelatedField(many=True, queryset=Boilerplate.objects.all())
class
Meta
:
model
=
User
fields
=
[
'pk'
,
'first_name'
,
'last_name'
,
'email'
,
'boilerplates'
]
\ No newline at end of file
fields
=
[
'pk'
,
'first_name'
,
'last_name'
,
'email'
]
#, 'boilerplates']
\ No newline at end of file
reqtool/reqman/api/reqman/apps/reqtool/rest_api/urls.py
View file @
887d0dc7
This diff is collapsed.
Click to expand it.
reqtool/reqman/api/reqman/apps/reqtool/rest_api/views/main_req_views.py
View file @
887d0dc7
from
rest_framework.generics
import
List
CreateAPIView
,
RetrieveUpdateDestroy
APIView
from
rest_framework.generics
import
List
APIView
,
RetrieveUpdateDestroyAPIView
,
List
APIView
from
rest_framework
import
permissions
from
django.http
import
HttpResponse
,
JsonResponse
...
...
@@ -18,7 +18,7 @@ from reqman.apps.reqtool.rest_api.serializers.main_req import Main_M13Serializer
from
reqman.apps.permissions
import
IsOwnerOrReadOnly
from
reqman.apps.reqtool.rest_api.services
import
fuseki
class
MainList
CreateAPIView
(
ListCreate
APIView
):
class
MainList
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
@@ -68,7 +68,7 @@ class MainDetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
Main_M1List
CreateAPIView
(
ListCreate
APIView
):
class
Main_M1List
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
@@ -117,7 +117,7 @@ class Main_M1DetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
Main_M2List
CreateAPIView
(
ListCreate
APIView
):
class
Main_M2List
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
@@ -166,7 +166,7 @@ class Main_M2DetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
Main_M3List
CreateAPIView
(
ListCreate
APIView
):
class
Main_M3List
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
@@ -215,7 +215,7 @@ class Main_M3DetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
Main_M4List
CreateAPIView
(
ListCreate
APIView
):
class
Main_M4List
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
@@ -264,7 +264,7 @@ class Main_M4DetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
Main_M5List
CreateAPIView
(
ListCreate
APIView
):
class
Main_M5List
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
@@ -313,7 +313,7 @@ class Main_M5DetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
Main_M6List
CreateAPIView
(
ListCreate
APIView
):
class
Main_M6List
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
@@ -362,7 +362,7 @@ class Main_M6DetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
Main_M7List
CreateAPIView
(
ListCreate
APIView
):
class
Main_M7List
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
@@ -411,7 +411,7 @@ class Main_M7DetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
Main_M8List
CreateAPIView
(
ListCreate
APIView
):
class
Main_M8List
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
@@ -460,7 +460,7 @@ class Main_M8DetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
Main_M9List
CreateAPIView
(
ListCreate
APIView
):
class
Main_M9List
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
@@ -509,7 +509,7 @@ class Main_M9DetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
Main_M10List
CreateAPIView
(
ListCreate
APIView
):
class
Main_M10List
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
@@ -558,7 +558,7 @@ class Main_M10DetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
Main_M11List
CreateAPIView
(
ListCreate
APIView
):
class
Main_M11List
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
@@ -607,7 +607,7 @@ class Main_M11DetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
Main_M12List
CreateAPIView
(
ListCreate
APIView
):
class
Main_M12List
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
@@ -656,7 +656,7 @@ class Main_M12DetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
Main_M13List
CreateAPIView
(
ListCreate
APIView
):
class
Main_M13List
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
@@ -705,7 +705,7 @@ class Main_M13DetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
Main_M14List
CreateAPIView
(
ListCreate
APIView
):
class
Main_M14List
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
@@ -754,7 +754,7 @@ class Main_M14DetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
Main_M15List
CreateAPIView
(
ListCreate
APIView
):
class
Main_M15List
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
@@ -803,7 +803,7 @@ class Main_M15DetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
Main_M16List
CreateAPIView
(
ListCreate
APIView
):
class
Main_M16List
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
reqtool/reqman/api/reqman/apps/reqtool/rest_api/views/requirements_views.py
View file @
887d0dc7
from
rest_framework.generics
import
ListCreateAPIView
,
RetrieveUpdateDestroyAPIView
from
rest_framework.generics
import
ListCreateAPIView
,
RetrieveUpdateDestroyAPIView
,
ListAPIView
from
rest_framework
import
permissions
from
django.http
import
HttpResponse
,
JsonResponse
...
...
@@ -52,7 +52,7 @@ class BoilerplateDetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
PrefixList
CreateAPIView
(
ListCreate
APIView
):
class
PrefixList
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
@@ -103,7 +103,7 @@ class PrefixDetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
LogicalExpressionList
CreateAPIView
(
ListCreate
APIView
):
class
LogicalExpressionList
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
@@ -145,7 +145,7 @@ class LogicalExpressionDetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
OccuringFunctionalityP2List
CreateAPIView
(
ListCreate
APIView
):
class
OccuringFunctionalityP2List
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
@@ -189,7 +189,7 @@ class OccuringFunctionalityP2DetailsAPIView(RetrieveUpdateDestroyAPIView):
class
OccuringFunctionalityP3List
CreateAPIView
(
ListCreate
APIView
):
class
OccuringFunctionalityP3List
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
@@ -232,7 +232,7 @@ class OccuringFunctionalityP3DetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
StateValueConstraintList
CreateAPIView
(
ListCreate
APIView
):
class
StateValueConstraintList
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
@@ -274,7 +274,7 @@ class StateValueConstraintDetailsAPIView(RetrieveUpdateDestroyAPIView):
instance
.
delete
()
class
OccuringFunctionalityForLogicalExpressionList
CreateAPIView
(
ListCreate
APIView
):
class
OccuringFunctionalityForLogicalExpressionList
APIView
(
List
APIView
):
"""
API view to retrieve list of posts or create new
"""
...
...
reqtool/reqman/api/reqman/apps/reqtool/rest_api/views/suffix_req_views.py
0 → 100644
View file @
887d0dc7
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