datamarket 0.8.0__tar.gz → 0.8.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of datamarket might be problematic. Click here for more details.
- {datamarket-0.8.0 → datamarket-0.8.1}/PKG-INFO +1 -1
- {datamarket-0.8.0 → datamarket-0.8.1}/pyproject.toml +1 -1
- {datamarket-0.8.0 → datamarket-0.8.1}/src/datamarket/utils/main.py +13 -4
- {datamarket-0.8.0 → datamarket-0.8.1}/LICENSE +0 -0
- {datamarket-0.8.0 → datamarket-0.8.1}/README.md +0 -0
- {datamarket-0.8.0 → datamarket-0.8.1}/src/datamarket/__init__.py +0 -0
- {datamarket-0.8.0 → datamarket-0.8.1}/src/datamarket/interfaces/__init__.py +0 -0
- {datamarket-0.8.0 → datamarket-0.8.1}/src/datamarket/interfaces/alchemy.py +0 -0
- {datamarket-0.8.0 → datamarket-0.8.1}/src/datamarket/interfaces/aws.py +0 -0
- {datamarket-0.8.0 → datamarket-0.8.1}/src/datamarket/interfaces/drive.py +0 -0
- {datamarket-0.8.0 → datamarket-0.8.1}/src/datamarket/interfaces/ftp.py +0 -0
- {datamarket-0.8.0 → datamarket-0.8.1}/src/datamarket/interfaces/nominatim.py +0 -0
- {datamarket-0.8.0 → datamarket-0.8.1}/src/datamarket/interfaces/peerdb.py +0 -0
- {datamarket-0.8.0 → datamarket-0.8.1}/src/datamarket/interfaces/proxy.py +0 -0
- {datamarket-0.8.0 → datamarket-0.8.1}/src/datamarket/interfaces/tinybird.py +0 -0
- {datamarket-0.8.0 → datamarket-0.8.1}/src/datamarket/params/__init__.py +0 -0
- {datamarket-0.8.0 → datamarket-0.8.1}/src/datamarket/params/nominatim.py +0 -0
- {datamarket-0.8.0 → datamarket-0.8.1}/src/datamarket/utils/__init__.py +0 -0
- {datamarket-0.8.0 → datamarket-0.8.1}/src/datamarket/utils/airflow.py +0 -0
- {datamarket-0.8.0 → datamarket-0.8.1}/src/datamarket/utils/alchemy.py +0 -0
- {datamarket-0.8.0 → datamarket-0.8.1}/src/datamarket/utils/selenium.py +0 -0
- {datamarket-0.8.0 → datamarket-0.8.1}/src/datamarket/utils/soda.py +0 -0
- {datamarket-0.8.0 → datamarket-0.8.1}/src/datamarket/utils/typer.py +0 -0
|
@@ -25,7 +25,7 @@ logger = logging.getLogger(__name__)
|
|
|
25
25
|
|
|
26
26
|
def get_granular_date(
|
|
27
27
|
granularity: Union[Literal["monthly", "biweekly", "weekly", "daily"], str], tz: str = "Europe/Madrid"
|
|
28
|
-
) ->
|
|
28
|
+
) -> pendulum.DateTime:
|
|
29
29
|
"""
|
|
30
30
|
Returns the most recent date based on the given granularity or a custom cron expression.
|
|
31
31
|
|
|
@@ -52,7 +52,7 @@ def get_granular_date(
|
|
|
52
52
|
|
|
53
53
|
try:
|
|
54
54
|
cron = croniter(cron_pattern, now)
|
|
55
|
-
return cron.get_prev(pendulum.DateTime)
|
|
55
|
+
return cron.get_prev(pendulum.DateTime)
|
|
56
56
|
except Exception as e:
|
|
57
57
|
raise ValueError("Invalid cron expression or granularity specified.") from e
|
|
58
58
|
|
|
@@ -70,12 +70,21 @@ def get_config(config_file: Path, tz: str = "Europe/Madrid"):
|
|
|
70
70
|
|
|
71
71
|
add_converter("read", read_converter)
|
|
72
72
|
|
|
73
|
+
today = get_granular_date("daily", tz)
|
|
74
|
+
|
|
73
75
|
config = Dynaconf(
|
|
74
76
|
environments=True,
|
|
75
77
|
env_switcher="SYSTYPE",
|
|
76
78
|
vars={
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
+
"now": today.strftime("%Y-%m-%d %H:%M:%S"),
|
|
80
|
+
"today": today.strftime("%Y-%m-%d"),
|
|
81
|
+
"year": today.strftime("%Y"),
|
|
82
|
+
"month": today.strftime("%m"),
|
|
83
|
+
"day": today.strftime("%d"),
|
|
84
|
+
"biweekly_date": get_granular_date("biweekly", tz).strftime("%Y-%m-%d"),
|
|
85
|
+
"today_stripped": today.strftime("%Y%m%d"),
|
|
86
|
+
"now_stripped": today.strftime("%Y%m%d%H%M%S"),
|
|
87
|
+
"dynaconf_merge": True,
|
|
79
88
|
},
|
|
80
89
|
)
|
|
81
90
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|