-
Couldn't load subscription status.
- Fork 98
fix: path generation in case of relative file paths without artifact directory #363
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
base: main
Are you sure you want to change the base?
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My proposal would be to not modify artifacts_dir in any way if value is provided.
Resolves #362