Skip to content

Uno-Takashi/django-dynamic-shields

Repository files navigation

django-dynamic-shields

sphinx Code Quality security

codecov PyPI - Downloads PyPI License: MIT

📚 Overview

Shields.io is one of the great inventions in human history. Everyone has collected badges and stickers as a child. In other words, it is one of the fundamental human needs to stick a badge.

With django-dynamic-badge, the display can be changed dynamically using information from a server built with Django.

For example, create a badge with the number of active users today, the number of times the function has been used, and the results of the server health check.

💾 Install

Published on PyPI. It can be installed with the following command.

pip install django-dynamic-shields

Alternatively, you can download and install the .whl file from the release.

📔 Document

Uploaded to the following github pages

🎮 Usage

⚒️ Develop

Preparation

Development requires installation of Poetry.

Watchman is required to run code checks with pyre. Although not required for development, code that fails pyre-check cannot be merged.

After installing the required software, execute the following commands to set up the development environment.

poetry install

Code Check

This repository uses Github actions for code checking. These actions are automatically executed when you push, but you can also execute them in your local environment before pushing.

pytest

codecov

Must pass CI by pytest.

poetry run pytest --cov=django_dynamic_shields --cov-report=xml --workers auto

lizard

lizard is a tool for measuring CCN. lizard allows us to block merging of overly complex code.

poetry run lizard ./django_dynamic_shields/

pyre

Pyre is a performant type checker for Python compliant with PEP 484.

poetry run pyre

bndit

bandit is a static analysis tool for python. It blocks vulnerable code.

poetry run bandit django_dynamic_shields -r 

python-taint

python-taint(pyt) is a static analysis tool for python. It blocks vulnerable code.

poetry run pyt -a D  ./django_dynamic_shields

Other

Develop according to GitHub flow

If you have any questions, feel free to ask in the Q&A

📝 License

GitHub watchers GitHub Repo stars GitHub forks Python Django