diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..380ed62 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,26 @@ +repos: +- repo: https://github.com/PyCQA/isort + rev: 5.6.4 + hooks: + - id: isort +- repo: https://github.com/psf/black + rev: 20.8b1 + hooks: + - id: black +- repo: https://gitlab.com/pycqa/flake8 + rev: 3.8.4 + hooks: + - id: flake8 +- repo: https://github.com/pre-commit/mirrors-mypy + rev: v0.790 + hooks: + - id: mypy +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.3.0 + hooks: + - id: check-toml + - id: check-yaml + # - id: check-json + - id: end-of-file-fixer + - id: trailing-whitespace + - id: requirements-txt-fixer diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..8c1c688 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,23 @@ +[build-system] +requires = [ + "setuptools>=42", + "wheel" +] +build-backend = "setuptools.build_meta" + +[tool.black] +line-length = 88 +include = '\.pyi?$' +exclude = ''' +/( + \.git + | \.hg + | \.mypy_cache + | \.tox + | \.venv + | _build + | buck-out + | build + | dist +)/ +''' diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..5460703 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,12 @@ +black==20.8b1 +flake8==3.8.4 +mypy==0.812 +pre-commit==2.10.1 +pytest==6.2.2 +PyYAML==5.4.1 +regex==2020.11.13 +six==1.15.0 +toml==0.10.2 +typed-ast==1.4.2 +typing-extensions==3.7.4.3 +virtualenv==20.4.2 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..9cdbaf0 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,41 @@ +[metadata] +name = buildurl +version = attr: setup.__version__ +author = Micael Jarniac +author_email = micael@jarniac.dev +description = Simple URL builder +long_description = file: README.md +long_description_content_type = text/markdown +url = https://github.com/MicaelJarniac/BuildURL +project_urls = + Bug Tracker = https://github.com/MicaelJarniac/BuildURL/issues +classifiers = + Programming Language :: Python :: 3 + License :: OSI Approved :: MIT License + Operating System :: OS Independent + +[options] +packages = find: +python_requires = >=3.6 + +[flake8] +max-line-length = 88 +max-complexity = 18 +ignore = E203, E266, E501, W503, F403, F401 + +[isort] +profile = black + +[semantic_release] +changelog_capitalize = false +version_variable = setup.py:__version__ +upload_to_pypi = false +build_command = python setup.py sdist +branch = main + +[coverage:run] +omit = venv/*, tests/* +command_line = -m pytest + +[tool:pytest] +# addopts = --cov diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..58da102 --- /dev/null +++ b/setup.py @@ -0,0 +1,5 @@ +import setuptools + +__version__ = "1.0.0" + +setuptools.setup()