Skip to content

Commit

Permalink
Simplify log format when used from CLI (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb authored Dec 14, 2023
1 parent 6d112d7 commit b9bbb04
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/packse/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def entrypoint():
else:
log_level = logging.INFO

logging.basicConfig(level=log_level)
logging.basicConfig(level=log_level, format="%(message)s")

# Call the implementation wrapper e.g. `_call_build`
try:
Expand Down
2 changes: 1 addition & 1 deletion tests/__snapshots__/test_build.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
''',
}),
'stderr': '''
INFO:packse.build:Building 'example-0611cb74' in directory 'build/example-0611cb74'
Building 'example-0611cb74' in directory 'build/example-0611cb74'
Destination directory '[PWD]/build/example-0611cb74' already exists. Pass `--rm` to allow removal.

''',
Expand Down
50 changes: 25 additions & 25 deletions tests/__snapshots__/test_publish.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
dict({
'exit_code': 0,
'stderr': '''
INFO:packse.publish:Publishing 1 target...
INFO:packse.publish:Publishing 'example-0611cb74'...
INFO:packse.publish:Published 'example_0611cb74-0.0.0.tar.gz'
INFO:packse.publish:Published 'example_0611cb74_a-1.0.0-py3-none-any.whl'
INFO:packse.publish:Published 'example_0611cb74_a-1.0.0.tar.gz'
INFO:packse.publish:Published 'example_0611cb74_b-1.0.0-py3-none-any.whl'
INFO:packse.publish:Published 'example_0611cb74_b-1.0.0.tar.gz'
Publishing 1 target...
Publishing 'example-0611cb74'...
Published 'example_0611cb74-0.0.0.tar.gz'
Published 'example_0611cb74_a-1.0.0-py3-none-any.whl'
Published 'example_0611cb74_a-1.0.0.tar.gz'
Published 'example_0611cb74_b-1.0.0-py3-none-any.whl'
Published 'example_0611cb74_b-1.0.0.tar.gz'

''',
'stdout': '''
Expand All @@ -27,8 +27,8 @@
dict({
'exit_code': 1,
'stderr': '''
INFO:packse.publish:Publishing 1 target...
INFO:packse.publish:Publishing 'example-0611cb74'...
Publishing 1 target...
Publishing 'example-0611cb74'...
Publish for 'example_0611cb74-0.0.0.tar.gz' already exists

''',
Expand All @@ -39,8 +39,8 @@
dict({
'exit_code': 1,
'stderr': '''
INFO:packse.publish:Publishing 1 target...
INFO:packse.publish:Publishing 'example-0611cb74'...
Publishing 1 target...
Publishing 'example-0611cb74'...
Publish of 'example_0611cb74-0.0.0.tar.gz' failed due to rate limits

''',
Expand All @@ -51,8 +51,8 @@
dict({
'exit_code': 1,
'stderr': '''
INFO:packse.publish:Publishing 1 target...
INFO:packse.publish:Publishing 'example-0611cb74'...
Publishing 1 target...
Publishing 'example-0611cb74'...
Publishing example_0611cb74-0.0.0.tar.gz with twine failed:
<twine error message>

Expand All @@ -65,33 +65,33 @@
dict({
'exit_code': 0,
'stderr': '''
INFO:packse.publish:Publishing 1 target...
INFO:packse.publish:Publishing 'example-0611cb74'...
DEBUG:packse.publish:Published example_0611cb74-0.0.0.tar.gz in [TIME]:
Publishing 1 target...
Publishing 'example-0611cb74'...
Published example_0611cb74-0.0.0.tar.gz in [TIME]:

<twine happy message>

INFO:packse.publish:Published 'example_0611cb74-0.0.0.tar.gz'
DEBUG:packse.publish:Published example_0611cb74_a-1.0.0-py3-none-any.whl in [TIME]:
Published 'example_0611cb74-0.0.0.tar.gz'
Published example_0611cb74_a-1.0.0-py3-none-any.whl in [TIME]:

<twine happy message>

INFO:packse.publish:Published 'example_0611cb74_a-1.0.0-py3-none-any.whl'
DEBUG:packse.publish:Published example_0611cb74_a-1.0.0.tar.gz in [TIME]:
Published 'example_0611cb74_a-1.0.0-py3-none-any.whl'
Published example_0611cb74_a-1.0.0.tar.gz in [TIME]:

<twine happy message>

INFO:packse.publish:Published 'example_0611cb74_a-1.0.0.tar.gz'
DEBUG:packse.publish:Published example_0611cb74_b-1.0.0-py3-none-any.whl in [TIME]:
Published 'example_0611cb74_a-1.0.0.tar.gz'
Published example_0611cb74_b-1.0.0-py3-none-any.whl in [TIME]:

<twine happy message>

INFO:packse.publish:Published 'example_0611cb74_b-1.0.0-py3-none-any.whl'
DEBUG:packse.publish:Published example_0611cb74_b-1.0.0.tar.gz in [TIME]:
Published 'example_0611cb74_b-1.0.0-py3-none-any.whl'
Published example_0611cb74_b-1.0.0.tar.gz in [TIME]:

<twine happy message>

INFO:packse.publish:Published 'example_0611cb74_b-1.0.0.tar.gz'
Published 'example_0611cb74_b-1.0.0.tar.gz'

''',
'stdout': '''
Expand Down

0 comments on commit b9bbb04

Please sign in to comment.