Skip to content

Commit 6f2d662

Browse files
authored
add shutdown logging, publish checklist (#184)
* add shutdown logging, publish checklist * testpypi publish
1 parent bd59670 commit 6f2d662

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,25 +129,30 @@ To debug `git webdiff`, run:
129129

130130
./test-gitwebdiff.sh
131131

132+
## Publishing
133+
132134
To iterate on the PyPI package, run:
133135

134-
# from outside the webdiff virtualenv:
135136
pip3 uninstall webdiff
136-
137-
# from inside the webdiff virtualenv, adjust for current version
138137
poetry build
139138
pip3 install dist/webdiff-?.?.?.tar.gz
140139

141140
To publish to pypitest:
142141

143142
poetry build
144-
???
143+
poetry publish -r testpypi
145144

146145
And to the real pypi:
147146

148147
poetry publish
149148

150-
See [pypirc][] docs for details on setting up `~/.pypirc`.
149+
See [pypirc][] and [poetry][] docs for details on setting up tokens for pypi.
150+
151+
Publication checklist. Do these from _outside_ the webdiff directory:
152+
153+
- Run `webdiff webdiff/testdata/.../{left,right}`
154+
- Run `git webdiff 52aa15f^..52aa15f` in the codediff.js repo
155+
- Run `webdiff https://github.com/danvk/webdiff/pull/160`
151156

152157
## Implementation notes
153158

@@ -176,3 +181,4 @@ There's one complication involving symlinks. `git difftool -d` may fill one of t
176181
[ImageMagick]: https://imagemagick.org/index.php
177182
[git config]: https://git-scm.com/docs/git-config
178183
[themes]: http://example.com
184+
[poetry]: https://python-poetry.org/docs/repositories/#publishable-repositories

webdiff/app.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ def shutdown():
225225
if LAST_REQUEST_MS <= last_ms: # subsequent requests abort shutdown
226226
# See https://stackoverflow.com/a/19040484/388951
227227
# and https://stackoverflow.com/q/4330111/388951
228+
sys.stderr.write('Shutting down...\n')
228229
threading.Thread(target=self.server.shutdown, daemon=True).start()
229230
else:
230231
logging.debug('Received subsequent request; canceling shutdown')

0 commit comments

Comments
 (0)