Skip to content

Commit

Permalink
Package Updates (rtdip#698)
Browse files Browse the repository at this point in the history
Signed-off-by: GBBBAS <[email protected]>
  • Loading branch information
GBBBAS authored Mar 6, 2024
1 parent 601108d commit 0c1bf62
Show file tree
Hide file tree
Showing 16 changed files with 34 additions and 57 deletions.
8 changes: 4 additions & 4 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ dependencies:
- azure-mgmt-storage==21.0.0
- boto3==1.28.2
- pyodbc==4.0.39
- fastapi==0.103.2
- fastapi==0.110.0
- httpx==0.24.1
- pyspark>=3.3.0,<3.6.0
- delta-spark>=2.2.0,<3.1.0
- grpcio>=1.48.1
- grpcio-status>=1.48.1
- googleapis-common-protos>=1.56.4
- openjdk==11.0.15
- openai==0.27.8
- openai==1.13.3
- mkdocs-material==9.3.1
- mkdocstrings==0.22.0
- mkdocstrings-python==1.4.0
Expand All @@ -67,14 +67,14 @@ dependencies:
- ecmwf-api-client==1.6.3
- netCDF4==1.6.4
- black==24.1.0
- joblib==1.3.2
- pip:
- databricks-sdk==0.20.0
- dependency-injector==4.41.0
- azure-functions==1.15.0
- azure-mgmt-eventgrid==10.2.0
- nest_asyncio==1.6.0
- hvac==1.1.1
- langchain==0.0.291
- langchain==0.1.11
- build==0.10.0
- deltalake==0.10.1
- trio==0.22.1
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"grpcio>=1.48.1",
"grpcio-status>=1.48.1",
"googleapis-common-protos>=1.56.4",
"langchain==0.0.291",
"openai==0.27.8",
"langchain==0.1.11",
"openai==1.13.3",
"pydantic==2.4.2",
]

Expand Down
19 changes: 9 additions & 10 deletions src/api/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
# Do not include azure-functions-worker as it may conflict with the Azure Functions platform
azure-functions==1.15.0
fastapi==0.103.2
nest_asyncio==1.6.0
azure-functions==1.18.0
fastapi==0.110.0
pydantic==2.4.2
# turbodbc==4.11.0
pyodbc==4.0.39
importlib_metadata>=1.0.0
databricks-sql-connector==3.1.0
azure-identity==1.12.0
azure-identity==1.15.0
oauthlib>=3.2.2
pandas>=2.0.1,<3.0.0
numpy==1.23.5
numpy==1.26.4
jinja2==3.1.3
pytz==2022.6
semver==3.0.0
pytz==2024.1
semver==3.0.2
xlrd==2.0.1
packaging==23.1
packaging==23.2
grpcio>=1.48.1
grpcio-status>=1.48.1
googleapis-common-protos>=1.56.4
langchain==0.0.291
openai==0.27.8
langchain==0.1.11
openai==1.13.3
pyjwt==2.8.0
4 changes: 1 addition & 3 deletions src/api/v1/circular_average.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from typing import Union
from src.api.FastAPIApp import api_v1_router
from fastapi import HTTPException, Depends, Body
import nest_asyncio

from src.sdk.python.rtdip_sdk.queries.time_series import circular_average
from src.api.v1.models import (
BaseQueryParams,
Expand All @@ -34,8 +34,6 @@
)
from src.api.v1.common import common_api_setup_tasks, json_response

nest_asyncio.apply()


