Skip to content

Commit e5eea02

Browse files
authored
Merge pull request #71 from ivelin/ci-tests
Ci tests - python 3.10
2 parents da2c043 + 999040a commit e5eea02

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: ["3.11"]
14+
python-version: ["3.10"]
1515

1616
steps:
1717
- uses: actions/checkout@v3

setup.cfg

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ package_dir=
2222
packages = find:
2323
python_requires = >=3.10
2424
install_requires =
25-
darts==0.27.2
25+
u8darts[torch]==0.27.2
26+
numpy<2
2627
yfinance[nospam]
2728
pandas_market_calendars
2829
fmpsdk

src/canswim/forecast.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def get_next_open_market_day():
244244
today = datetime.now().date()
245245

246246
# Look for the next valid trading day within a reasonably big window of 30 days
247-
valid_days = nyse.valid_days(start_date=today, end_date=today + timedelta(days=30))
247+
valid_days = nyse.valid_days(start_date=today, end_date=today + timedelta(days=30), tz=None)
248248

249249
next_trading_day = None
250250

@@ -265,7 +265,7 @@ def main(forecast_start_date: str = None):
265265
logger.info("Running forecast on stocks and uploading results to HF Hub...")
266266
if forecast_start_date is not None:
267267
logger.info(f"forecast_start_date: {forecast_start_date}")
268-
forecast_start_date = pd.Timestamp(forecast_start_date)
268+
forecast_start_date = pd.Timestamp(forecast_start_date, tz=None)
269269
else:
270270
# get next open stock market date
271271
# Example usage

tests/canswim/test_forecast.py

-3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,3 @@ def test_get_next_open_market_day():
1515
assert isinstance(next_day, pd.Timestamp)
1616
assert next_day.dayofweek < 5 # Not weekend
1717

18-
def test_forecaster_initialization(forecaster):
19-
"""Test that CanswimForecaster initializes correctly"""
20-
assert isinstance(forecaster, CanswimForecaster)

0 commit comments

Comments
 (0)