1797 Commits

Author SHA1 Message Date
Ben Felder
2da8f18913
Cleanup pyproject.toml 2020-02-26 20:38:18 +01:00
Ben Felder
99e2dae85c
Move mypy from pre-commit to CI explicitly 2020-02-26 20:38:02 +01:00
Ben Felder
fa2cf2f610
Merge branch 'master' of github.com:pykong/copier 2020-02-26 20:22:33 +01:00
Ben Felder
9e407925c7
Merge pull request #128 from pykong/ignore_globbing
gitignore-style pattern matching
2020-02-26 20:21:47 +01:00
Ben Felder
6730d0050e
Merge branch 'master' into ignore_globbing 2020-02-26 20:17:29 +01:00
Ben Felder
251fe2b2fe
Remove unused imports in tools.py 2020-02-26 20:13:45 +01:00
Ben Felder
cfe81629d2
Update badges in readme 2020-02-26 20:05:31 +01:00
Ben Felder
b004a4ec85
Remove .travis.yml 2020-02-26 20:05:31 +01:00
Ben Felder
d067eea279
Add ci.yml 2020-02-26 20:05:31 +01:00
Ben Felder
ccf74b3012
Merge branch 'master' of github.com:pykong/copier 2020-02-26 20:02:51 +01:00
Ben Felder
8462ec5ce7
Merge pull request #127 from pykong/poetry
Migrate to poetry and GitHub Actions
2020-02-26 20:01:54 +01:00
Ben Felder
4624a3c3e3
Merge branch ditch_travis 2020-02-26 19:58:49 +01:00
Ben Felder
423c23e293
Merge branches 'ditch_travis' and 'poetry' 2020-02-26 19:47:15 +01:00
Ben Felder
5286396f14
Update README.md 2020-02-26 19:18:15 +01:00
Ben Felder
e7620aacce
Add test_create_path_filter 2020-02-26 17:03:44 +01:00
Ben Felder
e462cb1bcc
Replace get_name_filters with create_path_filter 2020-02-26 16:23:54 +01:00
Ben Felder
c451f4c949
Remove ignore option, adapt tests 2020-02-26 15:50:28 +01:00
Ben Felder
10f739cb0a
Update docstring of test_exclude_recursive_negate 2020-02-26 15:31:04 +01:00
Ben Felder
a1455c975a
Adapt test_exclude_recursive_negate 2020-02-26 13:59:05 +01:00
Ben Felder
51db236ad8
Adapt include tests 2020-02-26 13:49:54 +01:00
Ben Felder
2f09876dd6
Extend test_exclude_file 2020-02-26 13:46:26 +01:00
Ben Felder
97c75e4402
Fixed unicode issue with test_exclude_file 2020-02-26 13:44:43 +01:00
Ben Felder
27c3d90052
Rebase filter logic on pathspec 2020-02-25 20:01:24 +01:00
Ben Felder
552d569107
Point flake8 pre-commit config to pyproject.toml 2020-02-25 19:16:50 +01:00
Ben Felder
d0bf1d8b7e
Format tool.isort.known_third_party 2020-02-25 19:11:35 +01:00
Ben Felder
6fe5860f76
Move to pyproject.toml 2020-02-25 19:03:06 +01:00
Ben Felder
f3d0ba45a2
Update badges in readme 2020-02-25 18:31:42 +01:00
Ben Felder
395bbfa33a
Remove .travis.yml 2020-02-25 18:27:06 +01:00
Ben Felder
5909e750ae
Add ci.yml 2020-02-25 18:26:40 +01:00
Ben Felder
fd2d37473a
Merge pull request #125 from pykong/move_img
Move image to img/
2020-02-25 17:12:23 +01:00
Ben Felder
fb7f8ea249
Move image to img/ 2020-02-25 17:11:10 +01:00
Ben Felder
d8f42a31fd
Delete FUNDING.yml 2020-02-25 17:03:13 +01:00
Ben Felder
4bb53f798b
Merge pull request #122 from Tecnativa/make-install-venv
Install into .venv by default
2020-02-25 10:48:17 +01:00
Jairo Llopis
05526b92bb
Merge pull request #124 from Tecnativa/fix-exclude-recursive
Exclude recursively
2020-02-25 08:07:29 +00:00
Jairo Llopis
f2ae70a4a8
Exclude recursively
Excluding a folder and its contents didn't exclude its subfolders.

Now, excluding a folder excludes all its files and subfolders.

@Tecnativa TT20357
2020-02-24 14:03:03 +00:00
Jairo Llopis
e72d1e5715
Merge pull request #123 from Tecnativa/fix-help
Fix copier --help
2020-02-24 11:31:08 +00:00
Jairo Llopis
1d8a2a47c3
Fix copier --help
A bug introduced in #121 made copier --help stop working.

