Uh oh!
There was an error while loading. Please reload this page.
Add missing CLI and INI options for a consistent API - #181
Conversation
b83ea27 to
fe4f4e3CompareCadair
commented
Sep 8, 2022
You can set these options in the pytest config (normally setup.cfg) but I don't know how that interacts with richer python objects? maybe we would need to parse a string in to a python object? |
ConorMacBride
commented
Sep 11, 2022
The pytest global options (probably) only supports returning one of these types. So I think it would be best to just recommend adding custom rc params to a new style file within the test directory, whose path (or URL) can just be referred to in the global pytest option as a string. |
ConorMacBride
left a comment
There was a problem hiding this comment.
These changes should get the tests passing. I think we should do a new major version soon with the default style changed from "classic" to "default", as I think any changes to the Matplotlib default style are outside the scope of this package and should be made apparent by default when testing on different Matplotlib version.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi @astrofrog, there are some other options (noted in #198) which could be added to make the config more consistent. Do you agree we should add these options?
If so, would you like me to open a separate PR, or shall I just add them to this PR? |
astrofrog
commented
May 20, 2023
Sounds good - feel free to just add them to this PR if you like! |
f43443e to
718308aCompareusing patterns from matplotlib#150
6fa164c to
913c476Compare1096aae to
fd3ca4eCompareAdds tests for the new config options across ini, CLI and kwarg where relevant. Asserts that they work and have the expected order of precedence. Still need to add dedicated tests for all the other options.
Adds tests for the new config options across ini, CLI and kwarg where relevant. Asserts that they work and have the expected order of precedence. Still need to add dedicated tests for all the other options.
fd3ca4e to
a36ac38Compare
astrofrog
left a comment
There was a problem hiding this comment.
Thanks for all the work on this!
It would be nice to be able to customize the default tolerance and style to use globally as both have defaults set by 'historical reasons' that aren't necessarily sensible.
For style, one of the issues is that actually style could be more than just a string - e.g. a dict and so on. Is there a way to set global options such as these in e.g. conftest.py? (if so I can document that too).
Remaining TODOs (if we go ahead with this):