Uh oh!
There was an error while loading. Please reload this page.
Set up pre-commit - #289
Conversation
syntron
commented
May 28, 2025
See status in #279 (comment) - 14 errors left:
I will prepare the needed changes as PR(s) |
ondras12345
commented
Jun 11, 2025
Rebased and fixed remaining mypy warnings. All tests in |
ondras12345
commented
Jun 11, 2025
Updated to run |
syntron
commented
Jun 14, 2025
@ondras12345 Would you consider to modify this PR such that it comes without the following parts (changes to OMCSession.py) - these clash with PR #295 such that there are big merge conflicts; both points (mypy warning and spelling fix) are included ... |
ondras12345
commented
Jun 14, 2025
@syntron I could do that, but it would cause this PR to fail its CI test run. It might be better to get your PR merged first and let me handle the conflicts here. |
ondras12345
commented
Jun 14, 2025
@syntron Btw, I tried to rebase #295 onto this PR, and it wasn't that bad. Only two of your commits had conflicts, and it was enough to just accept your version. Rebased branch: https://github.com/ondras12345/OMPython/tree/pr_295_rebased |
ondras12345
commented
Jun 16, 2025
Rebased to fix merge conflict. |
syntron
commented
Jun 16, 2025
@ondras12345 I think the renames would conflict with any changes in these classes; perhaps I should stop working on ModelicaSystem.py such that it could settle and you do not have so much work ... @adeas31 Do you know that the numbers at the ModelicaSystem methods refer to, i.e. |
adeas31
commented
Jun 17, 2025
arun3688
commented
Jun 17, 2025
That does not have any meaning just to count the number of API i guess which was done by a student as part of this thesis, so you can ignore that or you can even remove those numbers |
This should make workflow runs with linter errors fail faster.
ondras12345
commented
Jun 18, 2025
Rebased, should be ready for review & merge. |
Proposal
pre-commitis a nice tool that can be used to run various linters before each commit is made.This PR adds a
.pre-commit-config.yamlwith a basic set of checks and linters. It also fixes typos detected by the codespell check.Currently, the
mypycheck fails:I think @syntron has fixed at least some of these in his fork. I think we should wait for them to be merged before proceeding with this PR.
In the future, we could configure the github actions test workflow to also run linters via pre-commit.