-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate project to pyproject.toml based package setup
Fixes #128 Fixes #135 * Add pyproject.toml * Add poetry lock file * Add dependencies to pyproject.toml * Add dependabot updater to repository * Add pyupgrade commit hook to workspace * Remove deprecated and unused configuration entries * Add extension points required for sqlalchemy plugin(s) * Add version sync support for project.toml based version * Add version check to ci/verifier action * Update CI workflow to use poetry * Update base python version to 3.8 * Update changelog * Remove condaforge reference in README - Conda forge won't be maintained anymore. * Deleted deprecated and unused files * Use python built in mock library * Bump version to 3.0.0
- Loading branch information
Showing
29 changed files
with
1,112 additions
and
995 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: 2 | ||
updates: | ||
|
||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
day: "monday" | ||
open-pull-requests-limit: 5 | ||
|
||
# Maintain dependencies for poetry | ||
- package-ecosystem: "pip" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
open-pull-requests-limit: 5 |
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 |
---|---|---|
|
@@ -13,10 +13,18 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
python: [3.7, 3.8, 3.9] | ||
python: | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
connector: | ||
- pyodbc | ||
- turbodbc | ||
# TODO: Reenable once the issue(s) below have been fixed. | ||
# Turbodbc can't be supported using poetry until: | ||
# - https://github.com/blue-yonder/turbodbc/issues/358 | ||
# - https://github.com/exasol/sqlalchemy-exasol/issues/146 | ||
# are fixed. | ||
# - turbodbc | ||
exasol_version: | ||
- 7.1.6 | ||
- 7.0.16 | ||
|
@@ -31,26 +39,24 @@ jobs: | |
- name: Setup integration-test-docker-environment | ||
uses: actions/setup-python@v2 | ||
|
||
- name: Install via apt | ||
run: sudo apt-get install unixodbc unixodbc-dev libboost-date-time-dev libboost-locale-dev libboost-system-dev | ||
|
||
- name: Setup Python ${{ matrix.python }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install via apt | ||
run: sudo apt-get install unixodbc unixodbc-dev libboost-date-time-dev libboost-locale-dev libboost-system-dev | ||
|
||
- name: Install pipenv | ||
uses: dschep/install-pipenv-action@v1 | ||
|
||
- name: Pip install test requirements | ||
uses: BSFishy/pip-action@v1 | ||
- name: Install poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
requirements: requirements_dev.txt | ||
poetry-version: 1.1.13 | ||
|
||
- name: Pip install extra requirements | ||
uses: BSFishy/pip-action@v1 | ||
with: | ||
requirements: requirements_extras.txt | ||
- name: Install python project dependencies | ||
run: poetry install | ||
|
||
- name: Install python project dependencies including trubodbc | ||
run: poetry install --extras "turbodbc" | ||
if: ${{ matrix.connector == 'turbodbc' }} | ||
|
||
- name: Checkout test environment | ||
|
@@ -60,23 +66,18 @@ jobs: | |
ITDE_URL: "https://github.com/exasol/integration-test-docker-environment.git" | ||
ITDE_TAG: "0.10.0" | ||
|
||
- name: Check documentation links ${{ matrix.python }} using ${{ matrix.connector }} | ||
run: nox -s "check-links" | ||
|
||
- name: Run Test for Python ${{ matrix.python }} using ${{ matrix.connector }} | ||
run: nox -s "verify(connector='${{ matrix.connector }}')" | ||
run: poetry run nox -s "verify(connector='${{ matrix.connector }}')" | ||
|
||
upload_to_pypi: | ||
runs-on: ubuntu-latest | ||
needs: run_tests | ||
if: startsWith(github.event.ref, 'refs/tags') | ||
strategy: | ||
matrix: | ||
python: [3.7] | ||
connector: | ||
- pyodbc | ||
python: [3.8] | ||
|
||
name: Upload to PyPI (Python-${{ matrix.python }}, Connector-${{ matrix.connector }}) | ||
name: Build & Upload Package [PYPI] | ||
|
||
steps: | ||
|
||
|
@@ -91,17 +92,13 @@ jobs: | |
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install pipenv | ||
uses: dschep/install-pipenv-action@v1 | ||
|
||
- name: Install Wheel | ||
run: pip install wheel | ||
|
||
- name: Build sdist and wheel packages | ||
run: python setup.py sdist bdist_wheel | ||
|
||
- name: Push package to Pypi | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
- name: Install poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_token }} | ||
poetry-version: 1.1.13 | ||
|
||
- name: Build and push package to PYPI | ||
env: | ||
POETRY_HTTP_BASIC_TEST_USERNAME: "__token__" | ||
POETRY_HTTP_BASIC_TEST_PASSWORD: "${{ secrets.pypi_token }}" | ||
run: poetry run nox -s 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,18 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
python: [3.7, 3.8, 3.9] | ||
python: | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
connector: | ||
- pyodbc | ||
- turbodbc | ||
# TODO: Reenable once the issue(s) below have been fixed. | ||
# Turbodbc can't be supported using poetry until: | ||
# - https://github.com/blue-yonder/turbodbc/issues/358 | ||
# - https://github.com/exasol/sqlalchemy-exasol/issues/146 | ||
# are fixed. | ||
# - turbodbc | ||
exasol_version: | ||
- 7.1.6 | ||
- 7.0.16 | ||
|
@@ -32,29 +40,24 @@ jobs: | |
- name: Fetch sqlalchemy_exasol code from repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup integration-test-docker-environment | ||
uses: actions/setup-python@v2 | ||
- name: Install via apt | ||
run: sudo apt-get install unixodbc unixodbc-dev libboost-date-time-dev libboost-locale-dev libboost-system-dev | ||
|
||
- name: Setup Python ${{ matrix.python }} | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install via apt | ||
run: sudo apt-get install unixodbc unixodbc-dev libboost-date-time-dev libboost-locale-dev libboost-system-dev | ||
|
||
- name: Install pipenv | ||
uses: dschep/install-pipenv-action@v1 | ||
|
||
- name: Pip install requirements | ||
uses: BSFishy/pip-action@v1 | ||
- name: Install poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
requirements: requirements_dev.txt | ||
poetry-version: 1.1.13 | ||
|
||
- name: Pip install extra requirements | ||
uses: BSFishy/pip-action@v1 | ||
with: | ||
requirements: requirements_extras.txt | ||
- name: Install python project dependencies | ||
run: poetry install | ||
|
||
- name: Install python project dependencies including trubodbc | ||
run: poetry install --extras "turbodbc" | ||
if: ${{ matrix.connector == 'turbodbc' }} | ||
|
||
- name: Checkout test environment | ||
|
@@ -64,22 +67,17 @@ jobs: | |
ITDE_URL: "https://github.com/exasol/integration-test-docker-environment.git" | ||
ITDE_TAG: "0.10.0" | ||
|
||
- name: Check documentation links ${{ matrix.python }} using ${{ matrix.connector }} | ||
run: nox -s "check-links" | ||
|
||
- name: Run Test for Python ${{ matrix.python }} using ${{ matrix.connector }} | ||
run: nox -s "verify(connector='${{ matrix.connector }}')" | ||
run: poetry run nox -s "verify(connector='${{ matrix.connector }}')" | ||
|
||
build_package: | ||
runs-on: ubuntu-latest | ||
needs: run_tests | ||
strategy: | ||
matrix: | ||
python: [3.7] | ||
connector: | ||
- pyodbc | ||
python: [3.8] | ||
|
||
name: Build Package (Python-${{ matrix.python }}, Connector-${{ matrix.connector }}) | ||
name: Build Package | ||
|
||
steps: | ||
|
||
|
@@ -90,15 +88,14 @@ jobs: | |
run: git fetch origin +refs/tags/*:refs/tags/* | ||
|
||
- name: Setup Python ${{ matrix.python }} | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install pipenv | ||
uses: dschep/install-pipenv-action@v1 | ||
|
||
- name: Install Wheel | ||
run: pip install wheel | ||
- name: Install poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.1.13 | ||
|
||
- name: Build sdist and wheel packages | ||
run: python setup.py sdist bdist_wheel | ||
run: poetry build |
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,40 @@ | ||
name: Check Links | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- 'master' | ||
pull_request: | ||
branches-ignore: | ||
- 'master' | ||
|
||
jobs: | ||
run_tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python: [3.8] | ||
|
||
name: Check Links (Python-${{ matrix.python }}) | ||
|
||
steps: | ||
|
||
- name: Fetch sqlalchemy_exasol code from repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Python ${{ matrix.python }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install poetry | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.1.13 | ||
|
||
- name: Install python project dependencies | ||
run: poetry install --no-root | ||
|
||
- name: Check documentation links ${{ matrix.python }} using ${{ matrix.connector }} | ||
run: poetry run nox -s "check-links" |
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,17 @@ | ||
default_stages: [commit] | ||
repos: | ||
- repo: local | ||
hooks: | ||
|
||
- id: version-check | ||
name: Check if version(s) are in sync | ||
always_run: true | ||
language: system | ||
entry: python scripts/version_check.py --fix sqlalchemy_exasol/version.py | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.34.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: ['--py38-plus'] | ||
types: [python] |
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 was deleted.
Oops, something went wrong.
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,7 @@ | ||
FINAL TASKS: | ||
------------ | ||
* ATTENTION: Update turbodbc driver to latest including installation fix! | ||
* make sure automated publish via GH action still works with poetry | ||
* CLOSE: https://github.com/exasol/sqlalchemy-exasol/issues/135 | ||
* CLOSE: https://github.com/exasol/sqlalchemy-exasol/issues/146 | ||
* CLOSE: https://github.com/exasol/sqlalchemy-exasol/issues/128 |
Oops, something went wrong.