Open adebardo opened 3 weeks ago
Thanks @adebardo for the issue. It's ok for me globally. Some remarks and complements from my experience of other projects:
Thank you for this feedback.
1 - I acknowledge the possibility of adding this to the config file indeed.
2 - I’ve noted the point about the logging format.
3 - I’ll also add more global logging management.
It would be great to have the logging option indeed and be able to set it up through the CLI and API. We can also possibly add it to a global config file like what is done in geoutils.
- for many reasons (performance and compatibily), f-string is not so well in logging.
Just out of curiosity, what is wrong with the f-string? Why would it have lower performance? I got used to the f-strings now because they are much easier to read. So I would try to use f-string whenever possible, i.e. outside of logging.
Context
When using xdem errors and other types of information are displayed via
print
. The use of the logging module is more relevant, especially with the arrival of the CLI. This ticket, therefore proposes to replace all prints of xdem in logging.First, it is good to read the [documentation] (https://docs.python.org/en/3/howto/logging.html) in order to master the different levels and constraints related to the use
Code
The files affected by the changes are as follows: -xdem/examples.py
xdem/affine.py -xdem/base.py -xdem/biascorr.py -xdem/workflows.py
xdem/fit.py -xdem/misc.py -xdem/spatialstats.py
xdem/volume.py
example/plot_nuth_kaab.py
example/plot_block_wise_coreg.py
example/plor_deramp.py
example/plot_heterosc_estimation_modelling.py
example/plot_standardization.py
example/plot_variogram_estimation_modelling.py
example/plot_dem_substraction.py
example/plot_infer_heterosc.py
example/plot_infer_spatial_correlation.py
example/plot_spatial_error_propagation.py
test/test_coreg_pipeline.py
test/test_demcollection.py
test/test_doc.py
[ ] Add some logs in run and tests it
For CLI
Doc
Some help for an API use
Tests
Estimation 3d