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

Build rm pendulum dep #2183

Merged
merged 15 commits into from
Nov 15, 2024
316 changes: 132 additions & 184 deletions pdm.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ dependencies = [
"gspread>=5.12.0",
"ldap3>=2.9.1",
"oracledb>=1.4.2",
"pendulum>=3.0.0",
"py-avro-schema>=3.4.1",
"pycryptodome>=3.19.0",
"pypdf>=5.0.0",
"python-dateutil>=2.9.0.post0",
"scikit-learn>=1.4.0",
"tableauserverclient>=0.25",
"tenacity>=8.2.3",
"pypdf>=5.0.0",
]
requires-python = ">=3.12,<3.13"
license = { text = "GPL-3.0-or-later" }
Expand Down
48 changes: 23 additions & 25 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@ certifi==2024.8.30
cffi==1.17.1
charset-normalizer==3.4.0
click==8.1.7
cmake==3.30.5
cmake==3.31.0.1
colorama==0.4.6
coloredlogs==14.0
cramjam==2.9.0
croniter==3.0.4
cryptography==43.0.3
daff==1.3.46
dagster==1.9.1
dagster-airbyte==0.25.1
dagster-cloud==1.9.1
dagster-cloud-cli==1.9.1
dagster-dbt==0.25.1
dagster-fivetran==0.25.1
dagster-gcp==0.25.1
dagster-k8s==0.25.1
dagster-pandas==0.25.1
dagster-pipes==1.9.1
dagster-slack==0.25.1
dagster-ssh==0.25.1
db-dtypes==1.3.0
dagster==1.9.2
dagster-airbyte==0.25.2
dagster-cloud==1.9.2
dagster-cloud-cli==1.9.2
dagster-dbt==0.25.2
dagster-fivetran==0.25.2
dagster-gcp==0.25.2
dagster-k8s==0.25.2
dagster-pandas==0.25.2
dagster-pipes==1.9.2
dagster-slack==0.25.2
dagster-ssh==0.25.2
db-dtypes==1.3.1
dbt-adapters==1.7.0
dbt-bigquery==1.8.3
dbt-common==1.10.0
Expand All @@ -48,18 +48,18 @@ fastavro==1.9.7
filelock==3.16.1
fsspec==2024.10.0; python_version >= "3.12"
github3-py==4.0.1
google-api-core[grpc]==2.22.0
google-api-python-client==2.151.0
google-api-core[grpc]==2.23.0
google-api-python-client==2.153.0
google-auth==2.36.0
google-auth-httplib2==0.2.0
google-auth-oauthlib==1.2.1
google-cloud-bigquery[pandas]==3.26.0
google-cloud-bigquery[pandas]==3.27.0
google-cloud-core==2.4.1
google-cloud-dataproc==5.15.1
google-cloud-storage==2.18.2
google-crc32c==1.6.0
google-resumable-media==2.7.2
googleapis-common-protos[grpc]==1.65.0
googleapis-common-protos[grpc]==1.66.0
greenlet==3.1.1; (platform_machine == "win32" or platform_machine == "WIN32" or platform_machine == "AMD64" or platform_machine == "amd64" or platform_machine == "x86_64" or platform_machine == "ppc64le" or platform_machine == "aarch64") and python_version < "3.13"
grpc-google-iam-v1==0.13.1
grpcio==1.67.1
Expand Down Expand Up @@ -100,7 +100,6 @@ pandas==2.2.3
paramiko==3.5.0
parsedatetime==2.6
pathspec==0.12.1
pendulum==3.0.0
pex==2.24.1
prompt-toolkit==3.0.36
proto-plus==1.25.0
Expand Down Expand Up @@ -136,24 +135,23 @@ rpds-py==0.21.0
rsa==4.9
scikit-learn==1.5.2
scipy==1.14.1
setuptools==75.3.0
setuptools==75.5.0
shellingham==1.5.4
six==1.16.0
slack-sdk==3.33.3
soupsieve==2.6
sqlalchemy==2.0.36
sqlglot[rs]==25.29.0
sqlglot[rs]==25.30.0
sqlglotrs==0.2.13
sqlparse==0.5.1
sqlparse==0.5.2
sshtunnel==0.4.0
structlog==24.4.0
tableauserverclient==0.34
tabulate==0.9.0
tenacity==9.0.0
text-unidecode==1.3
threadpoolctl==3.5.0
time-machine==2.16.0; implementation_name != "pypy"
tomli==2.0.2
tomli==2.1.0
toposort==1.10
tqdm==4.67.0
typeguard==4.4.1
Expand All @@ -166,4 +164,4 @@ urllib3==2.2.3
watchdog==5.0.3
wcwidth==0.2.13
websocket-client==1.8.0
zipp==3.20.2
zipp==3.21.0
8 changes: 4 additions & 4 deletions src/teamster/code_locations/dev/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import pendulum
from pendulum import timezone
from datetime import datetime
from zoneinfo import ZoneInfo

