Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Pipenv 추가 #12

Merged
merged 3 commits into from
Feb 14, 2019
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
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,11 @@ use_black [n]: y
```

[`black`](https://github.com/ambv/black) 사용 여부를 설정할 수 있습니다. 설정 시 `pre-push` hook과 `make check`, `make format` 과정에 `black` 이 추가됩니다.

```
user_pipenv [n]: y
```

[`pipenv`](https://github.com/pypa/pipenv) 사용 여부를 설정할 수 있습니다.

* `black`과 `pipenv`를 같이 사용할 경우, `black`이 현재 프리릴리즈 상태이므로 `pipenv lock --pre` 명령어로 `Pipfile.lock` 파일을 생성해야합니다.
3 changes: 2 additions & 1 deletion cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"package_name": "{{ cookiecutter.project_slug.replace('-', '') }}",
"python_version": ["3.7", "3.6"],
"use_mypy": ["do not use", "beginner", "expert"],
"use_black": "n"
"use_black": "n",
"user_pipenv": "n"
}
3 changes: 3 additions & 0 deletions hooks/post_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ def remove_file(name):
if __name__ == '__main__':
if '{{ cookiecutter.use_mypy|lower }}' == 'do not use':
remove_file('mypy.ini')
if '{{ cookiecutter.user_pipenv|lower }}' == 'n':
remove_file('.gitattributes')
remove_file('Pipfile')
1 change: 1 addition & 0 deletions {{cookiecutter.project_slug}}/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Pipfile.lock binary
21 changes: 21 additions & 0 deletions {{cookiecutter.project_slug}}/Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]
isort = "*"
{%- if cookiecutter.use_black|lower != 'n' %}
black = "*"
{%- endif %}
pylint = "*"
{%- if cookiecutter.use_mypy|lower != 'do not use' %}
mypy = "*"
{%- endif %}
pytest = "*"
pytest-cov = "*"

[packages]

[requires]
python_version = "{{ cookiecutter.python_version }}"