def circular_average_events_get(
base_query_parameters,
Expand Down
4 changes: 1 addition & 3 deletions src/api/v1/circular_standard_deviation.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import numpy as np
from src.api.FastAPIApp import api_v1_router
from fastapi import HTTPException, Depends, Body
import nest_asyncio

from src.sdk.python.rtdip_sdk.queries.time_series import circular_standard_deviation
from src.api.v1.models import (
BaseQueryParams,
Expand All @@ -35,8 +35,6 @@
)
from src.api.v1.common import common_api_setup_tasks, json_response

nest_asyncio.apply()


def circular_standard_deviation_events_get(
base_query_parameters,
Expand Down
4 changes: 1 addition & 3 deletions src/api/v1/interpolate.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from src.api.FastAPIApp import api_v1_router
from fastapi import HTTPException, Depends, Body
import nest_asyncio

from src.sdk.python.rtdip_sdk.queries.time_series import interpolate
from src.api.v1.models import (
BaseQueryParams,
Expand All @@ -35,8 +35,6 @@
)
from src.api.v1.common import common_api_setup_tasks, json_response

nest_asyncio.apply()


def interpolate_events_get(
base_query_parameters,
Expand Down
4 changes: 1 addition & 3 deletions src/api/v1/interpolation_at_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from typing import Union
from src.api.FastAPIApp import api_v1_router
from fastapi import HTTPException, Depends, Body
import nest_asyncio

from src.sdk.python.rtdip_sdk.queries.time_series import interpolation_at_time
from src.api.v1.models import (
BaseQueryParams,
Expand All @@ -32,8 +32,6 @@
)
from src.api.v1.common import common_api_setup_tasks, json_response

nest_asyncio.apply()


def interpolation_at_time_events_get(
base_query_parameters,
Expand Down
6 changes: 2 additions & 4 deletions src/api/v1/latest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@


import logging
from fastapi import Query, HTTPException, Depends, Body
import nest_asyncio
from fastapi import HTTPException, Depends, Body

from src.sdk.python.rtdip_sdk.queries.time_series import latest
from src.api.v1.models import (
BaseQueryParams,
Expand All @@ -30,8 +30,6 @@
from src.api.v1.common import common_api_setup_tasks, json_response
from src.api.FastAPIApp import api_v1_router

nest_asyncio.apply()


def latest_retrieval_get(
query_parameters, metadata_query_parameters, limit_offset_parameters, base_headers
Expand Down
6 changes: 2 additions & 4 deletions src/api/v1/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import logging
from fastapi import Query, HTTPException, Depends, Body
import nest_asyncio
from fastapi import HTTPException, Depends, Body

from src.sdk.python.rtdip_sdk.queries import metadata
from src.api.v1.models import (
BaseQueryParams,
Expand All @@ -28,8 +28,6 @@
from src.api.v1.common import common_api_setup_tasks, json_response
from src.api.FastAPIApp import api_v1_router

nest_asyncio.apply()


def metadata_retrieval_get(
query_parameters, metadata_query_parameters, limit_offset_parameters, base_headers
Expand Down
2 changes: 1 addition & 1 deletion src/api/v1/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class HTTPError(BaseModel):
detail: str

class Config:
schema_extra = (
json_schema_extra = (
{
"example": {"detail": "HTTPException raised."},
},
Expand Down
4 changes: 1 addition & 3 deletions src/api/v1/raw.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import logging
import numpy as np
from fastapi import HTTPException, Depends, Body
import nest_asyncio

from src.sdk.python.rtdip_sdk.queries.time_series import raw
from src.api.v1.models import (
BaseHeaders,
Expand All @@ -30,8 +30,6 @@
from src.api.v1.common import common_api_setup_tasks, json_response
from src.api.FastAPIApp import api_v1_router

nest_asyncio.apply()


def raw_events_get(
base_query_parameters,
Expand Down
4 changes: 1 addition & 3 deletions src/api/v1/resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from typing import Union
from src.api.FastAPIApp import api_v1_router
from fastapi import HTTPException, Depends, Body
import nest_asyncio

from src.sdk.python.rtdip_sdk.queries.time_series import resample
from src.api.v1.models import (
BaseQueryParams,
Expand All @@ -34,8 +34,6 @@
)
from src.api.v1.common import common_api_setup_tasks, json_response

nest_asyncio.apply()


def resample_events_get(
base_query_parameters,
Expand Down
4 changes: 1 addition & 3 deletions src/api/v1/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import logging
from fastapi import HTTPException, Depends, Body
import nest_asyncio

from src.sdk.python.rtdip_sdk.queries.sql.sql_query import SQLQueryBuilder
from src.api.v1.models import (
AuthQueryParams,
Expand All @@ -29,8 +29,6 @@
from src.api.v1.common import common_api_setup_tasks, json_response
from src.api.FastAPIApp import api_v1_router

nest_asyncio.apply()


def sql_get(
base_query_parameters,
Expand Down
3 changes: 0 additions & 3 deletions src/api/v1/summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

import logging
from fastapi import HTTPException, Depends, Body
import nest_asyncio
from src.sdk.python.rtdip_sdk.queries.time_series import summary
from src.api.v1.models import (
BaseHeaders,
Expand All @@ -31,8 +30,6 @@
from src.api.v1.common import common_api_setup_tasks, json_response
from src.api.FastAPIApp import api_v1_router

nest_asyncio.apply()


def summary_events_get(
base_query_parameters,
Expand Down
3 changes: 0 additions & 3 deletions src/api/v1/time_weighted_average.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from typing import Union
from src.api.FastAPIApp import api_v1_router
from fastapi import HTTPException, Depends, Body
import nest_asyncio
from src.sdk.python.rtdip_sdk.queries.time_series import time_weighted_average
from src.api.v1.models import (
BaseQueryParams,
Expand All @@ -33,8 +32,6 @@
)
from src.api.v1.common import common_api_setup_tasks, json_response

nest_asyncio.apply()


def time_weighted_average_events_get(
base_query_parameters,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from langchain.chat_models import ChatOpenAI
from langchain import SQLDatabase
from langchain.agents import create_sql_agent
from langchain.agents.agent_toolkits import SQLDatabaseToolkit
from langchain_community.chat_models import ChatOpenAI
from langchain_community.utilities.sql_database import SQLDatabase
from langchain_community.agent_toolkits import create_sql_agent
from langchain_community.agent_toolkits import SQLDatabaseToolkit
from langchain.agents.agent_types import AgentType
import logging

Expand Down Expand Up @@ -144,7 +144,9 @@ def execute(self, query: str) -> None:
logging.exception("error while executing the query")
raise e

def fetch_all(self) -> list:
def fetch_all(
self,
) -> list:
"""
Gets all rows of a query.
Expand Down

0 comments on commit 0c1bf62

Please sign in to comment.