from teamster.core.utils.classes import FiscalYear

CODE_LOCATION = "dev"
LOCAL_TIMEZONE = ZoneInfo("America/New_York")

LOCAL_TIMEZONE = timezone("America/New_York")
CURRENT_FISCAL_YEAR = FiscalYear(datetime=pendulum.today(LOCAL_TIMEZONE), start_month=7)
CURRENT_FISCAL_YEAR = FiscalYear(datetime=datetime.now(LOCAL_TIMEZONE), start_month=7)
9 changes: 5 additions & 4 deletions src/teamster/code_locations/kippcamden/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import pendulum
from datetime import datetime
from zoneinfo import ZoneInfo

from dagster_dbt import DbtProject
from pendulum import timezone

from teamster.core.utils.classes import FiscalYear

CODE_LOCATION = "kippcamden"
LOCAL_TIMEZONE = timezone("America/New_York")
LOCAL_TIMEZONE = ZoneInfo("America/New_York")

CURRENT_FISCAL_YEAR = FiscalYear(datetime=pendulum.today(LOCAL_TIMEZONE), start_month=7)
CURRENT_FISCAL_YEAR = FiscalYear(datetime=datetime.now(LOCAL_TIMEZONE), start_month=7)
DBT_PROJECT = DbtProject(project_dir=f"src/dbt/{CODE_LOCATION}")
2 changes: 1 addition & 1 deletion src/teamster/code_locations/kippcamden/_dbt/schedules.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
dbt_code_version_schedule = build_dbt_code_version_schedule(
code_location=CODE_LOCATION,
cron_schedule="*/10 * * * *",
execution_timezone=LOCAL_TIMEZONE.name,
execution_timezone=str(LOCAL_TIMEZONE),
dbt_assets=dbt_assets,
)

Expand Down
4 changes: 2 additions & 2 deletions src/teamster/code_locations/kippcamden/deanslist/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
DEANSLIST_MONTHLY_MULTI_PARTITIONS_DEF = MultiPartitionsDefinition(
partitions_defs={
"date": MonthlyPartitionsDefinition(
start_date="2016-07-01", timezone=LOCAL_TIMEZONE.name, end_offset=1
start_date="2016-07-01", timezone=str(LOCAL_TIMEZONE), end_offset=1
),
"school": DEANSLIST_STATIC_PARTITIONS_DEF,
}
Expand All @@ -37,7 +37,7 @@
"date": FiscalYearPartitionsDefinition(
start_date="2016-07-01",
start_month=7,
timezone=LOCAL_TIMEZONE.name,
timezone=str(LOCAL_TIMEZONE),
end_offset=1,
),
"school": DEANSLIST_STATIC_PARTITIONS_DEF,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,31 @@
selection=static_partitions_assets,
partitions_def=DEANSLIST_STATIC_PARTITIONS_DEF,
cron_schedule="0 0 * * *",
execution_timezone=LOCAL_TIMEZONE.name,
execution_timezone=str(LOCAL_TIMEZONE),
)

deanslist_monthly_multi_partitions_assets_job_schedule = build_deanslist_job_schedule(
job_name=f"{CODE_LOCATION}__deanslist__monthly_multi_partitions_assets_job",
selection=monthly_multi_partitions_assets,
partitions_def=DEANSLIST_MONTHLY_MULTI_PARTITIONS_DEF,
cron_schedule="0 0 * * *",
execution_timezone=LOCAL_TIMEZONE.name,
execution_timezone=str(LOCAL_TIMEZONE),
)

