1
0
mirror of https://github.com/enpaul/estraven.git synced 2024-11-21 14:07:06 +00:00

Rename project to estraven

This commit is contained in:
Ethan Paul 2022-01-08 22:43:26 -05:00
parent 42367974ac
commit 1cfc6b6881
No known key found for this signature in database
GPG Key ID: D0E2CBF1245E92BF
11 changed files with 519 additions and 509 deletions

View File

@ -1,17 +1,4 @@
--- ---
# All of the pre-commit hooks here actually use the `pytyhon` pre-commit language
# setting. However, for the python language setting, pre-commit will create and manage
# a cached virtual environment for each hook ID and do a bare `pip install <repo>` into
# the venv to setup the hook. This can result in conflicting dependency versions between
# the version installed to the pre-commit venv and the version installed to the Poetry
# venv specified in the lockfile.
#
# The solution is to specify `language: system` for all hooks and then install the
# required dependencies to the Poetry venv. The `system` language skips the isolated
# venv creation and looks for the entrypoint specified by the hook in the global
# environment which, if running in the Poetry venv, will find the entrypoint provided
# by the Poetry-managed dependency.
#
repos: repos:
- repo: local - repo: local
hooks: hooks:

View File

@ -1,4 +1,4 @@
## Copyright 2021 Ethan Paul ## Copyright 2022 Ethan Paul
Permission is hereby granted, free of charge, to any person obtaining a copy of this Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software software and associated documentation files (the "Software"), to deal in the Software

View File

@ -1,4 +1,4 @@
# genly makefile # estraven makefile
.PHONY: help .PHONY: help
# Put it first so that "make" without argument is like "make help" # Put it first so that "make" without argument is like "make help"

View File

