From e0e13b630f384f2326e5272cc66cd5ef1fbcb841 Mon Sep 17 00:00:00 2001 From: Jace Browning Date: Sat, 24 Aug 2024 10:22:48 -0400 Subject: [PATCH] Add critical log level to package namespace --- .github/workflows/main.yml | 45 ++++++++++++++++++++++++++++++++++++++ .tool-versions | 4 ++-- .travis.yml | 38 -------------------------------- .verchew.ini | 2 +- CHANGELOG.md | 4 ++++ README.md | 6 ++--- docs/requirements.txt | 2 +- log/__init__.py | 2 +- poetry.lock | 12 +++++----- pyproject.toml | 3 ++- 10 files changed, 65 insertions(+), 53 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..12664b1 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,45 @@ +name: main + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.8', '3.9', '3.10', '3.11'] + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - uses: Gr1N/setup-poetry@v8 + + - name: Check dependencies + run: make doctor + + - uses: actions/cache@v2 + with: + path: .venv + key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} + + - name: Install dependencies + run: make install + + - name: Check code + run: make check + + - name: Test code + run: make test + + - name: Upload coverage + uses: codecov/codecov-action@v4 + if: steps.fork-check.outputs.is-fork == 'false' + with: + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true diff --git a/.tool-versions b/.tool-versions index fb12e21..7442775 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -python 3.11.5 -poetry 1.7.0 +python 3.11.9 +poetry 1.8.3 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5eba495..0000000 --- a/.travis.yml +++ /dev/null @@ -1,38 +0,0 @@ -dist: focal - -language: python -python: - - "3.8" - - "3.9" - - "3.10" - - "3.11" - -cache: - pip: true - directories: - - ${VIRTUAL_ENV} - -env: - global: - - RANDOM_SEED=0 - -before_install: - - curl -sSL https://raw.githubusercontent.com/python-poetry/install.python-poetry.org/main/install-poetry.py | python - - - make doctor - -install: - - make install - -script: - - make check - - make test - -after_success: - - pip install coveralls scrutinizer-ocular - - coveralls - - ocular - -notifications: - email: - on_success: never - on_failure: never diff --git a/.verchew.ini b/.verchew.ini index 9d9ad69..9e50349 100644 --- a/.verchew.ini +++ b/.verchew.ini @@ -17,6 +17,6 @@ version = 1 cli = dot cli_version_arg = -V -version = 7 || 8 || 9 +version = graphviz optional = true message = This is only needed to generate UML diagrams for documentation. diff --git a/CHANGELOG.md b/CHANGELOG.md index 3112711..33d8ec7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Release Notes +## 2.3.1 (2024-10-24) + +- Added `CRITICAL` log level to the package namespace. + ## 2.3 (2023-12-09) - Added automatic formatting for dataclasses. diff --git a/README.md b/README.md index 4e52837..0347f39 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ A minimalistic logging wrapper for Python. -[![Unix Build Status](https://img.shields.io/travis/com/jacebrowning/minilog.svg?label=unix)](https://travis-ci.com/jacebrowning/minilog) -[![Windows Build Status](https://img.shields.io/appveyor/ci/jacebrowning/minilog.svg?label=windows)](https://ci.appveyor.com/project/jacebrowning/minilog) -[![Coverage Status](https://img.shields.io/coveralls/jacebrowning/minilog/main.svg)](https://coveralls.io/r/jacebrowning/minilog) +[![Linux Build](https://img.shields.io/github/actions/workflow/status/jacebrowning/minilog/main.yml?branch=main&label=linux)](https://github.com/jacebrowning/minilog/actions) +[![Windows Build](https://img.shields.io/appveyor/ci/jacebrowning/minilog/main.svg?label=windows)](https://ci.appveyor.com/project/jacebrowning/minilog) +[![Code Coverage](https://img.shields.io/codecov/c/github/jacebrowning/minilog)](https://codecov.io/gh/jacebrowning/minilog) [![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/jacebrowning/minilog.svg)](https://scrutinizer-ci.com/g/jacebrowning/minilog) [![PyPI License](https://img.shields.io/pypi/l/minilog.svg)](https://pypi.org/project/minilog) [![PyPI Version](https://img.shields.io/pypi/v/minilog.svg)](https://pypi.org/project/minilog) diff --git a/docs/requirements.txt b/docs/requirements.txt index 0cce57e..59db206 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,3 @@ mkdocs==1.2.3 ; python_version >= "3.8" and python_version < "4.0" pygments==2.15.0 ; python_version >= "3.8" and python_version < "4.0" -jinja2==3.0.1 ; python_version >= "3.8" and python_version < "4.0" +jinja2==3.0.3 ; python_version >= "3.8" and python_version < "4.0" diff --git a/log/__init__.py b/log/__init__.py index b7380cb..d7869cd 100644 --- a/log/__init__.py +++ b/log/__init__.py @@ -1,6 +1,6 @@ # pylint: disable=wildcard-import -from logging import DEBUG, ERROR, INFO, WARNING +from logging import CRITICAL, DEBUG, ERROR, INFO, WARNING from .helpers import * from .logger import * diff --git a/poetry.lock b/poetry.lock index 2a8eb99..8b0a09b 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "altgraph" @@ -470,13 +470,13 @@ testing = ["Django (<3.1)", "colorama", "docopt", "pytest (>=3.9.0,<5.0.0)"] [[package]] name = "jinja2" -version = "3.1.3" +version = "3.0.3" description = "A very fast and expressive template engine." optional = false -python-versions = ">=3.7" +python-versions = ">=3.6" files = [ - {file = "Jinja2-3.1.3-py3-none-any.whl", hash = "sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa"}, - {file = "Jinja2-3.1.3.tar.gz", hash = "sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90"}, + {file = "Jinja2-3.0.3-py3-none-any.whl", hash = "sha256:077ce6014f7b40d03b47d1f1ca4b0fc8328a692bd284016f806ed0eaca390ad8"}, + {file = "Jinja2-3.0.3.tar.gz", hash = "sha256:611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7"}, ] [package.dependencies] @@ -1519,4 +1519,4 @@ testing = ["func-timeout", "jaraco.itertools", "pytest (>=4.6)", "pytest-black ( [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "c1f68dda30284e722cd459d60c99cf1bf6aa994593ddca11435dbbd91895196c" +content-hash = "9b2d4de9e7e37fdd0693344c288ebee5c9b67fb166608f3d507b7c3498502aa3" diff --git a/pyproject.toml b/pyproject.toml index b8588ef..2387c87 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "minilog" -version = "2.3" +version = "2.3.1" description = "Minimalistic wrapper for Python logging." license = "MIT" @@ -64,6 +64,7 @@ coveragespace = "^6.0.1" # Documentation mkdocs = "~1.2" pygments = "^2.15.0" +jinja2 = "~3.0" # Tooling pyinstaller = "*"