deanslist_fiscal_multi_partitions_assets_job_schedule = build_deanslist_job_schedule(
job_name=f"{CODE_LOCATION}__deanslist__fiscal_multi_partitions_assets_job",
selection=fiscal_multi_partitions_assets,
partitions_def=DEANSLIST_FISCAL_MULTI_PARTITIONS_DEF,
cron_schedule="0 0 * * *",
execution_timezone=LOCAL_TIMEZONE.name,
execution_timezone=str(LOCAL_TIMEZONE),
)

deanslist_midday_commlog_job_schedule = build_deanslist_job_schedule(
job_name=f"{CODE_LOCATION}__deanslist__midday_commlog_job",
selection=[AssetKey([CODE_LOCATION, "deanslist", "comm_log"])],
partitions_def=DEANSLIST_FISCAL_MULTI_PARTITIONS_DEF,
cron_schedule="0 14 * * *",
execution_timezone=LOCAL_TIMEZONE.name,
execution_timezone=str(LOCAL_TIMEZONE),
)

schedules = [
Expand Down
2 changes: 1 addition & 1 deletion src/teamster/code_locations/kippcamden/edplan/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
avro_schema=NJSMART_POWERSCHOOL,
partitions_def=DailyPartitionsDefinition(
start_date="2023-05-08",
timezone=LOCAL_TIMEZONE.name,
timezone=str(LOCAL_TIMEZONE),
fmt="%Y-%m-%d",
end_offset=1,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
powerschool_extract_assets_schedule = ScheduleDefinition(
job=powerschool_extract_asset_job,
cron_schedule="0 3 * * *",
execution_timezone=LOCAL_TIMEZONE.name,
execution_timezone=str(LOCAL_TIMEZONE),
)

schedules = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
name=f"{CODE_LOCATION}__overgrad__asset_schedule",
target=[admissions, custom_fields, followings, schools, students],
cron_schedule=["0 1 * * *", "0 15 * * *"],
execution_timezone=LOCAL_TIMEZONE.name,
execution_timezone=str(LOCAL_TIMEZONE),
)

schedules = [
Expand Down
10 changes: 5 additions & 5 deletions src/teamster/code_locations/kippcamden/powerschool/assets.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pathlib
from datetime import datetime

import pendulum
from dagster import MonthlyPartitionsDefinition, config_from_files

from teamster.code_locations.kippcamden import CODE_LOCATION, LOCAL_TIMEZONE
Expand Down Expand Up @@ -35,9 +35,9 @@
code_location=CODE_LOCATION,
table_name=a["asset_name"],
partitions_def=FiscalYearPartitionsDefinition(
start_date=pendulum.datetime(year=2016, month=7, day=1),
start_date=datetime(year=2016, month=7, day=1),
start_month=7,
timezone=LOCAL_TIMEZONE.name,
timezone=str(LOCAL_TIMEZONE),
fmt="%Y-%m-%dT%H:%M:%S%z",
),
partition_column="transaction_date",
Expand All @@ -62,8 +62,8 @@
code_location=CODE_LOCATION,
table_name=a["asset_name"],
partitions_def=MonthlyPartitionsDefinition(
start_date=pendulum.datetime(year=2016, month=7, day=1),
timezone=LOCAL_TIMEZONE.name,
start_date=datetime(year=2016, month=7, day=1),
timezone=str(LOCAL_TIMEZONE),
fmt="%Y-%m-%dT%H:%M:%S%z",
end_offset=1,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*powerschool_table_assets_gradebook_monthly,
],
cron_schedule="0 2 * * *",
execution_timezone=LOCAL_TIMEZONE.name,
execution_timezone=LOCAL_TIMEZONE,
)

powerschool_sis_asset_no_partition_job_schedule = ScheduleDefinition(
Expand All @@ -26,7 +26,7 @@
selection=powerschool_table_assets_no_partition,
),
cron_schedule="0 0 * * *",
execution_timezone=LOCAL_TIMEZONE.name,
execution_timezone=str(LOCAL_TIMEZONE),
tags={MAX_RUNTIME_SECONDS_TAG: str(60 * 10)},
)

Expand Down
9 changes: 5 additions & 4 deletions src/teamster/code_locations/kippmiami/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import pendulum
from datetime import datetime
from zoneinfo import ZoneInfo

