You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| `-d`, `--dir_name` | Specify the directory name where the modules will be saved. <br>By default, the modules will be saved in a directory named `my_gitmodules`. | • `not_gitmodules -d custom_folder`: Saves the repositories in `custom_folder` folder |
142
+
| `-y`, `--yaml-path` | Specify a custom path for the `notgitmodules.yaml` configuration file. <br>By default, it looks for `notgitmodules.yaml` in the current working directory. Naming it `notgitmodules` is a matter of best practices; you can name it as you want. | • `not_gitmodules -y /path/to/custom_notgitmodules.yaml`: Uses a custom YAML file located at `/path/to/custom_notgitmodules.yaml` |
143
+
| `-t`, `--threaded` | Enable threaded execution, where repositories are cloned in parallel (using threads). This flag is mutually exclusive with `-s`. <br> This is the default behavior if neither `-t` nor `-s` is specified. | • `not_gitmodules -t`: Clones repositories in parallel using threads <br> • `not_gitmodules --threaded`: Same as `-t`, using long form |
144
+
| `-s`, `--sequential` | Enable sequential execution, where repositories are cloned one by one in the order they appear in the YAML file. This flag is mutually exclusive with `-t`. | • `not_gitmodules -s`: Clones repositories one by one in order <br> • `not_gitmodules --sequential`: Same as `-s`, using long form |
145
+
146
+
### More command examples:
147
+
148
+
- ### Default command:
149
+
150
+
This will look for `notgitmodules.yaml` in the project root and create a directory named `my_gitmodules` in the root to
151
+
download the modules into, in parallel mode using threads.
For eleven repos with undefined amount of workers in `ThereadPool` :
172
+
173
+
- The execution of in sequential mode took 35.13206000009086 seconds.
174
+
- The execution of in parallel mode took 16.677515499992296 seconds.
175
+
176
+
We get **52.53%** performance boost.
177
+
153
178
---
154
-
### 4. Dockerizing
155
179
156
-
Double-check that you:
157
-
1. Created a `notgitmodules.yaml`
158
-
2. Included `not_gitmodules` version to `requirements.txt`
180
+
### 4. Dockerizing
181
+
182
+
Double-check that you:
183
+
184
+
1. Created a `notgitmodules.yaml`
185
+
2. Included `not_gitmodules` version to `requirements.txt`
186
+
187
+
Then:
159
188
160
-
Then:
161
-
3. Create your `Dockerfile`. Example:
189
+
3. Create your `Dockerfile`. Example:
162
190
163
191
```dockerfile
164
192
FROM python:3.10-slim
@@ -176,36 +204,41 @@ RUN pip install --no-cache-dir -r requirements.txt
176
204
COPY notgitmodules.yaml .
177
205
178
206
# install modules using not_gitmodules
179
-
RUN not_gitmodules install -y notgitmodules.yaml -d my_directory
207
+
RUN not_gitmodules install -y notgitmodules.yaml -d my_directory -t
180
208
181
209
CMD ["python", "main.py"]
182
210
```
183
211
184
212
---
185
-
## Possible Issues with Private Repositories
186
-
213
+
214
+
## Possible Issues with Private Repositories
215
+
187
216
If cloning fails but you have access to the repository, provide the HTTPS repo URL instead of SSH
188
-
in `notgitmodules.yaml`.
217
+
in `notgitmodules.yaml`.
189
218
190
219
---
220
+
191
221
## Worth to mention
192
222
193
-
-`not_gitmodules` doesn't require for you to keep the folders with modules. You can safely .gitignore/delete them.
194
-
- Do not use matching names for the repositories in `notgitmodules.yaml` file. In that case only the first repository will be downloaded and the second one - skipped.
223
+
-`not_gitmodules` doesn't require for you to keep the folders with modules. You can safely .gitignore/delete them.
224
+
- Do not use matching names for the repositories in `notgitmodules.yaml` file. In that case only the first repository
225
+
will be downloaded and the second one - skipped.
195
226
196
227
---
197
-
## License
198
-
199
-
This project is licensed under a **Custom License**. See the [LICENSE](./LICENSE) file for full details.
200
-
201
-
Key points:
202
-
203
-
- You may use this project for commercial or personal purposes.
228
+
229
+
## License
230
+
231
+
This project is licensed under a **Custom License**. See the [LICENSE](./LICENSE) file for full details.
232
+
233
+
Key points:
234
+
235
+
- You may use this project for commercial or personal purposes.
0 commit comments