Skip to content

Commit b65e667

Browse files
authored
Merge pull request #25 from stackql/feature/refactor
v3.2.1
2 parents 34fb97c + 47fe13b commit b65e667

File tree

9 files changed

+15
-16
lines changed

9 files changed

+15
-16
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## v3.2.0 (2023-10-18)
3+
## v3.2.1 (2023-10-18)
44

55
* implemented non `server_mode` magic extension
66

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,4 +193,4 @@ To publish the package to PyPI, run the following command:
193193

194194
::
195195

196-
twine upload dist/pystackql-3.1.2.tar.gz
196+
twine upload dist/pystackql-3.2.1.tar.gz

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# The short X.Y version
2727
version = ''
2828
# The full version, including alpha/beta/rc tags
29-
release = '3.2.0'
29+
release = '3.2.1'
3030

3131

3232
# -- General configuration ---------------------------------------------------

docs/source/magic_ext.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ To enable the `StackqlMagic` extension in your Jupyter notebook, use the followi
1010

1111
.. code-block:: python
1212
13-
%load_ext stackql_magic
13+
%load_ext pystackql.magic
1414
1515
To use the `StackqlMagic` extension in your Jupyter notebook to run queries against a StackQL server, use the following command:
1616

1717
.. code-block:: python
1818
19-
%load_ext stackql_server_magic
19+
%load_ext pystackql.magics
2020
2121
Usage
2222
-----

pystackql/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from .stackql import StackQL
2-
from .stackql_magic import StackqlMagic, load_non_server_magic
3-
from .stackql_server_magic import StackqlServerMagic, load_server_magic
2+
from .magic import StackqlMagic
3+
from .magics import StackqlServerMagic
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# stackql_magic.py
1+
# `%load_ext pystackql.magic` - loads the stackql magic with server_mode=False
22
from IPython.core.magic import magics_class
33
from .base_stackql_magic import BaseStackqlMagic
44

@@ -7,6 +7,6 @@ class StackqlMagic(BaseStackqlMagic):
77
def __init__(self, shell):
88
super().__init__(shell, server_mode=False)
99

10-
def load_non_server_magic(ipython):
10+
def load_ipython_extension(ipython):
1111
"""Load the non-server magic in IPython."""
1212
ipython.register_magics(StackqlMagic)
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
# stackql_server_magic.py
1+
# `%load_ext pystackql.magics` - loads the stackql magic with server_mode=True
22
from IPython.core.magic import magics_class
33
from .base_stackql_magic import BaseStackqlMagic
44

55
@magics_class
66
class StackqlServerMagic(BaseStackqlMagic):
7-
87
def __init__(self, shell):
98
super().__init__(shell, server_mode=True)
109

11-
def load_server_magic(ipython):
10+
def load_ipython_extension(ipython):
1211
"""Load the extension in IPython."""
1312
ipython.register_magics(StackqlServerMagic)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setup(
1212
name='pystackql',
13-
version='3.2.0',
13+
version='3.2.1',
1414
description='A Python interface for StackQL',
1515
long_description=readme,
1616
author='Jeffrey Aven',

tests/pystackql_tests.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import sys, os, unittest, asyncio
22
from unittest.mock import MagicMock
33
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
4-
from pystackql import StackQL, load_non_server_magic, load_server_magic, StackqlMagic, StackqlServerMagic
4+
from pystackql import StackQL, magic, magics, StackqlMagic, StackqlServerMagic
55
from .test_params import *
66

77
def pystackql_test_setup(**kwargs):
@@ -282,9 +282,9 @@ def setUp(self):
282282
assert self.MAGIC_CLASS, "MAGIC_CLASS should be set by child classes"
283283
self.shell = MockInteractiveShell.instance()
284284
if self.server_mode:
285-
load_server_magic(self.shell)
285+
magics.load_ipython_extension(self.shell)
286286
else:
287-
load_non_server_magic(self.shell)
287+
magic.load_ipython_extension(self.shell)
288288
self.stackql_magic = self.MAGIC_CLASS(shell=self.shell)
289289
self.query = "SELECT 1 as fred"
290290
self.expected_result = pd.DataFrame({"fred": [1]})

0 commit comments

Comments
 (0)