Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix extrapad#83

Open
EythorE wants to merge 4 commits intoLSYS:main from
EythorE:fix_extrapad
Open

Fix extrapad #83
EythorE wants to merge 4 commits intoLSYS:main from
EythorE:fix_extrapad

Conversation

@EythorE
Copy link

@EythorE EythorE commented Oct 10, 2023
edited
Loading

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.

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.
@EythorE EythorE marked this pull request as draft October 10, 2023 22:34
Copy link

@EythorE EythorE marked this pull request as ready for review October 10, 2023 23:29
Copy link

sonarqubecloud bot commented Feb 9, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

Comments

AltStyle によって変換されたページ (->オリジナル) /