Skip to content

Commit

Permalink
Merge pull request #71 from ivelin/ci-tests
Browse files Browse the repository at this point in the history
Ci tests - python 3.10
  • Loading branch information
ivelin authored Dec 21, 2024
2 parents da2c043 + 999040a commit e5eea02
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
python-version: ["3.10"]

steps:
- uses: actions/checkout@v3
Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/canswim/forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
3 changes: 0 additions & 3 deletions tests/canswim/test_forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit e5eea02

Please sign in to comment.