8000 Fix: Support relative file paths in Corpus widget (#534) by leskovecg · Pull Request #1119 · biolab/orange3-text · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix: Support relative file paths in Corpus widget (#534) #1119

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 2 commits into
base: master
Choose a base branch
from

Conversation

leskovecg
Copy link
Collaborator

Description

This PR addresses issue #534 by implementing proper support for saving and loading corpus file paths relative to the .ows workflow file. This ensures better portability of workflows when shared across machines or directories.

Changes made

  • When saving settings, the corpus path is stored relative to workflow_file, if possible.
  • When loading settings, the relative path is resolved back to an absolute path based on the location of workflow_file.

Tests

  • Added a unit test test_relative_corpus_path_serialization to validate:
    • Corpus file is correctly saved with a relative path.
    • Corpus file can be successfully located after being moved with the workflow.
    • The path is resolved as absolute at runtime.

Test is located in TestOWCorpus class (test_owcorpus.py).

@leskovecg leskovecg force-pushed the fix-relative-path-corpus-clean branch from 8b749b5 to 7dd5409 Compare April 23, 2025 15:21
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.

1 participant
0