Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: Migrate from iceberg to iceberg-python #2

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/iceberg_bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Iceberg Bug report 🐞
description: Problems, bugs and issues with Apache PyIceberg
labels: ["kind:bug"]
body:
- type: dropdown
attributes:
label: PyIceberg version
description: What PyIceberg version are you using?
multiple: false
options:
- "0.1.0"
- "0.2.0"
- "0.3.0"
- "0.4.0"
- "0.5.0"
- "main (development)"
validations:
required: false
- type: textarea
attributes:
label: Please describe the bug 🐞
description: >
Please describe the problem, what to expect, and how to reproduce.
Feel free to include stacktraces and the Iceberg catalog configuration.
You can include files by dragging and dropping them here.
validations:
required: true
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/iceberg_improvement.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Iceberg Improvement / Feature Request
description: New features with Apache PyIceberg
labels: ["kind:feature request"]
body:
- type: textarea
attributes:
label: Feature Request / Improvement
description: Please describe the feature and elaborate on the use case and motivation behind it
validations:
required: true
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/iceberg_question.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Iceberg Question
description: Questions around Apache PyIceberg
labels: ["kind:question"]
body:
- type: markdown
attributes:
value: "Feel free to ask your question on [Slack](https://join.slack.com/t/apache-iceberg/shared_invite/zt-1znkcg5zm-7_FE~pcox347XwZE3GNfPg) as well."
- type: textarea
attributes:
label: Question
description: What is your question?
validations:
required: true
32 changes: 32 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

version: 2
updates:
- package-ecosystem: "pip"
directory: "/python/"
schedule:
interval: "weekly"
day: "sunday"
open-pull-requests-limit: 5
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "sunday"
56 changes: 56 additions & 0 deletions .github/workflows/python-ci-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

name: "Python Docs"
on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
docs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install
working-directory: ./mkdocs
run: pip install -r requirements.txt
- name: Build
working-directory: ./mkdocs
run: mkdocs build --strict
- name: Copy
working-directory: ./mkdocs
run: mv ./site /tmp/site
- name: Push changes to gh-pages branch
run: |
git checkout --orphan gh-pages-tmp
git rm --quiet -rf .
cp -r /tmp/site/* .
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
echo "py.iceberg.apache.org" > CNAME
git add --all
git commit -m 'Publish Python docs'
git push -f origin gh-pages-tmp:gh-pages || true
51 changes: 51 additions & 0 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

name: "Python CI"
on:
push:
branches:
- 'main'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
lint-and-test:
runs-on: ubuntu-22.04
strategy:
matrix:
python: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v4
- name: Install poetry
run: make install-poetry
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: poetry
cache-dependency-path: poetry.lock
- name: Install
run: make install-dependencies
- name: Linters
run: make lint
- name: Tests
run: make test-coverage
44 changes: 44 additions & 0 deletions .github/workflows/python-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

name: "Python Integration"
on:
push:
branches:
- 'main'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
integration-test:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Install
run: make install
- name: Run integration tests
run: make test-integration
- name: Show debug logs
if: ${{ failure() }}
run: docker-compose -f python/dev/docker-compose.yml logs
88 changes: 88 additions & 0 deletions .github/workflows/python-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

name: "Python Release"

on:
workflow_dispatch:
inputs:
version:
description: 'Version'
type: string
default: 'master'


jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-22.04, windows-2022, macos-11 ]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Install poetry
run: pip install poetry

- name: Set version
run: python -m poetry version "${{ inputs.version }}"
working-directory: ./python
if: "${{ github.event.inputs.version != 'master' }}"

# Publish the source distribution with the version that's in
# the repository, otherwise the tests will fail
- name: Compile source distribution
run: python3 -m poetry build --format=sdist
if: startsWith(matrix.os, 'ubuntu')
working-directory: ./python

- name: Build wheels
uses: pypa/[email protected]
with:
output-dir: wheelhouse
config-file: "pyproject.toml"
env:
# Ignore 32 bit architectures
CIBW_ARCHS: "auto64"
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8,<3.12"
CIBW_TEST_REQUIRES: "pytest==7.4.2 moto==4.2.2"
CIBW_TEST_EXTRAS: "s3fs,glue"
CIBW_TEST_COMMAND: "pytest -Werror {project}/tests/avro/test_decoder.py"
# There is an upstream issue with installing on MacOSX
# https://github.com/pypa/cibuildwheel/issues/1603
# Ignore tests for pypy since not all dependencies are compiled for it
# and would require a local rust build chain
CIBW_TEST_SKIP: "pp* *macosx*"

- name: Add source distribution
if: startsWith(matrix.os, 'ubuntu')
run: ls -lah dist/* && cp dist/* wheelhouse/

- uses: actions/upload-artifact@v3
with:
name: "release-${{ github.event.inputs.version }}"
path: ./wheelhouse/*
49 changes: 49 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#

name: "Close Stale Issues"
on:
schedule:
- cron: '0 0 * * *'

permissions:
# All other permissions are set to none
issues: write

jobs:
stale:
if: github.repository_owner == 'apache'
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
with:
stale-issue-label: 'stale'
exempt-issue-labels: 'not-stale'
days-before-issue-stale: 180
days-before-issue-close: 14
# Only close stale issues, leave PRs alone
days-before-pr-stale: -1
stale-issue-message: >
This issue has been automatically marked as stale because it has been open for 180 days
with no activity. It will be closed in next 14 days if no further activity occurs. To
permanently prevent this issue from being considered stale, add the label 'not-stale',
but commenting on the issue is preferred when possible.
close-issue-message: >
This issue has been closed because it has not received any activity in the last 14 days
since being marked as 'stale'
Loading