Skip to content

Commit

Permalink
fix config gen from arbitrary directory (dev) (#267)
Browse files Browse the repository at this point in the history
Co-authored-by: Vasu Jaganath <vasu.jaganath@axleinfo.com>
  • Loading branch information
vjaganat90 and Vasu Jaganath authored Aug 23, 2024
1 parent 584f541 commit f97d29d
Showing 1 changed file with 6 additions and 6 deletions.
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

0 comments on commit f97d29d

Please sign in to comment.