Skip to content

Commit

Permalink
feat: add badgerdoc cli library
Browse files Browse the repository at this point in the history
  • Loading branch information
cakeinsauce committed Mar 26, 2023
1 parent 33bbdce commit e65b2cc
Show file tree
Hide file tree
Showing 9 changed files with 115 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/badgerdoc_cli/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/venv/
/.mypy_cache/
/.pytest_cache/
/tests/.pytest_cache/
*.egg-info/
.pytest_cache/
40 changes: 40 additions & 0 deletions lib/badgerdoc_cli/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args:
- --profile=black
- --line-length=79
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
language_version: python3
args:
- --line-length=79
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.1.1
hooks:
- id: mypy
name: mypy
entry: mypy
language: python
types: [python]
require_serial: true
args:
- --strict
- repo: https://github.com/pycqa/pylint
rev: v2.17.1
hooks:
- id: pylint
types: [ python ]
args:
- --max-line-length=79
- --errors-only
23 changes: 23 additions & 0 deletions lib/badgerdoc_cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<p style="font-size: 15vw; text-align: center">
<span style="color: #3f8dc8">Badgerdoc CLI</span>
</p>
<p style="text-align: center">
<em>Badgerdoc CLI simplify routine actions for the project, simple and ready to go</em>
</p>

---
## Requirements
[Python 3.8+ ](https://www.python.org/downloads/)

## Installation
- Clone repository `git clone git@github.com:epam/badgerdoc.git`
- Change directory `cd badgerdoc/lib/badgerdoc_cli`
- Create and activate virtualenv `python3.8 -m venv venv` and `source venv/bin/activate`
- Install CLI tool `pip install .`
- Install development dependencies if needed `pip install ."[dev]"`

## Usage
All commands available at `badgerdoc`.

## Example
blah blah
1 change: 1 addition & 0 deletions lib/badgerdoc_cli/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0
6 changes: 6 additions & 0 deletions lib/badgerdoc_cli/badgerdoc_cli/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
def get_version(file_path: str = "VERSION") -> str:
with open(file_path) as version_file:
return version_file.read().strip()


__version__ = get_version()
2 changes: 2 additions & 0 deletions lib/badgerdoc_cli/badgerdoc_cli/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def main() -> None:
print("HELLO BADGERDOC!")
35 changes: 35 additions & 0 deletions lib/badgerdoc_cli/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[project]
name = "badgerdoc_cli"
description = "Package for badgerdoc cli tools"
requires-python = ">=3.8"
dynamic = ["version", "readme", "dependencies", "optional-dependencies"]

[project.scripts]
badgerdoc = "badgerdoc_cli.main:main"

[tool.setuptools.dynamic]
version = {attr = "badgerdoc_cli.__version__"}
readme = {file = ["README.md"]}
dependencies = {file = "requirements.txt"}
optional-dependencies.dev = {file = "requirements-dev.txt"}

[build-system]
requires = ["setuptools>=56.0.0", "wheel"]
build-backend = "setuptools.build_meta"

# Dev tools settings

[tool.black]
line-length = 79

[tool.isort]
profile = "black"
line_length = 79

[tool.mypy]
python_version = 3.8
strict = "True"

[tool.pylint.basic]
max-line-length=79
errors-only = "True"
2 changes: 2 additions & 0 deletions lib/badgerdoc_cli/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pytest>=7.2.2
pre-commit>=3.2.1
Empty file.

0 comments on commit e65b2cc

Please sign in to comment.