Test added.
2020-02-24 11:24:00 +00:00
Jairo Llopis
a060fc2ea3
Install into .venv by default 2020-02-24 11:13:13 +00:00
Jairo Llopis
eb8bfa78f9
Merge pull request #121 from Tecnativa/version-updates
Add migrations support
2020-02-24 08:15:30 +00:00
Jairo Llopis
6bf0cedd3a
Add migrations support
This commit fixes #119. Summary:

- Depend on packaging to get a good implementation of PEP 440.
- Document new behaviors.
- Add support for migrations.
- Checkout by default the most modern git tag available in the template.
- Reuse `run_tasks` to run migrations too.
- Use `git describe --tags --always` to obtain template commit, to get a version parseable by PEP 440.
- Update `test_updatediff` to with new behaviors.

@Tecnativa TT20357
2020-02-21 13:52:35 +00:00
Jairo Llopis
9e515ed9f3
Merge pull request #120 from Tecnativa/small-refactor-pass-configdata
Reduce code complexity
2020-02-21 11:19:30 +00:00
Jairo Llopis
fc6b364321
Reduce code complexity
As explained in #110, the dangling parameters for methods keep on complicating development.

A full code refactoring is too much work for now, but I did a little refactoring which consists in:

- Merge `Flags` into `ConfigData`, and remove anything related exclusively to flags.
- Any method that uses arguments from `ConfigData` gets instead a `conf: ConfigData` argument.
- `get_jinja_renderer()` removed; it's not useful as its little work can easily be done by `Renderer` itself.

This way, whenever we need a new config, we can just add it to `ConfigData` and use it more widely.

A full refactoring is still needed IMHO, where we have a main `Copier` class which handles its state and everything it needs (or it could be `CopierApp` instead), but that's more a design decision to be taken by the project leader.

@Tecnativa TT20357
2020-02-21 11:11:49 +00:00
Ben Felder
ced42849ec
Delete mm.py
Closes: #85
2020-02-19 16:04:16 +01:00
Jairo Llopis
e7056d8317
Merge pull request #115 from Tecnativa/answers-sorted
Sort answers file
2020-01-31 10:41:26 +00:00
Jairo Llopis
f3b95d8bcd
Sort answers file
This way it will be more readable and it will produce less diff if the template copier.yml file is updated.

@Tecnativa TT20357
2020-01-31 10:38:12 +00:00
Jairo Llopis
7c45e77ca9
Merge pull request #114 from Tecnativa/specific-yaml
Be specific about what yaml we import
2020-01-29 13:33:43 +00:00
Jairo Llopis
ab857dd93a
Be specific about what yaml we import
Otherwise in recent versions it could just produce an error when running, just like this:

```
Traceback (most recent call last):
  File "/home/yajo/Documentos/prodevel/doodba-scaffolding/.venv/bin/copier", line 5, in <module>
    from copier.cli import CopierApp
  File "/home/yajo/Documentos/prodevel/doodba-scaffolding/.venv/lib/python3.7/site-packages/copier/__init__.py", line 3, in <module>
    from .main import *  # noqa
  File "/home/yajo/Documentos/prodevel/doodba-scaffolding/.venv/lib/python3.7/site-packages/copier/main.py", line 14, in <module>
    from .config import make_config
  File "/home/yajo/Documentos/prodevel/doodba-scaffolding/.venv/lib/python3.7/site-packages/copier/config/__init__.py", line 1, in <module>
    from .factory import Flags, make_config  # noqa
  File "/home/yajo/Documentos/prodevel/doodba-scaffolding/.venv/lib/python3.7/site-packages/copier/config/factory.py", line 9, in <module>
    from .user_data import load_answersfile_data, load_config_data, query_user_data
  File "/home/yajo/Documentos/prodevel/doodba-scaffolding/.venv/lib/python3.7/site-packages/copier/config/user_data.py", line 7, in <module>
    import yaml
ModuleNotFoundError: No module named 'yaml'
```

@Tecnativa TT20357
2020-01-29 13:29:16 +00:00
Jairo Llopis
e5f96ec1d0
Merge pull request #111 from Tecnativa/update-only-git-diff
Updates respecting evolved git history
2020-01-27 11:24:01 +00:00
Jairo Llopis
e5b685340f
Merge pull request #113 from Tecnativa/choose-tmpl-suffix
Support custom templates suffix
2020-01-27 10:56:40 +00:00
Jairo Llopis
1f2ce1ed25
Updates respecting evolved git history
Fix #88 the easiest way possible. Changes summary:

- A new `--vcs-ref` flag that indicates which commit/ref you want to copy, and only applies when the source directory is git-versioned.
- A new `--no-diff` flag to `copier update` skips the smartypants diff behavior.

What it does?

- Checks you are updating a git-versioned destination from a git-versioned source.
- Clones the destination into temp dir.
- Does a `copier copy -f tmp_src tmp_dst` (yes, a temp dir also).
- Gets the git diff between `tmp_dst` and `dst_path`.
- Performs a normal `copier update dst_path`.
- Applies the git diff at the end, to try to respect downstream project evolution.

@Tecnativa TT20357
2020-01-23 12:38:57 +00:00