diff --git a/CHANGELOG.md b/CHANGELOG.md index f67145c..931592c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) -### Version 3.x (2019-xx) +### Version 3.0 (2019-xx) - Dropped support for Python 3.5. - Dropped support for deprecated `voodoo.json`. - Type annotated entire code base. diff --git a/LICENSE.txt b/LICENSE similarity index 100% rename from LICENSE.txt rename to LICENSE diff --git a/README.md b/README.md index cf06a8f..8c8f935 100644 --- a/README.md +++ b/README.md @@ -19,16 +19,16 @@ A library for rendering projects templates. from copier import copy # Create a project from a local path -copy('path/to/project/template', 'path/to/destination') +copy("path/to/project/template", "path/to/destination") # Or from a git URL. -copy('https://github.com/jpscaletti/copier.git', 'path/to/destination') +copy("https://github.com/jpscaletti/copier.git", "path/to/destination") # You can also use "gh:" as a shortcut of "https://github.com/" -copy('gh:jpscaletti/copier.git', 'path/to/destination') +copy("gh:jpscaletti/copier.git", "path/to/destination") # Or "gl:" as a shortcut of "https://gitlab.com/" -copy('gl:jpscaletti/copier.git', 'path/to/destination') +copy("gl:jpscaletti/copier.git", "path/to/destination") ``` - Or as a command-line tool: @@ -58,9 +58,10 @@ Use the `data` argument to pass whatever extra context you want to be available in the templates. The arguments can be any valid Python value, even a function. -Since X.X.X, only Python 3.6 or later are supported. Please use the 2.5.1 version if your project runs +Since version 3.0, only Python 3.6 or later are supported. Please use the 2.5.1 version if your project runs on a previous Python version. + ## The copier.yml file If a `copier.yml`, `copier.toml`, or `copier.json` file is found in the root of the project, diff --git a/copier/main.py b/copier/main.py index 0ee8e60..8ff2d48 100644 --- a/copier/main.py +++ b/copier/main.py @@ -11,17 +11,17 @@ from typing import Callable, Dict, List, Optional, Tuple from . import vcs from .tools import ( - STYLE_DANGER, - STYLE_IGNORE, - STYLE_OK, - STYLE_WARNING, - Renderer, copy_file, get_jinja_renderer, get_name_filters, make_folder, printf, prompt_bool, + Renderer, + STYLE_DANGER, + STYLE_IGNORE, + STYLE_OK, + STYLE_WARNING, ) from .types import AnyByStrDict, CheckPathFunc, OptStrOrPathSeq, OptStrSeq, StrOrPath from .user_data import load_config_data, query_user_data diff --git a/copier/tools.py b/copier/tools.py index 4e48596..ef856d6 100644 --- a/copier/tools.py +++ b/copier/tools.py @@ -14,6 +14,7 @@ from jinja2.sandbox import SandboxedEnvironment from .types import AnyByStrDict, CheckPathFunc, OptStrOrPathSeq, StrOrPath, T + _all__: Tuple[str, ...] = ( "STYLE_OK", "STYLE_WARNING", diff --git a/copier/user_data.py b/copier/user_data.py index 1aacec4..6927b2f 100644 --- a/copier/user_data.py +++ b/copier/user_data.py @@ -3,6 +3,7 @@ from pathlib import Path from .tools import HLINE, INDENT, printf_block, prompt from .types import AnyByStrDict, StrOrPath + __all__ = ("load_config_data", "query_user_data") diff --git a/copier/vcs.py b/copier/vcs.py index 450b7d3..ff5566e 100644 --- a/copier/vcs.py +++ b/copier/vcs.py @@ -7,6 +7,7 @@ from typing import Optional from .types import StrOrPath + __all__ = ("get_repo", "clone") GIT_PREFIX = ("git@", "git://", "git+") diff --git a/mm.py b/mm.py index 384f0a4..14adcb0 100644 --- a/mm.py +++ b/mm.py @@ -12,24 +12,31 @@ data = { "title": "Copier", "name": "copier", "pypi_name": "copier", - "version": "2.5.1", + "version": "3.0", "author": "Juan-Pablo Scaletti", "author_email": "juanpablo@jpscaletti.com", - "description": "A library for rendering projects templates", + "description": "A library for rendering projects templates.", "copyright": "2011", "repo_name": "jpscaletti/copier", "home_url": "", "project_urls": {}, "development_status": "5 - Production/Stable", - "minimal_python": 3.5, + "minimal_python": 3.6, "install_requires": [ "jinja2 ~= 2.10", "colorama ~= 0.4", "toml ~= 0.10", "ruamel.yaml ~= 0.15", ], - "testing_requires": ["pytest", "pytest-mock"], - "development_requires": ["pytest-cov", "pytest-flake8", "flake8", "ipdb", "tox"], + "testing_requires": ["pytest", "pytest-mock", "pytest-mypy"], + "development_requires": [ + "pytest-cov", + "pytest-flake8", + "pytest-mypy", + "flake8", + "ipdb", + "tox", + ], "entry_points": "copier = copier.cli:run", "coverage_omit": [], "has_docs": False, diff --git a/setup.cfg b/setup.cfg index fb1711d..f9825d4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,14 +1,14 @@ [metadata] name = copier -version= 2.5.1 +version= 3.0 author = Juan-Pablo Scaletti author_email = juanpablo@jpscaletti.com -description = A library for rendering projects templates +description = A library for rendering projects templates. long_description = file:README.md long_description_content_type = text/markdown url = https://github.com/jpscaletti/copier license = MIT -license_file = LICENSE.txt +license_file = LICENSE classifiers = Development Status :: 5 - Production/Stable Intended Audience :: Developers