-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scottx611x/is tool based cleanup #2222
Merged
Merged
Changes from 4 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
42c722c
Remove conditionals and related code that isn't necessary now that we…
scottx611x 7abd945
Update Analysis config key names to be uniform, and update schema
scottx611x 5600afb
Remove unnecessary tests
scottx611x 019be46
Now that our schema is more basic we don't need the file resolver in …
scottx611x b6c3b24
Remove comment
scottx611x 498dafc
No need for intermediate value
scottx611x 3bb48f9
Exception handling
scottx611x 302dc2c
Fit on one line
scottx611x e42bb0e
No need for extra parens
scottx611x c143e28
Add note about atomic transactions
scottx611x c4fa720
Remove anti-pattern
scottx611x c1c8060
Fix bracket styling
scottx611x a26147e
Move JSONSchema paths into `base.py`
scottx611x a0a205d
Remove returns in analysis_manager/tasks.py
scottx611x 2f1419f
Utilize a single JSON_SCHEMA_FILE_RESOLVER setting for all defined sc…
scottx611x 4c5949a
Merge `origin/develop` into `is_tool_based_cleanup`
scottx611x abd16e9
Revert moving JSONSchema paths into `base.py`
scottx611x f310f72
Revert 2f1419f
scottx611x a63fcec
Favor `import jsonschema`
scottx611x File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,34 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema", | ||
"allOf": [{"$ref": "BaseAnalysisConfig.json#"}], | ||
"oneOf":[ | ||
{ | ||
"required": ["nodeSetUuid"], | ||
"properties": { | ||
"nodeSetUuid": {"$ref": "BaseAnalysisConfig.json#patterns/uuid"} | ||
} | ||
"type": "object", | ||
"required": [ | ||
"user_id", | ||
"study_uuid", | ||
"tool_uuid", | ||
"workflow_uuid" | ||
|
||
], | ||
"patterns": { | ||
"uuid": { | ||
"type": "string", | ||
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" | ||
} | ||
}, | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"study_uuid": { | ||
"$ref": "#/patterns/uuid" | ||
}, | ||
"tool_uuid": { | ||
"$ref": "#/patterns/uuid" | ||
}, | ||
{ | ||
"required": ["nodeRelationshipUuid"], | ||
"properties": { | ||
"nodeRelationshipUuid": {"$ref": "BaseAnalysisConfig.json#patterns/uuid"} | ||
} | ||
"user_id": { | ||
"type": "number" | ||
}, | ||
{ | ||
"required": ["toolUuid"], | ||
"properties": { | ||
"toolUuid": {"$ref": "BaseAnalysisConfig.json#patterns/uuid"} | ||
} | ||
"workflow_uuid": { | ||
"$ref": "#/patterns/uuid" | ||
} | ||
] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
galaxy_import_state is a field of AnalysisStatus. Is it necessary to check whether it exists?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you can still construct an AnalysisStatus like so w/o a
galaxy_import_state
:AnalysisStatus.objects.create(analysis=analysis)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right but the field would actually exists with a default value, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value for a
blank=True
isu''
which is still falseyFor example, this test case passes:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but the field is there, so checking for its existence is not necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its necessary as far as I can tell.
One would need to assert that there has been a
galaxy_import_state
set and that somegalaxy_import_progress
has happened before going ahead and handing a response over to the front end to display.Otherwise theres nothing meaningful for the UI to display yet.
I could imagine a scenario occurring where the
galaxy_import_state
is still equal tou''
and even though thegalaxy_import_state
field is present, passing that information along to the frontend without checking it first would yield odd results.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK but you are already checking it by
self.galaxy_import_progress != 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just because there is positive
galaxy_import_progress
doesn't mean that a validgalaxy_import_state
has been set as well?Something like
AnalyisStatus.objects.create(analysis=<analysis>, galaxy_import_progress=2)
Would break the UI with your proposed change