Closed lwasser closed 3 years ago
Just a note that this is still happening
(earth-analytics-python) cu-biot-2-10:2020-ea-python-course leahwasser$ abc-update-template ea-python-2020-05-what-the-fork-who-did-this
Loading configuration from config.yml
Template directory /Users/leahwasser/Documents/github/1-courses/0-professional-certificate/2020-ea-python-course/assignment-template-repos/ea-python-2020-05-what-the-fork-who-did-this-template already exists; will keep directory but overwrite existing files with same names
repo path: /Users/leahwasser/Documents/github/1-courses/0-professional-certificate/2020-ea-python-course/assignment-template-repos/ea-python-2020-05-what-the-fork-who-did-this-template
Getting assignment files
copying /Users/leahwasser/Documents/github/1-courses/0-professional-certificate/2020-ea-python-course/nbgrader-files/release/ea-python-2020-05-what-the-fork-who-did-this/earth-lab-logo-rgb.png to /Users/leahwasser/Documents/github/1-courses/0-professional-certificate/2020-ea-python-course/assignment-template-repos/ea-python-2020-05-what-the-fork-who-did-this-template
copying /Users/leahwasser/Documents/github/1-courses/0-professional-certificate/2020-ea-python-course/nbgrader-files/release/ea-python-2020-05-what-the-fork-who-did-this/colored-bar.png to /Users/leahwasser/Documents/github/1-courses/0-professional-certificate/2020-ea-python-course/assignment-template-repos/ea-python-2020-05-what-the-fork-who-did-this-template
copying /Users/leahwasser/Documents/github/1-courses/0-professional-certificate/2020-ea-python-course/nbgrader-files/release/ea-python-2020-05-what-the-fork-who-did-this/ea-python-2020-05-what-the-fork-who-did-this.ipynb to /Users/leahwasser/Documents/github/1-courses/0-professional-certificate/2020-ea-python-course/assignment-template-repos/ea-python-2020-05-what-the-fork-who-did-this-template
copying /Users/leahwasser/Documents/github/1-courses/0-professional-certificate/2020-ea-python-course/nbgrader-files/release/ea-python-2020-05-what-the-fork-who-did-this/.ipynb_checkpoints to /Users/leahwasser/Documents/github/1-courses/0-professional-certificate/2020-ea-python-course/assignment-template-repos/ea-python-2020-05-what-the-fork-who-did-this-template
Traceback (most recent call last):
File "/Users/leahwasser/miniconda3/envs/earth-analytics-python/bin/abc-update-template", line 8, in <module>
sys.exit(update_template())
File "/Users/leahwasser/miniconda3/envs/earth-analytics-python/lib/python3.7/site-packages/abcclassroom/__main__.py", line 205, in update_template
template.new_update_template(args)
File "/Users/leahwasser/miniconda3/envs/earth-analytics-python/lib/python3.7/site-packages/abcclassroom/template.py", line 31, in new_update_template
copy_assignment_files(config, template_repo_path, assignment)
File "/Users/leahwasser/miniconda3/envs/earth-analytics-python/lib/python3.7/site-packages/abcclassroom/template.py", line 168, in copy_assignment_files
shutil.copy(fpath, template_repo)
File "/Users/leahwasser/miniconda3/envs/earth-analytics-python/lib/python3.7/shutil.py", line 248, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/Users/leahwasser/miniconda3/envs/earth-analytics-python/lib/python3.7/shutil.py", line 120, in copyfile
with open(src, 'rb') as fsrc:
IsADirectoryError: [Errno 21] Is a directory: '/Users/leahwasser/Documents/github/1-courses/0-professional-certificate/2020-ea-python-course/nbgrader-files/release/ea-python-2020-05-what-the-fork-who-did-this/.ipynb_checkpoints'
(earth-analytics-python) cu-biot-2-10:2020-ea-python-course leahwasser$ ??›
@kcranston will the pr above fix this? it's the same thing with the check points!! we will have ci files however that might start with a . so we may need to manage this carefully.
PR #173 is the fix for skipping subdirectories.
Sounds like we want to think more about the patterns we want to include / skip, though.
i am still running into this same issue. i still think we should have a way to control what this function copies over
raceback (most recent call last):
File "/Users/leahwasser/opt/miniconda3/envs/abc-dev/bin/abc-new-template", line 33, in <module>
sys.exit(load_entry_point('abc-classroom', 'console_scripts', 'abc-new-template')())
File "/Users/leahwasser/github/0-python/abc-classroom/abcclassroom/__main__.py", line 185, in new_template
template.new_update_template(args)
File "/Users/leahwasser/github/0-python/abc-classroom/abcclassroom/template.py", line 33, in new_update_template
copy_assignment_files(config, template_repo_path, assignment)
File "/Users/leahwasser/github/0-python/abc-classroom/abcclassroom/template.py", line 195, in copy_assignment_files
shutil.copy(fpath, template_repo)
File "/Users/leahwasser/opt/miniconda3/envs/abc-dev/lib/python3.8/shutil.py", line 415, in copy
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "/Users/leahwasser/opt/miniconda3/envs/abc-dev/lib/python3.8/shutil.py", line 261, in copyfile
with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
IsADirectoryError: [Errno 21] Is a directory: '/Users/leahwasser/github/1-bootcamp-course/fall-2020-abc-ea-bootcamp/ea-bootcamp-fall-2020-nbgrader/release/bootcamp-2020-05-pandas/.ipynb_checkpoints'
Ah, https://github.com/earthlab/abc-classroom/pull/173 never got merged (because it got mixed up with the extra-files changes - see conversation). I think we need to add the functionality related to copying directories that was in that PR.
The simplest solution is to copy everything when creating / updating the template repo and to use the .gitignore
to control what gets committed and pushed.
this has been resolved by adding files_to_ignore
which allows you to ignore system files and directories or anything that you don't want abc-classroom pushing around.
When i run abc-template in merge mode:
this mkight be a separate issue but also my template repo did not push to github and also it doesn't have a remote.. really weird. i'll start over.