-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcopier.yaml
83 lines (81 loc) · 2.63 KB
/
copier.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
--- # GLOBAL PROMPT --------------------------------
project_name:
type: str
help: Short name for your project
default: ZenML Starter
version:
type: str
help: |
Version of your project
default: "0.1.0"
open_source_license:
type: str
help: >-
The license under which your project will be released
choices:
Apache Software License 2.0: apache
MIT license: mit
BSD license: bsd
ISC license: isc
GNU General Public License v3: gpl3
Not open source: none
default: apache
full_name:
type: str
help: >-
The name of the person/entity holding the copyright
default: ZenML GmbH
when: "{{ open_source_license }}"
email:
type: str
help: >-
The email of the person/entity holding the copyright
default: info@zenml.io
when: "{{ open_source_license }}"
# CONFIGURATION -------------------------
_templates_suffix: ""
_subdirectory: "./template"
_exclude:
- license
- license_header
_tasks:
# Remove unused imports and variables
- >-
{% if _copier_conf.os == 'windows' %}
echo "Auto-formatting not supported on Windows"
{% else %}
{{ _copier_python }} -m ruff check --select F401,F841 --fix \
--exclude "__init__.py" --isolated \
steps pipelines run.py > /dev/null 2>&1 || true
{% endif %}
# Sort imports
- >-
{% if _copier_conf.os == 'windows' %}
echo "Auto-formatting not supported on Windows"
{% else %}
{{ _copier_python }} -m ruff check --select I \
--fix --ignore D \
steps pipelines run.py > /dev/null 2>&1 || true
{% endif %}
# Auto-format code
- >-
{% if _copier_conf.os == 'windows' %}
echo "Auto-formatting not supported on Windows"
{% else %}
{{ _copier_python }} -m black \
--exclude '' --include '\.pyi?$' -l 79 \
steps pipelines run.py > /dev/null 2>&1 || true
{% endif %}
- |
echo "Congratulations, your project has been generated in the '{{ _copier_conf.dst_path }}' directory."
echo "You can now run the following commands to get started:"
echo " cd {{ _copier_conf.dst_path }}"
echo " pip install -r requirements.txt"
echo " # Start the ZenML UI (optional; you'll also need the zenml[server] Python"
echo " # package installed"
echo " zenml login --local"
echo " python run.py"
echo "Next, you should take a look at the '{{ _copier_conf.dst_path }}/README.md' file in the generated project."
echo "Happy coding!"
_jinja_extensions:
- jinja2_time.TimeExtension