Closed alustig3 closed 1 year ago
Thanks @alustig3 for the code review.
Regarding whether we should have a drop-down for the file type, my thoughs are:
.tsv
not .txt
files. The new file format is better and we don't want to support both formats over the long term as it makes maintainance more complicated. I therefore do not like the option of having it as a setting in the settings dialog..txt
but new projects would use .tsv
, hence the drop down menu. .tsv
in the next release. I had been thinking with all the new functionallity added in this release we might want to call it v2.0
, and doing so would also indicate that there are some changes that are not fully backward compatible. I do want to ensure that the data_import.py
functionallity can generate as close as possible to identical Session
objects or session_dataframe
s from either .tsv
or .txt
, to make it straightforward to mix and match file types in the same project without having to change analysis code (assuming the analysis uses the provided data import functions).What do you think?
I agree @ThomasAkam about it being best to avoid having to support both formats long term.
Doing a v2.0 release with only .tsv seems reasonable to me, especially if we did a v2.0rc version beforehand to hopefully get some more feedback/testing from others.
Sounds good, I'm happy with dropping the .txt format for the next v2.0 release. Agree a v2.0rc for testing is a good idea.
Please could you remove the stuff from the settings dialog for setting the file type and then I'll merge this.
@ThomasAkam I removed the stuff from the settings dialog
I hardcoded the data logger to use tsv. This was the quickest and easiest path, but maybe you want to also remove the "file_type" argument from data_logger's open_data_file() all together and get rid of the self.file_type from the Data_logger class?
Thanks, I'll take out the functionallity for generating the .txt files once I have merged this.
I noticed there is some code in dialogs.py
defining a Radio_setter
class which does not appear to be used anywhere. Should this be removed?
Thanks Andy!
fixed broken custom variable dialogs. fix was needed because
state_machine.py
no longer returns a string repr() of the value, but instead returns the value itselfremoved the tsv/txt "file type" dropdowns and instead made a "file type" setting in the settings dialog / user_settings.json
I think it makes sense to always print variables at the start of the task.
fixed a bug that also exists on the dev branch, where changing what subjects are being run in the experiment will cause the program to freeze because the pyControl would be trying to access a subject.plot from a previous experiment run that had been deleted. error below