diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..1e468919 --- /dev/null +++ b/.flake8 @@ -0,0 +1,3 @@ +[flake8] +max-line-length = 120 +exclude = .git,__pycache__,__init__.py,.mypy_cache,.pytest_cache diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 027113eb..00000000 --- a/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include *.txt *.ini *.cfg *.rst .env -recursive-include brewman *.ico *.png *.css *.gif *.jpg *.txt *.js *.html *.map *.eot *.svg *.ttf *.woff diff --git a/README.txt b/README.md similarity index 100% rename from README.txt rename to README.md diff --git a/container.ini b/container.ini deleted file mode 100644 index 3dba1d55..00000000 --- a/container.ini +++ /dev/null @@ -1,50 +0,0 @@ -[app:main] -use = egg:brewman - -pyramid.reload_templates = false -pyramid.debug_authorization = false -pyramid.debug_notfound = false -pyramid.debug_routematch = false -pyramid.default_locale_name = en -secret_key = secret - -[server:main] -use = egg:waitress#main -host = 0.0.0.0 -port = 80 - -# Begin logging configuration - -[loggers] -keys = root, brewman, sqlalchemy.engine.base - -[handlers] -keys = console - -[formatters] -keys = generic - -[logger_root] -level = WARNING -handlers = console - -[logger_brewman] -level = WARNING -handlers = -qualname = brewman - -[logger_sqlalchemy.engine.base] -level = DEBUG -handlers = -qualname = sqlalchemy.engine.base - -[handler_console] -class = StreamHandler -args = (sys.stderr,) -level = NOTSET -formatter = generic - -[formatter_generic] -format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s - -# End logging configuration diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..ba8a4b65 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,32 @@ +[tool.poetry] +name = "brewman" +version = "7.5.0" +description = "Accounting plus inventory management for a restaurant." +authors = ["tanshu "] + +[tool.poetry.dependencies] +python = "^3.8" +uvicorn = "^0.12.1" +fastapi = "^0.61.1" +python-jose = {extras = ["cryptography"], version = "^3.2.0"} +passlib = {extras = ["bcrypt"], version = "^1.7.3"} +psycopg2-binary = "^2.8.6" +SQLAlchemy = "^1.3.19" +python-multipart = "^0.0.5" +PyJWT = "^1.7.1" +alembic = "^1.4.3" +itsdangerous = "^1.1.0" +python-dotenv = "^0.14.0" +pydantic = {extras = ["dotenv"], version = "^1.6.1"} +starlette = "^0.13.6" + +[tool.poetry.dev-dependencies] +flake8 = "^3.8.4" +black = "^20.8b1" + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api" + +[tool.black] +line-length = 120 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index fe22da04..00000000 --- a/requirements.txt +++ /dev/null @@ -1,15 +0,0 @@ -setuptools -wheel -uvicorn -fastapi -python-jose[cryptography] -passlib[bcrypt] -psycopg2-binary -sqlalchemy -python-multipart -pyjwt -alembic -itsdangerous -python-dotenv -pydantic[dotenv] -starlette diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 38ffeeca..00000000 --- a/setup.cfg +++ /dev/null @@ -1,27 +0,0 @@ -[nosetests] -match = ^test -nocapture = 1 -cover-package = brewman -with-coverage = 1 -cover-erase = 1 - -[compile_catalog] -directory = brewman/locale -domain = brewman -statistics = true - -[extract_messages] -add_comments = TRANSLATORS: -output_file = brewman/locale/brewman.pot -width = 80 - -[init_catalog] -domain = brewman -input_file = brewman/locale/brewman.pot -output_dir = brewman/locale - -[update_catalog] -domain = brewman -input_file = brewman/locale/brewman.pot -output_dir = brewman/locale -previous = true diff --git a/setup.py b/setup.py deleted file mode 100644 index 38746ec4..00000000 --- a/setup.py +++ /dev/null @@ -1,39 +0,0 @@ -import os - -from setuptools import setup, find_packages - -here = os.path.abspath(os.path.dirname(__file__)) -with open(os.path.join(here, 'README.txt'), "r") as r: - README = r.read() -with open(os.path.join(here, 'CHANGES.txt'), "r") as c: - CHANGES = c.read() -with open(os.path.join(here, 'requirements.txt'), "r") as r: - requires = r.read().splitlines() - -setup(name='brewman', - version='7.4.0', - description='brewman', - long_description=README + '\n\n' + CHANGES, - classifiers=[ - "Programming Language :: Python", - "Framework :: Pyramid", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", - ], - author='Tanshu', - author_email='brewman@tanshu.com', - url='http://tanshu.com', - keywords='web pyramid pylons', - packages=find_packages(), - include_package_data=True, - zip_safe=False, - install_requires=requires, - tests_require=requires, - test_suite="brewman", - entry_points="""\ - [paste.app_factory] - main = brewman:main - [console_scripts] - initdb = brewman.scripts.initializedb:main - """, - )