diff --git a/.env.example b/.env.example index 98849fa..108b508 100755 --- a/.env.example +++ b/.env.example @@ -8,4 +8,6 @@ DESTINATION__FILESYSTEM__BUCKET_URL = 's3://ternyx-test/gas_storage' DESTINATION__FILESYSTEM__CREDENTIALS__AWS_ACCESS_KEY_ID = 'XXX' DESTINATION__FILESYSTEM__CREDENTIALS__AWS_SECRET_ACCESS_KEY = 'XXX' DESTINATION__FILESYSTEM__CREDENTIALS__REGION_NAME = 'auto' -DESTINATION__FILESYSTEM__CREDENTIALS__ENDPOINT_URL = 'https://XXXXXX.r2.cloudflarestorage.com' \ No newline at end of file +DESTINATION__FILESYSTEM__CREDENTIALS__ENDPOINT_URL = 'https://XXXXXX.r2.cloudflarestorage.com' + +RUNTIME__SENTRY_DSN="https://@sentry.io/" \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index d4f8a34..327ff98 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [0.4.6] 2024-03-03 +### Added +- Release version for sentry.io + ## [0.4.5] 2024-03-02 ### Changed - Improve query parameters to identify dates for which data exists diff --git a/pyproject.toml b/pyproject.toml index 1c41cc0..89a120d 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,7 +18,7 @@ disallow_incomplete_defs = true [tool.poetry] name = "ternyxmimosa" -version = "0.4.5" +version = "0.4.6" description = "A minimal modern data stack with working data pipelines in a single Docker container." authors = ["Erik Oosterop "] license = "MIT" diff --git a/src/mimosa/pipelines.py b/src/mimosa/pipelines.py index 4993fb2..bc71363 100755 --- a/src/mimosa/pipelines.py +++ b/src/mimosa/pipelines.py @@ -3,9 +3,11 @@ For example a class that loads data from European Gas data REST API. """ +import importlib.metadata import os import dlt +import sentry_sdk from dlt.sources.helpers import requests from dotenv import find_dotenv, load_dotenv from loguru import logger @@ -14,6 +16,17 @@ _ = load_dotenv(find_dotenv()) +version = importlib.metadata.version("ternyxmimosa") +sentry_sdk.init( + # ... + # By default the SDK will try to use the SENTRY_RELEASE + # environment variable, or infer a git commit + # SHA as release, however you may want to set + # something more human-readable. + release="ternyxmimosa@v" + + version, +) + class GEI: """Defines data loading pipeline for GEI gas storage data. diff --git a/src/mimosa/wip_missing_dates.py b/src/mimosa/wip_missing_dates.py index 1103b64..6f7128b 100644 --- a/src/mimosa/wip_missing_dates.py +++ b/src/mimosa/wip_missing_dates.py @@ -15,7 +15,7 @@ reporting_update = False for seq in dwd.tuples_of_missing_dates( - start_dt=date(2018, 1, 1), end_dt=date(2019, 1, 2) + start_dt=date(2018, 1, 1), end_dt=date(2024, 3, 2) ): pipeline.run_landing_pipeline( gas_date=seq[0],