Skip to content

Commit

Permalink
Merge branch 'master' into no-fastapi
Browse files Browse the repository at this point in the history
  • Loading branch information
trallnag authored Mar 10, 2024
2 parents da344ce + 885c80c commit 71a0cb7
Show file tree
Hide file tree
Showing 11 changed files with 487 additions and 612 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
exclude = .git,.lock
max-complexity = 12
max-line-length = 90
ignore=E501,W503
ignore=E501,W503,E231
12 changes: 6 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,30 @@ on:
- cron: 4 4 * * 1

env:
poetry_version: "1.3.2"
poetry_version: "1.8.2"

jobs:
ci:
name: CI
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.7"]
python-version: ["3.12", "3.8"]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# ------------------------------------------------------------------------
# Python & Poetry.

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Cache Poetry installation
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.local/bin/poetry
Expand All @@ -51,7 +51,7 @@ jobs:
POETRY_VERSION: ${{ env.poetry_version }}

- name: Cache Poetry cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry
key: |-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,27 @@ on:
- cron: 4 4 * * 1

env:
poetry_version: "1.3.2"
python_version: "3.11"
poetry_version: "1.8.2"
python_version: "3.12"

jobs:
pre-commit:
name: Pre-commit
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# ------------------------------------------------------------------------
# Python & Poetry.

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ env.python_version }}

- name: Cache Poetry installation
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.local/bin/poetry
Expand All @@ -59,7 +59,7 @@ jobs:
POETRY_VERSION: ${{ env.poetry_version }}

- name: Cache Poetry cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/pypoetry
key: |-
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@ permissions:
contents: write

env:
poetry_version: "1.3.2"
python_version: "3.11"
poetry_version: "1.8.2"
python_version: "3.12"

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# ------------------------------------------------------------------------
# Python & Poetry.

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ env.python_version }}

- name: Cache Poetry installation
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.local/bin/poetry
Expand Down Expand Up @@ -76,6 +76,6 @@ jobs:
TOKEN: ${{ secrets.PYPI_TOKEN }}

- name: Draft GitHub release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
draft: true
10 changes: 5 additions & 5 deletions .github/workflows/testpypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@ on:
default: ""

env:
poetry_version: "1.3.2"
python_version: "3.11"
poetry_version: "1.8.2"
python_version: "3.12"

jobs:
testpypi:
name: TestPyPI
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# ------------------------------------------------------------------------
# Python & Poetry.

- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ env.python_version }}

- name: Cache Poetry installation
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.local/bin/poetry
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-ast
- id: check-executables-have-shebangs
Expand All @@ -12,21 +12,21 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.5.0
rev: v9.13.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@commitlint/config-conventional"]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0
rev: v4.0.0-alpha.8
hooks:
- id: prettier
types_or: [json, yaml, markdown]
args: [--prose-wrap=always]

- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.8.1
rev: v0.12.1
hooks:
- id: markdownlint-cli2

Expand Down
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,17 @@ and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0).

## Unreleased

Nothing.
### Added

- Relaxed type of `get_route_name` argument to `HTTPConnection`. This allows
developers to use the `get_route_name` function for getting the name of
websocket routes as well. Thanks to [@pajowu](https://github.com/pajowu) for
proposing and implementing this feature in
[#276](https://github.com/trallnag/prometheus-fastapi-instrumentator/pull/276).

### Removed

- **BREAKING:** Dropped support for Python 3.7 which is has reached end-of-life.

## [6.1.0](https://github.com/trallnag/prometheus-fastapi-instrumentator/compare/v6.0.0...v6.1.0) / 2023-07-15

Expand Down
Loading

0 comments on commit 71a0cb7

Please sign in to comment.