-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ Make matplotlib dependency optional (#1061)
This commit makes matplotlib (and numpy) optional dependencies, using `pip install sphinx-needs[plotting]`, by: 1. Removing direct uses of numpy 2. Moving the matplotlib import to a function, which can return `None` 3. Handling the `None` case in the `needbar`/`needpie` post-processing, by emmiting a warning and replacing the nodes with error admonitions. A seperate test job and related test file is added for testing builds with needbar/needpie directives, for when matplotlib is uninstalled.
- Loading branch information
1 parent
40856b2
commit 5783d92
Showing
14 changed files
with
223 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
5783d92
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold
1.50
.Small, basic Sphinx-Needs project
0.3480288539999776
s0.20427617399991504
s1.70
Official Sphinx-Needs documentation (without services)
97.03009744299999
s59.276463209999974
s1.64
This comment was automatically generated by workflow using github-action-benchmark.
CC: @danwos