Skip to content

Commit

Permalink
Merge pull request #10 from EJOOSTEROP:feat_release_for_sentry
Browse files Browse the repository at this point in the history
Sentry add realease
  • Loading branch information
EJOOSTEROP authored Mar 5, 2024
2 parents f0a60f9 + 9bf4f4a commit 33838d1
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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'
DESTINATION__FILESYSTEM__CREDENTIALS__ENDPOINT_URL = 'https://XXXXXX.r2.cloudflarestorage.com'

RUNTIME__SENTRY_DSN="https://<YOUR-KEY>@sentry.io/<YOUR-KEY>"
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
<!-- insertion marker -->
## [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
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>"]
license = "MIT"
Expand Down
13 changes: 13 additions & 0 deletions src/mimosa/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/mimosa/wip_missing_dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down

0 comments on commit 33838d1

Please sign in to comment.