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.
Usually with undefined amount of workers in `ThereadPool` in parallel mode take more than **52%** less time than in parallel mode.
172
+
173
+
153
174
---
154
-
### 4. Dockerizing
155
175
156
-
Double-check that you:
157
-
1. Created a `notgitmodules.yaml`
158
-
2. Included `not_gitmodules` version to `requirements.txt`
176
+
### 4. Dockerizing
177
+
178
+
Double-check that you:
179
+
180
+
1. Created a `notgitmodules.yaml`
181
+
2. Included `not_gitmodules` version to `requirements.txt`
182
+
183
+
Then:
159
184
160
-
Then:
161
-
3. Create your `Dockerfile`. Example:
185
+
3. Create your `Dockerfile`. Example:
162
186
163
187
```dockerfile
164
188
FROM python:3.10-slim
@@ -176,36 +200,41 @@ RUN pip install --no-cache-dir -r requirements.txt
176
200
COPY notgitmodules.yaml .
177
201
178
202
# install modules using not_gitmodules
179
-
RUN not_gitmodules install -y notgitmodules.yaml -d my_directory
203
+
RUN not_gitmodules install -y notgitmodules.yaml -d my_directory -t
180
204
181
205
CMD ["python", "main.py"]
182
206
```
183
207
184
208
---
185
-
## Possible Issues with Private Repositories
186
-
209
+
210
+
## Possible Issues with Private Repositories
211
+
187
212
If cloning fails but you have access to the repository, provide the HTTPS repo URL instead of SSH
188
-
in `notgitmodules.yaml`.
213
+
in `notgitmodules.yaml`.
189
214
190
215
---
216
+
191
217
## Worth to mention
192
218
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.
219
+
-`not_gitmodules` doesn't require for you to keep the folders with modules. You can safely .gitignore/delete them.
220
+
- Do not use matching names for the repositories in `notgitmodules.yaml` file. In that case only the first repository
221
+
will be downloaded and the second one - skipped.
195
222
196
223
---
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.
224
+
225
+
## License
226
+
227
+
This project is licensed under a **Custom License**. See the [LICENSE](./LICENSE) file for full details.
228
+
229
+
Key points:
230
+
231
+
- You may use this project for commercial or personal purposes.
0 commit comments