Open Paebbels opened 10 months ago
Wow, this looks amazing :-) I really hope that you make this into an openly available, public project.
How are you using docstr-coverage in you plugin? I hope you use the analyze function, which is intended pretty much exactly for such purposes.
from docstr_coverage import analyze
coverage_report = analyze(['some_dir/file_0.py', 'some_dir/file_1.py'])
Your questions
Are you interested in such a usage of your package.
Absolutely, it looks amazing.
Could you support in improving it?
At the moment, not too much development is going on on our side, due to the lack of time and as this project is comparably stable. I likewise doubt we'll find much time committing to your source.
However, I am fairly certain we will be able to provide you with the following:
Note that @HunterMcGushion has the last say on everything, but I am quite confident that he'll agree.
Yes, I use analyze(...)
.
Your answers
Are you interested in such a usage of your package.
Absolutely, it looks amazing.
My plan is a new package at pyTooling/sphinx-reports
for the integration of these report types:
docstr_coverage
(and interrogate
?)coverage.py
pytest
mypy
reports (far future)This would be Apache License 2.0 code, which is compatible with MIT.
Could you support in improving it?
At the moment, not too much development is going on on our side, due to the lack of time and as this project is comparably stable. I likewise doubt we'll find much time committing to your source.
I'm active in lots of Python code, but I would like to spend my time not so much in sphinx extensions. It is already a painful experience writing Sphinx extensions, because Sphinx as a documentation tool itself is the by far the worst documented tool I've ever seen. Everything in this tool is based on magic and side effects.
Anyhow, I would like to bring this to a stable release but then it would be good if others could help maintain it. Maybe from the docstr_coverage
community?
Besides my real job, I'm writing a new Sphinx domain (at least I try to write one) for VHDL. With this idea in mind, lots of side projects evolved like a VHDL parser written in Python, a GHDL to Python lolevel C binding, a 9-layered EDA² framework as well as pyTooling and pyTooling/Actions. As I'm working on v6.0.0 of pyTooling, I'm also rewriting major parts of the documentation and theme styling (as far as I understand CSS) - which broad me to your package.
Features I have so far:
conf.py
. This allows to have separate coverage reports for a src
, tests
or example
directory.doccov-aboveXX
, where XX is 00 to 90. This allows the definition of color coding in 10% increments. CSS styles can be grouped to apply same colors to multiple classes.Problems I'm facing so far:
./doc
to ../src
isn't visible in the table.What I noticed so far for docstr_coverage
:
interrogate
(±3).sphinx.ext.coverage
. This Sphinx builder is not usable as a plugin nor does it compute the coverage in a fast way. It compiles a full documentation first, to emit a coverage.analyze(...)
, the progress bar is printed to the console.What I have in mind:
docstr_coverage
and/or interrogate
?). So your package becomes a consumer of the data model layer. Here you add your content by deriving the classes and implementing abstract methods or by creating instances of the model. Finally, the report extension package would again consume your package.pyTooling
.Hi, @Paebbels ! This is really cool! As @MiWeiss said, we aren't doing too much active development on docstr-coverage currently for the reasons he already mentioned. Likewise, I don't think either of us (please correct me if I'm wrong, @MiWeiss ) can make any substantial time commitment to help develop pyTooling and any extensions to communicate with docstr-coverage. You make a lot of excellent points, especially about the verbose logging in this particular case.
How to connect my own CSS file with the extensions. Currently I'm using a global styles overwrite file. I need to debug existing extensions how they solve that problem.
This may not be exactly what you're looking for, but I did some minimal styling for the HyperparameterHunter docs by adding docs/_static/style.css
and then loading it in docs/conf.py
How to find a good CSS styling - I'm no HTML/CSS/web programmer.
I'm certainly not a frontend engineer either, but I'd recommend looking into things like Bootstrap or MaterialUI, which provide large libraries of styles and components. I don't know how usable either of these will be if you're limited to a single CSS file, but I think they're good starting points to land on some basic UI that looks presentable.
Again, your project looks really awesome, and I'm honored that you want to add support for docstr-coverage to pyTooling! Thank you for sharing it with us! I'd love to continue the discussion here if you have any other questions.
The repository is now public: https://github.com/pyTooling/sphinx-reports (see dev
branch) or PR.
I'm currently migrating from a local extension to a real extension. Then I would like to change it from a simple extension to a domain.
So I just release v0.3.1, which should be a usable version for first tests by other users / early adopters. It fixes many remaining bugs and also ships the CSS file as a package resource.
Please have a try.
Repository: https://github.com/pyTooling/sphinx-reports
Extension setup instructions:https://pytooling.github.io/sphinx-reports/Overview.html
Doc coverage explanations: https://pytooling.github.io/sphinx-reports/DocCov/index.html
The documentation also contains 3 examples with no, some and a full documentation.
Moreover, the extension is now able to fully recreate the hierarchy to display packages and modules as a tree.
Hi,
I spent some time writing a quick and dirty Sphinx extension, so outputs from docstr_coverage are listed in Sphinx. The result for 1 day of coding and debugging looks as follows:
Are you interested in such a usage of your package. Could you support in improving it?