Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added make conform to run black against the code to standardize syntax #26

Merged
merged 1 commit into from
Apr 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ include HISTORY.rst
include LICENSE
include README.rst
include USAGE.rst
include requirements*.txt

recursive-include tests *
recursive-exclude * __pycache__
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: clean clean-test clean-pyc clean-build docs help
.PHONY: clean clean-test clean-pyc clean-build docs help lint conform
.DEFAULT_GOAL := help

define BROWSER_PYSCRIPT
Expand Down Expand Up @@ -92,3 +92,6 @@ dist: clean ## builds source and wheel package

install: clean ## install the package to the active Python's site-packages
python setup.py install

conform : ## Conform to a standard of coding syntax
black ecs_composex tests
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
troposphere==2.6.0
boto3==1.12.40

21 changes: 10 additions & 11 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
pip>=20.0
bump2version==0.5.11
wheel==0.33.6
watchdog==0.9.0
flake8==3.7.8
tox==3.14.0
coverage==4.5.4
Sphinx==1.8.5
bump2version==1.0.0
watchdog==0.10.2
flake8==3.7.9
tox==3.14.6
coverage==5.1
Sphinx==3.0.1
twine==3.1.1

pytest==4.6.5
pytest-runner==5.1
sphinx_rtd_theme
pytest==5.4.1
pytest-runner==5.2
sphinx-rtd-theme==0.4.3
black==19.10b0
5 changes: 5 additions & 0 deletions requirements_test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pytest==5.4.1
pytest-runner==5.2
flake8==3.7.9
tox==3.14.6
coverage==5.1
73 changes: 40 additions & 33 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,57 +3,64 @@

"""The setup script."""

from setuptools import setup, Extension, find_packages
import os
from setuptools import setup, find_packages

with open('README.rst') as readme_file:
DIR_HERE = os.path.abspath(os.path.dirname(__file__))

with open(f"{DIR_HERE}/README.rst") as readme_file:
readme = readme_file.read()

with open('HISTORY.rst') as history_file:
with open(f"{DIR_HERE}/HISTORY.rst") as history_file:
history = history_file.read()

requirements = [
'troposphere==2.6.0',
'boto3==1.12.36'
]
requirements = []
with open(f"{DIR_HERE}/requirements.txt", "r") as req_fd:
for line in req_fd:
requirements.append(line.strip())

test_requirements = []
with open(f"{DIR_HERE}/requirements_test.txt", "r") as req_fd:
for line in req_fd:
test_requirements.append(line.strip())

setup_requirements = ['pytest-runner>=5.1']
test_requirements = ['pytest>=4.6', "tox==3.14.6"]
setup_requirements = []

setup(
author="John Mille",
author_email='john@lambda-my-aws.io',
python_requires='!=2.*, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
author="John Preston",
author_email="john@lambda-my-aws.io",
python_requires="!=2.*, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8"
],
description="Package that generates CFN templates based on a Docker Compose file to generate ECS Cluster,"
"ECS Services and Extra resources such as SQS Queues, SNS Topics etc. that can be accessed via IAM",
"ECS Services and Extra resources such as SQS Queues, SNS Topics etc. that can be accessed via IAM",
entry_points={
'console_scripts': [
'ecs_composex=ecs_composex.cli:main',
'ecs_composex-compute=ecs_composex.compute.cli:main',
'ecs_composex-vpc=ecs_composex.vpc.cli:main',
'ecs_composex-sqs=ecs_composex.sqs.cli:main'
"console_scripts": [
"ecs_composex=ecs_composex.cli:main",
"ecs_composex-compute=ecs_composex.compute.cli:main",
"ecs_composex-vpc=ecs_composex.vpc.cli:main",
"ecs_composex-sqs=ecs_composex.sqs.cli:main",
]
},
install_requires=requirements,
license="BSD license",
long_description=readme + '\n\n' + history,
long_description=readme + "\n\n" + history,
include_package_data=True,
keywords='ecs_composex',
name='ecs_composex',
packages=find_packages(include=['ecs_composex', 'ecs_composex.*']),
keywords="ecs_composex",
name="ecs_composex",
packages=find_packages(include=["ecs_composex", "ecs_composex.*"]),
setup_requires=setup_requirements,
test_suite='tests',
test_suite="tests",
tests_require=test_requirements,
url='https://github.com/lambda-my-aws/ecs_composex',
version='0.1.3',
url="https://github.com/lambda-my-aws/ecs_composex",
version="0.1.3",
zip_safe=False
)
23 changes: 15 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
[tox]
requires = tox-venv
setuptools
envlist = py36, py37, py38, flake8

[testenv:flake8]
basepython = python
deps = flake8
commands = flake8 ecs_composex
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements_test.txt


[testenv]
passenv = *
setenv =
PYTHONPATH = {toxinidir}
deps =
-r{toxinidir}/requirements_dev.txt
; If you want to make tox run the tests with the same versions, create a
; requirements.txt with the pinned versions and uncomment the following line:
; -r{toxinidir}/requirements.txt
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements_test.txt

commands =
pip install -U pip
pytest --basetemp={envtmpdir}


[testenv:flake8]
basepython = python
deps = flake8
commands = flake8 ecs_composex