👉 Watch the introduction video on YouTube, where Snoop Dogg will gently explain everything!
Everything you need to do is:
Not Gitmodules will handle the rest for you.
Choose the most convenient way to install Not Gitmodules:
Clone (or download) this repository and include it to your project and use as a part of your project’s code:
git clone git@github.com:Armen-Jean-Andreasian/not_gitmodules.git
Install via a package manager and use as a Python package (example with pip):
pip install not-gitmodules
requirements.txt in advance, if you don’t use Poetry.notgitmodules.yaml lets you use it without explicitly specifying it in the command.folder_to_save: # Destination folder for this group of modules
module1: module1.url # directory_name: url (ssh or https)
module2: module2.url
another_folder:
module3: module3.url
Example:
# directory_name: url (ssh or https)
utils:
file_manager: https://github.com/not-gitmodules/notgitmodules-file-manager-py
file_encryptor: https://github.com/not-gitmodules/notgitmodules-file-encryptor-py
services:
forsaken_mail: https://github.com/malaohu/forsaken-mail
sim_mail: https://github.com/Webador/SlmMail
The example above will download and create this structure:
utils/
file_manager/
... (containing of the repo)
file_encryptor/
...
services:
forsaken_mail/
...
sim_mail/
...
| Flag (all of them are optional) | Description | Example |
|---|---|---|
-y, --yaml-path |
Specify a custom path for the YAML file. 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 |
-t, --threaded (default behaviour) |
Enable threaded execution, where repositories are cloned in parallel (using threads). This flag is mutually exclusive with -s. This is the default behavior if neither -t nor -s is specified. |
• not_gitmodules -t: Clones repositories in parallel using threads • not_gitmodules --threaded: Same as -t, using long form |
-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 • not_gitmodules --sequential: Same as -s, using long form |
This will look for notgitmodules.yaml in the project root and create a directory named my_gitmodules in the root to
download the modules into, in parallel mode using threads.
not_gitmodules install
not_gitmodules install --yaml-path </path/to/notgitmodules.yaml> --<execution_type>
or
not_gitmodules install -y </path/to/notgitmodules.yaml> --sequential
Note: Usually with undefined amount of workers in
ThereadPoolin parallel mode take more than 52% less time than in parallel mode.
FROM python:3.10-slim
# Install git for not_gitmodules
RUN apt-get update && apt-get install -y git
RUN pip install --no-cache-dir -r requirements.txt
# copy the notgitmodules.yaml file (default). Modify accordingly.
COPY notgitmodules.yaml .
# install modules using not_gitmodules.
RUN not_gitmodules install -y notgitmodules.yaml -t
WORKDIR /app
COPY . .
CMD ["python", "main.py"]
notgitmodules.yaml file. In that case only the first repository
will be downloaded and the second one will be skipped.Git and PyYAML for functioning.not_gitmodules.PyYAML==6.0 try to install the compatible version of PyYAML.
This project is licensed under a Custom License. See the LICENSE file for full details.
Key points:
Armen-Jean Andreasian, 2024