Skip to content

Commit

Permalink
v0.2.22
Browse files Browse the repository at this point in the history
  • Loading branch information
yh202109 committed Aug 27, 2024
1 parent 77d4b0f commit 8fc0d68
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
mkdir gh-pages
touch gh-pages/.nojekyll
cd docs/
poetry run sphinx-build -b html . _build
poetry run sphinx-build --keep-going -b html . _build
cp -r _build/* ../gh-pages/
- name: Deploy documentation
Expand Down
13 changes: 0 additions & 13 deletions mtbp3/stdiso/pdfsummary.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,6 @@ def __init__(self, path=None):
self.outline_list = []

def get_image(self, page_index=0, image_index=0, outfolder=""):
"""
Retrieves an image from the PDF summary.
Args:
page_index (int, optional): The index of the page containing the image. Defaults to 0.
image_index (int, optional): The index of the image within the page. Defaults to 0.
outfolder (str, optional): The folder to save the image file. Defaults to "".
Returns:
str or PIL.Image: If `outfolder` is provided, the function saves the image file and returns the file path as a string.
Otherwise, it returns the image as a PIL.Image object.
Raises:
ValueError: If `page_index` or `image_index` is not a non-negative integer, or if they are out of range.
"""

if (not isinstance(page_index, int)) or (not isinstance(page_index, int)):
raise ValueError("page_index and image_index must be non-negative integers")
if page_index < 0 or page_index >= self.summary['n_page']:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pandas = "^2.0.0"
seaborn = "^0.13.2"

[tool.poetry.dev-dependencies]
sphinx = { version = "*", optional = false }
sphinx = { version = "7.4.7", optional = false }
myst-nb = { version = "*", optional = false }
sphinx-autoapi = { version = "*", optional = false }
sphinx_rtd_theme = { version = "*", optional = false }
Expand Down

0 comments on commit 8fc0d68

Please sign in to comment.