From 6de95894e389195bd2de15167161f617c8d535b6 Mon Sep 17 00:00:00 2001 From: agusmakmun Date: Thu, 4 Apr 2024 07:22:46 +0700 Subject: [PATCH] feat: update docs --- README.md | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7eaf02d..9e9b6ba 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# scan-unused-requirements +# ScanReq -Python tool to scan all unused packages in requirements.txt file for your project. +**ScanReq** - Python tool to scan all unused packages in requirements.txt file for your project. ## Background @@ -8,10 +8,18 @@ One popular tool for checking requirements in a Python project is `pipdeptree`. So, this tool comes in handy for easily identifying which exact packages are actually unused in our project. +### Benefits -> **Note:** Don't forget to double cross-check after finding the unused packages, \ -> because sometimes they are used in different cases without being imported in the code. \ -> For example: `argon2-cffi` used in `settings.PASSWORD_HASHERS = ["django.contrib.auth.hashers.Argon2PasswordHasher", ...]` for Django. +1. **Save Money**: Remove unused dependencies to lower hosting costs. +2. **Speed Up**: Faster installation and build times mean quicker development. +3. **Use Resources Wisely**: Free up disk and memory space by removing what you don't use. +4. **Easier Maintenance**: Keep your project cleaner and simpler for easier management. +5. **Focus Better**: Work with only what you need, enhancing productivity. +6. **Update Efficiently**: Ensure your dependencies are up-to-date for smoother compatibility. +7. **Stay Safe**: Reduce the chance of security vulnerabilities by trimming unnecessary dependencies. +8. **Stay Legal**: Avoid licensing issues by managing dependencies more effectively. +9. **Work Together**: Simplify collaboration with a consistent set of dependencies. +10. **Code Better**: Keep your documentation and codebase cleaner for improved quality. ## Usage @@ -44,15 +52,21 @@ optional arguments: -p PATH, --path PATH Project path to scan for unused packages (default: current directory). ``` +> **Note:** Don't forget to cross-check the unused packages after finding them, +> because sometimes they are used in different cases without being imported in the code. +> For example: `argon2-cffi` used in `settings.PASSWORD_HASHERS = ["django.contrib.auth.hashers.Argon2PasswordHasher", ...]` for Django. + ## ToDo List -- [x] Support sys argv (command arguments) +- [x] Support argument parser (command arguments) - [x] Directory to scan - [x] Requirement file to scan -- [ ] Option to auto replace the package from requirements.txt file + - [ ] Option to auto replace the package from requirements.txt file + - [ ] Option to exclude or ignore some packages - [ ] Support multiple python versions -- [ ] Make it as a command by adding file to /bin +- [ ] Support CLI - make it as a command - [ ] Support multiple devices (Linux, Macbook, and Windows) - [ ] Write some tests - [ ] Publish to PyPi +- [ ] Support scan the `pyproject.toml`