-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into task/modify-lakefs-…
…python-docs-7120 # Conflicts: # clients/python-wrapper/setup.py
- Loading branch information
Showing
21 changed files
with
3,722 additions
and
7,147 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,22 +10,11 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Python Build and Make Package | ||
run: make package-python-wrapper | ||
|
||
- name: Publish Distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
packages-dir: clients/python-wrapper/dist/ | ||
verbose: true | ||
|
||
- name: Extract docs version | ||
working-directory: ./clients/python-wrapper/ | ||
shell: bash | ||
run: | | ||
echo "tag=$(python setup.py --version)" >> $GITHUB_OUTPUT | ||
echo "tag=$(python setup.py --version)" >> $GITHUB_OUTPUT | ||
id: docver | ||
|
||
- name: Set up Python 3.9 | ||
|
@@ -34,7 +23,7 @@ jobs: | |
python-version: '3.9' | ||
cache: 'pip' | ||
cache-dependency-path: 'clients/python-wrapper/requirements.txt' | ||
|
||
- name: Generate and Build Documentation | ||
run: | | ||
pip install -r clients/python-wrapper/requirements.txt | ||
|
@@ -50,3 +39,15 @@ jobs: | |
destination_folder: / | ||
user_email: '[email protected]' | ||
user_name: 'python-docs-action' | ||
|
||
- name: Python Build and Make Package | ||
run: make package-python-wrapper | ||
|
||
- name: Publish Distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
packages-dir: clients/python-wrapper/dist/ | ||
verbose: true | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Changelog | ||
|
||
## v0.1.0 | ||
What's new: | ||
- First official release! |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -306,3 +306,26 @@ def test_readline_partial_line_buffer(setup_repo): | |
assert read == expected | ||
|
||
assert reader.read() == "" | ||
|
||
|
||
def test_write_read_csv(setup_repo): | ||
_, repo = setup_repo | ||
columns = ["ID", "Name", "Email"] | ||
sample_data = [ | ||
['1', "Alice", "[email protected]"], | ||
['2', "Bob", "[email protected]"], | ||
['3', "Carol", "[email protected]"], | ||
] | ||
obj = repo.branch("main").object(path="csv/sample_data.csv") | ||
|
||
with obj.writer(mode='w', pre_sign=False, content_type="text/csv") as fd: | ||
writer = csv.writer(fd) | ||
writer.writerow(columns) | ||
for row in sample_data: | ||
writer.writerow(row) | ||
|
||
for i, row in enumerate(csv.reader(obj.reader(mode='r'))): | ||
if i == 0: | ||
assert row == columns | ||
else: | ||
assert row == sample_data[i - 1] |
This file contains 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
Oops, something went wrong.