Azure / azure-functions-python-worker

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

Configurable file name #1323

Closed hallvictoria closed 8 months ago

hallvictoria commented 11 months ago

Description

The Python worker reads the function app entry point from an app setting called PYTHON_SCRIPT_FILE_NAME. The default value for this setting will still be "function_app.py". Customers can signal to the worker to read from a file not called "function_app.py" by setting this variable to the new name of their file.

Added unit and e2e tests for this app setting by creating a function app file not called "function_app.py" and testing it.

Also added unit tests for 2 invalid V2 app scenarios: no top level function app instances and no inputs

Fixes #https://github.com/Azure/azure-functions-pyfx-planning/issues/72


PR information

Quality of Code and Contribution Guidelines

codecov[bot] commented 11 months ago

Codecov Report

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

Comparison is base (16c109a) 85.11% compared to head (9347e42) 85.84%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #1323 +/- ## ========================================== + Coverage 85.11% 85.84% +0.72% ========================================== Files 35 35 Lines 1955 1971 +16 Branches 370 371 +1 ========================================== + Hits 1664 1692 +28 + Misses 217 210 -7 + Partials 74 69 -5 ``` | [Flag](https://app.codecov.io/gh/Azure/azure-functions-python-worker/pull/1323/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/1323/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) | `85.79% <100.00%> (+0.73%)` | :arrow_up: | 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.