Scribe-Data icon indicating copy to clipboard operation
Scribe-Data copied to clipboard

Upgrade Cmd Removes All Files Including Virtual Environment

Open axif0 opened this issue 8 months ago • 6 comments

Terms

Behavior

Description

Running upgrade.py as,

scribe-data --upgrade

Removes all root files, including venv, instead of only updating necessary files which have changes in newer scribe version. Might be for this line, shutil.rmtree(Path.cwd() / item.name)

Expected behavior might be

  • Only update required files.

  • Preserve venv and other user-created files.

Also, add tests for upgrade.py.

Contribution

Happy to support this! I can also provide a review and check the PR once it's opened 😊

axif0 avatar Mar 25 '25 19:03 axif0

Feel free to add labels and the tags for the Scribe Board to new issues, @axif0 :)

andrewtavis avatar Mar 26 '25 21:03 andrewtavis

Hello @andrewtavis can I work on this

haasham1 avatar Apr 09 '25 17:04 haasham1

Sounds good, @meerhaasham1 :) Please let us know if you need any support!

andrewtavis avatar Apr 11 '25 19:04 andrewtavis

Hi @andrewtavis Just to update you, I have completed the task of identifying the issue with the scribe-data --upgrade command.

I’ve made the necessary changes to ensure that the command now behaves as expected, updating only the required files while preserving the venv and other user-created files.

Currently, I’m working on writing test cases for test_upgrade.py to ensure everything is functioning correctly.

I’ll update you once the tests are ready, and the pull request is submitted.

Thanks

Image

haasham1 avatar Apr 13 '25 06:04 haasham1

Thanks for the update, @meerhaasham1! 😊

andrewtavis avatar Apr 13 '25 07:04 andrewtavis

Hi @andrewtavis, Just a quick update — I’m currently working on the remaining issues related to “Add missing tests for files with low coverage” (#598). Also, a gentle reminder that I’ve submitted a PR for issue #596 earlier and just wanted to follow up in case it might have been missed. Thanks again!

haasham1 avatar May 04 '25 16:05 haasham1

Closed by #616 😊 Thanks so much for your work here, @haasham1! 🚀

@axif0, I implemented the changes to the upgrade functionality within the other CLI I work on i18n-check which was referenced from here, so decided to do the changes here as well 😊 Can you take a look at the current changes sent along in #616 and open an issue/a PR with any suggestions you'd have?

andrewtavis avatar Jun 27 '25 20:06 andrewtavis