from dagster_dbt import DbtProject
from pendulum import timezone

from teamster.core.utils.classes import FiscalYear

CODE_LOCATION = "kippmiami"
LOCAL_TIMEZONE = timezone("America/New_York")
LOCAL_TIMEZONE = ZoneInfo("America/New_York")

CURRENT_FISCAL_YEAR = FiscalYear(datetime=pendulum.today(LOCAL_TIMEZONE), start_month=7)
CURRENT_FISCAL_YEAR = FiscalYear(datetime=datetime.now(LOCAL_TIMEZONE), start_month=7)
DBT_PROJECT = DbtProject(project_dir=f"src/dbt/{CODE_LOCATION}")
2 changes: 1 addition & 1 deletion src/teamster/code_locations/kippmiami/_dbt/schedules.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
dbt_code_version_schedule = build_dbt_code_version_schedule(
code_location=CODE_LOCATION,
cron_schedule="*/10 * * * *",
execution_timezone=LOCAL_TIMEZONE.name,
execution_timezone=str(LOCAL_TIMEZONE),
dbt_assets=dbt_assets,
)

Expand Down
4 changes: 2 additions & 2 deletions src/teamster/code_locations/kippmiami/deanslist/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
DEANSLIST_MONTHLY_MULTI_PARTITIONS_DEF = MultiPartitionsDefinition(
partitions_defs={
"date": MonthlyPartitionsDefinition(
start_date="2018-07-01", timezone=LOCAL_TIMEZONE.name, end_offset=1
start_date="2018-07-01", timezone=str(LOCAL_TIMEZONE), end_offset=1
),
"school": DEANSLIST_STATIC_PARTITIONS_DEF,
}
Expand All @@ -35,7 +35,7 @@
"date": FiscalYearPartitionsDefinition(
start_date="2018-07-01",
start_month=7,
timezone=LOCAL_TIMEZONE.name,
timezone=str(LOCAL_TIMEZONE),
end_offset=1,
),
"school": DEANSLIST_STATIC_PARTITIONS_DEF,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,31 @@
selection=static_partitions_assets,
partitions_def=DEANSLIST_STATIC_PARTITIONS_DEF,
cron_schedule="0 0 * * *",
execution_timezone=LOCAL_TIMEZONE.name,
execution_timezone=str(LOCAL_TIMEZONE),
)

deanslist_monthly_multi_partitions_assets_job_schedule = build_deanslist_job_schedule(
job_name=f"{CODE_LOCATION}__deanslist__monthly_multi_partitions_assets_job",
selection=monthly_multi_partitions_assets,
partitions_def=DEANSLIST_MONTHLY_MULTI_PARTITIONS_DEF,
cron_schedule="0 0 * * *",
execution_timezone=LOCAL_TIMEZONE.name,
execution_timezone=str(LOCAL_TIMEZONE),
)

deanslist_fiscal_multi_partitions_assets_job_schedule = build_deanslist_job_schedule(
job_name=f"{CODE_LOCATION}__deanslist__fiscal_multi_partitions_assets_job",
selection=fiscal_multi_partitions_assets,
partitions_def=DEANSLIST_FISCAL_MULTI_PARTITIONS_DEF,
cron_schedule="0 0 * * *",
execution_timezone=LOCAL_TIMEZONE.name,
execution_timezone=str(LOCAL_TIMEZONE),
)

deanslist_midday_commlog_job_schedule = build_deanslist_job_schedule(
job_name=f"{CODE_LOCATION}__deanslist__midday_commlog_job",
selection=[AssetKey([CODE_LOCATION, "deanslist", "comm_log"])],
partitions_def=DEANSLIST_FISCAL_MULTI_PARTITIONS_DEF,
cron_schedule="0 14 * * *",
execution_timezone=LOCAL_TIMEZONE.name,
execution_timezone=str(LOCAL_TIMEZONE),
)

schedules = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
powerschool_extract_assets_schedule = ScheduleDefinition(
job=powerschool_extract_asset_job,
cron_schedule="0 3 * * *",
execution_timezone=LOCAL_TIMEZONE.name,
execution_timezone=str(LOCAL_TIMEZONE),
)

schedules = [
Expand Down
Loading
Loading