Skip to content

Commit

Permalink
Python Wrapper: Documentation alignment (#7098)
Browse files Browse the repository at this point in the history
  • Loading branch information
N-o-Z authored Dec 1, 2023
1 parent 45adc44 commit 3e33178
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ python-wrapper-lint:
$(DOCKER) run --user $(UID_GID) --rm -v $(shell pwd):/mnt -e HOME=/tmp/ -w /mnt/clients/python-wrapper $(PYTHON_IMAGE) /bin/bash -c "./pylint.sh"

python-wrapper-gen-docs:
sphinx-build -b html clients/python-wrapper/docs clients/python-wrapper/_site/
sphinx-build -b html clients/python-wrapper/docs clients/python-wrapper/_site/$$(python clients/python-wrapper/setup.py --version)
sphinx-build -b html -W clients/python-wrapper/docs clients/python-wrapper/_site/
sphinx-build -b html -W clients/python-wrapper/docs clients/python-wrapper/_site/$$(python clients/python-wrapper/setup.py --version)

$(UI_DIR)/node_modules:
cd $(UI_DIR) && $(NPM) install
Expand Down
6 changes: 3 additions & 3 deletions clients/python-wrapper/docs/lakefs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ Submodules
:maxdepth: 4

lakefs.branch
lakefs.branch_manager
lakefs.client
lakefs.config
lakefs.exceptions
lakefs.import_manager
lakefs.models
lakefs.namedtuple
lakefs.object
lakefs.object_io
lakefs.object_manager
lakefs.reference
lakefs.repository
lakefs.tag
lakefs.tag_manager

Module contents
---------------
Expand Down
1 change: 1 addition & 0 deletions clients/python-wrapper/lakefs/branch.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Module containing lakeFS branch implementation
"""

from __future__ import annotations

from typing import Optional, Generator, Iterable, Literal
Expand Down
10 changes: 5 additions & 5 deletions clients/python-wrapper/lakefs/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def seek(self, offset: int, whence: int = 0) -> int:
other values are os.SEEK_CUR or 1 (seek relative to the current position) and os.SEEK_END or 2
(seek relative to the file’s end)
os.SEEK_END is not supported
:raises OSError if calculated new position is negative
:raises: OSError if calculated new position is negative
"""
if whence == os.SEEK_SET:
pos = offset
Expand All @@ -255,9 +255,9 @@ def read(self, n: int = None) -> str | bytes:
Read object data
:param n: How many bytes to read. If read_bytes is None, will read from current position to end.
If current position + read_bytes > object size.
If current position + read_bytes > object size.
:return: The bytes read
:raises
:raises:
EOFError if current position is after object size
OSError if read_bytes is non-positive
ObjectNotFoundException if repo id, reference id or object path does not exist
Expand Down Expand Up @@ -626,11 +626,11 @@ def upload(self,
'w' - Create a new object or truncate if exists
'wb' - Create or truncate in binary mode
:param pre_sign: (Optional) Explicitly state whether to use pre_sign mode when uploading the object.
If None, will be taken from pre_sign property.
If None, will be taken from pre_sign property.
:param content_type: (Optional) Explicitly set the object Content-Type
:param metadata: (Optional) User metadata
:return: The Stat object representing the newly created object
:raises
:raises:
ObjectExistsException if object exists and mode is exclusive ('x')
ObjectNotFoundException if repo id, reference id or object path does not exist
PermissionException if user is not authorized to perform this operation, or operation is forbidden
Expand Down
2 changes: 1 addition & 1 deletion clients/python-wrapper/setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages

NAME = "lakefs"
VERSION = "0.1.0-beta.1"
VERSION = "0.1.0-beta.2"
# To install the library, run the following
#
# python setup.py install
Expand Down

0 comments on commit 3e33178

Please sign in to comment.