@ -1,5 +1,9 @@
# genly # estraven
An opinionated [YAML](https://yaml.org/) formatter for [Ansible](https://www.ansible.com/) playbooks An opinionated [YAML](https://yaml.org/) formatter for [Ansible](https://www.ansible.com/)
playbooks
Inspired by tools like [black](https://github.com/psf/black/), [rustfmt](https://rust-lang.github.io/rustfmt/), and [yamlfmt](https://pypi.org/project/yamlfmt/), built around [ruamel.yaml](https://pypi.org/project/ruamel.yaml/) Inspired by tools like [black](https://github.com/psf/black/),
[rustfmt](https://rust-lang.github.io/rustfmt/), and
[yamlfmt](https://pypi.org/project/yamlfmt/), built around
[ruamel.yaml](https://pypi.org/project/ruamel.yaml/)

View File

@ -1,7 +1,7 @@
# pylint: disable=missing-docstring # pylint: disable=missing-docstring
__title__ = "genly" __title__ = "estraven"
__summary__ = "An opinionated YAML formatter for Ansible playbooks" __summary__ = "An opinionated YAML formatter for Ansible playbooks"
__version__ = "0.0.0" __version__ = "0.0.0"
__url__ = "https://github.com/enpaul/genly/" __url__ = "https://github.com/enpaul/estraven/"
__license__ = "MIT" __license__ = "MIT"
__authors__ = ["Ethan Paul <24588726+enpaul@users.noreply.github.com>"] __authors__ = ["Ethan Paul <24588726+enpaul@users.noreply.github.com>"]

940
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +1,18 @@
[tool.poetry] [tool.poetry]
name = "genly" name = "estraven"
version = "0.0.0" version = "0.0.0"
license = "MIT" license = "MIT"
authors = ["Ethan Paul <24588726+enpaul@users.noreply.github.com>"] authors = ["Ethan Paul <24588726+enpaul@users.noreply.github.com>"]
description = "An opinionated YAML formatter for Ansible playbooks" description = "An opinionated YAML formatter for Ansible playbooks"
repository = "https://github.com/enpaul/genly/" repository = "https://github.com/enpaul/estraven/"
packages = [ packages = [
{include = "genly"}, {include = "estraven"},
{include = "tests/*.py", format = "sdist"} {include = "tests/*.py", format = "sdist"}
] ]
include = [ include = [
"genly/py.typed" "genly/py.typed"
] ]
keywords = ["ansible", "yaml", "automation", "formatter"] keywords = ["ansible", "yaml", "automation", "formatter", "pre-commit"]
readme = "README.md" readme = "README.md"
classifiers = [ classifiers = [
"Development Status :: 2 - Pre-Alpha", "Development Status :: 2 - Pre-Alpha",
@ -25,15 +25,15 @@ classifiers = [
"Natural Language :: English", "Natural Language :: English",
"Operating System :: OS Independent", "Operating System :: OS Independent",
"Programming Language :: Python :: 3", "Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython" "Programming Language :: Python :: Implementation :: CPython"
] ]
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.6.1" python = "^3.7.0"
[tool.poetry.dev-dependencies] [tool.poetry.dev-dependencies]
bandit = "^1.6.2" bandit = "^1.6.2"
@ -41,6 +41,7 @@ black = { version = "^21.9b0", allow-prereleases = true, python = "^3.7" }
blacken-docs = "^1.8.0" blacken-docs = "^1.8.0"
ipython = { version = "^7.18.1", python = "^3.7" } ipython = { version = "^7.18.1", python = "^3.7" }
mypy = "^0.800" mypy = "^0.800"
poetry = "^1.1.0"
pre-commit = "^2.7.1" pre-commit = "^2.7.1"
pre-commit-hooks = "^3.3.0" pre-commit-hooks = "^3.3.0"
pylint = "^2.4.4" pylint = "^2.4.4"
@ -50,7 +51,7 @@ reorder-python-imports = "^2.3.5"
safety = "^1.9.0" safety = "^1.9.0"
toml = "^0.10.1" toml = "^0.10.1"
tox = "^3.20.0" tox = "^3.20.0"
tox-poetry-installer = { version = "^0.8.1", extras = ["poetry"] } tox-poetry-installer = { version = "^0.8.2", extras = ["poetry"] }
mdformat = "^0.6.4" mdformat = "^0.6.4"
mdformat-gfm = "^0.2" mdformat-gfm = "^0.2"

View File

@ -7,7 +7,7 @@ from pathlib import Path
import toml import toml
from genly import __about__ from estraven import __about__
def test_metadata(): def test_metadata():

40
tox.ini
View File

@ -1,5 +1,5 @@
[tox] [tox]
envlist = py36, py37, py38, py39, static, static-tests, security envlist = py3{7,8,9,10}, static, static-tests, security
isolated_build = true isolated_build = true
skip_missing_interpreters = true skip_missing_interpreters = true
@ -12,7 +12,10 @@ locked_deps =
pytest-cov pytest-cov
toml toml
commands = commands =
pytest --cov {toxinidir}/genly --cov-config {toxinidir}/.coveragerc --cov-report term-missing {toxinidir}/tests/ pytest {toxinidir}/tests/ \
--cov {toxinidir}/estraven \
--cov-config {toxinidir}/.coveragerc \
--cov-report term-missing
[testenv:static] [testenv:static]
description = Static formatting and quality enforcement description = Static formatting and quality enforcement
@ -31,8 +34,11 @@ locked_deps =
pylint pylint
commands = commands =
pre-commit run --all-files pre-commit run --all-files
pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/genly/ pylint {toxinidir}/estraven/ \
mypy --ignore-missing-imports --no-strict-optional {toxinidir}/genly/ --rcfile {toxinidir}/.pylintrc
mypy {toxinidir}/estraven/ \
--ignore-missing-imports \
--no-strict-optional
[testenv:static-tests] [testenv:static-tests]
description = Static formatting and quality enforcement for the tests description = Static formatting and quality enforcement for the tests
@ -44,8 +50,11 @@ locked_deps =
pytest pytest
mypy mypy
commands = commands =
pylint --rcfile {toxinidir}/.pylintrc {toxinidir}/tests/ pylint {toxinidir}/tests/ \
mypy --ignore-missing-imports --no-strict-optional {toxinidir}/tests/ --rcfile {toxinidir}/.pylintrc
mypy {toxinidir}/tests/ \
--ignore-missing-imports \
--no-strict-optional
[testenv:security] [testenv:security]
description = Security checks description = Security checks
@ -57,7 +66,18 @@ locked_deps =
safety safety
poetry poetry
commands = commands =
bandit --recursive --quiet {toxinidir}/genly/ bandit {toxinidir}/genly/ \
bandit --recursive --quiet --skip B101 {toxinidir}/tests/ --recursive \
poetry export --format requirements.txt --output {envtmpdir}/requirements.txt --without-hashes --dev --quiet
safety check --bare --file {envtmpdir}/requirements.txt bandit {toxinidir}/tests/ \
--recursive \
--quiet \
--skip B101
poetry export \
--format requirements.txt \
--output {envtmpdir}/requirements.txt \
--without-hashes \
--dev
safety check \
--file {envtmpdir}/requirements.txt \
--json