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

fix config gen from arbitrary directory (dev) #267

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/sophios/input_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,15 @@ def move_adapters_and_examples(config: Json) -> None:
Args:
config (Json): Json containing search path information
"""
# if the sophios installation is through pip package
pip_dir_name = 'sophios'
if str(Path(__file__).parent).endswith(pip_dir_name):
adapters_dir = Path(__file__).parent / 'cwl_adapters'
examples_dir = Path(__file__).parent / 'examples'
# when using dev/git install
else:
paren_dir = 'src'
if str(Path(__file__).parent.parent).endswith(paren_dir):
adapters_dir = Path(__file__).parent.parent.parent / 'cwl_adapters'
examples_dir = Path(__file__).parent.parent.parent / 'docs' / 'tutorials'
# if the sophios installation is through pip package
else:
adapters_dir = Path(__file__).parent / 'cwl_adapters'
examples_dir = Path(__file__).parent / 'examples'

extlist = ['*.png', '*.md', '*.rst', '*.pyc', '__pycache__', '*.json']
# the default search paths will be the first entry in the 'global' namespace
Expand Down
Loading