diff --git a/.gitignore b/.gitignore index 87e166d..7856f1a 100644 --- a/.gitignore +++ b/.gitignore @@ -119,3 +119,6 @@ venv .hypothesis/ .mypy_cache/ **/__pycache__/ + +# poetry +poetry.lock diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..b90b156 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,42 @@ +[tool.isort] +multi_line_output = 3 +include_trailing_comma = true +force_grid_wrap = 0 +use_parentheses = true +ensure_newline_before_comments = true +line_length = 120 + +[tool.poetry] +name = "clickhouse_orm" +version = "0.2.1" +description = "A simple ORM for working with the Clickhouse database" +authors = ["olliemath "] +license = "BSD" +homepage = "https://github.com/SuadeLabs/clickhouse_orm" +repository = "https://github.com/SuadeLabs/clickhouse_orm" +classifiers = [ + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Database" +] + +[tool.poetry.dependencies] +python = "^3.7" + +[tool.poetry.dev-dependencies] +flake8 = "^3.9.2" +flake8-bugbear = "^21.4.3" +pep8-naming = "^0.12.0" +pytest = "^6.2.4" + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..0317882 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,18 @@ +[flake8] +max-line-length = 120 +select = + # pycodestyle + E, W + # pyflakes + F + # flake8-bugbear + B, B9 + # pydocstyle + D + # isort + I +ignore = + E203 # Whitespace after ':' + W503 # Operator after new line + B950 # We use E501 + B008 # Using callable in function defintion, required for FastAPI diff --git a/setup.in b/setup.in deleted file mode 100644 index e62522f..0000000 --- a/setup.in +++ /dev/null @@ -1,50 +0,0 @@ - -SETUP_INFO = dict( - name = '${project:name}', - version = '${infi.recipe.template.version:version}', - author = '${infi.recipe.template.version:author}', - author_email = '${infi.recipe.template.version:author_email}', - - url = ${infi.recipe.template.version:homepage}, - license = 'BSD', - description = """${project:description}""", - - # http://pypi.python.org/pypi?%3Aaction=list_classifiers - classifiers = [ - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "License :: OSI Approved :: BSD License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Programming Language :: Python :: 2.7", - "Programming Language :: Python :: 3.4", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Database" - ], - - install_requires = ${project:install_requires}, - namespace_packages = ${project:namespace_packages}, - - package_dir = {'': 'src'}, - package_data = {'': ${project:package_data}}, - include_package_data = True, - zip_safe = False, - - entry_points = dict( - console_scripts = ${project:console_scripts}, - gui_scripts = ${project:gui_scripts}, - ), -) - -if SETUP_INFO['url'] is None: - _ = SETUP_INFO.pop('url') - -def setup(): - from setuptools import setup as _setup - from setuptools import find_packages - SETUP_INFO['packages'] = find_packages('src') - _setup(**SETUP_INFO) - -if __name__ == '__main__': - setup() - diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 81299c8..0000000 --- a/tox.ini +++ /dev/null @@ -1,12 +0,0 @@ -[tox] -envlist = py27, py35, pypy - -[testenv] -deps = - nose - flake8 - -commands = - {envpython} -m compileall -q src/ tests/ - # {envbindir}/flake8 src/ tests/ --max-line-length=120 - nosetests -v {posargs}