Skip to content

Add --verbose flag to reduce logging to warning+ level, Add Progress bars #67

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

Merged
merged 8 commits into from
May 21, 2025

Conversation

x0rw
Copy link
Contributor

@x0rw x0rw commented Apr 30, 2025

Update:
--Check the comment below--

Give it a try!
Resolves #66

Copy link
Collaborator

@PLeVasseur PLeVasseur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking this on @x0rw! See my comment below.

In addition, one thing that I think would be useful to see fixed as a part of this is to remove this output:

checking consistency... No missing required field
No missing required field
No missing required field
No missing required field
No missing required field
No missing required field
No missing required field
No missing required field

@x0rw x0rw force-pushed the feature-flag/verbose-option branch 2 times, most recently from f78999d to a77d593 Compare May 8, 2025 01:02
@x0rw x0rw requested a review from PLeVasseur May 8, 2025 14:34
Copy link
Collaborator

@PLeVasseur PLeVasseur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @x0rw -- thanks for updating this!

I'd like to highlight what it would be good to see in the PR summary to help a reviewer understand before & after below.

Please also take a look at the comment I left about All FLS references in guidelines are valid being repeatedly output.

Also take a look at the comment I left about --debug and --verbose flag interaction.

Before

$ ./make.py
Running Sphinx v8.2.3
loading translations [en]... done
making output directory... done
building [mo]: targets for 0 po files that are out of date
writing output... 
building [html]: targets for 55 source files that are out of date
updating environment: [new config] 55 added, 0 changed, 0 removed
reading sources... [100%] retired-guidelines/retired-values
Copying static files for sphinx-data-viewer support
Copying static files for sphinx-needs datatables support
Copying static style files for sphinx-needs
looking for now-outdated files... none found
pickling environment... done
checking consistency... Gathering FLS paragraph IDs from https://spec.ferrocene.dev/paragraph-ids.json
Found 6042 total FLS IDs (sections and paragraphs)
  - 1119 section/container IDs
  - 4923 paragraph IDs
Checking FLS lock file consistency
Found 4923 paragraphs in live data
Found 4923 paragraphs in lock file
All FLS references in guidelines are valid
All FLS references in guidelines are valid
All FLS references in guidelines are valid
All FLS references in guidelines are valid
All FLS references in guidelines are valid
All FLS references in guidelines are valid
All FLS references in guidelines are valid
All FLS references in guidelines are valid
All FLS references in guidelines are valid
Reading FLS ignore list from /home/pete.levasseur/scrc/safety-critical-rust-coding-guidelines/src/spec_ignore_list.txt
Loaded 1 FLS IDs to ignore
Found 9 references to FLS IDs in guidelines
Found 9 unique FLS IDs covered by guidelines
=== FLS Coverage Report ===
Total FLS IDs: 6042
Covered FLS IDs: 9
Ignored FLS IDs: 1
Overall coverage: 0.15%

Coverage by chapter:
  Chapter 1: 0.00%
  Chapter 2: 0.00%
  Chapter 3: 0.00%
  Chapter 4: 0.14%
  Chapter 5: 0.00%
  Chapter 6: 0.11%
  Chapter 7: 0.00%
  Chapter 8: 0.00%
  Chapter 9: 0.00%
  Chapter 10: 0.00%
  Chapter 11: 0.00%
  Chapter 12: 0.00%
  Chapter 13: 0.00%
  Chapter 14: 0.00%
  Chapter 15: 0.00%
  Chapter 16: 0.00%
  Chapter 17: 0.00%
  Chapter 18: 0.00%
  Chapter 19: 0.00%
  Chapter 20: 3.48%
  Chapter 21: 0.00%
  Chapter 22: 0.00%
  Chapter A: 0.00%
  Chapter B: 0.00%
  Chapter C: 0.00%
done
preparing documents... done
copying assets... 
copying static files... 
Writing evaluated template result to /home/pete.levasseur/scrc/safety-critical-rust-coding-guidelines/build/html/_static/basic.css
Writing evaluated template result to /home/pete.levasseur/scrc/safety-critical-rust-coding-guidelines/build/html/_static/documentation_options.js
Writing evaluated template result to /home/pete.levasseur/scrc/safety-critical-rust-coding-guidelines/build/html/_static/language_data.js
Writing evaluated template result to /home/pete.levasseur/scrc/safety-critical-rust-coding-guidelines/build/html/_static/js/versions.js
copying static files: done
copying extra files... 
copying extra files: done
copying assets: done
writing output... [100%] retired-guidelines/retired-types-and-traits .. retired-guidelines/retired-values
generating indices... genindex done
highlighting module code... 
writing additional pages... search done
dumping search index in English (code: en)... done
dumping object inventory... done
Needs successfully exported
Generating guidelines IDs and checksums...
dumping paragraph ids... Guidelines IDs written to /home/pete.levasseur/scrc/safety-critical-rust-coding-guidelines/build/html/guidelines-ids.json
done
Adding FLS links...
dumping paragraph ids... Gathering FLS paragraph IDs from https://spec.ferrocene.dev/paragraph-ids.json
Found 6042 total FLS IDs (sections and paragraphs)
  - 1119 section/container IDs
  - 4923 paragraph IDs
done

Finalizing build:
build succeeded.

The HTML pages are in build/html.

Build finished in 3.50 seconds.

After

(putting image, as copying from terminal garbles the progress bar)

image

@x0rw x0rw changed the title Add --verbose flag to reduce logging to warning+ level, Add spinner Add --verbose flag to reduce logging to warning+ level, Add Progress bars May 14, 2025
@PLeVasseur
Copy link
Collaborator

@x0rw -- could you rebase? Then let's run CI again.

@x0rw x0rw force-pushed the feature-flag/verbose-option branch from d9e21a1 to c9beec2 Compare May 20, 2025 21:03
@x0rw
Copy link
Contributor Author

x0rw commented May 20, 2025

It's rebased on the last commit now 👍

Copy link
Collaborator

@PLeVasseur PLeVasseur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this very nice QoL improvement @x0rw!

@PLeVasseur PLeVasseur added this pull request to the merge queue May 21, 2025
Merged via the queue into rustfoundation:main with commit 3873d24 May 21, 2025
2 checks passed
@x0rw
Copy link
Contributor Author

x0rw commented May 21, 2025

Thanks for this very nice QoL improvement @x0rw!

Glad i could help!

@x0rw x0rw deleted the feature-flag/verbose-option branch May 21, 2025 20:25
AlexCeleste pushed a commit to AlexCeleste/safety-critical-rust-coding-guidelines that referenced this pull request Jun 4, 2025
…bars (rustfoundation#67)

* Add --verbose flag to reduce logging to warning+ level, Add spinner

* Remove spinner, Introduce tqdm, wrapping important loops in tqdm

* Add tqdm to pyproject.toml

* refactor: Add common.py to hold logger and tqdm wrapper, Disable tqdm progress on verbose mode, Remove Unused imports

* Remove extra return

* Apply suggestions from code review

Co-authored-by: Pete LeVasseur <[email protected]>

* Fix logger indentation

* merge --verbose into --debug, remove time.sleep()

---------

Co-authored-by: Pete LeVasseur <[email protected]>
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.

Minimize Verbosity in Sphinx Build Output
2 participants