Improve code format & add tests#246
Merged
arun3688 merged 12 commits intoOpenModelica:masterfrom Apr 7, 2025
Merged
Conversation
This test is currently failing, because getParameters() returns str instead of float. However, the documentation https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/ompython.html#simulation says it should return floats.
The documentation is wrong, as discussed in OpenModelica#244
I don't think this is needed now that python_requires is >=3.8.
pyproject.toml is preferred over setup.py for situations like this: https://packaging.python.org/en/latest/guides/modernize-setup-py-project/
Member
|
I looked through most of the changes and everything I saw looks good. However, it is not really up to me to decide. I assigned @arun3688 to take care if this pr. |
Collaborator
|
@ondras12345 The PR looks good I merged it, Thanks for the contributions |
Closed
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes a couple of code format issues, like inconsistent indentation (use of 2 spaces instead of 4), unused variables and imports, and PEP8 violations detected by flake8.
It also adds a couple of tests, removes Python2 compatibility code, switches from
setup.pytopyproject.tomland configures Github actions CI to runflake8linter.If you don't want all of these changes, feel free to let me know, I can cherry-pick some commits and make a new PR.