nialog

JSON logging setup for Python.

https://github.com/nialov/nialog

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.1%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

JSON logging setup for Python.

Basic Info
  • Host: GitHub
  • Owner: nialov
  • License: mit
  • Language: Python
  • Default Branch: master
  • Size: 82 KB
Statistics
  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 2
Created over 4 years ago · Last pushed over 4 years ago
Metadata Files
Readme Changelog License Citation

README.rst

Documentation
=============

|Documentation Status| |PyPI Status| |CI Test| |Coverage|

Introduction
------------

Simple package/script to setup ``JSON`` logging for a Python app or script.
Uses `python-json-logger `__ and
is mostly just a wrapper around it. Instead of adding this script to every
Python module that I/you create you can just add this as a dependency and call:

.. code:: python

   from nialog import setup_module_logging, LoggingLevel

   # Default logging level is WARNING
   setup_module_logging()

   # LoggingLevel has enums for default logging module levels
   # Can be used with e.g. typer as command-line inputs
   LoggingLevel.DEBUG.value == "DEBUG"  # = True

Running tests
-------------

To run pytest in currently installed environment:

.. code:: bash

   poetry run pytest

To run test suite best suited for before pushing to e.g. GitHub.

.. code:: bash

   poetry run invoke prepush

To run full extensive test suite:

.. code:: bash

   poetry run invoke test

Formatting and linting
----------------------

Formatting and linting is done with a single command. First formats,
then lints.

.. code:: bash

   poetry run invoke format-and-lint

Building docs
-------------

Docs can be built locally to test that ``ReadTheDocs`` can also build them:

.. code:: bash

   poetry run invoke docs

Invoke usage
------------

To list all available commands from ``tasks.py``:

.. code:: bash

   poetry run invoke --list

Development
~~~~~~~~~~~

Development dependencies include:

   -  invoke
   -  nox
   -  copier
   -  pytest
   -  coverage
   -  sphinx

Big thanks to all maintainers of the above packages!

License
~~~~~~~

Copyright © 2021, Nikolas Ovaskainen.

-----


.. |Documentation Status| image:: https://readthedocs.org/projects/nialog/badge/?version=latest
   :target: https://nialog.readthedocs.io/en/latest/?badge=latest
.. |PyPI Status| image:: https://img.shields.io/pypi/v/nialog.svg
   :target: https://pypi.python.org/pypi/nialog
.. |CI Test| image:: https://github.com/nialov/nialog/workflows/test-and-publish/badge.svg
   :target: https://github.com/nialov/nialog/actions/workflows/test-and-publish.yaml?query=branch%3Amaster
.. |Coverage| image:: https://raw.githubusercontent.com/nialov/nialog/master/docs_src/imgs/coverage.svg
   :target: https://github.com/nialov/nialog/blob/master/docs_src/imgs/coverage.svg

Owner

  • Name: Nikolas Ovaskainen
  • Login: nialov
  • Kind: user
  • Location: Turku, Finland
  • Company: MSc, Geology

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:

- family-names: Ovaskainen
  given-names: Nikolas
title: "nialog"
version: "0.0.2.post2.dev0+e1f6c83"
date-released: "2021-11-12"
keywords:
  - python
  - logging
contact:
  - email: "nikolasovaskainen@gmail.com"
url: "https://github.com/nialov/nialog"
repository-code: "https://github.com/nialov/nialog"

GitHub Events

Total
Last Year

Committers

Last synced: over 3 years ago

All Time
  • Total Commits: 29
  • Total Committers: 1
  • Avg Commits per committer: 29.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
nialov n****n@h****m 29

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

poetry.lock pypi
  • 129 dependencies
pyproject.toml pypi
  • invoke * develop
  • ipython * develop
  • jupyterlab * develop
  • nox * develop
  • pre-commit * develop
  • pytest * develop
  • black *
  • black-nb *
  • blackdoc *
  • blacken-docs *
  • coverage ^5.0
  • coverage-badge *
  • isort *
  • mypy *
  • nbsphinx *
  • pylint *
  • python ^3.7
  • python-json-logger ^2.0.2
  • rstcheck *
  • sphinx *
  • sphinx-autodoc-typehints *
  • sphinx-gallery *
  • sphinx-rtd-theme *