Use MSUIDefaultConfig.new_flighttrack_template Instead of STUB_CODE#2739
Conversation
|
look at the 90 failed, 390 passed, 11 skipped, 44 warnings, 90 errors in 470.02s (0:07:50) |
|
@ReimarBauer I got the error TypeError: contents must be unicode, but I don't understand what 'contents' means. |
mslib/mscolab/seed.py
Outdated
| if not file_dir.exists(path): | ||
| file_dir.makedir(path) | ||
| file_dir.writetext(f'{path}/main.ftml', mscolab_settings.STUB_CODE) | ||
| file_dir.writetext(f'{path}/main.ftml', get_content) |
There was a problem hiding this comment.
and add its content to the function.
mslib/mscolab/server.py
Outdated
|
|
||
|
|
||
| def get_content(): | ||
| return session.get('get_content') |
mslib/mscolab/server.py
Outdated
| def create_operation(): | ||
| path = request.form['path'] | ||
| content = request.form.get('content', None) | ||
| content = request.form.get('content', request.form.get('default_content')) |
mslib/msui/mscolab.py
Outdated
| return | ||
|
|
||
| user_template = MSUIDefaultConfig.new_flighttrack_template | ||
| xml_waypoints = "".join( |
There was a problem hiding this comment.
that goes wrong. we need the coordinates of the waypoints.
the same problem is solved for the local flighttrack.
okay. |
ReimarBauer
left a comment
There was a problem hiding this comment.
see comment
and look on the CI tests too
Yes, I just wanted to show you whether the content handled in @verify_user def create_operation() is okay or not. |
| else: | ||
| operation_file.write(mscolab_settings.STUB_CODE) | ||
| operation_file.write(content) | ||
| operation_path = fs.path.combine(self.data_dir, operation.path) |
There was a problem hiding this comment.
with your change you need to indent this under the if content is not None: condition
mslib/mscolab/seed.py
Outdated
| from mslib.mscolab.conf import mscolab_settings | ||
| from mslib.mscolab.models import User, db, Permission, Operation | ||
| from mslib.mscolab.server import APP as app | ||
| from mslib.mscolab.server import content |
There was a problem hiding this comment.
you need here as content the STUB_CODE maybe move it to here
And you need that also as default in the tests for test_server.py
|
please remove your version of .coverage |
Done |
|
@ReimarBauer When I ran the tests locally on macOS -13, macOS -14, and Ubuntu, there were no errors. However, the macOS -13 or macOS -14 test failed on GitHub? |
|
Yes known. There is an open PR by me, trying to track that down. |
|
@ReimarBauerIn commit 21, the tests failed on macOS-13 and macOS-14, but they were passing in commit 20. Only the linter was failing in commit 20, and after fixing the lint issues, the tests started failing. what should i do? |
|
Ignore macos13/14 wms tests. They are not related to your change. |
Okay, then I guess this issue is fixed? Because whenever I create a new operation, new waypoints are used. Or am I missing something? |
|
I review it later when there is a bit time. We have eastern this weekend. |
okk |
|
@ReimarBauer i am getting Timeout error, should i increase the timeout duration? |
Please don't. There is a race condition, which we have to find. longer timeout just let us wait longer. |
Okay, then is there any change I should make in this PR? |
Fixes #2474