-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Remove trailing slashes from source paths (#6102) #6179
Conversation
@jmg-duarte, thanks for this contribution. It appears that to make mypy happy, which is necessary before merge, you will need to avoid assigning the paths variable twice, but with objects of different types. Overall the fix makes sense to me, and I'll keep an eye out for your update so that we can quickly merge. |
Hey @peterallenwebb, I'm having some trouble updating the branch because I deleted the forked repo a while ago by mistake and haven't been able to push changes to the branch. I've followed guides but to no avail. I've also contacted GitHub support to see if I can avoid creating a new PR but if you feel this is important enough, I can go one to close this one and create a new branch. |
@jmg-duarte That would be great! If don't feel like going through all the trouble, I can also get this change in on your behalf with no further effort on your part, just let me know. |
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: José Duarte.
|
@peterallenwebb GitHub support was super helpful and I got it working. I've applied the changes, let me know if there is something I should update further! |
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.
A few formatting issues and you'll need to resolve the conflict. Then this should be good to merge in!
Rebasing over |
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.
Almost there! Just need to fix mypy.
core/dbt/config/project.py
Outdated
paths = map(lambda s: s.rstrip("/"), paths) | ||
return list(set(paths)) |
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 doesn't like that you change the type of paths
here
paths = map(lambda s: s.rstrip("/"), paths) | |
return list(set(paths)) | |
paths_stripped = map(lambda s: s.rstrip("/"), paths) | |
return list(set(paths_stripped)) |
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 did this before, with the constant updates to the underlying code I must've messed up the rebase. Let me fix that
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.
Clicked the wrong button, meant to request a change!
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: José Duarte.
|
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.
@jmg-duarte almost there! black now fails on a formatting issue. If you run pre-commit (pre-commit run
after installing it as described in the contributing doc), it will make the fixes for you. Alternatively, you can check out the failing tests and manually fix the formatting issue.
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: José Duarte.
|
Should be working now. My VSCode applied isort which in turn f'd up the black formatting. Thank you for the patience |
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.
Looks great! Thanks @jmg-duarte for the contribution. I'll get it merged in!
resolves #6102
Description
Paths like "models" and "models/" are the same but were resolved as different. Leading to issues when seemingly equivalent (but different) paths were used in (for example) seeds and models.
The following example would detect the same files twice.
Checklist
changie new
to create a changelog entry