[BUG]: Relative paths in the with section on the YAML are relative to the CWD instead of the YAML file #191

Merged
fraimondo merged 3 commits from fix/191 into main 2023-03-30 14:51:08 +00:00
fraimondo commented 2023-03-30 13:08:12 +00:00 (Migrated from github.com)

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Using a relative path in the with section is allowed. The problem is that this is resolved based on the CWD and not on the location of the YAML file.

Expected Behavior

The path should be computed relatively to the location of the yaml file

Steps To Reproduce

  1. Install junifer
  2. Create a yaml file and add a relative path to a python file in the with section.
  3. Move to another directory than the one of the yaml file and try to run junifer run with the absolute path of the yaml file.
  4. See it fail

Environment

junifer:
  version: 0.0.1.dev927
python:
  version: 3.9.12
  implementation: CPython
dependencies:
  click: 8.1.3
  numpy: 1.21.2
  datalad: 0.15.5
  pandas: 1.4.1
  nibabel: 3.2.2
  nilearn: 0.9.0
  sqlalchemy: 1.4.32
  yaml: '6.0'
system:
  platform: Linux-4.19.0-21-amd64-x86_64-with-glibc2.28
environment:
  LC_CTYPE: en_US.UTF-8
  PATH: /usr/lib/fsl/5.0:/home/fraimondo/anaconda3/envs/junifer/bin:/home/fraimondo/anaconda3/condabin:/home/fraimondo/.dotfiles/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/usr/local/games:/usr/games

Relevant log output

No response

Anything else?

No response

### Is there an existing issue for this? - [X] I have searched the existing issues ### Current Behavior Using a relative path in the `with` section is allowed. The problem is that this is resolved based on the CWD and not on the location of the YAML file. ### Expected Behavior The path should be computed relatively to the location of the yaml file ### Steps To Reproduce 1. Install junifer 2. Create a yaml file and add a relative path to a python file in the `with` section. 3. Move to another directory than the one of the yaml file and try to run `junifer run` with the absolute path of the yaml file. 4. See it fail ### Environment ```markdown junifer: version: 0.0.1.dev927 python: version: 3.9.12 implementation: CPython dependencies: click: 8.1.3 numpy: 1.21.2 datalad: 0.15.5 pandas: 1.4.1 nibabel: 3.2.2 nilearn: 0.9.0 sqlalchemy: 1.4.32 yaml: '6.0' system: platform: Linux-4.19.0-21-amd64-x86_64-with-glibc2.28 environment: LC_CTYPE: en_US.UTF-8 PATH: /usr/lib/fsl/5.0:/home/fraimondo/anaconda3/envs/junifer/bin:/home/fraimondo/anaconda3/condabin:/home/fraimondo/.dotfiles/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/usr/local/games:/usr/games ``` ### Relevant log output _No response_ ### Anything else? _No response_
codecov[bot] commented 2023-03-30 13:09:27 +00:00 (Migrated from github.com)

Codecov Report

Merging #191 (d8e0be9) into main (dd1ee0c) will increase coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #191      +/-   ##
==========================================
+ Coverage   93.33%   93.44%   +0.10%     
==========================================
  Files          80       80              
  Lines        3436     3462      +26     
  Branches      644      649       +5     
==========================================
+ Hits         3207     3235      +28     
+ Misses        151      149       -2     
  Partials       78       78              
Flag Coverage Δ
docs 100.00% <ø> (ø)
junifer 93.43% <100.00%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
junifer/api/parser.py 88.57% <100.00%> (+19.12%) ⬆️

... and 2 files with indirect coverage changes

## [Codecov](https://codecov.io/gh/juaml/junifer/pull/191?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) Report > Merging [#191](https://codecov.io/gh/juaml/junifer/pull/191?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) (d8e0be9) into [main](https://codecov.io/gh/juaml/junifer/commit/dd1ee0ca0b6af826bf6753ef593fc1a0904b5d49?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) (dd1ee0c) will **increase** coverage by `0.10%`. > The diff coverage is `100.00%`. [![Impacted file tree graph](https://codecov.io/gh/juaml/junifer/pull/191/graphs/tree.svg?width=650&height=150&src=pr&token=5H21JuZXMw&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml)](https://codecov.io/gh/juaml/junifer/pull/191?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) ```diff @@ Coverage Diff @@ ## main #191 +/- ## ========================================== + Coverage 93.33% 93.44% +0.10% ========================================== Files 80 80 Lines 3436 3462 +26 Branches 644 649 +5 ========================================== + Hits 3207 3235 +28 + Misses 151 149 -2 Partials 78 78 ``` | Flag | Coverage Δ | | |---|---|---| | docs | `100.00% <ø> (ø)` | | | junifer | `93.43% <100.00%> (+0.10%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/juaml/junifer/pull/191?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml) | Coverage Δ | | |---|---|---| | [junifer/api/parser.py](https://codecov.io/gh/juaml/junifer/pull/191?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml#diff-anVuaWZlci9hcGkvcGFyc2VyLnB5) | `88.57% <100.00%> (+19.12%)` | :arrow_up: | ... and [2 files with indirect coverage changes](https://codecov.io/gh/juaml/junifer/pull/191/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=juaml)
github-actions[bot] commented 2023-03-30 13:15:11 +00:00 (Migrated from github.com)
PR Preview Action v1.3.0
Preview removed because the pull request was closed.
2023-03-30 15:00 UTC
[PR Preview Action](https://github.com/rossjrw/pr-preview-action) v1.3.0 :---: Preview removed because the pull request was closed. 2023-03-30 15:00 UTC <!-- Sticky Pull Request Commentpr-preview -->
synchon (Migrated from github.com) approved these changes 2023-03-30 14:36:10 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
juaml/junifer!191
No description provided.