Skip to content
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

Expand tilde #835

Merged
merged 11 commits into from Oct 2, 2022
Merged

Expand tilde #835

merged 11 commits into from Oct 2, 2022

Conversation

pawamoy
Copy link
Contributor

@pawamoy pawamoy commented Oct 1, 2022

Closes #825

Copy link
Contributor Author

@pawamoy pawamoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if some parts aren't clear and if you'd like that I add my comments directly in the code.

copier/main.py Outdated Show resolved Hide resolved
copier/template.py Outdated Show resolved Hide resolved
copier/vcs.py Outdated Show resolved Hide resolved
tests/test_vcs.py Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Oct 1, 2022

Codecov Report

Merging #835 (9b9c313) into master (e8d6239) will increase coverage by 0.09%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #835      +/-   ##
==========================================
+ Coverage   96.68%   96.78%   +0.09%     
==========================================
  Files          41       41              
  Lines        2986     3014      +28     
==========================================
+ Hits         2887     2917      +30     
+ Misses         99       97       -2     
Flag Coverage Δ
unittests 96.78% <100.00%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
copier/main.py 94.60% <100.00%> (+0.06%) ⬆️
copier/template.py 98.18% <100.00%> (+0.03%) ⬆️
copier/vcs.py 97.67% <100.00%> (+0.11%) ⬆️
tests/test_vcs.py 100.00% <100.00%> (ø)
copier/user_data.py 94.52% <0.00%> (+0.82%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@pawamoy
Copy link
Contributor Author

pawamoy commented Oct 2, 2022

OMG Windows is such a PITA to work with 🤨

I've added comments to the code to make it more clear. Ready for review.

@pawamoy pawamoy marked this pull request as ready for review October 2, 2022 13:19
@pawamoy
Copy link
Contributor Author

pawamoy commented Oct 2, 2022

Tested locally:

% poetry run copier ~/data/dev/copier-pdm output
<copier prompts and output>

% cd output 
% cat .copier-answers.yml 
# Changes here will be overwritten by Copier
_commit: 0.10.2
_src_path: /home/pawamoy/data/dev/copier-pdm
<rest of the file>

% sed -i 's#/home/pawamoy#~#' .copier-answers.yml
% git init .
% git add -A
% git commit -m initial

% cd ..
% poetry run copier -f update output
<copier output>

% cat output/.copier-answers.yml
# Changes here will be overwritten by Copier
_commit: 0.10.2
_src_path: ~/data/dev/copier-pdm
<rest of the file>

Tilde preserved!

@yajo yajo merged commit 682f917 into copier-org:master Oct 2, 2022
@pawamoy pawamoy deleted the expand-tilde branch April 2, 2024 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expand ~ in answers' _src_path
3 participants