Skip to content

Commit 887659c

Browse files
Update UI (#7)
1 parent c478749 commit 887659c

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
- os: macos-latest
2727
python-version: "3.9"
2828
pytest-opts: "-m 'not docker'"
29+
publish-docs: true
2930

3031
runs-on: ${{ matrix.cfg.os }}
3132
steps:
@@ -41,3 +42,10 @@ jobs:
4142
extra_args: --verbose --all-files
4243

4344
- run: poetry run pytest ${{ matrix.cfg.pytest-opts }}
45+
- run: poetry run whaler --no-server
46+
- if: matrix.cfg.publish-docs
47+
uses: peaceiris/[email protected]
48+
with:
49+
github_token: ${{ secrets.GITHUB_TOKEN }}
50+
publish_dir: ./_whaler/html
51+

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ packages = [
99
]
1010
include = ["ui.zip"]
1111
readme = "README.md"
12-
version = "0.1"
12+
version = "0.1.1"
1313

1414
[tool.poetry.scripts]
1515
whaler = 'whaler.cli:run'

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
setup_kwargs = {
2323
'name': 'whaler',
24-
'version': '0.1',
24+
'version': '0.1.1',
2525
'description': '',
2626
'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)",
2727
'author': 'alex-treebeard',

src/whaler/static/html.tgz

335 KB
Binary file not shown.

0 commit comments

Comments
 (0)