Open
Conversation
Tests did not work when working offline. This was because forestplot.dataframe_utils.load_data and forestplot.tests.test_plot.py were trying to access csv's from https://github.com/LSYS/forestplot/tree/main/examples/data. To fix this, a option for setting an environment variable FORESTPLOT_OFFLINE=1 and an argument data_path to forestplot.dataframe_utils.load_data was added. This makes it possible to provide a path to the directory containing csv's to load_data and setting FORESTPLOT_OFFLINE=1 makes it fail immediately if unsuccesful.
extrapad was calculated as xlim[1] * (1 + extrapad) which becomes extremely large when effects are not close to 0. These lines were refactored into a function _get_pad() which uses the range xlim[1] - xlim[0] as reference to compute the pad, which fixes the issue.
|
Kudos, SonarCloud Quality Gate passed!
|
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.











In forestplot/graph_utils.py, extrapad was calculated as xlim[1] * (1 + extrapad) which becomes extremely large when effects are not close to 0.
These lines were refactored into a function _get_pad() which
uses the range xlim[1] - xlim[0] as reference to compute the pad, which fixes the issue.
Modified some of the code to work without internet connection.
Some of the code was trying to access csv's from https://github.com/LSYS/forestplot/tree/main/examples/data
those csv's are available as a part of this repo.
It now first checks if csvs are available in .[forestplot]/examples/data or a user provided Path else it access them through the url.