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

Interpret paths in known-model.json relative to the JSON file #495

Open
Wuestengecko opened this issue Jan 6, 2025 · 0 comments
Open

Interpret paths in known-model.json relative to the JSON file #495

Wuestengecko opened this issue Jan 6, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@Wuestengecko
Copy link
Member

The current behavior of interpreting relative paths in a known-model.json file relative to CWD is very unintuitive, and can easily lead to confusion if CWD doesn't match expectations. capellambse.repl tries to work around that by switching to the project root, so that e.g. python -m capellambse.repl test-6.0 works as expected; however, that introduces the new problem that cd /some/model; python -m capellambse.repl . doesn't work anymore.

We should adjust the loader behavior so that it interprets paths relative to the location of the JSON file that they came from. If the path didn't come from a JSON file, we should still fall back to using CWD, to still allow e.g. a stringified JSON object to be passed in as command line argument.

@Wuestengecko Wuestengecko added the enhancement New feature or request label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant