-
Notifications
You must be signed in to change notification settings - Fork 193
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
Get name for parent path to create schema_filename #2886
Conversation
4e0aa2e
to
03dcd56
Compare
I was not sure this should really matter too much but now I am having another realisation. This code probably isn't doing what anyone thinks it is doing. And it probably never has. In the most common case, where you run My suspicion is that the actual intention of this code is to set the pipeline name to be the same as the name of the parent directory e.g. Even if this code operated on the absolute path right now (or previously) it would actually be set to @mashehu you implemented the original code I think, so do you have a take on what the intended outcome was? |
Thanks for the comment @awgymer When I came to address the issue my though was to control and raise an Path(self.schema_filename).parent.name).strip("'") would do the trick. Let see what @mashehu says. Thank you! |
oooh, good catch. yes, we should probably always convert to a full path |
8d463f8
to
fa461a7
Compare
I've updated the tests for covering the issue. The Line 31 in 9eac5e9
|
I think the hardcoding in this case is probably fine. We are hardcoding the input path and the expected value based on that? Only downside I really see there is that people might wonder how we know what the expected is if they don't realise we hardcode the input path but... 🤷 |
@nf-core-bot fix linting |
Yes, based on that initialisation. I think it's fine for now, don't think it's worth to refactor it now, it might bring new issues 😄 |
I think those two test failing are related to the |
yes, sorry, two tests are currently borked. you have my permission to ignore them for now and merge 😉 |
Thanks @mashehu ! since I've merged latest |
ef4f4a8
to
2975f6a
Compare
branch rebased to dev for triggering tests @mashehu thanks! |
@mashehu I don't have permissions to merge 😄 |
Hi 👋🏽 I've came to fix an issue but didn't realise about the dev branch until PR time, I've missed that detail in CONTRIBUTORS file, so the issue was already fixed with the
str
cast doing the trick.I kept the PR as I think using
as_posix
is generally more correct for Paths, but maybe I'm missing something for this use case. First time around here.Also adding a test since it wasn't tested the particular error.
Feel free to drop the PR in case is not necessary.
Thanks.
PR checklist
CHANGELOG.md
is updateddocs
is updated