fix: path generation in case of relative file paths without artifact directory#363
Conversation
|
✅ DCO Check Passed Thanks @geoHeil, all your commits are properly signed off. 🎉 |
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
01cb61e to
e92f120
Compare
dolfim-ibm
left a comment
There was a problem hiding this comment.
There is something weird here, it looks like you are duplicating the function _get_output_paths()?
…directory Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
e92f120 to
0bd7792
Compare
indeed - fix pushed now |
Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
| if artifacts_dir.is_absolute(): | ||
| final_artifacts_dir = artifacts_dir | ||
| else: | ||
| final_artifacts_dir = filename.parent / artifacts_dir |
There was a problem hiding this comment.
I'm not sure about this line. Depending on from where this function is called, the use case can be different:
- for example, if called from
save_as_json()with imagereferencedflag, then one can have a use-case where images are stored completely separately from the json document itself, but path is still relative - the other example is when both
save_as_json()andsave_as_markdown()used, with imagereferencedflag, one could use the same artifact directory to store images and avoid duplication. To clarify, an example would befilename="../results/json/my_doc.json"andfilename="../results/md/my_doc.md"with a shared reference imagesartifacts_dir="../results/ref_images/my_doc/"
There was a problem hiding this comment.
My proposal would be to not modify artifacts_dir in any way if value is provided.
Resolves #362