pepkit / looper

A job submitter for Portable Encapsulated Projects
http://looper.databio.org
BSD 2-Clause "Simplified" License
20 stars 7 forks source link

.looper.yaml should just use a relative path #267

Closed nsheff closed 4 years ago

nsheff commented 4 years ago

Originally posted by @nsheff in https://github.com/pepkit/looper/issues/266#issuecomment-631562293

requires 2 changes:

  1. if we say looper init x, it should identify the relative path to config and use that. right now it's sticking in an absolute path

  2. if you say looper run from a subdir, it's assuming a relative path in .looper is relative to pwd. instead, it should consider it relative to .looper.yaml.

stolarczyk commented 4 years ago

this should make this work as expected

nsheff commented 4 years ago

this doesn't solve point 2 though, does it? only point 1 (plus env vars)?

stolarczyk commented 4 years ago

I thought it did. Isn't this what you meant?

[mstolarczyk@MichalsMBP bedstat]: looper init test_bedstat.yaml 
Initialized looper dotfile: /Users/mstolarczyk/Desktop/testing/bedstat/.looper.yaml
[mstolarczyk@MichalsMBP bedstat]: c .looper.yaml 
config_file_path: test_bedstat.yaml
[mstolarczyk@MichalsMBP bedstat]: cd subdir; looper inspect
No project config defined, using: /Users/mstolarczyk/Desktop/testing/bedstat/test_bedstat.yaml. Read from dotfile (/Users/mstolarczyk/Desktop/testing/bedstat/subdir/.looper.yaml).
Looper version: 1.2.0-dev
Command: inspect
Project 'bedstat' (/Users/mstolarczyk/Desktop/testing/bedstat/test_bedstat.yaml)
4 samples: ews1, ews4, ews407, ews9
Sections: pep_version, sample_table, name, sample_modifiers, looper
nsheff commented 4 years ago

indeed you are correct. my mistake.