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

Use logging instead of prints #98

Closed
14 tasks done
veenstrajelmer opened this issue Jun 27, 2023 · 0 comments · Fixed by #236
Closed
14 tasks done

Use logging instead of prints #98

veenstrajelmer opened this issue Jun 27, 2023 · 0 comments · Fixed by #236
Labels
enhancement New feature or request

Comments

@veenstrajelmer
Copy link
Collaborator

veenstrajelmer commented Jun 27, 2023

  • convert all warning prints to actual warnings?
  • use logging module/file instead of any prints like in ddlpy (including logging level and set globally how hatyan should print nothing, or to screen, or tot file)
  • enable verbose in cli
  • add silent mode?
  • check logging from cli (initialization/finalization and exec print in console or in STDOUT.txt, depending on users wishes)
  • check acceptance tests (do not timeout with new logging?) >> spatial_plot and numbering_extremes have timeout
  • predictie_2022_frommergedcomp_LAT has no decent error message in pytest anymore
  • overwrite instead of unique-outputdir argument
  • clean up cli function
  • disable matplotlib logging in case of verbose cli or debug logging level in spyder/jupyter: "DEBUG:matplotlib.font_manager:findfont: score(FontEntry(fname='C:\\Windows\\Fonts\\LTYPE.TTF', name='Lucida Sans Typewriter', style='normal', variant='normal', weight=400, stretch='normal', size='scalable')) = 10.05" >> maybe set more things as info and test if warning level suppresses these. In that case it does not have to be solved.
  • maybe set logging format to exlude name? >> no
  • Re-enable proper warnings in _read_components_analysis_settings #177
  • add debug logging example to notebook (see below)
  • merge debug prints (see below)

add debug in example notebook:

import logging
hatyan.close("all")
# logging.basicConfig(level=logging.DEBUG)
# hatyan.analysis_prediction.logger.setLevel(logging.DEBUG)
# hatyan.timeseries.logger.setLevel(logging.DEBUG)

merge debug lines into one:

DEBUG:hatyan.analysis_prediction:components used      = 95
DEBUG:hatyan.analysis_prediction:tstart               = 2019-01-01 00:00:00
DEBUG:hatyan.analysis_prediction:tstop                = 2020-01-01 00:00:00
DEBUG:hatyan.analysis_prediction:timestep             = <10 * Minutes>
@veenstrajelmer veenstrajelmer added the enhancement New feature or request label Jun 27, 2023
@veenstrajelmer veenstrajelmer changed the title Improve logging Improve logging/statistics Aug 11, 2023
@veenstrajelmer veenstrajelmer changed the title Improve logging/statistics Use logging instead of prints Mar 26, 2024
@veenstrajelmer veenstrajelmer linked a pull request Mar 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant