Skip to content

Commit

Permalink
fix: release 1.3.0 (#480)
Browse files Browse the repository at this point in the history
* fix: release 1.3.0

* Fix action

* Trying to fix.
  • Loading branch information
betodealmeida authored Oct 10, 2024
1 parent 72d770d commit 4a7613e
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 26 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/python-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.9]
python-version: ['3.9']

steps:
- uses: actions/checkout@v2
Expand All @@ -29,8 +29,8 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/test.txt
python -m pip install --upgrade pip setuptools
python -m pip install -r requirements/test.txt
- name: Start the Postgres service
run: |
docker compose -f postgres/docker-compose.yml up --build -d
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/python-package-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
env:
VERSION: 3.38.1
RELEASE: r1
run: |
python -m pip install --upgrade pip setuptools
python -m pip install -e '.[testing]'
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
env:
VERSION: 3.38.1
RELEASE: r1
run: |
python -m pip install --upgrade pip setuptools
python -m pip install -r requirements/test.txt
Expand Down
8 changes: 2 additions & 6 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@ Changelog
Next
====

Version 1.3.1 - 2024-10-08
==========================

- Add support for Python 3.12, drop support for 3.8 (#478)

Version 1.3.0 - 2024-09-26
Version 1.3.0 - 2024-10-08
==========================

- New Postgres backend based on multicorn2 (#397)
- Add support for Python 3.12, drop support for 3.8 (#478)

Version 1.2.28 - 2024-09-11
===========================
Expand Down
11 changes: 10 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,14 @@ And a command-line utility:
$ shillelagh
sql> SELECT * FROM a_table
There is also an `experimental backend <https://shillelagh.readthedocs.io/en/latest/postgres.html>`_ that uses Postgres with the `Multicorn2 <http://multicorn2.org/>`_ extension:
There is also an `experimental backend <https://shillelagh.readthedocs.io/en/latest/postgres.html>`_ that uses Postgres with the `Multicorn2 <http://multicorn2.org/>`_ extension. First, install the additional dependencies:

.. code-block:: bash
$ pip install 'shillelagh[multicorn]'
$ pip install 'multicorn @ git+https://github.com/pgsql-io/multicorn2.git@v2.5'
Then run:

.. code-block:: python
Expand All @@ -66,6 +73,8 @@ There is also an `experimental backend <https://shillelagh.readthedocs.io/en/lat
database="examples",
)
Or:

.. code-block:: python
from sqlalchemy import create_engine
Expand Down
2 changes: 1 addition & 1 deletion docs/postgres.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Postgres backend
================

Since version 1.3 Shillelagh ships with an experimental backend that uses Postgres instead of SQLite. The backend implements a custom [pyscopg2](https://pypi.org/project/psycopg2/) cursor that automatically registers a foreign data wrapper (FDW) whenever a supported table is accessed. It's based on the [multicorn2](http://multicorn2.org/) extension and Python package.
Since version 1.3.0 Shillelagh ships with an experimental backend that uses Postgres instead of SQLite. The backend implements a custom [pyscopg2](https://pypi.org/project/psycopg2/) cursor that automatically registers a foreign data wrapper (FDW) whenever a supported table is accessed. It's based on the [multicorn2](http://multicorn2.org/) extension and Python package.

To use the backend you need to:

Expand Down
9 changes: 4 additions & 5 deletions examples/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@
If you want to play with it Shillelagh has a `docker-compose.yml` file that will run
Postgres with the extension and the Python packages. Just run:
$ cd postgres/
$ docker compose up --build -d
$ docker compose -f postgres/docker-compose.yml up
Then you can run this script.
"""

from sqlalchemy import create_engine
from sqlalchemy import create_engine, text

# the backend uses psycopg2 under the hood, so any valid connection string for it will
# work; just replace the scheme with `shillelagh+multicorn2`
Expand All @@ -23,9 +22,9 @@
)
connection = engine.connect()

SQL = (
SQL = text(
'SELECT * FROM "https://docs.google.com/spreadsheets/d/'
'1LcWZMsdCl92g7nA-D6qGRqg1T5TiHyuKJUY1u9XAnsk/edit#gid=0"'
'1LcWZMsdCl92g7nA-D6qGRqg1T5TiHyuKJUY1u9XAnsk/edit#gid=0"',
)
for row in connection.execute(SQL):
print(row)
3 changes: 2 additions & 1 deletion postgres/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ RUN wget https://github.com/pgsql-io/multicorn2/archive/refs/tags/v2.5.tar.gz &&
# Create a virtual environment and install dependencies
RUN python3 -m venv /code/venv && \
/code/venv/bin/pip install --upgrade pip && \
/code/venv/bin/pip install -e '.[all]'
/code/venv/bin/pip install -e '.[all]' && \
/code/venv/bin/pip install 'multicorn @ git+https://github.com/pgsql-io/multicorn2.git@v2.5'

# Set environment variable for PostgreSQL to use the virtual environment
ENV PATH="/code/venv/bin:$PATH"
Expand Down
1 change: 1 addition & 0 deletions requirements/test.in
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
-e file:.[testing]
multicorn @ git+https://github.com/pgsql-io/multicorn2.git@v2.5
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ testing =
google-auth>=1.23.0
holidays>=0.23
html5lib>=1.1
multicorn @ git+https://github.com/pgsql-io/multicorn2.git@v2.5
# multicorn @ git+https://github.com/pgsql-io/multicorn2.git@v2.5
pandas>=1.2.2
pip-tools>=6.4.0
pre-commit>=2.13.0
Expand Down Expand Up @@ -113,7 +113,7 @@ all =
google-auth>=1.23.0
holidays>=0.23
html5lib>=1.1
multicorn @ git+https://github.com/pgsql-io/multicorn2.git@v2.5
# multicorn @ git+https://github.com/pgsql-io/multicorn2.git@v2.5
pandas>=1.2.2
prison>=0.2.1
prompt_toolkit>=3
Expand Down Expand Up @@ -158,7 +158,7 @@ htmltableapi =
html5lib>=1.1
pandas>=1.2.2
multicorn =
multicorn @ git+https://github.com/pgsql-io/multicorn2.git@v2.5
# multicorn @ git+https://github.com/pgsql-io/multicorn2.git@v2.5
psycopg2-binary>=2.9.9
pandasmemory =
pandas>=1.2.2
Expand Down

0 comments on commit 4a7613e

Please sign in to comment.