Skip to content

Commit

Permalink
Merge pull request #1415 from the-deep/project/assessment-registry
Browse files Browse the repository at this point in the history
Project/assessment registry
  • Loading branch information
subinasr authored Jan 26, 2024
2 parents c7155fc + 3b68903 commit d7ef25b
Show file tree
Hide file tree
Showing 119 changed files with 16,884 additions and 8,260 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

.venv
.vscode/
# dependencies
/node_modules
vendor/
Expand Down
7 changes: 4 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"python.linting.mypyEnabled": true,
"python.linting.enabled": true
}
"python.linting.mypyEnabled": true,
"python.linting.enabled": true,
"python.formatting.provider": "true"
}
3 changes: 2 additions & 1 deletion apps/analysis_framework/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
Widget,
Filter,
)
from .widgets.store import widget_store


class AnalysisFrameworkTagFactory(DjangoModelFactory):
Expand Down Expand Up @@ -53,7 +54,7 @@ class Meta:
class WidgetFactory(DjangoModelFactory):
title = factory.Sequence(lambda n: f'Widget-{n}')
key = factory.Sequence(lambda n: f'widget-key-{n}')
widget_id = fuzzy.FuzzyChoice(Widget.WidgetType.choices, getter=lambda c: c[0])
widget_id = fuzzy.FuzzyChoice(widget_store.keys())
properties = {}
version = 1

