From 91a0ea35c3238852e6190a4829a9ba1f738b4fbe Mon Sep 17 00:00:00 2001 From: Nathan Date: Thu, 11 Nov 2021 10:36:20 +0100 Subject: [PATCH] init package --- .pre-commit-config.yaml | 38 +++++++++++++++++++++++++ ascii_art/__init__.py | 2 ++ ascii_art/scrap/__init__.py | 2 ++ ascii_art/scrap/scrap_img.py | 2 ++ ascii_art/scrap/tests/test_scrap_img.py | 2 ++ requirements.txt | 1 + setup.py | 15 ++++++++++ version | 1 + 8 files changed, 63 insertions(+) create mode 100644 .pre-commit-config.yaml create mode 100644 ascii_art/__init__.py create mode 100644 ascii_art/scrap/__init__.py create mode 100644 ascii_art/scrap/scrap_img.py create mode 100644 ascii_art/scrap/tests/test_scrap_img.py create mode 100644 requirements.txt create mode 100644 setup.py create mode 100644 version diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..4f44dd9 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,38 @@ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.0.1 + hooks: + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace + - id: requirements-txt-fixer +- repo: https://github.com/asottile/reorder_python_imports + rev: v2.6.0 + hooks: + - id: reorder-python-imports + args: [--py3-plus] +- repo: https://github.com/econchick/interrogate + rev: 1.5.0 # or master if you're bold + hooks: + - id: interrogate + args: [-vv, -i, --fail-under=50] + verbose: true +- repo: https://github.com/ambv/black + rev: stable + hooks: + - id: black +# Local pre commit hook to only contril +# code quality and not block commit +- repo: local + hooks: + - id: flake8 + name: flake8 + language: system + files: .+\.py$ + entry: bash -c 'flake8 "$@" || true' -- + verbose: true + - id: radon + name: radon + language: system + entry: bash -c 'radon cc "$@" || true' -- + verbose: true diff --git a/ascii_art/__init__.py b/ascii_art/__init__.py new file mode 100644 index 0000000..422c1c9 --- /dev/null +++ b/ascii_art/__init__.py @@ -0,0 +1,2 @@ +"""ASCII Art generator package +""" diff --git a/ascii_art/scrap/__init__.py b/ascii_art/scrap/__init__.py new file mode 100644 index 0000000..1a58ff1 --- /dev/null +++ b/ascii_art/scrap/__init__.py @@ -0,0 +1,2 @@ +"""Scraping submodule +""" diff --git a/ascii_art/scrap/scrap_img.py b/ascii_art/scrap/scrap_img.py new file mode 100644 index 0000000..6e6ac54 --- /dev/null +++ b/ascii_art/scrap/scrap_img.py @@ -0,0 +1,2 @@ +"""Retrieves an image online given a keyword +""" diff --git a/ascii_art/scrap/tests/test_scrap_img.py b/ascii_art/scrap/tests/test_scrap_img.py new file mode 100644 index 0000000..bd4518f --- /dev/null +++ b/ascii_art/scrap/tests/test_scrap_img.py @@ -0,0 +1,2 @@ +"""Test scrap image from keywords +""" diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..a8ed785 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +requests==2.26.0 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..960361c --- /dev/null +++ b/setup.py @@ -0,0 +1,15 @@ +from distutils.core import setup + +version = open("version", "rb").read().close() +desc = "Generate an ASCII Art from keyword put in the cli" +url = "https://github.com/Nathanlauga/ascii-art-generator-cli" + +setup( + name="ascii_art", + version=version, + description=desc, + author="Nathan LAUGA", + author_email="nathan.lauga@protonmail.com", + url=url, + packages=["ascii_art"], +) diff --git a/version b/version new file mode 100644 index 0000000..6e8bf73 --- /dev/null +++ b/version @@ -0,0 +1 @@ +0.1.0