Skip to content
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

Make rcparams more robust and explicit #911

Merged
merged 5 commits into from Nov 23, 2019
Merged

Make rcparams more robust and explicit #911

merged 5 commits into from Nov 23, 2019

Conversation

OriolAbril
Copy link
Member

Also increases testing of rcparams

Copy link
Member

@ColCarroll ColCarroll left a comment

Choose a reason for hiding this comment

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

This is nice. Feel free to make these fixes, or just merge.

def test_warning_rc_file(caplog):
"""Test invalid lines and duplicated keys log warnings and bad value raises error."""
path = os.path.dirname(os.path.abspath(__file__))
read_rcfile(path + "/test.rcparams")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
read_rcfile(path + "/test.rcparams")
read_rcfile(os.path.join(path, "/test.rcparams"))

windows uses \ as a separator, so we have to play this game, or use pathlib.

Copy link
Member Author

Choose a reason for hiding this comment

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

Should the / in "/test.rcparams" be removed?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes

arviz/tests/test_rcparams.py Outdated Show resolved Hide resolved
Co-Authored-By: Colin <ColCarroll@users.noreply.github.com>
@@ -91,7 +91,7 @@ def test_rcparams_repr_str():
"""Check both repr and str print all keys."""
repr_str = rcParams.__repr__()
str_str = rcParams.__str__()
assert repr_str[:8] == "RcParams"
assert repr_str.startsWith("RcParams")
Copy link
Contributor

Choose a reason for hiding this comment

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

Small w

@canyon289
Copy link
Member

This LGTM

@canyon289
Copy link
Member

@ahartikainen ahartikainen merged commit b593ee3 into master Nov 23, 2019
@canyon289 canyon289 deleted the rcparams branch November 24, 2019 01:40
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.

None yet

4 participants