Skip to content

Commit

Permalink
add shutdown logging, publish checklist (#184)
Browse files Browse the repository at this point in the history
* add shutdown logging, publish checklist

* testpypi publish
  • Loading branch information
danvk authored Jun 5, 2024
1 parent bd59670 commit 6f2d662
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,25 +129,30 @@ To debug `git webdiff`, run:

./test-gitwebdiff.sh

## Publishing

To iterate on the PyPI package, run:

# from outside the webdiff virtualenv:
pip3 uninstall webdiff

# from inside the webdiff virtualenv, adjust for current version
poetry build
pip3 install dist/webdiff-?.?.?.tar.gz

To publish to pypitest:

poetry build
???
poetry publish -r testpypi

And to the real pypi:

poetry publish

See [pypirc][] docs for details on setting up `~/.pypirc`.
See [pypirc][] and [poetry][] docs for details on setting up tokens for pypi.

Publication checklist. Do these from _outside_ the webdiff directory:

- Run `webdiff webdiff/testdata/.../{left,right}`
- Run `git webdiff 52aa15f^..52aa15f` in the codediff.js repo
- Run `webdiff https://github.com/danvk/webdiff/pull/160`

## Implementation notes

Expand Down Expand Up @@ -176,3 +181,4 @@ There's one complication involving symlinks. `git difftool -d` may fill one of t
[ImageMagick]: https://imagemagick.org/index.php
[git config]: https://git-scm.com/docs/git-config
[themes]: http://example.com
[poetry]: https://python-poetry.org/docs/repositories/#publishable-repositories
1 change: 1 addition & 0 deletions webdiff/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ def shutdown():
if LAST_REQUEST_MS <= last_ms: # subsequent requests abort shutdown
# See https://stackoverflow.com/a/19040484/388951
# and https://stackoverflow.com/q/4330111/388951
sys.stderr.write('Shutting down...\n')
threading.Thread(target=self.server.shutdown, daemon=True).start()
else:
logging.debug('Received subsequent request; canceling shutdown')
Expand Down

0 comments on commit 6f2d662

Please sign in to comment.