Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ci tests - python 3.10 #71

Merged
merged 8 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Loading