Skip to content

Commit

Permalink
Merge pull request #127 from OpenSTEF/bugfix/KTPS-3358-fix-empty-params
Browse files Browse the repository at this point in the history
Update data_interface.py
  • Loading branch information
FrankKr committed Jan 4, 2024
2 parents 1e258e7 + 4a491df commit 2b68dff
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/python-upload-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
environment: release
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
# Checkout
- name: Checkout code
Expand All @@ -26,10 +30,8 @@ jobs:
python -m pip install --upgrade pip
pip install setuptools wheel twine
# Build and publish
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Build
run: python setup.py sdist bdist_wheel
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1

4 changes: 0 additions & 4 deletions openstef_dbc/data_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,6 @@ def check_influx_available(self):
return available

def exec_sql_query(self, query: str, params: dict = None, **kwargs):
if params is None:
params = {}
try:
return pd.read_sql(query, self.mysql_engine, params=params, **kwargs)
except sqlalchemy.exc.OperationalError as e:
Expand All @@ -239,8 +237,6 @@ def exec_sql_query(self, query: str, params: dict = None, **kwargs):
raise

def exec_sql_write(self, statement: str, params: dict = None) -> None:
if params is None:
params = {}
try:
with self.mysql_engine.connect() as connection:
response = connection.execute(statement, params=params)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def read_long_description_from_readme():

setup(
name="openstef_dbc",
version="3.6.19",
version="3.6.21",
packages=find_packages(include=["openstef_dbc", "openstef_dbc.*"]),
description="Database Connection for OpenSTEF",
long_description=read_long_description_from_readme(),
Expand Down

0 comments on commit 2b68dff

Please sign in to comment.