Skip to content
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
7 changes: 4 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: actions/checkout@v3
with: { fetch-depth: 0 } # deep clone for setuptools-scm
- uses: actions/setup-python@v4
with: { python-version: "3.10" }
with: { python-version: "3.11" }
- name: Run static analysis and format checkers
run: pipx run pre-commit run --all-files --show-diff-on-failure
- name: Build package distribution files
Expand All @@ -47,8 +47,9 @@ jobs:
strategy:
matrix:
python:
- "3.7" # oldest Python supported by PSF
- "3.10" # newest Python that is stable
- "3.10"
- "3.11"
- "3.12"
platform:
- ubuntu-latest
- macos-latest
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v3
with: { fetch-depth: 0 } # deep clone for setuptools-scm
- uses: actions/setup-python@v4
with: { python-version: "3.10" }
with: { python-version: "3.11" }
- name: Run static analysis and format checkers
run: pipx run pre-commit run --all-files --show-diff-on-failure
- name: Build package distribution files
Expand All @@ -42,8 +42,9 @@ jobs:
strategy:
matrix:
python:
- "3.7" # oldest Python supported by PSF
- "3.10" # newest Python that is stable
- "3.10"
- "3.11"
- "3.12"
platform:
- ubuntu-latest
- macos-latest
Expand Down Expand Up @@ -89,7 +90,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with: { python-version: "3.10" }
with: { python-version: "3.11" }
- name: Retrieve pre-built distribution files
uses: actions/download-artifact@v4
with: { name: python-distribution-files, path: dist/ }
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@ repos:
- --fix=lf
id: mixed-line-ending
repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.5.0
- hooks:
- args:
- --in-place
- --remove-all-unused-imports
- --remove-unused-variables
id: autoflake
repo: https://github.com/myint/autoflake
rev: v1.4
rev: v2.2.1
- hooks:
- id: isort
repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.13.2
- hooks:
- id: black
language_version: python3
repo: https://github.com/psf/black
rev: stable
rev: 24.2.0
- hooks:
- id: commitizen
repo: https://github.com/commitizen-tools/commitizen
rev: v2.32.2
rev: v3.13.0
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[build-system]
# AVOID CHANGING REQUIRES: IT WILL BE UPDATED BY PYSCAFFOLD!
requires = ["setuptools>=46.1.0", "setuptools_scm[toml]>=5"]
requires = ["setuptools>=61.0", "setuptools_scm[toml]>=7"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
# For smarter version schemes and other configuration options,
# check out https://github.com/pypa/setuptools_scm
version_scheme = "no-guess-dev"
version_scheme = "post-release"
local_scheme = "node-and-date"
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
PyScaffold helps you to put up the scaffold of your new Python project.
Learn more under: https://pyscaffold.org/
"""

from setuptools import setup

if __name__ == "__main__":
Expand Down
12 changes: 11 additions & 1 deletion src/safe_security_logger/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,17 @@
__copyright__ = "Safe Security"
__license__ = "MIT"

ROOT_LEVEL_FIELDS = ["level", "service", "timestamp", "type", "message", "error", "tenantId", "requestId"]
ROOT_LEVEL_FIELDS = [
"level",
"service",
"timestamp",
"type",
"message",
"error",
"tenantId",
"requestId",
]


# Adding custom logger to support additional default field such as serviceName
class CustomJsonFormatter(jsonlogger.JsonFormatter):
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
minversion = 3.24
envlist = default
envlist = py{310,311,312} # Test against multiple Python versions
isolated_build = True


Expand Down
Loading