Conversation
0bba273 to
c60efe9
Compare
e6a71ee to
0dbf745
Compare
959d438 to
8586192
Compare
|
Hi @PawelPlesniak @henry-wallace-phys, this monster of a PR is ready for review. Might be easier to review if you just read the docs to be honest, which is found here: https://dune-daq.github.io/daqpytools/ @henry-wallace-phys since youre not too familiar with the logging framework, can you give comments on how clear and easy to follow the docs are? hopefully the tutorial and the how tos and the best practices should help you get up and running with your runconfui refactor :) @PawelPlesniak since youre an expert, can you flick through everything? (sorry..) Let me know if im missing something svp |
|
Thank you for this Emir. It will take a bit to read, so I will leave running commentary separated by time at which I cannot follow the length of the comment. On the splash page
Rewrite "(as of 5.6.0)" to "(as of fddaq-v5.6.0, daqpytools vX.Y.Z)"
In the tutorial Step 1
Could do with a hyperlink Tutorial Step 2
Is worth defining what "emit" means. Tutorial next steps
Link broken. Would highly recommend using lychee, as per the drunc example. This autochecks whether tha pages are safe.
APIref -> API reference guide (both this link and the bookmark) Concepts - how logging works in DUNE DAQhttps://dune-daq.github.io/daqpytools/user/explanation/
Here it's worth stating that the log level is just an enum, with CRITICAL being 50, with incrememnts of 10 down to 0 for NOTSET.
Link this Filters section Worth also saying that each handler and logger have their own levels Inheritance section Slightly misleading - the log records are passed to the parents all the way up until they hit root. The diagram you link below your diagram shows this. Streams Include a link to the next section here (How to use handlers and filters) How to use handlers and filterrs
Is this generally true or have we configured it to work this way? In the code example Slight pedantic request - your variable name is How to route messages to specific handlers
Can you make this "It can handle ERS environment variables..." instead? This makes it seem that it will always parse the ERS env vars, even if the protobufstream handler is not requested. How to add handlers at runtime
Could you rephrase this as "Handlers can be configured in two ways", give an example with
This secttion makes sense as I read several of your talks, but for a user who didn't it would be better to state this section as "default behaviour with How to configure ERS handlers
Here also link the definition of the ERS kafka handler
Here also explain how to initialize it straight away (i.e. on logger construction) Logging best practices
You should explain what
This should be modified to say (in bold and maybe caps depending on your personal choice) that it will affect thee logger instances from other repositories too, and that it can lead to undesirable code (e.g. this)
Missing a dot after the f.
Preface this with "once the pseudo-root logger is defined". You could also point to the function we have in drunc which prepends the "drunc" prefix to actually inherit from the pseudo-root loggers, to make sure that the inheritance is followed. Concepts: How the logging system works internally
Is this formatting correct? Similarly for tthe following bullet point list. I will finish the dev docs tomorrow, they need dedicated effort General commentsThis is a very nice set of complete documentation, with clear descriptions and demonstrations. Nice work! Some requests:
|
|
I will also quickly flick through the code and the docstrings, but after lunch |
|
It may also be worth nuking my old wiki |






Description
vibes
Fix #52
Fix #43
Add docs and deploy them. Its a lot.
There are two kinds of docs that exist, one for the user and one for the developer. The user docs are found in docs/ and the dev docs are in docs_dev/. The split is so that the user docs are used to make the dune daq readthedocs website, while the dev docs are primarily found in the mkdocs (similar to how it is in drunc).
Speaking of mkdocs, they should be found here: https://dune-daq.github.io/daqpytools/
It contains both the user and developer docs just so we have everything in one consistent place.
The docs themselves follow the diataxis framework, such that each page should be only one of the four: tutorial, guide, reference, explanation. That should make the reading and understanding of the docs much clearer. \
The api references are automatically generated, this is done using the dev_docs/generate_logging_autodocs.py script.
The other script in that file just cleans up the file structure in the two docs so they are clearly displayed in the mkdocs.
For this one feature to work, we have an empty folder called docs_anchor, which is eventually used to build the autodocs so that we have the user and dev docs in the same heirarchy.
Type of change
TODO
Testing checklist
View https://dune-daq.github.io/daqpytools/ and read through everything :')
dbt-build --unittest)pytest -s minimal_system_quick_test.py)daqsystemtest_integtest_bundle.sh)python -m pytest)pre-commit run --all-files)Comments here on the testing
Further checks
dbt-build --lint, and/or see https://dune-daq-sw.readthedocs.io/en/latest/packages/styleguide/)(Indicate issue here: # (issue))