mirror of
https://github.com/apache/airflow.git
synced 2026-11-04 16:01:19 +00:00
* Add tests for scripts and remove redundant sys.path.insert calls - Remove 85 redundant `sys.path.insert(0, str(Path(__file__).parent.resolve()))` calls from scripts in ci/prek/, cov/, and in_container/. Python already adds the script's directory to sys.path when running a file directly, making these calls unnecessary. - Keep 6 cross-directory sys.path.insert calls that are genuinely needed (AIRFLOW_CORE_SOURCES_PATH, AIRFLOW_ROOT, etc.). - Add __init__.py files to scripts/ci/ and scripts/ci/prek/ to make them proper Python packages. - Add scripts/pyproject.toml with package discovery and pytest config. - Add 176 tests covering: common_prek_utils (insert_documentation, check_list_sorted, get_provider_id_from_path, ConsoleDiff, etc.), new_session_in_provide_session, check_deprecations, unittest_testcase, changelog_duplicates, newsfragments, checkout_no_credentials, and check_order_dockerfile_extras. - Add scripts tests to CI: new SCRIPTS_FILES file group in selective checks, run-scripts-tests output, and tests-scripts job in basic-tests.yml. - Document scripts as a workspace distribution in CLAUDE.md. * Add pytest as dev dependency for scripts distribution Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Use devel-common instead of pytest for scripts dev dependencies Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Fix xdist test collection order for newsfragment tests Sort the VALID_CHANGE_TYPES set when passing to parametrize to ensure deterministic test ordering across xdist workers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Update scripts/ci/prek/changelog_duplicates.py Co-authored-by: Dev-iL <6509619+Dev-iL@users.noreply.github.com> * Refactor scripts tests: convert setup methods to fixtures and extract constants --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: Dev-iL <6509619+Dev-iL@users.noreply.github.com>
17 lines
785 B
Python
17 lines
785 B
Python
# 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.
|