Compare commits
2 Commits
480f4266b6
...
220f2fa646
Author | SHA1 | Date |
---|---|---|
Антон Касимов | 220f2fa646 | |
Антон Касимов | f32067d7e3 |
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"project_name": "My New Project",
|
||||
"project_slug": "{{ cookiecutter.project_name|lower|replace(' ', '-') }}",
|
||||
"pkg_name": "{{ cookiecutter.project_slug|replace('-', '') }}",
|
||||
"description": "Project description",
|
||||
"author_name": "John Doe",
|
||||
"author_email": "doe@example.net",
|
||||
"__prompts__": {
|
||||
"package_name": "Select your project name",
|
||||
"project_slug": "Project directory",
|
||||
"pkg_name": "Python package name",
|
||||
"description": "Short description",
|
||||
"author_name": "Author full name",
|
||||
"author_email": "Author email"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
# Unix-style newlines with a newline ending every file
|
||||
end_of_line = lf
|
||||
insert_final_newline = True
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
charset = utf-8
|
||||
|
||||
# Whitespace at the end of lines
|
||||
trim_trailing_whitespace = True
|
||||
|
||||
[*.py]
|
||||
indent_size = 4
|
||||
|
||||
# Tab indentation (no size specified)
|
||||
[Makefile]
|
||||
indent_style = tab
|
|
@ -0,0 +1,164 @@
|
|||
# ---> Python
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# C extensions
|
||||
*.so
|
||||
|
||||
# Distribution / packaging
|
||||
.Python
|
||||
build/
|
||||
develop-eggs/
|
||||
dist/
|
||||
downloads/
|
||||
eggs/
|
||||
.eggs/
|
||||
lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
var/
|
||||
wheels/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
|
||||
# PyInstaller
|
||||
# Usually these files are written by a python script from a template
|
||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
||||
*.manifest
|
||||
*.spec
|
||||
|
||||
# Installer logs
|
||||
pip-log.txt
|
||||
pip-delete-this-directory.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
htmlcov/
|
||||
.tox/
|
||||
.nox/
|
||||
.coverage
|
||||
.coverage.*
|
||||
.cache
|
||||
nosetests.xml
|
||||
coverage.xml
|
||||
*.cover
|
||||
*.py,cover
|
||||
.hypothesis/
|
||||
.pytest_cache/
|
||||
cover/
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
# Django stuff:
|
||||
*.log
|
||||
local_settings.py
|
||||
db.sqlite3
|
||||
db.sqlite3-journal
|
||||
|
||||
# Flask stuff:
|
||||
instance/
|
||||
.webassets-cache
|
||||
|
||||
# Scrapy stuff:
|
||||
.scrapy
|
||||
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# PyBuilder
|
||||
.pybuilder/
|
||||
target/
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
||||
# IPython
|
||||
profile_default/
|
||||
ipython_config.py
|
||||
|
||||
# pyenv
|
||||
# For a library or package, you might want to ignore these files since the code is
|
||||
# intended to run in multiple environments; otherwise, check them in:
|
||||
# .python-version
|
||||
|
||||
# pipenv
|
||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
||||
# install all needed dependencies.
|
||||
#Pipfile.lock
|
||||
|
||||
# poetry
|
||||
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
||||
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
||||
# commonly ignored for libraries.
|
||||
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
||||
#poetry.lock
|
||||
|
||||
# pdm
|
||||
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
||||
#pdm.lock
|
||||
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
||||
# in version control.
|
||||
# https://pdm.fming.dev/#use-with-ide
|
||||
.pdm.toml
|
||||
|
||||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
||||
__pypackages__/
|
||||
|
||||
# Celery stuff
|
||||
celerybeat-schedule
|
||||
celerybeat.pid
|
||||
|
||||
# SageMath parsed files
|
||||
*.sage.py
|
||||
|
||||
# Environments
|
||||
.env
|
||||
.venv
|
||||
env/
|
||||
venv/
|
||||
ENV/
|
||||
env.bak/
|
||||
venv.bak/
|
||||
|
||||
# Spyder project settings
|
||||
.spyderproject
|
||||
.spyproject
|
||||
|
||||
# Rope project settings
|
||||
.ropeproject
|
||||
|
||||
# mkdocs documentation
|
||||
/site
|
||||
|
||||
# mypy
|
||||
.mypy_cache/
|
||||
.dmypy.json
|
||||
dmypy.json
|
||||
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
|
||||
# pytype static type analyzer
|
||||
.pytype/
|
||||
|
||||
# Cython debug symbols
|
||||
cython_debug/
|
||||
|
||||
# PyCharm
|
||||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
||||
#.idea/
|
||||
|
||||
|
||||
/tags
|
|
@ -0,0 +1,10 @@
|
|||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.0.1]
|
||||
Project initialization
|
|
@ -0,0 +1,28 @@
|
|||
WATCH_COMMAND=poetry run uvicorn --reload --host=::1 {{cookiecutter.pkg_name}}.application:app
|
||||
SERVER_COMMAND=poetry run uvicorn --host=::1 {{cookiecutter.pkg_name}}.application:app
|
||||
VERSION != poetry version | tr ' ' -
|
||||
|
||||
|
||||
watch:
|
||||
${WATCH_COMMAND}
|
||||
|
||||
test:
|
||||
poetry run pytest -x -n auto --dist loadscope
|
||||
|
||||
retest:
|
||||
poetry run pytest -lx --ff -n auto
|
||||
|
||||
cov:
|
||||
poetry run pytest --cov=cpms
|
||||
|
||||
server:
|
||||
${SERVER_COMMAND}
|
||||
|
||||
update:
|
||||
poetry update
|
||||
|
||||
build:
|
||||
poetry build -f wheel
|
||||
|
||||
wheels: build
|
||||
poetry run pip wheel -w dist dist/${VERSION}-*.whl
|
|
@ -0,0 +1,3 @@
|
|||
# {{cookiecutter.project_name}}
|
||||
|
||||
{{cookiecutter.description}}
|
|
@ -0,0 +1,57 @@
|
|||
[tool.poetry]
|
||||
name = "{{cookiecutter.pkg_name}}"
|
||||
version = "0.0.1"
|
||||
description = "{{cookiecutter.description}}"
|
||||
authors = ["{{cookiecutter.author_name}} <{{cookiecutter.author_email}}>", "Radium, LLC"]
|
||||
license = "ISC"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.10"
|
||||
starlette = "^0.33.0"
|
||||
uvicorn = {extras = ["standard"], version = "^0.24.0.post1"}
|
||||
sentry-sdk = "^1.5.0"
|
||||
pydantic = "^2.5.2"
|
||||
httpx = "^0.25.0"
|
||||
asyncpg = "^0.29.0"
|
||||
starlette-htmx = "^0.1.1"
|
||||
|
||||
[tool.poetry.group.test.dependencies]
|
||||
pytest = "^7.4.3"
|
||||
pytest-cov = "^4.1.0"
|
||||
pytest-sugar = "^0.9.7"
|
||||
pytest-xdist = {extras = ["psutil"], version = "^3.5.0"}
|
||||
pytest-mock = "^3.6.1"
|
||||
pytest-snapshot = "^0.9.0"
|
||||
pytest-httpx = "^0.27.0"
|
||||
Faker = "^20.1.0"
|
||||
asgi-lifespan = "^2.1.0"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
wemake-python-styleguide = "^0.18.0"
|
||||
flake8-pytest-style = "^1.7.2"
|
||||
flake8-SQL = "^0.4.1"
|
||||
flake8-annotations = "^3.0.1"
|
||||
flake8-logging-format = "^0.9.0"
|
||||
flake8-spellcheck = "^0.28.0"
|
||||
isort = "^5.7.0"
|
||||
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry>=0.12"]
|
||||
build-cpms = "poetry.masonry.api"
|
||||
|
||||
[tool.nitpick]
|
||||
style = "https://gitea.radium.group/radium/project-configuration/raw/branch/master/nitpick/all.toml"
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = [
|
||||
"tests",
|
||||
]
|
||||
python_files = "test*.py"
|
||||
addopts = "-rsxX -l --tb=short --strict-markers --doctest-modules"
|
||||
xfail_strict = "true"
|
||||
|
||||
[tool.isort]
|
||||
multi_line_output = 3
|
||||
include_trailing_comma = true
|
||||
use_parentheses = true
|
|
@ -0,0 +1,9 @@
|
|||
[flake8]
|
||||
per-file-ignores = tests/**.py: S101, D103, ANN201
|
||||
spellcheck-targets=comments
|
||||
sql-excepted-names=EXISTS
|
||||
ignore = F841,W504
|
||||
nested-classes-whitelist=Meta,Params,Config
|
||||
|
||||
[darglint]
|
||||
strictness = long
|
|
@ -1,4 +1,4 @@
|
|||
["pyproject.toml".tool.poetry.group.dev.dependencies]
|
||||
["pyproject.toml".tool.poetry.group.test.dependencies]
|
||||
pytest = "^7.4.3"
|
||||
pytest-cov = "^4.1.0"
|
||||
pytest-xdist = {extras = ["psutil"], version = "^3.5.0"}
|
||||
|
|
Loading…
Reference in New Issue