-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from jacebrowning/release/v1.5
Release v1.5
- Loading branch information
Showing
16 changed files
with
163 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* text=auto | ||
CHANGELOG.md merge=union |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[settings] | ||
|
||
not_skip = __init__.py | ||
|
||
multi_line_output = 3 | ||
|
||
known_standard_library = dataclasses,typing_extensions | ||
known_third_party = click,log | ||
known_first_party = log | ||
|
||
combine_as_imports = true | ||
force_grid_wrap = false | ||
include_trailing_comma = true | ||
|
||
lines_after_imports = 2 | ||
line_length = 88 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import os | ||
import importlib | ||
import tempfile | ||
import shutil | ||
import subprocess | ||
import sys | ||
|
||
CWD = os.getcwd() | ||
TMP = tempfile.gettempdir() | ||
CONFIG = { | ||
"full_name": "Jace Browning", | ||
"email": "jacebrowning@gmail.com", | ||
"github_username": "jacebrowning", | ||
"github_repo": "minilog", | ||
"default_branch": "develop", | ||
"project_name": "minilog", | ||
"package_name": "log", | ||
"project_short_description": "Minimalistic wrapper for Python logging.", | ||
"python_major_version": 3, | ||
"python_minor_version": 6, | ||
} | ||
|
||
|
||
def install(package='cookiecutter'): | ||
try: | ||
importlib.import_module(package) | ||
except ImportError: | ||
print("Installing cookiecutter") | ||
subprocess.check_call([sys.executable, '-m', 'pip', 'install', package]) | ||
|
||
|
||
def run(): | ||
print("Generating project") | ||
|
||
from cookiecutter.main import cookiecutter | ||
|
||
os.chdir(TMP) | ||
cookiecutter( | ||
'https://github.com/jacebrowning/template-python.git', | ||
no_input=True, | ||
overwrite_if_exists=True, | ||
extra_context=CONFIG, | ||
) | ||
|
||
|
||
def copy(): | ||
for filename in [ | ||
'.appveyor.yml', | ||
'.coveragerc', | ||
'.gitattributes', | ||
'.gitignore', | ||
'.isort.cfg', | ||
'.mypy.ini', | ||
'.pydocstyle.ini', | ||
'.pylint.ini', | ||
'.scrutinizer.yml', | ||
'.travis.yml', | ||
'.verchew.ini', | ||
'CONTRIBUTING.md', | ||
'Makefile', | ||
os.path.join('bin', 'checksum'), | ||
os.path.join('bin', 'open'), | ||
os.path.join('bin', 'update'), | ||
os.path.join('bin', 'verchew'), | ||
'pytest.ini', | ||
'scent.py', | ||
]: | ||
src = os.path.join(TMP, CONFIG['project_name'], filename) | ||
dst = os.path.join(CWD, filename) | ||
print("Updating " + filename) | ||
shutil.copy(src, dst) | ||
|
||
|
||
if __name__ == '__main__': | ||
install() | ||
run() | ||
copy() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
from .helpers import * | ||
from .logger import * | ||
|
||
|
||
WARN = WARNING | ||
|
||
d = debug | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
|
||
from . import utils | ||
|
||
|
||
__all__ = ['log', 'debug', 'info', 'warning', 'error', 'critical', 'exception'] | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import logging | ||
|
||
|
||
default_level = logging.INFO | ||
default_format = "%(levelname)s: %(name)s: %(message)s" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import logging | ||
|
||
|
||
log = logging.getLogger('3rd-party') | ||
|
||
|
||
|