Skip to content
Open
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 cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"author_name": "Your name (or your organization/company/team)",
"description": "A short description of the project.",
"open_source_license": ["MIT", "BSD-3-Clause", "No license file"],
"env_choice": ["poetry", "conda"],
"s3_bucket": "[OPTIONAL] your-bucket-for-syncing-data (do not include 's3://')",
"aws_profile": "default",
"install_data_science_pkgs": ["yes", "no"]
Expand Down
50 changes: 47 additions & 3 deletions {{ cookiecutter.repo_name }}/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,50 @@
repos:
- repo: https://github.com/psf/black
rev: stable # Replace by any tag/version: https://github.com/psf/black/tags
- repo: local
hooks:
- id: isort
name: isort (python)
entry: isort
language: system
types: [python]
- id: black
language_version: python3 # Should be a command that runs python3.6+
name: black
entry: black
language: system
types: [python]
require_serial: true
- id: check-added-large-files
name: Check for added large files
entry: check-added-large-files
language: system
- id: check-toml
name: Check Toml
entry: check-toml
language: system
types: [toml]
- id: check-yaml
name: Check Yaml
entry: check-yaml
language: system
types: [yaml]
- id: end-of-file-fixer
name: Fix End of Files
entry: end-of-file-fixer
language: system
types: [text]
stages: [commit, push, manual]
- id: flake8
name: flake8
entry: flake8
language: system
types: [python]
require_serial: true
- id: trailing-whitespace
name: Trim Trailing Whitespace
entry: trailing-whitespace-fixer
language: system
types: [text]
stages: [commit, push, manual]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.3.0
hooks:
- id: prettier
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[tool.poetry]
name = "{{cookiecutter.project_name}}"
version = "0.0.1"
description = "{{cookiecutter.description}}"
authors = ["{{cookiecutter.author_name}}"]
license = "{{cookiecutter.open_source_license}}"
readme = "README.md"

[tool.poetry.dependencies]
python = ">=3.7.1,<4.0.0"
click = "^8.0.1"

[tool.poetry.dev-dependencies]
pytest = "^6.2.4"
pre-commit = "^2.13.0"
flake8 = "^3.9.2"
black = "^20.8b1"
reorder-python-imports = "^2.5.0"
pre-commit-hooks = "^4.0.1"
data-science-types = "^0.2.23"

[tool.isort]
profile = "black"
include_trailing_comma = true
lines_after_imports = 2
lines_between_types = 1
use_parentheses = true
src_paths = ["src", "tests"]

[tool.black]
line-length = 88
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.nox
| \.venv
| _build
| buck-out
| build
| dist
| tests/.*/setup.py
| \.ipynb_checkpoints
)/
'''

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"