Skip to content

Commit

Permalink
a17: rename to azure_functions_worker_v2
Browse files Browse the repository at this point in the history
  • Loading branch information
hallvictoria committed Feb 21, 2025
1 parent e292f4a commit 2038019
Show file tree
Hide file tree
Showing 35 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ omit =
# Removing the imported libraries that might show up in this.
*/azure/functions/*
*/azure/*
*/azure_functions_worker/_thirdparty/*
*/azure_functions_worker_v2/_thirdparty/*
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
ignore = W503,E402,E731

exclude = .git, __pycache__, build, dist, .eggs, .github, .local, docs/,
Samples, azure_functions_worker/protos/,
Samples, azure_functions_worker_v2_v2/protos/,
azure_functions_worker/utils/typing_inspect.py,
tests/unittests/test_typing_inspect.py,
tests/unittests/broken_functions/syntax_error/main.py,
Expand Down
4 changes: 2 additions & 2 deletions .github/linters/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ exclude =
docs,
Samples,
__pycache__,
azure_functions_worker/protos/,
azure_functions_worker/_thirdparty/typing_inspect.py,
azure_functions_worker_v2/protos/,
azure_functions_worker_v2/_thirdparty/typing_inspect.py,
tests/unittests/test_typing_inspect.py,
.venv*,
.env*,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
# VALIDATE_PYTHON_PYLINT: false # disable pylint, as we have not configure it
# VALIDATE_PYTHON_BLACK: false # same as above
PYTHON_FLAKE8_CONFIG_FILE: tox.ini
FILTER_REGEX_INCLUDE: azure_functions_worker/.*
FILTER_REGEX_INCLUDE: azure_functions_worker_v2/.*
FILTER_REGEX_EXCLUDE: tests/.*
DEFAULT_BRANCH: dev
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
PYTHON_ENABLE_INIT_INDEXING,
X_MS_INVOCATION_ID,
)
from azure_functions_worker.logging import logger
from azure_functions_worker_v2.logging import logger
from .utils.env_state import is_envvar_false


Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

VERSION = '0.0.0a1'
VERSION = '1.0.0a17'
2 changes: 1 addition & 1 deletion eng/templates/jobs/ci-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ jobs:
eng/scripts/install-dependencies.sh
displayName: 'Install dependencies'
- bash: |
python -m pytest -q -n auto --dist loadfile --reruns 4 --instafail --cov=./azure_functions_worker --cov-report xml --cov-branch tests/unittests
python -m pytest -q -n auto --dist loadfile --reruns 4 --instafail --cov=./azure_functions_worker_v2 --cov-report xml --cov-branch tests/unittests
displayName: "Running $(PYTHON_VERSION) Unit Tests"
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[azure_functions_worker/utils/typing_inspect.py]
[azure_functions_worker_v2/utils/typing_inspect.py]
ignore_errors = True

[mypy]
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[project]
name = "azure-functions-runtime"
name = "test-worker"
dynamic = ["version"]
description = "Python Language Worker for Azure Functions Runtime"
authors = [
Expand Down Expand Up @@ -86,9 +86,9 @@ profile = "black"
line_length = 88
multi_line_output = 3
include_trailing_comma = true
known_first_party = ["azure_functions_worker"]
known_first_party = ["azure_functions_worker_v2"]
default_section = "THIRDPARTY"
src_paths = ["azure_functions_worker"]
src_paths = ["azure_functions_worker_v2"]
skip_glob = [
"build",
"dist",
Expand All @@ -109,4 +109,4 @@ skip_glob = [
]

[tool.setuptools.dynamic]
version = {attr = "azure_functions_worker.version.VERSION"}
version = {attr = "azure_functions_worker_v2.version.VERSION"}
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ warn_return_any = True
disallow_subclassing_any = False
ignore_missing_imports = True

[mypy-azure_functions_worker.protos.*]
[mypy-azure_functions_worker_v2.protos.*]
ignore_errors = True

[mypy-azure_functions_worker._thirdparty.typing_inspect]
[mypy-azure_functions_worker_v2._thirdparty.typing_inspect]
ignore_errors = True
2 changes: 1 addition & 1 deletion tests/unittests/test_code_quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_mypy(self):

try:
subprocess.run(
[sys.executable, '-m', 'mypy', '-m', 'azure_functions_worker'],
[sys.executable, '-m', 'mypy', '-m', 'azure_functions_worker_v2'],
check=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
Expand Down
6 changes: 3 additions & 3 deletions tests/unittests/test_handle_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from typing import Any
from unittest.mock import patch

from azure_functions_worker.utils.constants import PYTHON_ENABLE_INIT_INDEXING
from azure_functions_worker.handle_event import (worker_init_request,
from azure_functions_worker_v2.utils.constants import PYTHON_ENABLE_INIT_INDEXING
from azure_functions_worker_v2.handle_event import (worker_init_request,
functions_metadata_request,
function_environment_reload_request)
from tests.utils import testutils
Expand Down Expand Up @@ -111,7 +111,7 @@ async def test_functions_metadata_request(self):

async def run_init_then_meta(self):
worker_request = WorkerRequest(name='worker_init_request',
request=Request(FunctionRequest('hello')),
request=Request(FunctionRequest('hello', BASIC_FUNCTION_DIRECTORY)),
properties={'host': '123',
'protos': protos})
_ = await worker_init_request(worker_request)
Expand Down

0 comments on commit 2038019

Please sign in to comment.