-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ✨ initial prototype * ✨ first working prototype that having relocated copy: into targets:. #165 * 📰 add missing unit test file * ♿ deprecate copy: key word. #165 * 📰 add the missing file * 🔨 code refactoring with TemplateTarget. replace all template tuples with TemplateTarget * 💚 install pypi-mobans-pkg for testing * 🔥 remove added test package: pypi-mobans-pkg * 🐛 when new plugins are installed, call the lml scanner again so that newly installed packages are loaded, pypi-moban-pkg should be reloaded in the test, #165 * 🔨 refactor constants.py * 🔥 remove previous fix for pypi-mobans-pkg not found. #165 * 📚 update copy action documentation and update integration tests 🔬 * 💄 minor update * 🚜 relocating files * 🚜 code refactoring on plugins.py * 🚜 flatten concentrated files * 🚜 fusing engines to template.py * 🚜 relocate copier to plugins * ✨ first working prototype: copy as template engine. #165 * 💚 fix unit test failure because of dependency * 🔨 code refactoring, support template a directory as it used to, template-folder/a.jj2 become dest/a without jj2 suffix. it also means: copy-folder/me.copy becomes dest-folder/me but no effect if copy-folder/you, as it dest-folder/you * 💚 try to fix broken unit tests in travis-ci * 🐛 fix the bug where repo is not found if it is newly installed. #165 * 🔨 respect default template type * 🔥 remove useless function as code evolves * 🔨 code refactor magic copy label * 🔬 test content forward engine, nickname copy engine. #165 * 🔥 remove useless report functions * 🔥 remove unreachable test codes and remove unused code * ✨ support group targets with template type, #165. And it is related to #62 with current restriction on template type as key. What will happen if template type as group key is unknown, atm it will be treated as jinja2 template type * ✨ force template type regardless of individual template types. #165 * 💚 fix broken tests * 🔬 more test coverage * 🚜 rename docs directory * 🔨 code refactoring * 🔨 code refactoring on targets * 🚜 re-organising file structures * 🚜 re-organize repo related functionality * 🚜 re-organize template target parsing functionality for moban file * 📚 update documentation * 📚 document 'copy' engine * 🔨 black all source code * 📚 update change log * 💄 update gitignore * 🔬 squeeze more test coverage from test code * :micrscope: more test coverage * 🔬 more tests on mobanfile targets * 🔨 relocate test files * 🔬 more tests on mobanfile targets * 🚜 relocate test file * 🔬 more tests * 📚 update documentation index * 📚 update change log
- Loading branch information
Showing
77 changed files
with
1,293 additions
and
707 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
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
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
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,19 @@ | ||
configuration: | ||
template_dir: | ||
- template-sources | ||
targets: | ||
- output: simple.file.copy | ||
template: file-in-template-sources-folder.txt | ||
template_type: copy | ||
- output: target_without_template_type | ||
template: file_extension_will_trigger.copy | ||
- target_in_short_form: as_long_as_this_one_has.copy | ||
- output: "misc-1-copying/can-create-folder/if-not-exists.txt" | ||
template: file-in-template-sources-folder.txt | ||
template_type: copy | ||
- output: "test-dir" | ||
template: dir-for-copying | ||
template_type: copy | ||
- output: "test-recursive-dir" | ||
template: dir-for-recusive-copying/** | ||
template_type: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
Level 15: template copying becomes an action plugin in targets | ||
================================================================================ | ||
|
||
With `.moban.yml`, you can copy templates to your destination. More information | ||
is documented in `misc-1-copying-template`. | ||
|
||
Explicit syntax:: | ||
|
||
targets: | ||
- output: explicit | ||
template: template_file | ||
template_type: copy | ||
|
||
|
||
Implicit syntax:: | ||
|
||
targets: | ||
- output: explicit | ||
template: template_file.copy | ||
|
||
|
||
Shorthand syntax:: | ||
|
||
targets: | ||
- explicit: template_file.copy | ||
|
||
|
||
No implicit nor short hand syntax for the following directory copying unless | ||
you take a look at `force-template-type`. When you read | ||
`level-17-force-template-type-from-moban-file/README.rst`, you will find | ||
out more. | ||
|
||
|
||
Directory copying syntax:: | ||
|
||
targets: | ||
- output: dest-dir | ||
template: source-dir | ||
template_type: copy | ||
|
||
Recursive directory copying syntax:: | ||
|
||
|
||
targets: | ||
- output: dest-dir | ||
template: source-dir/** | ||
template_type: copy | ||
|
||
|
||
Evaluation | ||
-------------------------------------------------------------------------------- | ||
|
||
Here is example moban file for copying:: | ||
configuration: | ||
template_dir: | ||
- template-sources | ||
targets: | ||
- output: simple.file.copy | ||
template: file-in-template-sources-folder.txt | ||
template_type: copy | ||
- output: target_without_template_type | ||
template: file_extension_will_trigger.copy | ||
- target_in_short_form: as_long_as_this_one_has.copy | ||
- output: "misc-1-copying/can-create-folder/if-not-exists.txt" | ||
template: file-in-template-sources-folder.txt | ||
template_type: copy | ||
- output: "test-dir" | ||
template: dir-for-copying | ||
template_type: copy | ||
- output: "test-recursive-dir" | ||
template: dir-for-recusive-copying/** | ||
template_type: copy | ||
|
||
|
||
template copy does: | ||
|
||
|
||
#. copies any template inside pre-declared template directory to anywhere. moban will create directory if needed. | ||
#. copies any directory to anywhere. If "**" is followed, moban attempts to do recursive copying. |
1 change: 1 addition & 0 deletions
1
docs/level-15-copy-templates-as-target/misc-1-copying/can-create-folder/if-not-exists.txt
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 @@ | ||
test file |
1 change: 1 addition & 0 deletions
1
docs/level-15-copy-templates-as-target/template-sources/as_long_as_this_one_has.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
it is OK to have a short form, but the file to be 'copied' shall have 'copy' extension, so as to trigger ContentForwardEngine, 'copy' engine. |
1 change: 1 addition & 0 deletions
1
docs/level-15-copy-templates-as-target/template-sources/dir-for-copying/afile.txt
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 @@ | ||
dir for copying |
1 change: 1 addition & 0 deletions
1
...plate-sources/dir-for-copying/sub_directory_is_not_copied/becuase_star_star_is_needed.txt
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 @@ | ||
Please look at .moban.yml |
1 change: 1 addition & 0 deletions
1
docs/level-15-copy-templates-as-target/template-sources/dir-for-recusive-copying/fileb.txt
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 @@ | ||
everything is copied |
1 change: 1 addition & 0 deletions
1
...urces/dir-for-recusive-copying/sub_directory_is_copied/because_star_star_is_specified.txt
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 @@ | ||
dest_directory: source_directory/** |
1 change: 1 addition & 0 deletions
1
docs/level-15-copy-templates-as-target/template-sources/file-in-template-sources-folder.txt
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 @@ | ||
test file |
1 change: 1 addition & 0 deletions
1
docs/level-15-copy-templates-as-target/template-sources/file_extension_will_trigger.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
file extension will trigger copy engine |
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,9 @@ | ||
configuration: | ||
template_dir: | ||
- template-sources | ||
targets: | ||
- copy: | ||
- simple.file.copy: file-in-template-sources-folder.txt | ||
- "misc-1-copying/can-create-folder/if-not-exists.txt": file-in-template-sources-folder.txt | ||
- "test-dir": dir-for-copying | ||
- "test-recursive-dir": dir-for-recusive-copying/** |
31 changes: 31 additions & 0 deletions
31
docs/level-16-group-targets-using-template-type/README.rst
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,31 @@ | ||
Level 16: group targets by their template type | ||
================================================================================ | ||
|
||
Since moban version 0.4.0, you can group your targets with their template type. | ||
For example, with `copy` target, you can do the following things: | ||
|
||
|
||
Here is example moban file for copying:: | ||
configuration: | ||
template_dir: | ||
- template-sources | ||
targets: | ||
- copy: | ||
- simple.file.copy: file-in-template-sources-folder.txt | ||
- "misc-1-copying/can-create-folder/if-not-exists.txt": file-in-template-sources-folder.txt | ||
- "test-dir": dir-for-copying | ||
- "test-recursive-dir": dir-for-recusive-copying/** | ||
|
||
More information is documented in `misc-1-copying-template`. | ||
|
||
|
||
template copy does: | ||
|
||
#. copies any template inside pre-declared template directory to anywhere. moban will create directory if needed. | ||
#. copies any directory to anywhere. If "**" is followed, moban attempts to do recursive copying. | ||
|
||
|
||
.. note:: | ||
|
||
The suffix `.copy` of `simple.file.copy` will be removed. |
1 change: 1 addition & 0 deletions
1
...l-16-group-targets-using-template-type/misc-1-copying/can-create-folder/if-not-exists.txt
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 @@ | ||
test file |
1 change: 1 addition & 0 deletions
1
docs/level-16-group-targets-using-template-type/template-sources/dir-for-copying/afile.txt
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 @@ | ||
dir for copying |
1 change: 1 addition & 0 deletions
1
...plate-sources/dir-for-copying/sub_directory_is_not_copied/becuase_star_star_is_needed.txt
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 @@ | ||
Please look at .moban.yml |
1 change: 1 addition & 0 deletions
1
...-16-group-targets-using-template-type/template-sources/dir-for-recusive-copying/fileb.txt
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 @@ | ||
everything is copied |
1 change: 1 addition & 0 deletions
1
...urces/dir-for-recusive-copying/sub_directory_is_copied/because_star_star_is_specified.txt
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 @@ | ||
dest_directory: source_directory/** |
1 change: 1 addition & 0 deletions
1
...16-group-targets-using-template-type/template-sources/file-in-template-sources-folder.txt
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 @@ | ||
test file |
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,9 @@ | ||
configuration: | ||
template_dir: | ||
- template-sources | ||
force_template_type: copy | ||
targets: | ||
- simple.file.copy: file-in-template-sources-folder.txt | ||
- "misc-1-copying/can-create-folder/if-not-exists.txt": file-in-template-sources-folder.txt | ||
- "test-dir": dir-for-copying | ||
- "test-recursive-dir": dir-for-recusive-copying/** |
26 changes: 26 additions & 0 deletions
26
docs/level-17-force-template-type-from-moban-file/README.rst
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,26 @@ | ||
Level 17: force template type | ||
================================================================================ | ||
|
||
Since moban version 0.4.0, you can enforce all targets to use one and only one | ||
template type, regardless of their individual template types. | ||
|
||
|
||
Here is example moban file for copying:: | ||
configuration: | ||
template_dir: | ||
- template-sources | ||
force_template_type: copy | ||
targets: | ||
- simple.file.copy: file-in-template-sources-folder.txt | ||
- "misc-1-copying/can-create-folder/if-not-exists.txt": file-in-template-sources-folder.txt | ||
- "test-dir": dir-for-copying | ||
- "test-recursive-dir": dir-for-recusive-copying/** | ||
|
||
More information is documented in `misc-1-copying-template`. | ||
|
||
|
||
template copy does: | ||
|
||
#. copies any template inside pre-declared template directory to anywhere. moban will create directory if needed. | ||
#. copies any directory to anywhere. If "**" is followed, moban attempts to do recursive copying. |
1 change: 1 addition & 0 deletions
1
...vel-17-force-template-type-from-moban-file/misc-1-copying/can-create-folder/if-not-exists
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 @@ | ||
test file |
1 change: 1 addition & 0 deletions
1
...17-force-template-type-from-moban-file/misc-1-copying/can-create-folder/if-not-exists.txt
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 @@ | ||
test file |
1 change: 1 addition & 0 deletions
1
docs/level-17-force-template-type-from-moban-file/template-sources/dir-for-copying/afile.txt
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 @@ | ||
dir for copying |
1 change: 1 addition & 0 deletions
1
...plate-sources/dir-for-copying/sub_directory_is_not_copied/becuase_star_star_is_needed.txt
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 @@ | ||
Please look at .moban.yml |
1 change: 1 addition & 0 deletions
1
...7-force-template-type-from-moban-file/template-sources/dir-for-recusive-copying/fileb.txt
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 @@ | ||
everything is copied |
1 change: 1 addition & 0 deletions
1
...urces/dir-for-recusive-copying/sub_directory_is_copied/because_star_star_is_specified.txt
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 @@ | ||
dest_directory: source_directory/** |
1 change: 1 addition & 0 deletions
1
...-force-template-type-from-moban-file/template-sources/file-in-template-sources-folder.txt
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 @@ | ||
test file |
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
Oops, something went wrong.