Skip to content

OMCPath #317

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

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open

OMCPath #317

wants to merge 32 commits into from

Conversation

syntron
Copy link
Contributor

@syntron syntron commented Jun 28, 2025

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 syntron force-pushed the OMCPath branch 4 times, most recently from 7514c47 to 13fec2c Compare July 9, 2025 18:35
@syntron syntron force-pushed the OMCPath branch 2 times, most recently from c8bddac to b59e473 Compare July 11, 2025 19:30
@syntron syntron force-pushed the OMCPath branch 4 times, most recently from 1b64550 to c45b4f7 Compare July 11, 2025 21:10
@syntron
Copy link
Contributor Author

syntron commented Jul 12, 2025

@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
Contributor Author

syntron commented Jul 12, 2025

@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
syntron added 19 commits August 16, 2025 14:49
* this is scripting output and, thus, it cannot be parsed
see commit ID: aa74b36 - [OMCPath] add more functionality and docstrings
* differentiate between
  * Python >= 3.12 uses OMCPath based on OMC for filesystem operation
  * Python <  3.12 uses a pathlib.Path based implementation which is
    limited to OMCProcessLocal
error: "unlink" of "OMCPathReal" does not return a value (it only ever returns None)  [func-returns-value]
@adeas31 adeas31 added this to the 4.1.0 milestone Aug 18, 2025
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.

2 participants