Skip to content

build: migrate release pipeline #103

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

Merged
merged 10 commits into from
Mar 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[flake8]
# it's not a bug that we aren't using all of hacking, ignore:
# H402: Module level import not at top of file
# W503: Line break occurred before a binary operator
# E731: Do not assign a lambda expression, use a def
ignore = W503,E402,E731

exclude = .git, __pycache__, build, dist, .eggs, .github, .local, docs/,
Samples, .env*, .vscode, venv*, *.venv*

max-line-length = 88
2 changes: 0 additions & 2 deletions .github/linters/.isort.cfg

This file was deleted.

36 changes: 0 additions & 36 deletions .github/linters/tox.ini

This file was deleted.

80 changes: 0 additions & 80 deletions .github/workflows/linting_extension_base.yml

This file was deleted.

80 changes: 0 additions & 80 deletions .github/workflows/linting_extension_blob.yml

This file was deleted.

80 changes: 0 additions & 80 deletions .github/workflows/linting_extension_fastapi.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@
"RequestSynchronizer",
]

__version__ = "1.0.0b2"
__version__ = '1.0.0b2'
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import re
from abc import ABC
from enum import Enum
from typing import Any, Callable, Dict, List, Optional
from typing import Any, Callable, Optional

from . import meta

Expand Down
13 changes: 7 additions & 6 deletions azurefunctions-extensions-base/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,17 @@ classifiers= [

[project.optional-dependencies]
dev = [
'pytest',
'pytest-cov',
'coverage',
'pytest-instafail',
'pre-commit'
'flake8',
'mypy',
'pytest',
'pytest-cov',
'coverage',
'pytest-instafail',
'pre-commit'
]

[tool.setuptools.dynamic]
version = {attr = "azurefunctions.extensions.base.__version__"}

[tool.setuptools.packages.find]
exclude = ['azurefunctions.extensions', 'azurefunctions', 'tests']

51 changes: 51 additions & 0 deletions azurefunctions-extensions-base/tests/test_code_quality.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import pathlib
import subprocess
import sys
import unittest

ROOT_PATH = pathlib.Path(__file__).parent.parent.parent


class TestCodeQuality(unittest.TestCase):
def test_mypy(self):
try:
import mypy # NoQA
except ImportError as e:
raise unittest.SkipTest('mypy module is missing') from e

try:
subprocess.run(
[sys.executable, '-m', 'mypy', '-m', 'azurefunctions-extensions-base'],
check=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
cwd=str(ROOT_PATH))
except subprocess.CalledProcessError as ex:
output = ex.output.decode()
raise AssertionError(
f'mypy validation failed:\n{output}') from None

def test_flake8(self):
try:
import flake8 # NoQA
except ImportError as e:
raise unittest.SkipTest('flake8 module is missing') from e

config_path = ROOT_PATH / '.flake8'
if not config_path.exists():
raise unittest.SkipTest('could not locate the .flake8 file')

try:
subprocess.run(
[sys.executable, '-m', 'flake8', 'azurefunctions-extensions-base',
'--config', str(config_path)],
check=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
cwd=str(ROOT_PATH))
except subprocess.CalledProcessError as ex:
output = ex.output.decode()
raise AssertionError(
f'flake8 validation failed:\n{output}') from None
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
"BlobClientConverter",
]

__version__ = "1.0.0b3"
__version__ = '1.0.0b3'
Loading