Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions airflow-core/src/airflow/partition_mappers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@
from airflow.partition_mappers.identity import IdentityMapper
from airflow.partition_mappers.product import ProductMapper
from airflow.partition_mappers.temporal import (
FanOutMapper,
StartOfDayMapper,
StartOfHourMapper,
StartOfMonthMapper,
StartOfQuarterMapper,
StartOfWeekMapper,
StartOfYearMapper,
)
from airflow.partition_mappers.wait_policy import MinimumCount, WaitForAll
from airflow.partition_mappers.window import (
DayWindow,
HourWindow,
Expand All @@ -45,9 +47,11 @@
"AllowedKeyMapper",
"ChainMapper",
"DayWindow",
"FanOutMapper",
"FixedKeyMapper",
"HourWindow",
"IdentityMapper",
"MinimumCount",
"MonthWindow",
"PartitionMapper",
"ProductMapper",
Expand All @@ -60,6 +64,7 @@
"StartOfQuarterMapper",
"StartOfWeekMapper",
"StartOfYearMapper",
"WaitForAll",
"WeekWindow",
"Window",
"YearWindow",
Expand Down
30 changes: 30 additions & 0 deletions airflow-core/tests/unit/partition_mappers/test_init.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from __future__ import annotations

import airflow.partition_mappers
import airflow.sdk


def test_package_root_exports_match_sdk():
"""Every partition-mapper symbol exported from airflow.sdk must also be exported from the core package root."""
sdk_names = {
name
for name, module in airflow.sdk.__lazy_imports.items()
if module.startswith(".definitions.partition_mappers")
}
assert sdk_names == set(airflow.partition_mappers.__all__)
Loading