kaxil commented on code in PR #53149: URL: https://github.com/apache/airflow/pull/53149#discussion_r2198236175
########## shared/README.md: ########## @@ -0,0 +1,54 @@ +<!-- + 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. + --> + +# Shared Python Code for Airflow Components + +This folder contains code that is shared across two or more of the Airflow distributions. + +## Be Thoughtfull about what you add under here + +Not every piece of code that is used in two distributions should be automatically placed in one of the shared libraries, and sometimes "just duplicate it" is the right approach to take. For example if it's just a 5 or 10 line function and it's used in two places, it might be easier to future developers to understand if the function is in two places. + +There is no hard rules about what should or shouldn't be in these libraries, so try to apply your best judgement. + +## Vendoring process + +i.e. how this code ends up in distributions + +One of the desires we had when setting up this shared code process was to only have one copy of the source in the repo; while we could have used a pre-commit check to ensure that other copies were kept up to date, and that approach would have worked, it is "a bit messier" and makes PRs look scarier, so we have an process that has only a single copy of the code in the repo. + +### In built distributions + +We make use of [hatch-build-time-vendoring] to automatically run [vendoring] for us when the `sdist` is built (and then the wheel is automatically built using that already vendored sdist). Review Comment: I think you meant to add a link here and on vendoring -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
