Skip to content

Use MSUIDefaultConfig.new_flighttrack_template Instead of STUB_CODE#2739

Merged
ReimarBauer merged 22 commits intoOpen-MSS:developfrom
annapurna-gupta:feature/mscolab-templete
Apr 21, 2025
Merged

Use MSUIDefaultConfig.new_flighttrack_template Instead of STUB_CODE#2739
ReimarBauer merged 22 commits intoOpen-MSS:developfrom
annapurna-gupta:feature/mscolab-templete

Conversation

@annapurna-gupta
Copy link
Collaborator

Fixes #2474

@ReimarBauer
Copy link
Member

look at the 90 failed, 390 passed, 11 skipped, 44 warnings, 90 errors in 470.02s (0:07:50)

@annapurna-gupta
Copy link
Collaborator Author

@ReimarBauer I got the error TypeError: contents must be unicode, but I don't understand what 'contents' means.

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name it content

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and add its content to the function.



def get_content():
return session.get('get_content')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is that needed?

def create_operation():
path = request.form['path']
content = request.form.get('content', None)
content = request.form.get('content', request.form.get('default_content'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need only content

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

return

user_template = MSUIDefaultConfig.new_flighttrack_template
xml_waypoints = "".join(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that goes wrong. we need the coordinates of the waypoints.

the same problem is solved for the local flighttrack.

@annapurna-gupta
Copy link
Collaborator Author

see comments

okay.

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment

and look on the CI tests too

@annapurna-gupta
Copy link
Collaborator Author

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with your change you need to indent this under the if content is not None: condition

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@ReimarBauer
Copy link
Member

please remove your version of .coverage

@ReimarBauer
Copy link
Member

have a look on this one
https://github.com/annapurna-gupta/MSS/blob/feature/mscolab-templete/tests/_test_mscolab/test_utils.py#L90

@annapurna-gupta
Copy link
Collaborator Author

please remove your version of .coverage

Done

@annapurna-gupta
Copy link
Collaborator Author

@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?

@ReimarBauer
Copy link
Member

Yes known. There is an open PR by me, trying to track that down.

@annapurna-gupta
Copy link
Collaborator Author

annapurna-gupta commented Apr 19, 2025

@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?

@ReimarBauer
Copy link
Member

Ignore macos13/14 wms tests. They are not related to your change.

@annapurna-gupta
Copy link
Collaborator Author

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?

@ReimarBauer
Copy link
Member

I review it later when there is a bit time. We have eastern this weekend.

@annapurna-gupta
Copy link
Collaborator Author

I review it later when there is a bit time. We have eastern this weekend.

okk

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few changes in tests

@annapurna-gupta
Copy link
Collaborator Author

@ReimarBauer i am getting Timeout error, should i increase the timeout duration?

@ReimarBauer
Copy link
Member

@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.
It is not easy to track down.
#2729

@annapurna-gupta
Copy link
Collaborator Author

@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. It is not easy to track down. #2729

Okay, then is there any change I should make in this PR?

Copy link
Member

@ReimarBauer ReimarBauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx :)

@ReimarBauer ReimarBauer merged commit 3918230 into Open-MSS:develop Apr 21, 2025
9 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unify mscolab_settings.STUB_CODE with MSUIDefaultConfig.new_flighttrack_template

2 participants