Expand Down
120 changes: 40 additions & 80 deletions apps/analysis_framework/tests/snapshots/snap_test_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'analysisFramework': {
'allowedPermissions': [
'CAN_CLONE_FRAMEWORK',
'CAN_USE_IN_OTHER_PROJECTS',
'CAN_USE_IN_OTHER_PROJECTS'
],
'currentUserRole': 'DEFAULT',
'description': 'Quality throughout beautiful instead ahead despite measure ago current practice nation determine operation speak.',
Expand Down Expand Up @@ -60,8 +60,8 @@
'properties': {
},
'title': 'Widget-2',
'widgetId': 'DATE',
'version': 1,
'widgetId': 'NUMBER'
},
{
'id': '4',
Expand All @@ -70,8 +70,8 @@
'properties': {
},
'title': 'Widget-1',
'widgetId': 'MULTISELECT',
'version': 1,
'widgetId': 'ORGANIGRAM'
},
{
'id': '3',
Expand All @@ -80,8 +80,8 @@
'properties': {
},
'title': 'Widget-0',
'widgetId': 'TEXT',
'version': 1,
'widgetId': 'MULTISELECT'
}
]
},
Expand All @@ -91,35 +91,15 @@
'title': 'Section-2',
'tooltip': 'Some tooltip info 103',
'widgets': [
{
'id': '6',
'key': 'widget-key-0',
'order': 0,
'properties': {
},
'title': 'Widget-0',
'widgetId': 'SCALE',
'version': 1,
},
{
'id': '8',
'key': 'widget-key-2',
'order': 2,
'properties': {
},
'title': 'Widget-2',
'widgetId': 'MATRIX1D',
'version': 1,
},
{
'id': '9',
'key': 'widget-key-3',
'order': 3,
'properties': {
},
'title': 'Widget-3',
'widgetId': 'MULTISELECT',
'version': 1,
'widgetId': 'DATE'
}
]
},
Expand All @@ -129,15 +109,25 @@
'title': 'Section-0',
'tooltip': 'Some tooltip info 101',
'widgets': [
{
'id': '1',
'key': 'widget-key-0',
'order': 0,
'properties': {
},
'title': 'Widget-0',
'version': 1,
'widgetId': 'SELECT'
},
{
'id': '2',
'key': 'widget-key-1',
'order': 1,
'properties': {
},
'title': 'Widget-1',
'widgetId': 'SELECT',
'version': 1,
'widgetId': 'TIME_RANGE'
}
]
}
Expand All @@ -150,8 +140,8 @@
'properties': {
},
'title': 'Widget-3',
'widgetId': 'TIME_RANGE',
'version': 1,
'widgetId': 'SELECT'
},
{
'id': '12',
Expand All @@ -160,8 +150,8 @@
'properties': {
},
'title': 'Widget-2',
'widgetId': 'MATRIX1D',
'version': 1,
'widgetId': 'MATRIX2D'
},
{
'id': '11',
Expand All @@ -170,21 +160,11 @@
'properties': {
},
'title': 'Widget-1',
'widgetId': 'GEO',
'version': 1,
},
{
'id': '10',
'key': 'widget-key-0',
'order': 20,
'properties': {
},
'title': 'Widget-0',
'widgetId': 'NUMBER',
'version': 1,
'widgetId': 'TIME'
}
],
'title': 'AF-0',
'title': 'AF-0'
}
}
}
Expand All @@ -194,7 +174,7 @@
'analysisFramework': {
'allowedPermissions': [
'CAN_CLONE_FRAMEWORK',
'CAN_USE_IN_OTHER_PROJECTS',
'CAN_USE_IN_OTHER_PROJECTS'
],
'currentUserRole': None,
'description': 'Quality throughout beautiful instead ahead despite measure ago current practice nation determine operation speak.',
Expand All @@ -216,8 +196,8 @@
'properties': {
},
'title': 'Widget-2',
'widgetId': 'DATE',
'version': 1,
'widgetId': 'NUMBER'
},
{
'id': '4',
Expand All @@ -226,8 +206,8 @@
'properties': {
},
'title': 'Widget-1',
'widgetId': 'MULTISELECT',
'version': 1,
'widgetId': 'ORGANIGRAM'
},
{
'id': '3',
Expand All @@ -236,8 +216,8 @@
'properties': {
},
'title': 'Widget-0',
'widgetId': 'TEXT',
'version': 1,
'widgetId': 'MULTISELECT'
}
]
},
Expand All @@ -247,35 +227,15 @@
'title': 'Section-2',
'tooltip': 'Some tooltip info 103',
'widgets': [
{
'id': '6',
'key': 'widget-key-0',
'order': 0,
'properties': {
},
'title': 'Widget-0',
'widgetId': 'SCALE',
'version': 1,
},
{
'id': '8',
'key': 'widget-key-2',
'order': 2,
'properties': {
},
'title': 'Widget-2',
'widgetId': 'MATRIX1D',
'version': 1,
},
{
'id': '9',
'key': 'widget-key-3',
'order': 3,
'properties': {
},
'title': 'Widget-3',
'widgetId': 'MULTISELECT',
'version': 1,
'widgetId': 'DATE'
}
]
},
Expand All @@ -285,15 +245,25 @@
'title': 'Section-0',
'tooltip': 'Some tooltip info 101',
'widgets': [
{
'id': '1',
'key': 'widget-key-0',
'order': 0,
'properties': {
},
'title': 'Widget-0',
'version': 1,
'widgetId': 'SELECT'
},
{
'id': '2',
'key': 'widget-key-1',
'order': 1,
'properties': {
},
'title': 'Widget-1',
'widgetId': 'SELECT',
'version': 1,
'widgetId': 'TIME_RANGE'
}
]
}
Expand All @@ -306,8 +276,8 @@
'properties': {
},
'title': 'Widget-3',
'widgetId': 'TIME_RANGE',
'version': 1,
'widgetId': 'SELECT'
},
{
'id': '12',
Expand All @@ -316,8 +286,8 @@
'properties': {
},
'title': 'Widget-2',
'widgetId': 'MATRIX1D',
'version': 1,
'widgetId': 'MATRIX2D'
},
{
'id': '11',
Expand All @@ -326,21 +296,11 @@
'properties': {
},
'title': 'Widget-1',
'widgetId': 'GEO',
'version': 1,
},
{
'id': '10',
'key': 'widget-key-0',
'order': 20,
'properties': {
},
'title': 'Widget-0',
'widgetId': 'NUMBER',
'version': 1,
'widgetId': 'TIME'
}
],
'title': 'AF-0',
'title': 'AF-0'
}
}
}
Expand Down
Loading

0 comments on commit d7ef25b

Please sign in to comment.