-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.imake
107 lines (97 loc) · 3.01 KB
/
.imake
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
[build]
description = "Compile the project for publication and installation."
header = "Build project ..."
commands = ["python -m snakypy.dotctrl", "poetry build"]
footer = "Compilation command terminated!"
[install]
description = "Performs the installation of project dependencies and installs the same."
header = "Installing package and dependencies ..."
commands = ["poetry install"]
footer = "Installation command terminated!"
[tests]
description = "Perform tests using the Pytest library"
header = "Starting tests with Pytest ..."
commands = ["poetry run pytest"]
footer = "Test command terminated!"
[tox]
description = "Tests using the Tox library."
header = "Starting tests with Tox ..."
commands = ["poetry run tox"]
footer = "Test command terminated!"
[linters]
description = "Checks if the project structure is in accordance with certain linters."
header = "Checking project structure with linters ..."
commands = [
"""
poetry run flake8 snakypy/ tests/;
poetry run mypy snakypy/ tests/;
poetry run isort --profile black snakypy/ tests/ --check-only;
poetry run black snakypy/ tests/ --check;
"""
]
footer = "Linters command terminated!"
[black]
description = "Corrects the project structure with certain tools with Black and Isort."
header = "Correcting the project structure with Black and Isort..."
commands = [
"""
poetry run isort --profile black snakypy/ tests/;
poetry run black snakypy/ tests/;
"""
]
footer = "Command to correct structure finished!"
[clean]
description = "Removes insignificant objects."
header = "Starting object cleanup ..."
commands = [
"""
rm -rf dist;
rm -rf .pytest_cache;
rm -rf .tox;
rm -rf .mypy_cache;
rm -rf docs/_build;
rm -rf binary;
"""
]
footer = "Cleaning command finished!"
[pypi]
#
# Add configuration: poetry config repositories.pypi https://upload.pypi.org/legacy/
#
description = "Publish this project to the Pypi repository."
header = "Publishing package to the Pypi repository ..."
commands = [
"""
rm -f dist/*;
python -m snakypy.dotctrl;
poetry build;
poetry publish -r pypi -u williamcanin;
"""
]
footer = "Publishing command terminated!"
[testpypi]
#
# Add configuration: poetry config repositories.testpypi https://test.pypi.org/legacy/
#
description = "Publish this project to the TestPypi repository."
header = "Publishing package to the TestPypi repository ..."
commands = [
"""
rm -f dist/*;
python -m snakypy.dotctrl;
poetry build;
poetry publish -r testpypi -u williamcanin;
"""
]
footer = "Publishing command terminated!"
[deploy]
description = "Deploy to: Github(williamcanin|snakypy), Gitlab (snakypy)."
header = "Starting deploy to: Github(williamcanin|snakypy), Gitlab (snakypy) ..."
commands = [
"""
git push origin;
git push snakypy;
git push gitlab;
"""
]
footer = "Deploy command terminated!"