nansencenter / DAPPER

Data Assimilation with Python: a Package for Experimental Research
https://nansencenter.github.io/DAPPER
MIT License
341 stars 119 forks source link

Keyboard input for Liveplot #61

Closed yumengch closed 3 years ago

yumengch commented 3 years ago

I notice that several issues in the Github are related to liveplotting.

I avoided the liveplotting module since beginning and I think I should take this chance to check it.

I made some tests under Windows Subsystem for Linux (WSL), which is a Ubuntu system.

This running result leads me to some design questions: Is the blocking of program run by read1 done by intention? If so:

If it is a bug:

patnr commented 3 years ago

Yes, liveplotting could use some brushing up. But it's also something that is hard to ever say is "finished". What you have pointed out is definitely a bug though (on WSL) .

It might not be necessary to print information about keyboard input if user_interaction is False.

Indeed, the printouts should be replaced by a statement saying that user_interaction has been set to False.

Here is a script I used to develop/test read1

yumengch commented 3 years ago

I tested with real Ubuntu and it indeed is due to incomplete implementation of the WSL microsoft/WSL#3507. It turns out WSL is handy but not a full-blown Linux system.

I will see if I can find a workaround for this. Otherwise we should close this issue for the time being.

patnr commented 3 years ago

Great stuff!

If you cannot find a solution, it'd be great if we can detect WSL (the terminal provided by it, I guess) and print a warning message saying that pausing/skipping ain't possible

patnr commented 3 years ago

Closed by #62