diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 96424ef..d4d0460 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.11"] + python-version: ["3.10"] steps: - uses: actions/checkout@v3 diff --git a/setup.cfg b/setup.cfg index 85426a8..fd08955 100644 --- a/setup.cfg +++ b/setup.cfg @@ -22,7 +22,8 @@ package_dir= packages = find: python_requires = >=3.10 install_requires = - darts==0.27.2 + u8darts[torch]==0.27.2 + numpy<2 yfinance[nospam] pandas_market_calendars fmpsdk diff --git a/src/canswim/forecast.py b/src/canswim/forecast.py index 2c59098..6da8ec5 100644 --- a/src/canswim/forecast.py +++ b/src/canswim/forecast.py @@ -244,7 +244,7 @@ def get_next_open_market_day(): today = datetime.now().date() # Look for the next valid trading day within a reasonably big window of 30 days - valid_days = nyse.valid_days(start_date=today, end_date=today + timedelta(days=30)) + valid_days = nyse.valid_days(start_date=today, end_date=today + timedelta(days=30), tz=None) next_trading_day = None @@ -265,7 +265,7 @@ def main(forecast_start_date: str = None): logger.info("Running forecast on stocks and uploading results to HF Hub...") if forecast_start_date is not None: logger.info(f"forecast_start_date: {forecast_start_date}") - forecast_start_date = pd.Timestamp(forecast_start_date) + forecast_start_date = pd.Timestamp(forecast_start_date, tz=None) else: # get next open stock market date # Example usage diff --git a/tests/canswim/test_forecast.py b/tests/canswim/test_forecast.py index a8fa314..7c794cc 100644 --- a/tests/canswim/test_forecast.py +++ b/tests/canswim/test_forecast.py @@ -15,6 +15,3 @@ def test_get_next_open_market_day(): assert isinstance(next_day, pd.Timestamp) assert next_day.dayofweek < 5 # Not weekend -def test_forecaster_initialization(forecaster): - """Test that CanswimForecaster initializes correctly""" - assert isinstance(forecaster, CanswimForecaster)