Conversation
* Added Save on Exit Prompt, details on Issue #138 * Small logic changes * Updated saving mechanism to compare widgets only * Rought implementation of new popup * Fixed minor saving bugs and logic * Small update to checkbox * Minor bug fix * Few logic changes and bug fixes * Added additional clarity to comments * Few renaming and logic changes * close popup when user clicks X * Merge saving updates; unify file location * Small change to one comment --------- Co-authored-by: Patrick Gu <patrick@patrickgu.ca>
…-rocketry/omnibus into p22gu/182-launcher-args
|
I will continue to work for this PR, which I believe is something we really need right now. |
Description
This PR closes #182 . Known Issue
Developer TestingHere's what I did to test my changes:
Reviewer TestingHere's what you should do to quickly validate my changes:
|
patrick-gu
left a comment
There was a problem hiding this comment.
Left some comments about the code. Also it doesn't seem to work for me, I get the error:
Running in GUI mode
Launching... Run commands: [['venv/Scripts/python', '-m', 'omnibus', False], ['venv/Scripts/python', 'sources/fakeni/main.py', False], ['venv/Scripts/python', 'sources/parsley/main.py', '--fake', False], ['venv/Scripts/python', 'sinks/dashboard/main.py', True], ['venv/Scripts/python', 'sinks/printer/main.py', False]]
Traceback (most recent call last):
File "...\omnibus\launcher.py", line 409, in <module>
main()
File "...\omnibus\launcher.py", line 403, in main
gui_launcher.subprocess()
File "...\omnibus\launcher.py", line 159, in subprocess
process = subprocess.Popen(launch_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\subprocess.py", line 1026, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Program Files\Python312\Lib\subprocess.py", line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified
| max_logs = args.max_logs | ||
| replay_speed = args.replay_speed | ||
| log_file = args.log_file if args.log_file != None else get_replay_log(max_logs) | ||
| log_file = os.path.expanduser(args.log_file if args.log_file != None else get_replay_log(max_logs)) |
There was a problem hiding this comment.
is there a reason for this?
There was a problem hiding this comment.
I did this because for some reason, if I use ~ relative to the home directory on a unix-like system, it pops up an error that the system cannot find the specified file. I think the reason for the error popping up before you mentioned is probably because I switched this... I think I need to add an OS check for this.
launcher.py
Outdated
| checkbox.stateChanged.connect(self.update_selected) | ||
| for i, (checkbox, args) in enumerate(self.src_widgets): | ||
| # https://docs.python.org/3/faq/programming.html#why-do-lambdas-defined-in-a-loop-with-different-values-all-return-the-same-result | ||
| def stateChanged(state, i=i): |
There was a problem hiding this comment.
This is really small nitpick. Although the Python documentation officially suggests you can do this, I would be inclined to avoid this. The reason is because we don't know if .connect will always only give us one argument, and I assume that nobody really wants to take the time to check (and just looking at the [outdated] docs quickly is unclear https://doc.qt.io/qtforpython-5/PySide2/QtCore/Signal.html#PySide2.QtCore.Signal.connect). I think it's better to make sure it's clear that this is a function with arity 1 (i.e. takes exactly one argument).
There was a problem hiding this comment.
Hi :)) I didn't think about a good way to pass only one argument because I have no idea how to edit state binding to a list. But I did use another solution with partial function to ensure it take two argument.
|
I did test this script on the Windows and Linux also, unfortunately I cannot reproduce the issue |
|
Sorry I never responded to this! I've figured out that the issue was that I created my venv in a folder called |
|
@patrick-gu No worries :). I just get some free time today to review some code before. I did test more with more combination of sources and sinks. It should be working well! If any others come up, we can still fix it later lol. Merry Christmas 🎄 |
Description
I changed X and Y to accomplish Z.
This PR closes #182 .
Developer Testing
Here's what I did to test my changes:
Reviewer Testing
Here's what you should do to quickly validate my changes:
This change is