From d5cd1002d41c56a996e7ec17d62bd616cd30fb09 Mon Sep 17 00:00:00 2001 From: Alex Remedios Date: Thu, 31 Dec 2020 16:34:40 +0000 Subject: [PATCH] Release 0.1.2 (#9) --- .github/workflows/test.yml | 2 +- README.md | 4 +--- pyproject.toml | 2 +- setup.py | 4 ++-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dded3ba..3a14b45 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,7 +42,7 @@ jobs: extra_args: --verbose --all-files - run: poetry run pytest ${{ matrix.cfg.pytest-opts }} - - run: poetry run whaler --no-server / + - run: poetry run whaler --no-server ../.. - if: matrix.cfg.publish-docs && github.ref == 'refs/heads/main' uses: peaceiris/actions-gh-pages@v3.6.1 with: diff --git a/README.md b/README.md index 9d5ad6c..77360e3 100644 --- a/README.md +++ b/README.md @@ -47,11 +47,9 @@ Done. Serving output at http://localhost:8000 (ctrl+c to exit) Running python3 -m http.server 8000 --directory=_whaler/html ``` -Done. Serving output at http://localhost:8000 (ctrl+c to exit) -Running python3 -m http.server 8000 --directory=_whaler/html - ![HTML Report](docs/screen.png) +Play with a [hosted demo](https://treebeardtech.github.io/whaler/) ## Limitations diff --git a/pyproject.toml b/pyproject.toml index 4b7259a..7001585 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ packages = [ ] include = ["ui.zip"] readme = "README.md" -version = "0.1.1" +version = "0.1.2" [tool.poetry.scripts] whaler = 'whaler.cli:run' diff --git a/setup.py b/setup.py index 694abc4..1f8b8d1 100644 --- a/setup.py +++ b/setup.py @@ -21,9 +21,9 @@ setup_kwargs = { 'name': 'whaler', - 'version': '0.1.1', + 'version': '0.1.2', 'description': '', - 'long_description': "# whaler\n\n[![PyPI versions](https://img.shields.io/pypi/pyversions/whaler?logo=python&logoColor=white)](https://pypi.org/project/whaler)\n[![PyPI versions](https://img.shields.io/pypi/v/whaler?logo=python&logoColor=white)](https://pypi.org/project/whaler)\n\n**What?** A command-line tool for visually investigating the disk usage of docker images\n\n**Why?** Large images are slow to move and expensive to store. They cost developer productivity by lengthening devops tasks and often contain unnecessary data\n\n**Who is this for?** Primarily for engineers working with images containing Python packages.\n\n## User Stories\n\nThis tool should allow you to answer questions such as:\n1. Which file types are occupying the most disk space?\n2. Which are my largest Python packages?\n3. What are my unknown causes of high disk usage?\n\n## Quick start\n\n```bash\npip install whaler\n```\n\n### Run against a local directory\n```\n➜ whaler .venv\nRunning bash -c cd .venv && du -a -k\nDone. Serving output at http://localhost:8000 (ctrl+c to exit)\nRunning python3 -m http.server 8000 --directory=_whaler/html\n```\n\n### Run against a docker image\n\nThe tool will pull the image first if it is not present.\n```\nwhaler --image='hl:latest' /\nRunning docker run --rm --entrypoint=du --workdir=/ hl:latest -a -k\nIgnoring what seems to be non-fatal error(s):\ndu: cannot access './proc/1/task/1/fd/4': No such file or directory\ndu: cannot access './proc/1/task/1/fdinfo/4': No such file or directory\ndu: cannot access './proc/1/fd/3': No such file or directory\ndu: cannot access './proc/1/fdinfo/3': No such file or directory\n\n\nDone. Serving output at http://localhost:8000 (ctrl+c to exit)\nRunning python3 -m http.server 8000 --directory=_whaler/html\n```\n\nDone. Serving output at http://localhost:8000 (ctrl+c to exit)\nRunning python3 -m http.server 8000 --directory=_whaler/html\n\n![HTML Report](docs/screen.png)\n\n\n## Limitations\n\n1. Platform: whaler uses `du` to gather disk usage data. It must be present in your docker image\n2. Scale: I have tested the web UI with up to 500,000 file system nodes with `du` output of up to ~100MB.\n\n## Alternatives/Complements to this tool:\n\n1. Whaler can tell you what is taking up space in the final layer of your Docker image, but you may have intermediate layers which are contributing to the image size. For diving through the layers, use [dive](https://github.com/wagoodman/dive)\n * **Related**: read up on [multi-stage builds](https://docs.docker.com/develop/develop-images/multistage-build/) to understand how to mitigate the problem of intermediate layers bloating your image.\n1. For investigating disk usage in non-docker directories, [Disk Inventory X](http://www.derlien.com/) is a great tool on OS X which I have based whaler on.\n\n## Developing\n\nSee `.github/workflows/test.yml` for the development platform and setup.\n\nFor UI, see [whaler-ui](https://github.com/treebeardtech/whaler-ui)", + 'long_description': "# whaler\n\n[![PyPI versions](https://img.shields.io/pypi/pyversions/whaler?logo=python&logoColor=white)](https://pypi.org/project/whaler)\n[![PyPI versions](https://img.shields.io/pypi/v/whaler?logo=python&logoColor=white)](https://pypi.org/project/whaler)\n\n**What?** A command-line tool for visually investigating the disk usage of docker images\n\n**Why?** Large images are slow to move and expensive to store. They cost developer productivity by lengthening devops tasks and often contain unnecessary data\n\n**Who is this for?** Primarily for engineers working with images containing Python packages.\n\n## User Stories\n\nThis tool should allow you to answer questions such as:\n1. Which file types are occupying the most disk space?\n2. Which are my largest Python packages?\n3. What are my unknown causes of high disk usage?\n\n## Quick start\n\n```bash\npip install whaler\n```\n\n### Run against a local directory\n```\n➜ whaler .venv\nRunning bash -c cd .venv && du -a -k\nDone. Serving output at http://localhost:8000 (ctrl+c to exit)\nRunning python3 -m http.server 8000 --directory=_whaler/html\n```\n\n### Run against a docker image\n\nThe tool will pull the image first if it is not present.\n```\nwhaler --image='hl:latest' /\nRunning docker run --rm --entrypoint=du --workdir=/ hl:latest -a -k\nIgnoring what seems to be non-fatal error(s):\ndu: cannot access './proc/1/task/1/fd/4': No such file or directory\ndu: cannot access './proc/1/task/1/fdinfo/4': No such file or directory\ndu: cannot access './proc/1/fd/3': No such file or directory\ndu: cannot access './proc/1/fdinfo/3': No such file or directory\n\n\nDone. Serving output at http://localhost:8000 (ctrl+c to exit)\nRunning python3 -m http.server 8000 --directory=_whaler/html\n```\n\n![HTML Report](docs/screen.png)\n\nPlay with a [hosted demo](https://treebeardtech.github.io/whaler/)\n\n## Limitations\n\n1. Platform: whaler uses `du` to gather disk usage data. It must be present in your docker image\n2. Scale: I have tested the web UI with up to 500,000 file system nodes with `du` output of up to ~100MB.\n\n## Alternatives/Complements to this tool:\n\n1. Whaler can tell you what is taking up space in the final layer of your Docker image, but you may have intermediate layers which are contributing to the image size. For diving through the layers, use [dive](https://github.com/wagoodman/dive)\n * **Related**: read up on [multi-stage builds](https://docs.docker.com/develop/develop-images/multistage-build/) to understand how to mitigate the problem of intermediate layers bloating your image.\n1. For investigating disk usage in non-docker directories, [Disk Inventory X](http://www.derlien.com/) is a great tool on OS X which I have based whaler on.\n\n## Developing\n\nSee `.github/workflows/test.yml` for the development platform and setup.\n\nFor UI, see [whaler-ui](https://github.com/treebeardtech/whaler-ui)", 'author': 'alex-treebeard', 'author_email': 'alex@treebeard.io', 'maintainer': None,