-
-
Notifications
You must be signed in to change notification settings - Fork 189
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
Add subdirectory option #193
Conversation
It would be great if you could review and merge #192 so I can rebase before adding documentation for this feature! |
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.
One use case that worries me enough is the update-diff one.
I see you have a small test about it, but could you copy some test such as tests.test_updatediff.test_commit_hooks_respected
and adapt it to test complexities introduced here? Some of them:
- Template in v1 doesn't have a
_subdirectory
; in v2 it moves all things into a subdir and adds that key tocopier.yml
. Some files change. Downstream project has evolved too. Does that work as expected? - Template in v3 changes from one subdirectory to another. Some file evolves also. Subproject evolves separately. Subproject is updated. Does that work as expected?
Seeing the code, I guess the tests should just go OK as it is, but I want to make sure, as it's the flagship feature of Copier.
This should be a WIP until #198 is fixed IMHO. |
These are great remarks, thank you for having taken the time to think about this. I'll add tests to make sure what you listed is working as expected 🙂 |
I've added two big tests with comments 🙂 Let me know what you think! |
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.
Some comments. Looks good overall, thanks for your hard work!
Co-authored-by: Jairo Llopis <Yajo@users.noreply.github.com>
Hey @yajo, not sure if you were waiting for me to comment, but I implemented the changes you suggested 🙂 If you just couldn't find the time to review it, then please ignore this comment, there is absolutely nothing urgent here! |
Yes, I was waiting. Thanks for your contribution! |
Would it be possible for you to release a new version with this feature @yajo? That would be great 🙂 |
Oh yes, I was hoping to have time to put more features, but I've been lacking time lately. Let me release. |
The I put it in my Here is the top of my
I added manually the subdirectory line but it is not recognized. |
Hi there @micheelengronne, according to your comments I guess that you're having some trouble understanding what this option does and how Copier updates your subprojects. If you want, you can open up a new discussion explaining your use case so you can get better help from the community. This thread was finished long ago and is not the best place to get further support. |
Sorry @yajo Indeed, I read too fast that part of the doc. I altered my code accordingly and I will open a new issue with my ideas and a snippet. |
I will delete my previous comments. They are totally out of subject. |
Well, this required less code than I thought! I guess I could add more tests, particularly when updating a project.
TODO:
Fixes #183