Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added worker to pythonpath #1215

Merged
merged 6 commits into from
Apr 27, 2023
Merged

Added worker to pythonpath #1215

merged 6 commits into from
Apr 27, 2023

Conversation

gavin-aguiar
Copy link
Contributor

Added worker to pythonpath

Description

Fixes #


PR information

  • The title of the PR is clear and informative.
  • There are a small number of commits, each of which has an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
  • If applicable, the PR references the bug/issue that it fixes in the description.
  • New Unit tests were added for the changes made and CI is passing.

Quality of Code and Contribution Guidelines

@codecov
Copy link

codecov bot commented Apr 14, 2023

Codecov Report

Merging #1215 (f85b96a) into dev (8938bf6) will decrease coverage by 51.77%.
The diff coverage is n/a.

❗ Current head f85b96a differs from pull request most recent head 31be10c. Consider uploading reports for the commit 31be10c to get more accurate results

@@             Coverage Diff             @@
##              dev    #1215       +/-   ##
===========================================
- Coverage   83.76%   32.00%   -51.77%     
===========================================
  Files          34       34               
  Lines        1903     1903               
  Branches      366      366               
===========================================
- Hits         1594      609      -985     
- Misses        237     1293     +1056     
+ Partials       72        1       -71     
Flag Coverage Δ
unittests 32.00% <ø> (-51.71%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 24 files with indirect coverage changes

func_worker_dir = str(Path(__file__).absolute().parent)
env = os.environ

# Setting up python path for all environments to prioritize
# third-party user packages over worker packages in PYTHONPATH
user_pkg_paths = determine_user_pkg_paths()
joined_pkg_paths = os.pathsep.join(user_pkg_paths)
env['PYTHONPATH'] = f'{joined_pkg_paths}:{func_worker_dir}'
env['PYTHONPATH'] = f'{worker_path}:{joined_pkg_paths}:{func_worker_dir}'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any way to add test for this? in the docker test as least?

@gavin-aguiar gavin-aguiar merged commit a60ef25 into dev Apr 27, 2023
@gavin-aguiar gavin-aguiar deleted the gaaguiar/remove_old_worker branch April 27, 2023 23:40
gavin-aguiar pushed a commit that referenced this pull request May 5, 2023
gavin-aguiar pushed a commit that referenced this pull request May 5, 2023
gavin-aguiar added a commit that referenced this pull request May 8, 2023
* Revert "Added worker to pythonpath (#1215)"

This reverts commit a60ef25.

* Revert "Added worker to pythonpath (#1215)"

This reverts commit a60ef25.

* Deleted empty worker.py file

---------

Co-authored-by: Gavin Aguiar <gavin@GavinPC>
gavin-aguiar added a commit that referenced this pull request Jun 7, 2023
* Revert "Added worker to pythonpath (#1215)"

This reverts commit a60ef25.

* Update Python SDK Version to 1.14.1b3 (#1232)

* Update Python SDK Version to 1.14.1b3

* Update setup.py

---------

Co-authored-by: AzureFunctionsPython <[email protected]>

* Update Python Worker Version to 4.13.0

* Update Python Worker Version to 4.14.0

* Test fixes

* Installing packages with -U

* Install packages with updates

* Adding python -m to pytest

* Reverting change to codecov.yml

---------

Co-authored-by: Gavin Aguiar <gavin@GavinPC>
Co-authored-by: AzureFunctionsPython <[email protected]>
gavin-aguiar added a commit that referenced this pull request Jul 28, 2023
* Revert "Added worker to pythonpath (#1215)"

This reverts commit a60ef25.

* Update Python SDK Version to 1.14.1b3 (#1232)

* Update Python SDK Version to 1.14.1b3

* Update setup.py

---------

Co-authored-by: AzureFunctionsPython <[email protected]>

* Update Python Worker Version to 4.13.0

* Update Python Worker Version to 4.14.0

* Importing azure functions in InitRequest by default

* Updated tests

---------

Co-authored-by: Gavin Aguiar <gavin@GavinPC>
Co-authored-by: AzureFunctionsPython <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants