Closed ct-camecon closed 5 months ago
@sgulati26 has been able to run the model using the front-end and it produces the same results as running it on a Windows machine.
I'll leave the formal review to one of the Mac users.
@jp-camecon did some further tests on Windows to check for issues. Things look to be working as normal/before.
So we're just waiting for (at least) one Mac user to test this independently.
@jk694exe or @zoeberger : both of you have a Mac, right? Do you have time to test this?
We just had someone with a Mac successfully run the model from the front-end in an EEIST2 FTT training session. Might still want a more formal review before merging though.
When trying to run the Backend.py file from a Mac, there is an issue with the "start" command (cf picture). When I tried to use the equivalent for Mac (i.e. "open"), it created an issue with the thread object (cf picture).
Could you check if you're testing the cross-platform
branch?
https://github.com/ct-camecon/FTT_StandAlone/tree/cross-platform
In this branch, I replaced the systemcall
to the Windows start
command with a more general call to the Python webbrowser
module.
@zoeberger: in case you missed Chris' message.
Overview
Code changes to run on non-Windows (e.g. macOS, Linux) platforms, with some minor tidying and supporting additions elsewhere.
Subject to (stress-)testing, this should close #40.
Almost all changes concern cross-platform, rather than Windows-specific, approaches to handling file and folder paths, for the most part using
pathlib
.Other changes:
webbrowser
to open the frontend in the user's default browser, in place of the previous use of a Windows-specific system call:os.system('start ...')
pip install
any dependencies prior to runningApproach
Focus on getting the following to run:
run_file.py
, which runs FTT from the terminalBackend_FTT.py
, which starts the browser-based GUI to run FTT and examine model resultsNote that the aim was to make changes that addressed runtime errors only, rather than just blanket replace all instances. There are various functions in
Backend_FTT.py
that have been left alone for this reason, even if the corrections are (probably) safe and obvious.Also note that the EXTRACT and GAMMA tabs have not been tested, pending further developments to those parts of the model and frontend.
Untouched functions, of which there are ten, have the following comment immediately below their function signature:
# TODO: Still to review for cross-platform compatibility
Tests
Tests involved alternately running
python Backend_FTT.py
in:Outputs and behaviour appear to be preserved between the two versions, as well as compared to the original fork (admittedly, to this non-FTT specialist).