Skip to content

Commit

Permalink
enable logging in GH actions, more Python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-oleary committed Aug 12, 2024
1 parent 7e3f996 commit 56a8d75
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/fetch_data.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Fetch Data

on: [push]
on:
push:
branches:
- main
schedule:
# every night at 01:30 UTC
- cron: "30 1 * * *"

jobs:
get_data:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion src/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from src.logs import Logs

if __name__ == '__main__':
Logs().log_to_stderr().log_to_file(
Logs(enable=True).log_to_stderr().log_to_file(
sink='logs/irish_weather.log',
level='DEBUG',
backtrace=True,
Expand Down
4 changes: 2 additions & 2 deletions src/fetch_weather_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(
data_formats: list[str] | None = None,
max_rows: int = MAX_ROWS,
min_date: str = MIN_DATE,
overwrite_files: bool = False,
overwrite_files: bool = True,
sleep_delay: int = SLEEP_DELAY,
station_url: str = STATION_DATA_URL,
enable_logging: bool = True,
Expand Down Expand Up @@ -66,7 +66,7 @@ def __init__(
if enable_logging:
Logs(enable=enable_logging).log_to_stderr()

self.df_all_stations = None
self.df_all_stations = pd.DataFrame()
self.first_warning = True

def fetch_data(self):
Expand Down

0 comments on commit 56a8d75

Please sign in to comment.