pawamoy / copier-poetry Goto Github PK
View Code? Open in Web Editor NEWCopier template for Python projects managed by Poetry.
Home Page: https://pawamoy.github.io/copier-poetry/
License: ISC License
Copier template for Python projects managed by Poetry.
Home Page: https://pawamoy.github.io/copier-poetry/
License: ISC License
when i remove code of conduct i get error on macros.py
src/iqdb_tagger/main.pymkdocs build -s✗ Building documentation (1)
> mkdocs build -s
INFO - [macros] - Macros arguments: {'module_name': 'docs/macros',
'modules': [], 'include_dir': '', 'include_yaml': [],
'j2_block_start_string': '', 'j2_block_end_string': '',
'j2_variable_start_string': '', 'j2_variable_end_string': '',
'verbose': False}
INFO - [macros] - Found local Python module 'docs/macros' in:
/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger
INFO - [macros] - Found external Python module 'docs/macros' in:
/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger
INFO - [macros] - Extra filters (module): ['pretty']
INFO - Cleaning site directory
INFO - Building documentation to directory:
/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/site
WARNING - A relative path to 'code_of_conduct.md' is included in the 'nav'
configuration, which is not found in the documentation files
Package(s) not found: astunparse, atomicwrites, cached-property, pywin32-ctypes
INFO - [macros] - ERROR # _Macro Rendering Error_
**TypeError**: tuple indices must be integers or slices, not str
```
Traceback (most recent call last):
File
"/home/r3r/.cache/pypoetry/virtualenvs/iqdb-tagger-C28AsU-2-py3.9/lib/python3.9/site-packages/mkdocs_macros/plugin.py",
line 434, in render
return md_template.render(**page_variables)
File
"/home/r3r/.cache/pypoetry/virtualenvs/iqdb-tagger-C28AsU-2-py3.9/lib/python3.9/site-packages/jinja2/environment.py",
line 1090, in render
self.environment.handle_exception()
File
"/home/r3r/.cache/pypoetry/virtualenvs/iqdb-tagger-C28AsU-2-py3.9/lib/python3.9/site-packages/jinja2/environment.py",
line 832, in handle_exception
reraise(*rewrite_traceback_stack(source=source))
File
"/home/r3r/.cache/pypoetry/virtualenvs/iqdb-tagger-C28AsU-2-py3.9/lib/python3.9/site-packages/jinja2/_compat.py",
line 28, in reraise
raise value.with_traceback(tb)
File "<template>", line 1, in top-level template code
File
"/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/docs/macros.py",
line 81, in credits
return get_credits()
File
"/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/docs/macros.py",
line 63, in get_credits
template_data = get_credits_data()
File
"/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/docs/macros.py",
line 35, in get_credits_data
pkg = {_: pkg[_] for _ in ("name", "home-page")} # type: ignore
File
"/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/docs/macros.py",
line 35, in <dictcomp>
pkg = {_: pkg[_] for _ in ("name", "home-page")} # type: ignore
TypeError: tuple indices must be integers or slices, not str
```
Aborted with 1 warnings in strict mode!
WPS332 Found walrus operator> poetry run mkdocs build -s
INFO - [macros] - Macros arguments: {'module_name': 'docs/macros', 'modules': [], 'include_dir': '', 'include_yaml': [], 'j2_block_start_string': '', 'j2_block_end_string': '',
'j2_variable_start_string': '', 'j2_variable_end_string': '', 'verbose': False}
INFO - [macros] - Found local Python module 'docs/macros' in: /mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger
INFO - [macros] - Found external Python module 'docs/macros' in: /mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger
INFO - [macros] - Extra filters (module): ['pretty']
INFO - Cleaning site directory
INFO - Building documentation to directory: /mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/site
WARNING - A relative path to 'code_of_conduct.md' is included in the 'nav' configuration, which is not found in the documentation files
Package(s) not found: astunparse, atomicwrites, cached-property, pywin32-ctypes
WARNING:root:tuple indices must be integers or slices, not str
Traceback (most recent call last):
File "/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/docs/macros.py", line 37, in get_credits_data
pkg = {_: pkg[_] for _ in ("name", "home-page")} # type: ignore
File "/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/docs/macros.py", line 37, in <dictcomp>
pkg = {_: pkg[_] for _ in ("name", "home-page")} # type: ignore
TypeError: tuple indices must be integers or slices, not str
INFO - [macros] - ERROR # _Macro Rendering Error_
**KeyError**: 'name'
```
Traceback (most recent call last):
File "/home/r3r/.cache/pypoetry/virtualenvs/iqdb-tagger-C28AsU-2-py3.9/lib/python3.9/site-packages/mkdocs_macros/plugin.py", line 434, in render
return md_template.render(**page_variables)
File "/home/r3r/.cache/pypoetry/virtualenvs/iqdb-tagger-C28AsU-2-py3.9/lib/python3.9/site-packages/jinja2/environment.py", line 1090, in render
self.environment.handle_exception()
File "/home/r3r/.cache/pypoetry/virtualenvs/iqdb-tagger-C28AsU-2-py3.9/lib/python3.9/site-packages/jinja2/environment.py", line 832, in handle_exception
reraise(*rewrite_traceback_stack(source=source))
File "/home/r3r/.cache/pypoetry/virtualenvs/iqdb-tagger-C28AsU-2-py3.9/lib/python3.9/site-packages/jinja2/_compat.py", line 28, in reraise
raise value.with_traceback(tb)
File "<template>", line 1, in top-level template code
File "/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/docs/macros.py", line 86, in credits
return get_credits()
File "/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/docs/macros.py", line 68, in get_credits
template_data = get_credits_data()
File "/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/docs/macros.py", line 41, in get_credits_data
packages[pkg["name"].lower()] = pkg # type: ignore
KeyError: 'name'
```
Aborted with 1 warnings in strict mode!
INFO - [macros] - Macros arguments: {'module_name': 'docs/macros',
'modules': [], 'include_dir': '', 'include_yaml': [],
'j2_block_start_string': '', 'j2_block_end_string': '',
'j2_variable_start_string': '', 'j2_variable_end_string': '',
'verbose': False}
INFO - [macros] - Found local Python module 'docs/macros' in:
/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger
INFO - [macros] - Found external Python module 'docs/macros' in:
/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger
INFO - [macros] - Extra filters (module): ['pretty']
INFO - Cleaning site directory
INFO - Building documentation to directory:
/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/site
WARNING - A relative path to 'code_of_conduct.md' is included in the 'nav'
configuration, which is not found in the documentation files
Package(s) not found: astunparse, atomicwrites, cached-property, pywin32-ctypes
Aborted with 1 warnings in strict mode!
make: *** [Makefile:45: check] Error 1
i tried to by pass that but got another error
src/iqdb_tagger/main.pymkdocs build -s✗ Building documentation (1)
> mkdocs build -s
INFO - [macros] - Macros arguments: {'module_name': 'docs/macros',
'modules': [], 'include_dir': '', 'include_yaml': [],
'j2_block_start_string': '', 'j2_block_end_string': '',
'j2_variable_start_string': '', 'j2_variable_end_string': '',
'verbose': False}
INFO - [macros] - Found local Python module 'docs/macros' in:
/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger
INFO - [macros] - Found external Python module 'docs/macros' in:
/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger
INFO - [macros] - Extra filters (module): ['pretty']
INFO - Cleaning site directory
INFO - Building documentation to directory:
/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/site
WARNING - A relative path to 'code_of_conduct.md' is included in the 'nav'
configuration, which is not found in the documentation files
Package(s) not found: astunparse, atomicwrites, cached-property, pywin32-ctypes
INFO - [macros] - ERROR # _Macro Rendering Error_
**TypeError**: tuple indices must be integers or slices, not str
```
Traceback (most recent call last):
File
"/home/r3r/.cache/pypoetry/virtualenvs/iqdb-tagger-C28AsU-2-py3.9/lib/python3.9/site-packages/mkdocs_macros/plugin.py",
line 434, in render
return md_template.render(**page_variables)
File
"/home/r3r/.cache/pypoetry/virtualenvs/iqdb-tagger-C28AsU-2-py3.9/lib/python3.9/site-packages/jinja2/environment.py",
line 1090, in render
self.environment.handle_exception()
File
"/home/r3r/.cache/pypoetry/virtualenvs/iqdb-tagger-C28AsU-2-py3.9/lib/python3.9/site-packages/jinja2/environment.py",
line 832, in handle_exception
reraise(*rewrite_traceback_stack(source=source))
File
"/home/r3r/.cache/pypoetry/virtualenvs/iqdb-tagger-C28AsU-2-py3.9/lib/python3.9/site-packages/jinja2/_compat.py",
line 28, in reraise
raise value.with_traceback(tb)
File "<template>", line 1, in top-level template code
File
"/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/docs/macros.py",
line 81, in credits
return get_credits()
File
"/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/docs/macros.py",
line 63, in get_credits
template_data = get_credits_data()
File
"/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/docs/macros.py",
line 35, in get_credits_data
pkg = {_: pkg[_] for _ in ("name", "home-page")} # type: ignore
File
"/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/docs/macros.py",
line 35, in <dictcomp>
pkg = {_: pkg[_] for _ in ("name", "home-page")} # type: ignore
TypeError: tuple indices must be integers or slices, not str
```
Aborted with 1 warnings in strict mode!
WPS332 Found walrus operator> poetry run mkdocs build -s
INFO - [macros] - Macros arguments: {'module_name': 'docs/macros', 'modules': [], 'include_dir': '', 'include_yaml': [], 'j2_block_start_string': '', 'j2_block_end_string': '',
'j2_variable_start_string': '', 'j2_variable_end_string': '', 'verbose': False}
INFO - [macros] - Found local Python module 'docs/macros' in: /mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger
INFO - [macros] - Found external Python module 'docs/macros' in: /mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger
INFO - [macros] - Extra filters (module): ['pretty']
INFO - Cleaning site directory
INFO - Building documentation to directory: /mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/site
WARNING - A relative path to 'code_of_conduct.md' is included in the 'nav' configuration, which is not found in the documentation files
Package(s) not found: astunparse, atomicwrites, cached-property, pywin32-ctypes
WARNING:root:tuple indices must be integers or slices, not str
Traceback (most recent call last):
File "/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/docs/macros.py", line 37, in get_credits_data
pkg = {_: pkg[_] for _ in ("name", "home-page")} # type: ignore
File "/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/docs/macros.py", line 37, in <dictcomp>
pkg = {_: pkg[_] for _ in ("name", "home-page")} # type: ignore
TypeError: tuple indices must be integers or slices, not str
INFO - [macros] - ERROR # _Macro Rendering Error_
**KeyError**: 'name'
```
Traceback (most recent call last):
File "/home/r3r/.cache/pypoetry/virtualenvs/iqdb-tagger-C28AsU-2-py3.9/lib/python3.9/site-packages/mkdocs_macros/plugin.py", line 434, in render
return md_template.render(**page_variables)
File "/home/r3r/.cache/pypoetry/virtualenvs/iqdb-tagger-C28AsU-2-py3.9/lib/python3.9/site-packages/jinja2/environment.py", line 1090, in render
self.environment.handle_exception()
File "/home/r3r/.cache/pypoetry/virtualenvs/iqdb-tagger-C28AsU-2-py3.9/lib/python3.9/site-packages/jinja2/environment.py", line 832, in handle_exception
reraise(*rewrite_traceback_stack(source=source))
File "/home/r3r/.cache/pypoetry/virtualenvs/iqdb-tagger-C28AsU-2-py3.9/lib/python3.9/site-packages/jinja2/_compat.py", line 28, in reraise
raise value.with_traceback(tb)
File "<template>", line 1, in top-level template code
File "/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/docs/macros.py", line 86, in credits
return get_credits()
File "/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/docs/macros.py", line 68, in get_credits
template_data = get_credits_data()
File "/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/docs/macros.py", line 41, in get_credits_data
packages[pkg["name"].lower()] = pkg # type: ignore
KeyError: 'name'
```
Aborted with 1 warnings in strict mode!
INFO - [macros] - Macros arguments: {'module_name': 'docs/macros',
'modules': [], 'include_dir': '', 'include_yaml': [],
'j2_block_start_string': '', 'j2_block_end_string': '',
'j2_variable_start_string': '', 'j2_variable_end_string': '',
'verbose': False}
INFO - [macros] - Found local Python module 'docs/macros' in:
/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger
INFO - [macros] - Found external Python module 'docs/macros' in:
/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger
INFO - [macros] - Extra filters (module): ['pretty']
INFO - Cleaning site directory
INFO - Building documentation to directory:
/mnt/ac54dceb-73a5-4f94-b52c-cb7a426c0f29/Documents/iqdb_tagger/site
WARNING - A relative path to 'code_of_conduct.md' is included in the 'nav'
configuration, which is not found in the documentation files
Package(s) not found: astunparse, atomicwrites, cached-property, pywin32-ctypes
Aborted with 1 warnings in strict mode!
make: *** [Makefile:45: check] Error 1
this is fix for python3.8
Author: Rachmadani Haryono <[email protected]>
Date: Tue Dec 14 07:45:16 2021 +0800
fix(macros): type error
diff --git a/project/docs/macros.py b/project/docs/macros.py
index 72262ad..2ccf826 100644
--- a/project/docs/macros.py
+++ b/project/docs/macros.py
@@ -4,6 +4,7 @@ import functools
from itertools import chain
from pathlib import Path
+import logging
import httpx
import toml
from jinja2 import StrictUndefined
@@ -32,8 +33,13 @@ def get_credits_data() -> dict:
packages = {}
for pkg in search_packages_info(list(dependencies)):
- pkg = {_: pkg[_] for _ in ("name", "home-page")} # type: ignore
- packages[pkg["name"].lower()] = pkg # type: ignore
+ try:
+ pkg_data = {_: pkg[_] for _ in ("name", "home-page")} # type: ignore
+ except TypeError as err:
+ logging.debug(err, exc_info=True)
+ pkg_data = {}
+ if pkg_name := pkg_data.get("name"):
+ packages[pkg_name.lower()] = pkg_data # type: ignore
# all packages might not be credited,
# like the ones that are now part of the standard library
See commit in mkdocstrings to remove flakehell.
Push wps-light 0.15.2 to pypi, use it in this template.
Move flake8 config to config/flake8.ini (see mkdocstrings again)
.PHONY: help
help: ## Print this help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_ \t@-]+:.*?## / {gsub("\t@", ""); printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
Just feel the urge to express my gratitude for this, Timothée.
I admit, I'm more the freestyler guy, who first has to break everything before he finally adopts best practices - plus the problem of (no possibility to) updating always turned me off project templates. But this beauty is really so well executed, I had zero problems to understand it within a few hours and I did not even know copier before. Yeah in fact that was half of the understanding time, finding that copier takes the last tagged version, when its a repo, that drove me nuts, totally not your fault :-)
Regarding this, It's so cool that I finally found something, which does not restrict me at all, freedom wise, but still gives me a ton of python goodies w/o investing any work - including your mkdocstrings plugin, which also rocks.
I really think this deserves more attention, I would suggest giving a talk at pycon or so.
Anyway, sorry for the noise - just wanted to say thanks. You saved me minimum a week or so, investigating tools and putting it all together until finding I picked the wrong tools (e.g. pipenv) and so.. if I consider my would be result with this, I tend to think its a month :-)
PS2:
If you want a real reason for a ticket: I think the licenses with quotes break in the post_generation.py script, some escaping required I guess:
> Running task 1 of 1: python scripts/post_generation.py
File "scripts/post_generation.py", line 30
"BSD 2-Clause "Simplified" License"
^
SyntaxError: invalid syntax
Interrupting copier and running the postgen script in foreground, I see that it has been rendered into this:
def copy_license():
"""Copy the selected rendered license to the LICENSE file."""
target = "LICENSE"
if not os.path.exists("LICENSE"):
source = os.path.join(
"licenses",
"BSD 2-Clause "Simplified" License"
.replace('"', "")
=> seems you either delete the apos in the license names or use a filter here:
def copy_license():
"""Copy the selected rendered license to the LICENSE file."""
target = "LICENSE"
if not os.path.exists("LICENSE"):
source = os.path.join(
"licenses",
"[[ copyright_license ]]" <--------------- here
.replace('"', "")
.replace("'", "")
.replace("/", "-")
.replace(" ", "_")
.replace("*", "_"))
shutil.copyfile(source, target)
Thanks again,
Cheers,
Gunther
Sorry if I missed an existing option.
I feel like a bad person asking for this, but would you be up for a PR that adds an option to not include a License for internal projects? I'm guessing I can delete the license file + license line in pyproject.toml, but I'm worried about that upsetting copier (this is my first time picking up copier)
Resolving dependencies to create the lock file can take up to 5mins:
We could reduce that time by caching poetry's own cache, usually located in ~/.cache/pypoetry/artifacts
and ~/.cache/pypoetry/cache/repositories
. Not sure about the repositories cache, as we want to make sure to have access to latest versions of packages, but artifacts can be a good fit.
I noticed i had a license file but it was empty even though i had selected MIT license in the installer.
Showed in pyproject.toml file but file was empty.
license = "MIT License"
Is it supposed to pull down and fill it with the appropriate boilerplate one? If not that fine but it was slightly confusing.
Just in case it is useful output from when i generated the project.
onessa@onessa-All-Series:~$ pip install --user copier
Collecting copier
Downloading copier-5.1.0-py3-none-any.whl (22 kB)
Requirement already satisfied: colorama<0.5.0,>=0.4.3 in /usr/lib/python3/dist-packages (from copier) (0.4.3)
Requirement already satisfied: pyyaml<6.0.0,>=5.3.1 in /usr/lib/python3/dist-packages (from copier) (5.3.1)
Collecting pyyaml-include<2.0,>=1.2
Downloading pyyaml_include-1.2.post2-py3-none-any.whl (20 kB)
Collecting jinja2<3.0.0,>=2.11.2
Downloading Jinja2-2.11.3-py2.py3-none-any.whl (125 kB)
|████████████████████████████████| 125 kB 1.2 MB/s
Collecting plumbum<2.0.0,>=1.6.9
Downloading plumbum-1.7.0-py2.py3-none-any.whl (116 kB)
|████████████████████████████████| 116 kB 1.1 MB/s
Collecting packaging<21.0,>=20.4
Downloading packaging-20.9-py2.py3-none-any.whl (40 kB)
|████████████████████████████████| 40 kB 1.3 MB/s
Collecting regex<2021.0.0,>=2020.6.8
Downloading regex-2020.11.13-cp38-cp38-manylinux2014_x86_64.whl (738 kB)
|████████████████████████████████| 738 kB 1.3 MB/s
Collecting pydantic<2.0.0,>=1.5.1
Downloading pydantic-1.8.1-cp38-cp38-manylinux2014_x86_64.whl (13.7 MB)
|████████████████████████████████| 13.7 MB 1.9 MB/s
Collecting pathspec<0.9.0,>=0.8.0
Downloading pathspec-0.8.1-py2.py3-none-any.whl (28 kB)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/lib/python3/dist-packages (from jinja2<3.0.0,>=2.11.2->copier) (1.1.0)
Requirement already satisfied: pyparsing>=2.0.2 in /usr/lib/python3/dist-packages (from packaging<21.0,>=20.4->copier) (2.4.6)
Collecting typing-extensions>=3.7.4.3
Downloading typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
Installing collected packages: pyyaml-include, jinja2, plumbum, packaging, regex, typing-extensions, pydantic, pathspec, copier
Successfully installed copier-5.1.0 jinja2-2.11.3 packaging-20.9 pathspec-0.8.1 plumbum-1.7.0 pydantic-1.8.1 pyyaml-include-1.2.post2 regex-2020.11.13 typing-extensions-3.7.4.3
WARNING: You are using pip version 20.2.3; however, version 21.0.1 is available.
You should consider upgrading via the '/usr/bin/python3.8 -m pip install --upgrade pip' command.
onessa@onessa-All-Series:~$ copier "gh:pawamoy/copier-poetry" PycharmProjects/domaininfowizard
Your project name
project_name? Format: str
🎤 [None]: Wizard Domaininfo
Your project description
project_description? Format: str
🎤 [None]: DNS/Whois Domain Information library
Your full name
author_fullname? Format: str
🎤 [None]: Michael Ramsey
Your email
author_email? Format: str
🎤 [None]: [email protected]
Your username (e.g. on GitHub)
author_username? Format: str
🎤 [None]: mikeramsey
Your repository provider
repository_provider? Format: str
🎤
(1) github.com
(2) gitlab.com
(3) bitbucket.org
Choice [1]: 2
Your repository namespace
repository_namespace? Format: str
🎤 [mikeramsey]:
Your repository name
repository_name? Format: str
🎤 [wizard-domaininfo]:
The name of the person/entity holding the copyright
copyright_holder? Format: str
🎤 [Michael Ramsey]:
The email of the person/entity holding the copyright
copyright_holder_email? Format: str
🎤 [[email protected]]:
The copyright date
copyright_date? Format: str
🎤 [2020]: 2021
Your project's license
copyright_license? Format: str
🎤
(1) Academic Free License v3.0
(2) Apache License 2.0
(3) Artistic License 2.0
(4) BSD 2-Clause "Simplified" License
(5) BSD 3-Clause Clear License
(6) BSD 3-Clause "New" or "Revised" License
(7) Boost Software License 1.0
(8) Creative Commons Attribution 4.0
(9) Creative Commons Attribution Share Alike 4.0
(10) Creative Commons Zero v1.0 Universal
(11) Do What The F*ck You Want To Public License
(12) Educational Community License v2.0
(13) Eclipse Public License 1.0
(14) Eclipse Public License 2.0
(15) European Union Public License 1.1
(16) European Union Public License 1.2
(17) GNU Affero General Public License v3.0
(18) GNU General Public License v2.0
(19) GNU General Public License v3.0
(20) GNU Lesser General Public License v2.1
(21) GNU Lesser General Public License v3.0
(22) ISC License
(23) LaTeX Project Public License v1.3c
(24) MIT License
(25) Mozilla Public License 2.0
(26) Microsoft Public License
(27) Microsoft Reciprocal License
(28) University of Illinois/NCSA Open Source License
(29) SIL Open Font License 1.1
(30) Open Software License 3.0
(31) PostgreSQL License
(32) The Unlicense
(33) zlib License
Choice [22]: 24
Your Python package distribution name (for `pip install NAME`)
python_package_distribution_name? Format: str
🎤 [wizard-domaininfo]: wizard_domaininfo
Your Python package import name (for `import NAME` in Python code)
python_package_import_name? Format: str
🎤 [wizard_domaininfo]:
Your CLI name if any (for use in the shell)
python_package_command_line_name? Format: str
🎤 [wizard-domaininfo]:
create README.md
create .gitignore
create CODE_OF_CONDUCT.md
create CONTRIBUTING.md
create .gitlab-ci.yml
create duties.py
create LICENSE
create Makefile
create .copier-answers.yml
create mkdocs.yml
create pyproject.toml
create CHANGELOG.md
create src/
create src/wizard_domaininfo/
create src/wizard_domaininfo/cli.py
create src/wizard_domaininfo/__main__.py
create src/wizard_domaininfo/__init__.py
create docs/
create docs/credits.md
create docs/changelog.md
create docs/index.md
create docs/license.md
create docs/contributing.md
create docs/macros.py
create docs/code_of_conduct.md
create docs/reference/
create docs/reference/cli.md
create docs/css/
create docs/css/mkdocstrings.css
create scripts/
create scripts/post_generation.py
create scripts/setup.sh
create scripts/multirun.sh
create .github/
create .github/FUNDING.yml
create .github/workflows/
create .github/workflows/ci.yml
create .github/ISSUE_TEMPLATE/
create .github/ISSUE_TEMPLATE/feature_request.md
create .github/ISSUE_TEMPLATE/bug_report.md
create config/
create config/mypy.ini
create config/pytest.ini
create config/coverage.ini
create tests/
create tests/test_cli.py
create tests/__init__.py
create tests/conftest.py
> Running task 1 of 1: python scripts/post_generation.py
Project sucessfully generated!
Run `make` to show the available actions.
onessa@onessa-All-Series:~$
To make sure everything is built correctly, we should run tests against an installed version of the package, not the sources.
I keep getting this error when I try to copy this template to empty project folder
> Running task 1 of 1: python scripts/post_generation.py
Traceback (most recent call last):
File "scripts/post_generation.py", line 44, in <module>
clean_up_precommit()
File "scripts/post_generation.py", line 33, in clean_up_precommit
use_precommit = [[ use_precommit ]]
UnboundLocalError: local variable 'use_precommit' referenced before assignment
Traceback (most recent call last):
File "/Users/opunsoars/.pyenv/versions/immaculate_env/bin/copier", line 8, in <module>
sys.exit(copier_app_run())
File "/Users/opunsoars/.pyenv/versions/immaculate_env/lib/python3.8/site-packages/plumbum/cli/application.py", line 638, in run
inst, retcode = subapp.run(argv, exit=False)
File "/Users/opunsoars/.pyenv/versions/immaculate_env/lib/python3.8/site-packages/plumbum/cli/application.py", line 633, in run
retcode = inst.main(*tailargs)
File "/Users/opunsoars/.pyenv/versions/immaculate_env/lib/python3.8/site-packages/decorator.py", line 232, in fun
return caller(func, *(extras + args), **kw)
File "/Users/opunsoars/.pyenv/versions/immaculate_env/lib/python3.8/site-packages/copier/cli.py", line 66, in handle_exceptions
return method(*args, **kwargs)
File "/Users/opunsoars/.pyenv/versions/immaculate_env/lib/python3.8/site-packages/copier/cli.py", line 244, in main
worker.run_copy()
File "/Users/opunsoars/.pyenv/versions/immaculate_env/lib/python3.8/site-packages/copier/main.py", line 205, in __exit__
raise value
File "/Users/opunsoars/.pyenv/versions/immaculate_env/lib/python3.8/site-packages/copier/cli.py", line 244, in main
worker.run_copy()
File "/Users/opunsoars/.pyenv/versions/immaculate_env/lib/python3.8/site-packages/copier/main.py", line 751, in run_copy
self._execute_tasks(self.template.tasks)
File "/Users/opunsoars/.pyenv/versions/immaculate_env/lib/python3.8/site-packages/copier/main.py", line 284, in _execute_tasks
subprocess.run(task_cmd, shell=use_shell, check=True, env=local.env)
File "/Users/opunsoars/.pyenv/versions/3.8.6/lib/python3.8/subprocess.py", line 512, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'python scripts/post_generation.py' returned non-zero exit status 1.
I use py3.8.6
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.