Smokeshow CLI
CLI to deploy ephemeral websites, see smokeshow.helpmanual.io for more information.
Installation
pip install smokeshow
Usage
To get help on usage, run:
smokeshow --help
To generate an upload key, use:
smokeshow generate-key
You should then set the key as an environment variable with
export SMOKESHOW_AUTH_KEY='...'
With that, you can upload a site with:
smokeshow upload path/to/upload
For more help run smokeshow upload --help, if you run smokeshow upload without either
setting the SMOKESHOW_AUTH_KEY environment variable or using the --auth-key option, smokeshow will generate
a new upload key before uploading the site.
If you're having trouble with python versions and accessing the CLI, you can also run the smokeshow library module as a script via
python -m smokeshow
GitHub actions & commit status integration
I build smokeshow primarily to preview documentation and coverage generate with github actions.
smokeshow therefore integrates directly with github actions to add a status to commits with a link to the newly created ephemeral site.
In addition, smokeshow has custom logic to extract the total coverage figure from coverage.py HTML coverage reports to both annotate commit status updates and decide if the commit status is "success" or "failure".
Example of setting the commit status from a github action:
- run: smokeshow upload cli/htmlcov
env:
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: CLI Coverage {coverage-percentage}
SMOKESHOW_GITHUB_COVERAGE_THRESHOLD: 50
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
(this is taken directly from smokeshow's own CI, see here)
The following environment variables are used when setting commit statuses:
SMOKESHOW_GITHUB_STATUS_DESCRIPTION(or alternatively the--github-status-descriptionCLI option) set the description for the commit status; the string{coverage-percentage}has a special meaning and will be replaced by the actual coverage percentage if it can be extract from the rootindex.htmlfile being uploaded, this must be set for smokeshow to set the commit statusSMOKESHOW_GITHUB_COVERAGE_THRESHOLD(or alternatively the--github-coverage-thresholdCLI option) decide the "state" of the commit status update;successis used if either the total coverage number isn't available or it's above the threshold,failureis used if the coverage number is below this thresholdSMOKESHOW_GITHUB_TOKENthis is used to authenticate the status update, more details hereSMOKESHOW_GITHUB_PR_HEAD_SHAor if it's omitted or emptyGITHUB_SHA(which is set automatically by github actions) are used to decide which commit to set the status on. TheSMOKESHOW_GITHUB_PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}trick shown above is required since github set theGITHUB_SHAenv var to a merge commit on pull requests which isn't what you wantSMOKESHOW_GITHUB_CONTEXTsuffix for github status contextGITHUB_REPOSITORYis set automatically by github actions, it's used to choose the repo to set the status on
Release files for smokeshow 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| smokeshow-0.5.0.tar.gz | 101.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| smokeshow-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 109.7 kB
Release files / smokeshow-0.5.0.tar.gz
| Download URL | smokeshow-0.5.0.tar.gz |
|---|---|
| Size | 101.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
91dcabc29ac3116bff59b4d8a7bda4ae3ccc4c70742a38cec7127b8162e4a0f6
|
|
BLAKE2b-256 checksum How to use checksums |
7594c99b76517c268ef8d5c2ff88faba5a019664bd69e4754944afa294b4f24c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 7, 2025.
Transparency logRelease files / smokeshow-0.5.0-py3-none-any.whl
| Download URL | smokeshow-0.5.0-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
da12a960fc7cb525efc4035a0c3c9363b6217ea7e66bc39b9ed3cd8bed6eeedc
|
|
BLAKE2b-256 checksum How to use checksums |
77100d23e4953eb7c1e1ad848084b3115f19234f34f907658ed11bed0d826aee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 7, 2025.
Transparency log