From 34da9b9a5841ec771c4646a4a650f5a861bff56f Mon Sep 17 00:00:00 2001 From: westonplatter Date: Sun, 13 Oct 2024 09:21:44 -0600 Subject: [PATCH] feat: remove unused libs (#9) * fix: remove unused libs in notebook --- .trunk/trunk.yaml | 4 ++++ example_downloads_for_es_gc_cl.ipynb | 26 +++----------------------- tests/utils/test_formatting_utils.py | 1 + 3 files changed, 8 insertions(+), 23 deletions(-) diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index ab5c66c..51a342e 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -33,6 +33,10 @@ lint: paths: - "*.ipynb" + - linters: [ALL] + paths: + - CHANGELOG.md + runtimes: enabled: - go@1.21.0 diff --git a/example_downloads_for_es_gc_cl.ipynb b/example_downloads_for_es_gc_cl.ipynb index 30eb51e..28d1ecb 100644 --- a/example_downloads_for_es_gc_cl.ipynb +++ b/example_downloads_for_es_gc_cl.ipynb @@ -17,36 +17,16 @@ "outputs": [], "source": [ "from datetime import datetime\n", - "from datetime import datetime, timedelta\n", - "from typing import Any, List\n", + "from typing import List\n", "\n", - "import numpy as np\n", "import pandas as pd\n", - "import pandera as pa\n", "import pytz\n", - "from ib_insync import (\n", - " IB,\n", - " Contract,\n", - " FuturesOption,\n", - " Index,\n", - " Ticker,\n", - " util,\n", - ")\n", - "from loguru import logger\n", - "from loman import ComputationFactory, input_node, calc_node\n", - "from tqdm import tqdm\n", + "from ib_insync import IB, util\n", "\n", - "from ib_insync_options.etl.ibkr_etl import map_ticker_to_exchange, MarketDataType\n", + "from ib_insync_options.etl.ibkr_etl import MarketDataType\n", "from ib_insync_options.utils.date_utils import calc_effective_date_of_dt\n", - "from ib_insync_options.utils.dict_utils import gen_json\n", - "from ib_insync_options.utils.formatting_utils import lower_camel_case_to_snake_case\n", - "from ib_insync_options.utils.list_utils import chunks\n", "from ib_insync_options.utils.networking import get_ibkr_host_ip\n", - "from ib_insync_options.etl.facets import FacetCoreDfColumns, CoreFacetSchema\n", "from ib_insync_options.etl.ibkr_etl import IbkrFutureOptionData, IbkrDownloader\n", - "\n", - "import pytz\n", - "from ib_insync_options.utils.date_utils import calc_effective_date_of_dt\n", "from ib_insync_options.etl.instrument_multiplexer import InstrumentMultiplexer" ] }, diff --git a/tests/utils/test_formatting_utils.py b/tests/utils/test_formatting_utils.py index 883c6d7..94f84ca 100644 --- a/tests/utils/test_formatting_utils.py +++ b/tests/utils/test_formatting_utils.py @@ -35,5 +35,6 @@ snake_case_columns, ) + def test_convert_to_snake_case(): assert convert_to_snake_case("HelloWorld") == "hello_world"