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

Deprecate copytree method #439

Merged
merged 10 commits into from
Jan 21, 2021
Merged

Deprecate copytree method #439

merged 10 commits into from
Jan 21, 2021

Conversation

shandave
Copy link
Contributor

Description

Deprecate copytree method

Motivation and Context

Resolves #432

Types of Changes

  • Documentation update
  • Bug fix
  • New feature
  • Breaking change1

1The change breaks (or has the potential to break) existing functionality.

Checklist:

If necessary:

  • I have updated the API documentation as part of the package doc-strings.
  • I have created a separate pull request to update the framework documentation on signac-docs and linked it here.
  • I have updated the changelog and added all related issue and pull request numbers for future reference (if applicable). See example below.

@shandave shandave requested review from a team as code owners December 19, 2020 20:58
@shandave shandave requested review from b-butler and cbkerr and removed request for a team December 19, 2020 20:58
@shandave
Copy link
Contributor Author

@bdice I deprecated the copytree method, but I'm not sure how to perform step 3 mentioned in your proposed solution.

@codecov
Copy link

codecov bot commented Dec 19, 2020

Codecov Report

Merging #439 (911d7eb) into master (d3bb558) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #439      +/-   ##
==========================================
+ Coverage   77.06%   77.08%   +0.01%     
==========================================
  Files          42       42              
  Lines        5765     5768       +3     
  Branches     1129     1129              
==========================================
+ Hits         4443     4446       +3     
  Misses       1034     1034              
  Partials      288      288              
Impacted Files Coverage Δ
signac/contrib/project.py 86.97% <100.00%> (ø)
signac/syncutil.py 76.39% <100.00%> (+0.44%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d3bb558...911d7eb. Read the comment docs.

@bdice
Copy link
Member

bdice commented Dec 19, 2020

@bdice I deprecated the copytree method, but I'm not sure how to perform step 3 mentioned in your proposed solution.

@shandave Thank you for the pull request! Step 3 is basically just a “find and replace” operation. Anywhere that the code says syncutil.copytree should be changed to shutil.copytree. We appreciate your contribution!

Copy link
Member

@b-butler b-butler left a comment

Choose a reason for hiding this comment

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

@shandave I noticed there are a couple of references to syncutil.copytree remaining in signac/contrib/project.py lines 1439 and 1451.

@bdice
Copy link
Member

bdice commented Jan 13, 2021

@shandave I noticed you pushed a commit. Please tag the assigned reviewers in a comment when you're ready for someone to review again. Please add a note to the changelog and add yourself to the contributors list as you did for signac-flow. Thank you again! 😄

@shandave
Copy link
Contributor Author

Thank You @bdice , @b-butler and @cbkerr for reviewing my commit and suggesting the changes; I would like to review my commit again, I have made all the changes suggested in the comment.

@b-butler
Copy link
Member

@shandave I still see multiple uses of syncutil.copytree in signac/contrib/project.py. In the clone method of the Project class. This should default to shutil.copytree now.

@shandave
Copy link
Contributor Author

Thank You @b-butler for reviewing. I have made the suggested changes.

@bdice
Copy link
Member

bdice commented Jan 13, 2021

@shandave The pre-checks are failing:

signac/contrib/project.py:25:1: F401 '..syncutil' imported but unused
signac/contrib/project.py:1497:35: F821 undefined name 'shutil'

You need to remove the import of syncutil and add import shutil. You should install pre-commit with these instructions to catch problems like these: https://docs.signac.io/projects/core/en/latest/support.html#set-up-a-development-environment

Also please update the changelog and contributors list.

@shandave
Copy link
Contributor Author

Thank You @bdice for giving me an opportunity to contribute in signac. I have made the suggested changes. Thank you again for helping me out.

Copy link
Member

@bdice bdice left a comment

Choose a reason for hiding this comment

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

Great work @shandave! Thanks for your persistence. I have two small changes to apply. I will go ahead and make those changes, and approve this PR. Once a second reviewer approves the PR, we will merge it.

Copy link
Member

@b-butler b-butler left a comment

Choose a reason for hiding this comment

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

LGTM

@bdice bdice enabled auto-merge (squash) January 21, 2021 20:53
@bdice bdice merged commit d4f2121 into glotzerlab:master Jan 21, 2021
@bdice bdice mentioned this pull request Jul 29, 2021
12 tasks
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.

Deprecate syncutil.copytree
3 participants