-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement passing constraints as arg
Previously the constraints argument was disabled because I did not find a way to pass Python objects (tuple of dictionaries) into the mantid algorithm. This workaround converts the tuple of dictionaries into a byte string using the dill library which can then be converted to a normal string and passed into the mantid algorithm as an argument. When the algorithm executes, the string is converted into byte string again though eval() and then into the tuple of dicts of lambdas by the dill library. A better solution might be implemented in the future but this will suffice for now.
- Loading branch information
1 parent
62b388d
commit 0657f7d
Showing
6 changed files
with
42 additions
and
36 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ dependencies: | |
- pytest | ||
- jacobi==0.4.2 #pinned until newer versions functionality confirmed | ||
- coverage | ||
- dill |
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 |
---|---|---|
|
@@ -26,6 +26,7 @@ dependencies = [ | |
"iminuit", | ||
"h5py", | ||
"jacobi==0.4.2", | ||
"dill", | ||
] | ||
|
||
[project.optional-dependencies] | ||
|
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
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