beat issueshttps://gitlab.idiap.ch/groups/beat/-/issues2019-10-04T15:12:53Zhttps://gitlab.idiap.ch/beat/beat.editor/-/issues/233An empty json file in the wrong directory format crashes the editor2019-10-04T15:12:53ZZohreh MOSTAANIAn empty json file in the wrong directory format crashes the editorIf a user adds an empty json file in the wrong directory structure using file manager or command line like following:
Usually this is the correct structure:
prefix/dataformats/<username>/<dataformatname>/1.json
Lets make a file directly...If a user adds an empty json file in the wrong directory structure using file manager or command line like following:
Usually this is the correct structure:
prefix/dataformats/<username>/<dataformatname>/1.json
Lets make a file directly in <username> folder so we will have:
prefix/dataformats/<username>/1.json
If the editor is already open it shows it in the list of the files without giving any warning to the user. But then if you open this new json file the editor will close and this error is shown in the log:
```
Traceback (most recent call last):
File "/remote/idiap.svm/user.active/zmostaani/experiments/beat/beat.editor/beat/editor/widgets/assetwidget.py", line 356, in loadAsset
self.watcher.addPath(self.current_asset.declaration_path)
File "/remote/idiap.svm/user.active/zmostaani/experiments/beat/beat.editor/beat/editor/backend/asset.py", line 208, in declaration_path
storage = self.type.storage(self.prefix, self.name)
File "/remote/idiap.svm/user.active/zmostaani/experiments/beat/beat.editor/src/beat.backend.python/beat/backend/python/dataformat.py", line 77, in __init__
raise RuntimeError("invalid dataformat name: `%s'" % name)
RuntimeError: invalid dataformat name: `zmostaani/1'
Aborted
```
Now if you try to run the editor again this will be the error:
```
Traceback (most recent call last):
File "/remote/idiap.svm/user.active/zmostaani/experiments/beat/beat.editor/beat/editor/widgets/dataformateditor.py", line 601, in <lambda>
lambda: self.dataformat_model.setPrefixPath(self.prefix_path)
File "/remote/idiap.svm/user.active/zmostaani/experiments/beat/beat.editor/beat/editor/backend/assetmodel.py", line 182, in setPrefixPath
self.reload()
File "/remote/idiap.svm/user.active/zmostaani/experiments/beat/beat.editor/beat/editor/backend/assetmodel.py", line 119, in reload
json_files = _find_json_files(asset_folder)
File "/remote/idiap.svm/user.active/zmostaani/experiments/beat/beat.editor/beat/editor/backend/assetmodel.py", line 70, in _find_json_files
asset_items = os.scandir(path)
NotADirectoryError: [Errno 20] Not a directory: '/remote/idiap.svm/user.active/zmostaani/experiments/beat/beat.zmostaani.prefix/prefix/dataformats/zmostaani/1.json'
Aborted
```
Even though users are not supposed to make such problematic files but they may by accident and just having log information might not be enough. see #232Samuel GAISTSamuel GAISThttps://gitlab.idiap.ch/beat/beat.editor/-/issues/232An empty json file in the correct directory structure crashes the editor2019-10-04T15:12:53ZZohreh MOSTAANIAn empty json file in the correct directory structure crashes the editorAt the moment it is assumed the prefix is completely valid. If a user adds an empty json file (using file manager or command line for example $ touch 1.json) in the correct directory format, if the editor is open it is shown on the list ...At the moment it is assumed the prefix is completely valid. If a user adds an empty json file (using file manager or command line for example $ touch 1.json) in the correct directory format, if the editor is open it is shown on the list of the available asset, without any error or warning. But is you click on it the editor will close completely and there is a log error.
```
Traceback (most recent call last):
File "/remote/idiap.svm/user.active/zmostaani/experiments/beat/beat.editor/beat/editor/widgets/assetwidget.py", line 358, in loadAsset
self.__update_content()
File "/remote/idiap.svm/user.active/zmostaani/experiments/beat/beat.editor/beat/editor/widgets/assetwidget.py", line 214, in __update_content
editor.load_json(json.loads(json_data))
File "/idiap/user/zmostaani/miniconda3/envs/beat2/lib/python3.6/site-packages/simplejson/__init__.py", line 518, in loads
return _default_decoder.decode(s)
File "/idiap/user/zmostaani/miniconda3/envs/beat2/lib/python3.6/site-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/idiap/user/zmostaani/miniconda3/envs/beat2/lib/python3.6/site-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Aborted
```
After the editor crashes you can run it again. It will run containing the mistaken json file. Now assume you know where the problem is and this time you learnt your lesson and you want to use editor to delete the asset. Go to the file in question. Right click on it and choose delete. Again the editor crashes and this is in the log info:
```
Traceback (most recent call last):
File "/remote/idiap.svm/user.active/zmostaani/experiments/beat/beat.editor/beat/editor/widgets/assetwidget.py", line 321, in deleteAsset
if self.current_asset.declaration_path == file_path:
AttributeError: 'NoneType' object has no attribute 'declaration_path'
Aborted
```
You can only remove it now is to use file manager or command line again.
It would be good to handle such instances more gracefully and more informative for the user since it is not easy from this log to understand where the problem is unless the user remembers exactly what they have done to cause this problem. It is not always the case :D
Also if we have multiple instance of editor open from terminal (see #228) and lose this information completely it would be even worse.Samuel GAISTSamuel GAISThttps://gitlab.idiap.ch/beat/beat.editor/-/issues/231The cleanup for the content widget is not done properly.2019-10-04T15:12:53ZZohreh MOSTAANIThe cleanup for the content widget is not done properly.The issue is that if you edit an asset (tested with dataformat), and then open another dataformat without saving the previous one the content of what you have opened past will be shown in the one that has not been saved, instead of it be...The issue is that if you edit an asset (tested with dataformat), and then open another dataformat without saving the previous one the content of what you have opened past will be shown in the one that has not been saved, instead of it being in the previous state.
I realize that you don't even need to make a new dataformat. To reproduce the issue, you just need to have several dataformat from one or more than one user available. Start opening them one after another and look at the change in the content!
The issue comes from how the widgets are being cleaned before a new asset is open. The content from previous asset is not cleaned fully and what you see as the newly open asset is not it's own content but information from the leftovers.Samuel GAISTSamuel GAISThttps://gitlab.idiap.ch/beat/beat.editor/-/issues/230Adding the name of the asset being saved to the dialogue box2019-07-05T14:43:55ZZohreh MOSTAANIAdding the name of the asset being saved to the dialogue boxAt the moment when you save an asset, it just says "Content changed. Do you want to save it?" But it doesn't give the name of the asset in question. This can become very confusing.
1. At the moment there is no name on the top of editor/...At the moment when you save an asset, it just says "Content changed. Do you want to save it?" But it doesn't give the name of the asset in question. This can become very confusing.
1. At the moment there is no name on the top of editor/json widget, and it is not obvious what is being changed. see #229 .
2. If there will be multiple windows in the future this feature is necessary. see #228 .Samuel GAISTSamuel GAISThttps://gitlab.idiap.ch/beat/beat.editor/-/issues/229Adding the name of the asset being edited on the top of the edit/json widget2019-06-28T09:58:15ZZohreh MOSTAANIAdding the name of the asset being edited on the top of the edit/json widgetIt is necessary to have the name of the asset being edited somewhere on the right side of the editor. The reason is that at the moment if you have an asset open, and on the list of the assets on the left you click on some other thing, on...It is necessary to have the name of the asset being edited somewhere on the right side of the editor. The reason is that at the moment if you have an asset open, and on the list of the assets on the left you click on some other thing, only once (not double click), that object gets the focus but it is not open. Therefore what you see that is selected is not what is being actually edited.
The idea is to add the name of the asses on the top of the edit/json widget.
If we have the name there it will be useful if there are multiple windows open. see #228.Samuel GAISTSamuel GAISThttps://gitlab.idiap.ch/beat/beat.editor/-/issues/228Feature request: Be able to have multi window open2020-02-12T12:42:39ZZohreh MOSTAANIFeature request: Be able to have multi window openIt would be nice if you are able to have multiple assets open at the same time, since sometimes you may need it.
There are to options here:
1. Having multiple windows open in the same instance of editor. Kind of just splitting the edit...It would be nice if you are able to have multiple assets open at the same time, since sometimes you may need it.
There are to options here:
1. Having multiple windows open in the same instance of editor. Kind of just splitting the editor window.
2. Having a new instance of editor opened from terminal. In this case there might be complications with the log info shown in the terminal. The question is are they useful for user or not?https://gitlab.idiap.ch/beat/beat.editor/-/issues/227Feature request: Search functionality when making a new version or fork an as...2020-08-06T09:10:07ZZohreh MOSTAANIFeature request: Search functionality when making a new version or fork an asset.It would be good to be able to search for the asset you want to fork or make a new version since the existing list can be very long.It would be good to be able to search for the asset you want to fork or make a new version since the existing list can be very long.Samuel GAISTSamuel GAISThttps://gitlab.idiap.ch/beat/beat.editor/-/issues/226When a new/new version of an asset is made, it is not obvious to the user sin...2019-10-04T15:12:51ZZohreh MOSTAANIWhen a new/new version of an asset is made, it is not obvious to the user since it doesn't pop open.At the moment, when you make a new/new version of a asset, it only creates a file in the corresponding directory, but it doesn't actually open the file in the editor, ready to be edited. The user needs to go back through the list of file...At the moment, when you make a new/new version of a asset, it only creates a file in the corresponding directory, but it doesn't actually open the file in the editor, ready to be edited. The user needs to go back through the list of files to find it and open it manually.
This approach not only is not intuitive, but also it can get very confusing very fast especially if you have so many assets with similar names. It is usually the case when you are testing experiments just with minor changes.https://gitlab.idiap.ch/beat/beat.editor/-/issues/225When opening a new algorithm, editor checks for "integer" dataformat that mig...2019-07-02T13:24:53ZZohreh MOSTAANIWhen opening a new algorithm, editor checks for "integer" dataformat that might not be available.When you try to make a new algorithm it gives and error "Reference dataformats [integer, integer] not found". The reason is that to make the correct template for the algorithm the editor checks for "integer" data format to exist, otherwi...When you try to make a new algorithm it gives and error "Reference dataformats [integer, integer] not found". The reason is that to make the correct template for the algorithm the editor checks for "integer" data format to exist, otherwise it gives an error. Even though the dataformat "integer" seems very obvious to be a part of a typical custom prefix, it is not the case.
There are two solutions to this problem:
1. When the user wants to make a new algorithm a message pops up and says "you need this, do you want me to create it"
2. At the beginning when the editor checks the sanity of the prefix the same window pops up. (similar to the behaviour regarding protocoltemplates)
Steps to reproduce:
- Open editor v2.
- Go to File -> New -> algorithm -> New.
- Press ok.
It gives the error "Reference dataformats [integer, integer] not found".
It should just make a new algorithm and such underlying issues should be transparent to the user as much as possible.Samuel GAISTSamuel GAISThttps://gitlab.idiap.ch/beat/beat.editor/-/issues/224Automatic conversion to v2 for databases2020-02-20T13:32:19ZZohreh MOSTAANIAutomatic conversion to v2 for databasesAt the moment all the database objects available in the test prefix (and probably the user's custom prefix) are not using "schema_version": 2. All the databases written in the previous version of the schema are read-only, therefore if a ...At the moment all the database objects available in the test prefix (and probably the user's custom prefix) are not using "schema_version": 2. All the databases written in the previous version of the schema are read-only, therefore if a user wants to make a new version of a database, it is again read-only (not editable) which defeats the purpose of making a new version!
It is reasonable that when the user makes a new version of a database, instead of ending up with a read-only file, a new file for the database using "schema_version": 2 is created.
It will be good also that a message is shown to the user that there is a change in the schema_version, so they are aware of the change, and they won't be surprised when they look at the json file.
Steps to reproduce:
- Open editor v2.
- Go to File -> New -> databases -> New version
- Click on Ok
the created database is read-only.https://gitlab.idiap.ch/beat/beat.core/-/issues/83Test prefix: plotters empty uses not present2019-06-28T13:14:47ZFlavio TARSETTITest prefix: plotters empty uses not presentThis issue tracks inconsistency with the json libraries management in the plotter and other editors such as the library editor.
Description of the issue:
In the test prefix, the plotters contain a "uses" key targeting the libraries th...This issue tracks inconsistency with the json libraries management in the plotter and other editors such as the library editor.
Description of the issue:
In the test prefix, the plotters contain a "uses" key targeting the libraries that are used.
When used we have:
```python
"uses": {
"baselib": "plot/baselib/1"
}
```
When no libraries are defined I was expecting to have something like this:
```python
"uses": {}
```
However we get no "uses" key in the dictionary at all. This is counter-intuitive and works at the opposite of what is done for the libraries editor where no libraries used mean having:
```python
"uses": {}
```
in the json file.Flavio TARSETTIFlavio TARSETTIhttps://gitlab.idiap.ch/beat/beat.core/-/issues/82Improve duplicate key handling2019-06-19T05:13:48ZSamuel GAISTImprove duplicate key handlingThis issue tracks the implementation of duplicated key handling in JSON files used.
In normal situation, the files should be edited and stored using beat/beat.editor> or currently still beat/beat.web> however if one does edit the declar...This issue tracks the implementation of duplicated key handling in JSON files used.
In normal situation, the files should be edited and stored using beat/beat.editor> or currently still beat/beat.web> however if one does edit the declaration file by hand, errors like duplicated key might be introduced which won't be caught as loading a JSON file line by line will result in a dictionary with the last entry being used (which is normal behavior when dealing with dictionary type of containers).
In our case, the system will generate an error so that nothing will run with unexpected values.Soft loopsSamuel GAISTSamuel GAISThttps://gitlab.idiap.ch/beat/beat.backend.python/-/issues/25Handle duplicate key in json data2019-06-17T05:48:34ZSamuel GAISTHandle duplicate key in json dataCurrently loading a json file that contains a key multiple times will result in the last entry being used.
To avoid getting strange result, implement a hook that will raise an error and stop there.Currently loading a json file that contains a key multiple times will result in the last entry being used.
To avoid getting strange result, implement a hook that will raise an error and stop there.Soft loopsSamuel GAISTSamuel GAISThttps://gitlab.idiap.ch/beat/beat.editor/-/issues/223Remove unused code in protocol template editor2019-10-04T15:12:53ZFlavio TARSETTIRemove unused code in protocol template editorThis targets unused code from the plotter template editorThis targets unused code from the plotter template editorFlavio TARSETTIFlavio TARSETTIhttps://gitlab.idiap.ch/beat/beat.examples/-/issues/15String default values used in place of float for float types for plotters2019-06-17T06:02:28ZFlavio TARSETTIString default values used in place of float for float types for plottersString default are used in place of float for float types for plotters.
This affects the implementation of the "Plotter Editor" especially at the creation of the spinboxes that checks strictly for the correct typeString default are used in place of float for float types for plotters.
This affects the implementation of the "Plotter Editor" especially at the creation of the spinboxes that checks strictly for the correct typeFlavio TARSETTIFlavio TARSETTIhttps://gitlab.idiap.ch/beat/beat.tutorial.prefix/-/issues/2String default values used in place of float for float types for plotters2019-06-07T20:07:18ZFlavio TARSETTIString default values used in place of float for float types for plottersString default are used in place of float for float types for plotters.
This affects the implementation of the "Plotter Editor" especially at the creation of the spinboxes that checks strictly for the correct typeString default are used in place of float for float types for plotters.
This affects the implementation of the "Plotter Editor" especially at the creation of the spinboxes that checks strictly for the correct typeFlavio TARSETTIFlavio TARSETTIhttps://gitlab.idiap.ch/beat/beat.editor/-/issues/222Database Editor: update naming for set2019-10-04T15:12:53ZFlavio TARSETTIDatabase Editor: update naming for setPatch typo name as possible confusion and collision with python "set" class.
Part of #183Patch typo name as possible confusion and collision with python "set" class.
Part of #183Flavio TARSETTIFlavio TARSETTIhttps://gitlab.idiap.ch/beat/beat.editor/-/issues/221Open asset related files2019-10-04T15:12:53ZSamuel GAISTOpen asset related filesFiles related to the asset are currently not shown nor editable through beat/beat.editor>.
Add the possibility to edit these using the user's corresponding default editor.Files related to the asset are currently not shown nor editable through beat/beat.editor>.
Add the possibility to edit these using the user's corresponding default editor.[v2] 1 - Edition/Visualization for small editorsSamuel GAISTSamuel GAISThttps://gitlab.idiap.ch/beat/beat.editor/-/issues/219AssetModel latest only feature is incomplete2019-06-03T09:36:59ZSamuel GAISTAssetModel latest only feature is incompleteSummary
The "latest only" property implement of AssetModel is currently incomplete and does not work for all asset types.
Steps to reproduce
```
model = AssetModel()
model.prefix_path = "path/to/prefix"
model.asset_type = "AssetType....Summary
The "latest only" property implement of AssetModel is currently incomplete and does not work for all asset types.
Steps to reproduce
```
model = AssetModel()
model.prefix_path = "path/to/prefix"
model.asset_type = "AssetType.DATAFORMAT"
asset_list = model.stringList()
model.setLatestOnlyEnabled(False)
full_asset_list = model.stringList()
assert asset_list != full_asset_list
assert len(asset_list) < len(full_asset_list)
```
What is the current bug behavior?
The same list of assets is returned for types that are neither database nor protocol templates.
What is the expected correct behavior?
The two lists should be different if the prefix contains several versions of these assets
Possible fixes
Implement the same "un-filtering" for all assets where it make sense.
The fix will require beat/beat.core!76[v2] 1 - Edition/Visualization for small editorsSamuel GAISTSamuel GAISThttps://gitlab.idiap.ch/beat/beat.examples/-/issues/14Wrong algorithm V1 parameters value in declaration2019-05-28T14:45:18ZSamuel GAISTWrong algorithm V1 parameters value in declarationFollowing the development of beat/beat.core!65, it has been discovered that part of the v1 algorithms provided by this repository have an issue: some of their numerical parameters have their default value stored as string rather than num...Following the development of beat/beat.core!65, it has been discovered that part of the v1 algorithms provided by this repository have an issue: some of their numerical parameters have their default value stored as string rather than number.
This was fixed by !19 and !20 however, taking into account that the live platform has already some experiment that ran using these algorithm, updating them will break the cache (which in itself is not an issue) but also would require to re-run certified experiment which is a no-go.
The decided course of action is the following:
- Reverse !19
- Reverse the last fixes done in !20
- Implement a fully self-contained algorithm version 1 schema (done in beat/beat.core!65)
This will allow to have algorithm using still using the V1 left untouched while enforcing the correct data types for newer algorithms.Samuel GAISTSamuel GAIST