Commit 1915603
Merge common and specific code-templates (#260)
* Added functionality for merging of common and specific templates
- Merges the common template into specific template
- Uses replace in js to find the tag and replace with the common code
- Uses ejs to render
* Merge common and Specific code-templates
- Modified the code in fetchTemplates so that any live updates from vue
in genCode is not overwritten
- Dynamically fetches the common code if the file exists, else proceeds
with the code from specific file
- Created new function mergeCode to merge codes from specific and common
templates using ejs, the code tag being `#:::- replace_here :::#`
- The function takes in strings of specific file and common file and
returns the rendered code using ejs
- The code tag is present in specific template which will be replaced with
the code from common template
* Handle error code-tag is present in a file but file is missing in Common-template
- The if else statements throw an error when replace ejs code-tag is present
in the specific file, but the common file is also missing in the common
template
- This handles the error by just replacing the replace_here tag with
an empty string, since this tag is not defined for the second render
* Update branch with changes from main
* chore(deps): bump playwright-chromium from 1.33.0 to 1.35.1 (#255)
Bumps [playwright-chromium](https://github.com/Microsoft/playwright) from 1.33.0 to 1.35.1.
- [Release notes](https://github.com/Microsoft/playwright/releases)
- [Commits](microsoft/playwright@v1.33.0...v1.35.1)
---
updated-dependencies:
- dependency-name: playwright-chromium
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump semver from 7.3.5 to 7.5.2 (#254)
Bumps [semver](https://github.com/npm/node-semver) from 7.3.5 to 7.5.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](npm/node-semver@v7.3.5...v7.5.2)
---
updated-dependencies:
- dependency-name: semver
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: vfdev <vfdev.5@gmail.com>
* chore(deps): bump ejs from 3.1.6 to 3.1.9 (#253)
Bumps [ejs](https://github.com/mde/ejs) from 3.1.6 to 3.1.9.
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](mde/ejs@v3.1.6...v3.1.9)
---
updated-dependencies:
- dependency-name: ejs
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump prismjs from 1.26.0 to 1.29.0 (#245)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.26.0 to 1.29.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](PrismJS/prism@v1.26.0...v1.29.0)
---
updated-dependencies:
- dependency-name: prismjs
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump @vitejs/plugin-vue from 2.1.0 to 2.3.4 (#251)
Bumps [@vitejs/plugin-vue](https://github.com/vitejs/vite-plugin-vue/tree/HEAD/packages/plugin-vue) from 2.1.0 to 2.3.4.
- [Release notes](https://github.com/vitejs/vite-plugin-vue/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-vue/blob/main/packages/plugin-vue/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-vue/commits/HEAD/packages/plugin-vue)
---
updated-dependencies:
- dependency-name: "@vitejs/plugin-vue"
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: vfdev <vfdev.5@gmail.com>
* Restructured config (#243)
* Restructured config
- Restructured config so that arguments are defined in cofing.yaml
* Fix main.py
* MOdified tests according to new config restructuring
* Updating remaining templates with restructured config
* Update according to original config args
* Configs for all the templates
- Created new yaml files for testing the code
- These are the test args that will be run when we run the tests
* Modified tests according to new config structure
* Fix typo
* Correct backend argument to be passed in command line
* Pass backend argument as a command line argument
* Modifying the config structure in template-common
---------
Co-authored-by: vfdev <vfdev.5@gmail.com>
* chore(deps): bump prettier from 2.5.1 to 2.8.8 (#259)
Bumps [prettier](https://github.com/prettier/prettier) from 2.5.1 to 2.8.8.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@2.5.1...2.8.8)
---
updated-dependencies:
- dependency-name: prettier
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: vfdev <vfdev.5@gmail.com>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: vfdev <vfdev.5@gmail.com>
* Code format
* Changed code tag to `from_template_common`
* Refactoring the redundant/repeating code in utils.py
- Removes the repeating code in the specific templates
- The common code is stored in src/templates/template-common
* Fix lint of utils.py
* Refactoring the redundant/repeating code in config.yaml
- Removes the repeating code in the specific templates
- The common code is stored in src/templates/template-common
* Refactoring the redundant/repeating code in main.py
- Removes the repeating code in the specific templates
- The common code is stored in src/templates/template-common
* MOdify lint options
- added min_lint
- flake8 tests now run on the rendered code in dist-tests/
* Deleting the script check_copies.py and the command in workflow
- We do not need the script now since the code from common and specific
don't have an intersection now
* Add lint in tests and modify min_lint in lint
* Modify render with replace using js on vision-classification template
* Install formatting tools in tests job
* Change code tags from `#:::- from_template_common :::#` to `#::= from_template_common ::#` handle flake import errors
- Changed the code tags to match `.replace()`
- handled the flake import errors by including if else statements using ejs rendering
* Modifying trainers.py to include the if else statements for unused imports
* Removes any usort skip statements in the final code
- Making replacement globally
* Added usort skip statements for certain imports in trainers.py
- Formatting
* Modified tests, imports, workflow
- Modified tests to check if rendered code is present and unzipped
- Modified imports to include `Engine`
- Modified workflow so that dir `dist-tests` are removed
* Added type hints for functions in template-vision-segmentation/trainers.py
* Formatting modifications
- added __DEV_CONFIG__.json to prettierignore
- start dev server on port 5000
- add F821 non imported objects to flake8 tests
- utils Formatting
- trainers Formatting
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: vfdev <vfdev.5@gmail.com>1 parent 52b75ba commit 1915603
File tree
21 files changed
+72
-1191
lines changed- .github/workflows
- scripts
- src
- templates
- template-common
- template-text-classification
- template-vision-classification
- template-vision-dcgan
- template-vision-segmentation
21 files changed
+72
-1191
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| |||
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
111 | | - | |
112 | | - | |
| 113 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
6 | 11 | | |
7 | | - | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
62 | 71 | | |
63 | 72 | | |
64 | 73 | | |
| |||
78 | 87 | | |
79 | 88 | | |
80 | 89 | | |
| 90 | + | |
81 | 91 | | |
82 | 92 | | |
83 | 93 | | |
| |||
98 | 108 | | |
99 | 109 | | |
100 | 110 | | |
101 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
102 | 119 | | |
103 | 120 | | |
104 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 1 | | |
25 | 2 | | |
26 | 3 | | |
| |||
42 | 19 | | |
43 | 20 | | |
44 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
15 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
16 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
17 | 38 | | |
| 39 | + | |
| 40 | + | |
18 | 41 | | |
19 | 42 | | |
20 | 43 | | |
| |||
141 | 164 | | |
142 | 165 | | |
143 | 166 | | |
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 | 167 | | |
211 | 168 | | |
212 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 1 | + | |
11 | 2 | | |
12 | 3 | | |
13 | 4 | | |
| |||
18 | 9 | | |
19 | 10 | | |
20 | 11 | | |
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 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 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 | | - | |
| 176 | + | |
0 commit comments