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

[CLI] Add "ti cache clean" command to clean the offline cache files manually #6937

Merged
merged 8 commits into from
Dec 21, 2022

Conversation

PGZXB
Copy link
Contributor

@PGZXB PGZXB commented Dec 20, 2022

Issue: #6919

@netlify
Copy link

netlify bot commented Dec 20, 2022

Deploy Preview for docsite-preview ready!

Name Link
🔨 Latest commit 2df3d8f
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/63a306d6631bce00095e7321
😎 Deploy Preview https://deploy-preview-6937--docsite-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@PGZXB PGZXB changed the title [CLI] Add "ti ticache clean" command to clean ticache files [CLI] Add "ti ticache clean" command to clean ticache files manually Dec 20, 2022
@PGZXB PGZXB changed the title [CLI] Add "ti ticache clean" command to clean ticache files manually [CLI] Add "ti cache clean" command to clean the offline cache files manually Dec 21, 2022
Copy link
Contributor

@lin-hitonami lin-hitonami left a comment

Choose a reason for hiding this comment

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

LGTM! some nits:

python/taichi/_main.py Outdated Show resolved Hide resolved
python/taichi/_main.py Outdated Show resolved Hide resolved
PGZXB and others added 2 commits December 21, 2022 19:34
Co-authored-by: Lin Jiang <linjiang@taichi.graphics>
@PGZXB
Copy link
Contributor Author

PGZXB commented Dec 21, 2022

Should we add an error message here?

Thanks for your suggestion ~
I added some hint messages.

  • ti cache
[Taichi] version 1.4.0, llvm 15.0.1, commit 02cce8c6, win, python 3.7.0
[I 12/21/22 21:06:27.015 70128] [shell.py:_shell_pop_print@23] Graphical python shell detected, using wrapped sys.stdout

*******************************************
**      Taichi Programming Language      **
*******************************************

Docs:   https://docs.taichi-lang.org/
GitHub: https://github.com/taichi-dev/taichi/
Forum:  https://forum.taichi.graphics/

usage: ti cache <command> [<args>]
        clean   |-> Clean all offline cache files in given path
>>> Running time: 0.00s
  • ti cache faker
[Taichi] version 1.4.0, llvm 15.0.1, commit 02cce8c6, win, python 3.7.0
[I 12/21/22 21:07:32.127 67672] [shell.py:_shell_pop_print@23] Graphical python shell detected, using wrapped sys.stdout

*******************************************
**      Taichi Programming Language      **
*******************************************

Docs:   https://docs.taichi-lang.org/
GitHub: https://github.com/taichi-dev/taichi/
Forum:  https://forum.taichi.graphics/

'ti cache faker' is not a valid command!
usage: ti cache <command> [<args>]
        clean   |-> Clean all offline cache files in given path
>>> Running time: 0.00s
  • ti cache clean
[Taichi] version 1.4.0, llvm 15.0.1, commit 02cce8c6, win, python 3.7.0
[I 12/21/22 21:10:11.792 36964] [shell.py:_shell_pop_print@23] Graphical python shell detected, using wrapped sys.stdout

*******************************************
**      Taichi Programming Language      **
*******************************************

Docs:   https://docs.taichi-lang.org/
GitHub: https://github.com/taichi-dev/taichi/
Forum:  https://forum.taichi.graphics/

Deleted 9841 offline cache files in C:\taichi_cache\ticache
>>> Running time: 1.87s
  • ti cache clean faker
[Taichi] version 1.4.0, llvm 15.0.1, commit 02cce8c6, win, python 3.7.0
[I 12/21/22 21:12:10.007 70904] [shell.py:_shell_pop_print@23] Graphical python shell detected, using wrapped sys.stdout

*******************************************
**      Taichi Programming Language      **
*******************************************

Docs:   https://docs.taichi-lang.org/
GitHub: https://github.com/taichi-dev/taichi/
Forum:  https://forum.taichi.graphics/

usage: ti cache clean [-h] [-p OFFLINE_CACHE_FILE_PATH]
ti cache clean: error: unrecognized arguments: faker
  • ti cache clean -p ./2022-12-21-JOC/gfx
[Taichi] version 1.4.0, llvm 15.0.1, commit 02cce8c6, win, python 3.7.0
[I 12/21/22 21:13:17.783 33348] [shell.py:_shell_pop_print@23] Graphical python shell detected, using wrapped sys.stdout

*******************************************
**      Taichi Programming Language      **
*******************************************

Docs:   https://docs.taichi-lang.org/
GitHub: https://github.com/taichi-dev/taichi/
Forum:  https://forum.taichi.graphics/

Deleted 15 offline cache files in D:\CODE\CPP_CODE\taichi_test\2022-12-21-JOC\gfx
>>> Running time: 0.00s

Copy link
Contributor

@lin-hitonami lin-hitonami left a comment

Choose a reason for hiding this comment

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

LGTM

@lin-hitonami lin-hitonami merged commit 1ab05a5 into taichi-dev:master Dec 21, 2022
quadpixels pushed a commit to quadpixels/taichi that referenced this pull request May 13, 2023
…anually (taichi-dev#6937)

Issue: taichi-dev#6919

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Lin Jiang <linjiang@taichi.graphics>
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.

2 participants