Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging, format strings, tests don't change settings, split tests, --gst- arguments #34

Merged
merged 13 commits into from
Jun 22, 2020

Conversation

sezanzeb
Copy link
Contributor

@sezanzeb sezanzeb commented Jun 20, 2020

  • uses the logging module now, since that is what many python modules use - makes the code possibly more familiar - and it allows to log to files and such if that is required at some point.
  • correctly forwards --gst- arguments. For example soundconverter --gst-debug-level=3. See https://gstreamer.freedesktop.org/documentation/application-development/appendix/checklist-element.html?gi-language=python#debugging and gst-launch-1.0 --help-gst
  • does not modify the users setting during make test using a memory backend (unittests #30 (comment)). The way how the code gets the Gio.Settings object had to be changed a bit for this.
  • moved from '%s' % 'string' to the newer '{}'.format('string') formatting almost everywhere
  • clarified differences between argv and gio settings
  • put audio-format related code from settings into separate file
  • splitted test file into multiple files
  • fixed changing the number of jobs required a restart
  • fixed deprecation warnings for Gtk.Dialog
  • rearranged readme a bit
  • limit-jobs is treated as boolean now instead of int

example showing gstreamers debug messages and our new colored debug logs. The lines saying "WARN" in yellow are gstreamers debug messages.

Screenshot_2020-06-20_20-05-57
Screenshot_2020-06-21_10-35-45

gstreamer really logs a lot of things with increasing verbosity (up to 9). I removed the debug logs for the message types at some point because they were actually a bit too much, so the screenshot is a bit outdated.

@sezanzeb sezanzeb changed the title better logging gst args logging, format strings, --gst- arguments Jun 20, 2020
@sezanzeb sezanzeb changed the title logging, format strings, --gst- arguments logging, format strings, UI settings reset in tests, --gst- arguments Jun 20, 2020
@sezanzeb sezanzeb changed the title logging, format strings, UI settings reset in tests, --gst- arguments logging, format strings, UI settings changed in tests fix, --gst- arguments Jun 20, 2020
@sezanzeb sezanzeb changed the title logging, format strings, UI settings changed in tests fix, --gst- arguments logging, format strings, tests restore settings, --gst- arguments Jun 20, 2020
@sezanzeb sezanzeb marked this pull request as draft June 21, 2020 12:01
@sezanzeb sezanzeb marked this pull request as ready for review June 21, 2020 17:47
@sezanzeb
Copy link
Contributor Author

sezanzeb commented Jun 21, 2020

the --gst-debug-level=3 argument may possibly help debugging https://bugs.launchpad.net/soundconverter/+bug/1881376

@sezanzeb sezanzeb changed the title logging, format strings, tests restore settings, --gst- arguments logging, format strings, tests don't change settings, split tests, --gst- arguments Jun 21, 2020
@kassoulet kassoulet merged commit 4a50152 into kassoulet:py3k Jun 22, 2020
@kassoulet
Copy link
Owner

Amazing work, thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants