Azure / azure-functions-python-worker

Python worker for Azure Functions.
http://aka.ms/azurefunctions
MIT License
331 stars 100 forks source link

refactor: Remove custom targets, use 'None' item group #1472

Open jviau opened 2 months ago

jviau commented 2 months ago

Description

This PR refactors the python worker nuget package targets as follows:

  1. Removes current custom targets/properties
    1. Properties, items, targets all share the same global namespace. Naming these generally increases risk of conflicts with other props/items/targets.
  2. Leverages None item group with appropriate metadata to have CopyToOutputDirectory and CopyToPublishDirectory targets perform the copies for us.
    1. Instead of copying files to output or publish manually, you can add to various existing item groups and tag them to be copied.
    2. This change improves incremental build support, avoiding copies when the files already exist at the destination.
  3. Adds additional logic to copy only specific runtime files with a runtime identifier is specified.
    1. Will error out if the runtime identifier is not supported.

PR information

Quality of Code and Contribution Guidelines

codecov-commenter commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 45.88%. Comparing base (c244569) to head (2f40dbd). Report is 3 commits behind head on dev.

:exclamation: Current head 2f40dbd differs from pull request most recent head 6586aaf

Please upload reports for the commit 6586aaf to get more accurate results.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #1472 +/- ## =========================================== - Coverage 83.03% 45.88% -37.15% =========================================== Files 36 35 -1 Lines 2322 2040 -282 Branches 346 302 -44 =========================================== - Hits 1928 936 -992 - Misses 295 1028 +733 + Partials 99 76 -23 ``` | [Flag](https://app.codecov.io/gh/Azure/azure-functions-python-worker/pull/1472/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/Azure/azure-functions-python-worker/pull/1472/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) | `45.88% <ø> (-37.15%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.