diff --git a/airflow-core/src/airflow/partition_mappers/__init__.py b/airflow-core/src/airflow/partition_mappers/__init__.py index f780603870736..fe2157ee98c56 100644 --- a/airflow-core/src/airflow/partition_mappers/__init__.py +++ b/airflow-core/src/airflow/partition_mappers/__init__.py @@ -23,6 +23,7 @@ from airflow.partition_mappers.identity import IdentityMapper from airflow.partition_mappers.product import ProductMapper from airflow.partition_mappers.temporal import ( + FanOutMapper, StartOfDayMapper, StartOfHourMapper, StartOfMonthMapper, @@ -30,6 +31,7 @@ StartOfWeekMapper, StartOfYearMapper, ) +from airflow.partition_mappers.wait_policy import MinimumCount, WaitForAll from airflow.partition_mappers.window import ( DayWindow, HourWindow, @@ -45,9 +47,11 @@ "AllowedKeyMapper", "ChainMapper", "DayWindow", + "FanOutMapper", "FixedKeyMapper", "HourWindow", "IdentityMapper", + "MinimumCount", "MonthWindow", "PartitionMapper", "ProductMapper", @@ -60,6 +64,7 @@ "StartOfQuarterMapper", "StartOfWeekMapper", "StartOfYearMapper", + "WaitForAll", "WeekWindow", "Window", "YearWindow", diff --git a/airflow-core/tests/unit/partition_mappers/test_init.py b/airflow-core/tests/unit/partition_mappers/test_init.py new file mode 100644 index 0000000000000..e7579ec6eec11 --- /dev/null +++ b/airflow-core/tests/unit/partition_mappers/test_init.py @@ -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__)