Skip to content

OMCPath - #317

Merged
adeas31 merged 33 commits into
OpenModelica:masterfrom
syntron:OMCPath
Oct 20, 2025
Merged

OMCPath#317
adeas31 merged 33 commits into
OpenModelica:masterfrom
syntron:OMCPath

Conversation

@syntron

@syntronsyntron commented Jun 28, 2025

Copy link
Copy Markdown
Contributor

new class OMCPath which implements path handling based on OMC commands

currently just a prove of concept with a test case using docker

see issue #315 and PR #309

Important: due to limitations in pathlib.Path, this is not working for Python < 3.12! - I'm testing compatibility but got no overall success (local Linux seems to work / Windows fails for 3.10)

@syntron
syntronforce-pushed the OMCPath branch 4 times, most recently from 7514c47 to 13fec2cCompareJuly 9, 2025 18:35
@syntron
syntronforce-pushed the OMCPath branch 2 times, most recently from c8bddac to b59e473CompareJuly 11, 2025 19:30
@syntron
syntronforce-pushed the OMCPath branch 4 times, most recently from 1b64550 to c45b4f7CompareJuly 11, 2025 21:10
@syntronsyntron mentioned this pull request Jul 11, 2025
@syntron

syntron commented Jul 12, 2025

Copy link
Copy Markdown
ContributorAuthor

@Sonyoyo could you please test if this is working on WSL and provide some feedback? I'm just coding blind regarding this option ...

Feel free to use the testcase in tests.test_OMCPath.test_OMCPath_WSL() - it is working well on local and docker; thus, should also work on WSL (I hope)

@syntron

Copy link
Copy Markdown
ContributorAuthor

@ondras12345 could you please advice on the unittest?

In tests.test_OMCPath tests are defined which use different backends (local / docker / WSL). I implemented it by using different functions to define the test and the unique code is in a helper function which is called by each test.

@syntron
syntron marked this pull request as ready for review August 12, 2025 20:25
@adeas31adeas31 added this to the 4.1.0 milestone Aug 18, 2025

@adeas31adeas31 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

Important: due to limitations in pathlib.Path, this is not working for Python < 3.12! - I'm testing compatibility but got no overall success (local Linux seems to work / Windows fails for 3.10)

Did you figure out what is the limitation? Is there a workaround?

Comment threadOMPython/OMCSession.py
@syntron

Copy link
Copy Markdown
ContributorAuthor

Did you figure out what is the limitation? Is there a workaround?

see 1acd916: there is a compatibility layer such that for Python < 3.12 pathlib.Path is used such that it will work on the same level as it is now (i.e. no regression but also not the new possibilities)

@adeas31
adeas31 merged commit 07eb621 into OpenModelica:masterOct 20, 2025
14 checks passed
@syntron
syntron deleted the OMCPath branch October 26, 2025 19:55
This was referenced Oct 30, 2025
@adeas31adeas31 mentioned this pull request Nov 5, 2025
@syntronsyntron mentioned this pull request Dec 2, 2025
@adeas31adeas31 modified the milestones: 4.1.0, 5.0.0Dec 16, 2025
Sign up for freeto 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.

2 participants

@syntron@adeas31