-
Notifications
You must be signed in to change notification settings - Fork 52
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
Optional inputs #3842
Draft
amickan
wants to merge
31
commits into
main
Choose a base branch
from
feat_optional_inputs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Optional inputs #3842
+5,265
−1,892
Conversation
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
First PR for DIAGNijmegen/rse-roadmap#153 This adds the `AlgorithmInterface` model, as well as the necessary through table, and removes the inputs and outputs fields from the algorithm form. The following restrictions apply: - AlgorithmInterfaces cannot be deleted (protection on model level and admin form level) - AlgorithmInterfaces cannot be updated (protection on admin form level) - AlgorithmInterfaces are unique (i.e. input and output combinations are unique, we check for that in the form) - An algorithm can only have 1 default algorithm interface - There can only be one entry per algorithm and interface in the through table. --------- Co-authored-by: James Meakin <[email protected]>
Part of DIAGNijmegen/rse-roadmap#153 This adds a create and list view for algorithm interfaces that is accessible to algorithm editors with the global `add_algorithm` permission. Create view:  List view:  --------- Co-authored-by: James Meakin <[email protected]>
…ge.org into feat_optional_inputs
Adds a check to both the form and the model that ensures that an algorithm has a default interface. We're not using the through model directly to create an interface for an algorithm through the UI, hence the check in 2 places.
This enables selecting an interface when trying out an algorithm. Interface selection happens in a separate form and view, but is unnecessary if an algorithm has only 1 interface.  Part of DIAGNijmegen/rse-roadmap#153
This enables users with the `add_algorithm` permission to remove interfaces from their algorithm. Part of DIAGNijmegen/rse-roadmap#153
…ge.org into feat_optional_inputs
Adds restriction that interfaces for an algorithm need to have unique sets of inputs, discussed [here](DIAGNijmegen/rse-roadmap#153 (comment)). Also fixes an oversights from an earlier PR.
This adds input-to-interface matching to the JobPostSerializer so that algorithm jobs created through the API also have the interface configured. This also adds a serializer for algorithm interfaces. Part of DIAGNijmegen/rse-roadmap#153
I added an input/output count annotation to the `AlgorithmInterfaceManager` in my last PR, but had not tested the migrations again. In my migration check for the phase interfaces, I realized that the migrations break with that addition since they don't have access to custom manager methods. So I'm moving the annotation to a separate function here. The upside of this is that I can now use it in 2 other places where we're making the same annotation. So I'm calling this a win. Note that this does not add or change functionality, it just moves the code. So I didn't spend time on adding a test for the new function - it is indirectly covered by tests of all the places where it is used.
Discussed with James that we don't need the option to mark an interface as default, so removing it here.
This adds a `algorithm_interfaces` M2M to the `Phase` model and adds a custom through model for it. It also removes the input / output configuration option from both the phase admin and the `ConfigureAlgorithmPhases` view. In anticipation of PR 2, it refactors the interface create form so that it can be easily used for both phases and algorithms alike. Views to create and manage interfaces for phases will be added in a separate PR. Part of DIAGNijmegen/rse-roadmap#153
This adds the management views for algorithm interfaces for phases. The views are only accessible to staff users, and only for algorithm submission phases that are not external. The logic behind the views is the same as for the algorithm interfaces, but it only made sense to refactor the create view logic, and parts of the templates.  Part of DIAGNijmegen/rse-roadmap#153
This unifies the display of algorithm interface information in various locations. Part of DIAGNijmegen/rse-roadmap#153
This renames `interface` to `socket` on user-facing views and forms. I did not change the urls that include the word `interface`. That seems less important to me for now. We will need to add permanent redirects when we do change them. I based this on the feature branch for optional inputs since a lot of the places that require changes are touched in this branch. The users can wait 1 week for the renaming I think. The only places where the user is still confronted with the word `interface` now (as far as I can tell) is the API. Updating that is more complex.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Final PR for https://github.com/DIAGNijmegen/rse-roadmap/issues/153
I will merge with main once again after my vacation, but leaving this here already in draft mode.