Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a check for readonly mode #437

Closed
koubaa opened this issue Oct 4, 2023 · 1 comment · Fixed by #441
Closed

add a check for readonly mode #437

koubaa opened this issue Oct 4, 2023 · 1 comment · Fixed by #441

Comments

@koubaa
Copy link
Collaborator

koubaa commented Oct 4, 2023

When Mechanical doesn't have an active license, it will be readonly in the UI. When using Pymechanical, there should be an easy way to check. In readonly mode, many mutating APIs don't work, which could be difficult to debug.

pytest based tests should assert that we are not in readonly mode in the fixture for embedding. A single test should be added that runs pymechanical as a subprocess in readonly mode to make sure the API works.

The function to check seems to be MechanicalAPI.Instance.ReadOnlyMode, it should be exposed as a getter on the app class
Message window might also have it

@koubaa
Copy link
Collaborator Author

koubaa commented Oct 5, 2023

#440 for listing messages from the "message window". The messages there is not quite as useful as a direct APi for readonly mode

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 a pull request may close this issue.

1 participant