-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
4,344 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
xorbits_sql/_version.py export-subst |
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,26 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: "[BUG]" | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
### Describe the bug | ||
A clear and concise description of what the bug is. | ||
|
||
### To Reproduce | ||
To help us to reproduce this bug, please provide information below: | ||
|
||
1. Your Python version | ||
2. The version of Xorbits and SQLGlot you use | ||
3. Versions of crucial packages, such as numpy, scipy and pandas | ||
4. Full stack of the error. | ||
5. Minimized code to reproduce the error. | ||
|
||
### Expected behavior | ||
A clear and concise description of what you expected to happen. | ||
|
||
### Additional context | ||
Add any other context about the problem here. |
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,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
### Is your feature request related to a problem? Please describe | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
### Describe the solution you'd like | ||
A clear and concise description of what you want to happen. | ||
|
||
### Describe alternatives you've considered | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
### Additional context | ||
Add any other context or screenshots about the feature request here. |
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,12 @@ | ||
--- | ||
name: Other | ||
about: Submit other issues here. | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
Note that the issue tracker is NOT the place for general support. For | ||
discussions about development, questions about usage, or any general questions, | ||
contact us on https://discuss.xorbits.io/. |
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,17 @@ | ||
<!-- | ||
Thank you for your contribution! | ||
--> | ||
|
||
## What do these changes do? | ||
|
||
<!-- Please give a short brief about these changes. --> | ||
|
||
## Related issue number | ||
|
||
<!-- Are there any issues opened that will be resolved by merging this change? --> | ||
Fixes #xxxx | ||
|
||
## Check code requirements | ||
|
||
- [ ] tests added / passed (if needed) | ||
- [ ] Ensure all linting tests pass |
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,6 @@ | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
target: 90% | ||
threshold: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
pull_request_rules: | ||
- name: automatic update | ||
conditions: | ||
- -conflict # skip PRs with conflicts | ||
- -draft # filter-out GH draft PRs | ||
actions: | ||
update: | ||
- name: Automatic merge | ||
conditions: | ||
- "#approved-reviews-by>=2" | ||
- check-success=lint (ubuntu-latest, 3.10) | ||
- check-success=build_test_job (ubuntu-latest, 3.8, ray) | ||
- check-success=build_test_job (ubuntu-latest, 3.9, ray) | ||
- check-success=build_test_job (ubuntu-latest, 3.10, ray) | ||
- check-success=build_test_job (ubuntu-latest, 3.11, ray) | ||
- check-success=codecov/project | ||
- base=main | ||
actions: | ||
merge: | ||
method: squash |
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,19 @@ | ||
name: Assign | ||
on: | ||
issue_comment: | ||
types: created | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
issue_assign: | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- if: github.event.comment.body == 'take' | ||
run: | | ||
echo "Assigning issue ${{ github.event.issue.number }} to ${{ github.event.comment.user.login }}" | ||
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"assignees": ["${{ github.event.comment.user.login }}"]}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees |
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,75 @@ | ||
name: Build and upload to PyPI | ||
|
||
on: | ||
schedule: | ||
# trigger build every day at 4:30 UTC | ||
- cron: '30 4 * * *' | ||
push: | ||
tags: | ||
- '*' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build_wheel: | ||
name: Build wheel | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
|
||
- name: Build wheel | ||
run: python setup.py bdist_wheel --python-tag py3 | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./dist/*.whl | ||
|
||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
|
||
- name: Build sdist | ||
run: pipx run build --sdist | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
path: ./dist/*.tar.gz | ||
|
||
upload_pypi: | ||
needs: [build_wheel, build_sdist] | ||
runs-on: ubuntu-latest | ||
# upload to PyPI on every tag starting with 'v' | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
# unpacks default artifact into dist/ | ||
# if `name: artifact` is omitted, the action will create extra parent dir | ||
name: artifact | ||
path: dist | ||
|
||
# if is xprobe repo, upload to pypi | ||
- uses: pypa/[email protected] | ||
if: github.repository == 'xorbitsai/xorbits_sql' | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_PASSWORD }} | ||
|
||
# if is not xorbitsai repo, upload to test | ||
- uses: pypa/[email protected] | ||
if: github.repository != 'xorbitsai/xorbits_sql' | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.TEST_PYPI_PASSWORD }} | ||
verbose: true | ||
repository_url: https://test.pypi.org/legacy/ |
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,105 @@ | ||
name: Python CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
types: ['opened', 'reopened', 'synchronize'] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ "ubuntu-latest" ] | ||
python-version: [ "3.10" ] | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
- name: Set up Python environment | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: flake8 Lint | ||
uses: py-actions/flake8@v2 | ||
with: | ||
path: "xorbits_sql" | ||
args: "--config setup.cfg" | ||
- name: black | ||
uses: psf/black@stable | ||
with: | ||
src: "xorbits_sql" | ||
options: "--check" | ||
- uses: isort/isort-action@master | ||
with: | ||
sortPaths: "xorbits_sql" | ||
configuration: "--check-only --diff --sp setup.cfg" | ||
- name: mypy | ||
run: pip install mypy && mypy xorbits_sql | ||
- name: codespell | ||
run: pip install codespell && codespell xorbits_sql | ||
|
||
build_test_job: | ||
runs-on: ${{ matrix.os }} | ||
needs: lint | ||
env: | ||
CONDA_ENV: xorbits_sql-test | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
module: ["xorbits_sql"] | ||
exclude: | ||
- { os: macos-latest, python-version: 3.9 } | ||
- { os: macos-latest, python-version: 3.10 } | ||
- { os: windows-latest, python-version: 3.9 } | ||
- { os: windows-latest, python-version: 3.10 } | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
|
||
- name: Set up conda ${{ matrix.python-version }} | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
activate-environment: ${{ env.CONDA_ENV }} | ||
|
||
- name: Install dependencies | ||
env: | ||
MODULE: ${{ matrix.module }} | ||
run: | | ||
pip install cython coverage flaky | ||
pip install -e ".[dev]" | ||
working-directory: . | ||
|
||
- name: Test with pytest | ||
env: | ||
MODULE: ${{ matrix.module }} | ||
run: | | ||
pytest --cov-config=setup.cfg --cov-report=xml --cov=xorbits_sql --durations=0 \ | ||
--log-level=DEBUG --timeout=200 xorbits_sql | ||
working-directory: . | ||
|
||
- name: Report coverage data | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
working-directory: . | ||
flags: unittests |
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,32 @@ | ||
files: xorbits_sql | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.0.0 | ||
hooks: | ||
- id: flake8 | ||
args: [--config, setup.cfg] | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
args: [--sp, setup.cfg] | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.0.1 | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: [tokenize-rt==3.2.0] | ||
args: [--ignore-missing-imports, --follow-imports, skip] | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.2 | ||
hooks: | ||
- id: codespell | ||
args: [ --config, setup.cfg] |
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,22 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools<64", | ||
"wheel", | ||
"sqlglot>=17.16.0", | ||
"xorbits>=0.5.0" | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.black] | ||
include = '\.pyi?$' | ||
extend-exclude = ''' | ||
^/xorbits_sql/(_version.py) | ||
''' | ||
|
||
[tool.pytest.ini_options] | ||
asyncio_mode = "auto" | ||
|
||
[tool.cibuildwheel] | ||
build = ["cp38-*", "cp39-*", "cp310-*", "cp311-*"] | ||
skip = "pp* *musllinux* *i686 cp36* cp310-win32" | ||
manylinux-x86_64-image = "manylinux2014" |
Oops, something went wrong.