Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

config.yml 7.1 KB

You have to be logged in to leave a comment. Sign In
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
  1. version: 2.1
  2. parameters:
  3. orb_version:
  4. type: string
  5. description: Deci ai ORB version https://circleci.com/developer/orbs/orb/deci-ai/circleci-common-orb
  6. default: "4.1.3"
  7. # default: "dev:alpha"
  8. orbs:
  9. deci-common: deci-ai/circleci-common-orb@<< pipeline.parameters.orb_version >>
  10. # This filter operates on SemVer2 tags only
  11. release_tag_filter: &release_tag_filter
  12. filters:
  13. branches:
  14. ignore: /.*/
  15. tags:
  16. only: /^\d+\.\d+\.\d+$/
  17. release_candidate_filter: &release_candidate_filter
  18. filters:
  19. branches:
  20. only: master
  21. jobs:
  22. build:
  23. parameters:
  24. py_version:
  25. type: string
  26. default: latest
  27. package_name:
  28. type: string
  29. docker:
  30. - image: cimg/python:<< parameters.py_version >>
  31. resource_class: large
  32. steps:
  33. - deci-common/checkout_and_skip_build:
  34. check_version_file: true
  35. - deci-common/get_persisted_version_info
  36. - when:
  37. condition:
  38. and:
  39. - not:
  40. equal: [ develop, << pipeline.git.branch >> ]
  41. - not:
  42. equal: [ staging, << pipeline.git.branch >> ]
  43. - not:
  44. equal: [ master, << pipeline.git.branch >> ]
  45. steps:
  46. - run:
  47. name: install Flake8 python linter
  48. command: |
  49. pip install --user flake8
  50. - run:
  51. name: Lint all python files changed since develop branch
  52. command: |
  53. flake8 --statistics --config scripts/flake8-config setup.py $(git diff --diff-filter ACM origin/master --name-only | grep 'py$' | grep -v 'experimental/' | grep -v 'experimental_models/')
  54. - run:
  55. name: add requirements.txt and requirements.pro.txt to source code
  56. command: |
  57. cp requirements.txt src/super_gradients/requirements.txt
  58. cp requirements.pro.txt src/super_gradients/requirements.pro.txt
  59. - run:
  60. name: install python dependencies
  61. command: |
  62. python3 -m venv venv
  63. . venv/bin/activate
  64. python3 -m pip install pip==22.0.4
  65. cat requirements.txt | cut -f1 -d"#" | xargs -n 1 -L 1 pip install --progress-bar off
  66. - run:
  67. name: edit package version
  68. command: |
  69. echo "${NEW_VERSION}" > version.txt
  70. cat version.txt
  71. - run:
  72. name: setup custom environment variables
  73. command: |
  74. echo 'export PYTHONPATH=/home/circleci/super_gradients' >> $BASH_ENV
  75. - run:
  76. name: install package
  77. no_output_timeout: 30m
  78. command: |
  79. . venv/bin/activate
  80. python3 -m pip install .[pro]
  81. - run:
  82. name: run tests with coverage
  83. no_output_timeout: 30m
  84. command: |
  85. . venv/bin/activate
  86. coverage run --source=super_gradients -m unittest tests/deci_core_unit_test_suite_runner.py
  87. coverage report
  88. coverage html # open htmlcov/index.html in a browser
  89. - store_artifacts:
  90. path: htmlcov
  91. - store_artifacts:
  92. path: ~/sg_logs
  93. release_candidate:
  94. parameters:
  95. py_version:
  96. type: string
  97. docker:
  98. - image: cimg/python:<< parameters.py_version >>
  99. steps:
  100. - deci-common/checkout_and_skip_build:
  101. check_version_file: true
  102. - deci-common/get_persisted_version_info
  103. - run:
  104. name: edit package version
  105. command: |
  106. echo $NEW_VERSION > version.txt
  107. - deci-common/pip_upload_package_codeartifact_dev:
  108. codeartifact_repository: "deci-packages"
  109. - deci-common/pip_test_package_installation_codeartifact_dev:
  110. package_name: "super-gradients"
  111. version: $NEW_VERSION
  112. - deci-common/git_config_automation_user
  113. - run:
  114. name: "commit version file"
  115. command: |
  116. git commit version.txt -m "Deci Services - Changed version to $NEW_VERSION"
  117. - deci-common/git_commit_and_tag:
  118. version: $NEW_VERSION
  119. release_version:
  120. parameters:
  121. py_version:
  122. type: string
  123. docker:
  124. - image: cimg/python:<< parameters.py_version >>
  125. steps:
  126. - deci-common/checkout_and_skip_build:
  127. check_version_file: true
  128. - run:
  129. name: add requirements.txt and requirements.pro.txt to source code
  130. command: |
  131. cp requirements.txt src/super_gradients/requirements.txt
  132. cp requirements.pro.txt src/super_gradients/requirements.pro.txt
  133. - run:
  134. name: edit package version
  135. command: |
  136. echo $CIRCLE_TAG > version.txt
  137. - deci-common/pip_upload_package_codeartifact_all_accounts:
  138. codeartifact_repository: "deci-packages"
  139. - deci-common/pip_test_package_installation_codeartifact_dev:
  140. package_name: "super-gradients"
  141. version: $CIRCLE_TAG
  142. - deci-common/pip_test_package_installation_codeartifact_prod:
  143. package_name: "super-gradients"
  144. version: $CIRCLE_TAG
  145. - deci-common/pip_upload_package_codeartifact_prod:
  146. codeartifact_repository: "deci-toolkit"
  147. - deci-common/git_commit_and_tag:
  148. version: $CIRCLE_TAG
  149. delete_remote_tag_before_tagging: true
  150. - deci-common/tag_as:
  151. tag_name: "stable"
  152. delete_remote: true
  153. - deci-common/github_create_release:
  154. github_cli_token: $GITHUB_CLI_TOKEN
  155. directory_to_cd_into: "."
  156. tag: $CIRCLE_TAG
  157. notes: "This GitHub Release was done automatically by CircleCI"
  158. workflows:
  159. release:
  160. jobs:
  161. - deci-common/persist_version_info:
  162. <<: *release_tag_filter
  163. - deci-common/codeartifact_login:
  164. name: "login_to_codeartifact_release"
  165. repo_name: "deci-packages"
  166. <<: *release_tag_filter
  167. - build:
  168. name: "build3.7"
  169. py_version: "3.7"
  170. package_name: "super-gradients"
  171. requires:
  172. - deci-common/persist_version_info
  173. - login_to_codeartifact_release
  174. <<: *release_tag_filter
  175. - release_version:
  176. py_version: "3.7"
  177. requires:
  178. - "build3.7"
  179. <<: *release_tag_filter
  180. - deci-common/pip_upload_package_from_codeartifact_to_global_pypi:
  181. package_name: "super-gradients"
  182. name: "upload_super_gradients_to_pypi"
  183. version: $CIRCLE_TAG
  184. requires:
  185. - "release_version"
  186. context:
  187. - pypi-public
  188. <<: *release_tag_filter
  189. build_and_deploy:
  190. jobs:
  191. - deci-common/persist_version_info:
  192. branch: << pipeline.git.branch >>
  193. - deci-common/codeartifact_login:
  194. repo_name: "deci-packages"
  195. - build:
  196. name: "build3.7"
  197. py_version: "3.7"
  198. package_name: "super-gradients"
  199. requires:
  200. - deci-common/persist_version_info
  201. - deci-common/codeartifact_login
  202. - release_candidate: # happens on merge
  203. py_version: "3.7"
  204. requires:
  205. - "build3.7"
  206. <<: *release_candidate_filter
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...