Skip to content

DOC fix broken RTD example gallery#83

Merged
BorisMuzellec merged 8 commits intomainfrom
fix_rtd_docs
Feb 21, 2023
Merged

DOC fix broken RTD example gallery#83
BorisMuzellec merged 8 commits intomainfrom
fix_rtd_docs

Conversation

@BorisMuzellec
Copy link
Copy Markdown
Collaborator

@BorisMuzellec BorisMuzellec commented Feb 20, 2023

What does your PR implement? Be specific.

This PR fixes the example gallery which causes the docs not to compile on readthedocs. This is due to a data importing issue after merging #68 (pandas won't load a csv from an url provided in the form of a Path).

A unit test was added to test_utils.py to check that load_example_data correctly retrieves data from github when the datasets directory is not accessible (as when building the docs on RTD).

@BorisMuzellec BorisMuzellec marked this pull request as ready for review February 21, 2023 09:57
@BorisMuzellec BorisMuzellec requested a review from a user February 21, 2023 09:57

# Mock the output of is_dir() as False to emulate not having access to the
# ``datasets`` directory
pathlib.Path.is_dir.return_value = [False, True]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this should be in parametrize (otherwise the value is [False, True]

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Indeed... would this work fa707b9?

@BorisMuzellec BorisMuzellec requested a review from maikia February 21, 2023 12:56
Copy link
Copy Markdown
Collaborator

@maikia maikia left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @BorisMuzellec

@BorisMuzellec BorisMuzellec merged commit f0f0741 into main Feb 21, 2023
@BorisMuzellec BorisMuzellec deleted the fix_rtd_docs branch February 21, 2023 15:31
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.

2 participants