Skip to main content

git-fleximod

Flexible Submodule Management for Git

Overview

Git-fleximod is a Python-based tool that extends Git's submodule capabilities, offering additional features for managing submodules in a more flexible and efficient way.

Installation

#TODO Install using pip:

pip install git-fleximod

If you choose to locate git-fleximod in your path you can access it via command: git fleximod

Usage

Basic Usage:
    git fleximod <command> [options]
Available Commands:
    install: Install submodules according to configuration.
    status: Display the status of submodules.
    update: Update submodules to the tag indicated in .gitmodules variable fxtag.
Additional Options:
    See git fleximod --help for more details.

Supported .gitmodules Variables

fxtag: Specify a specific tag or branch to checkout for a submodule.
fxrequired: Mark a submodule's checkout behavior, with allowed values:
  - T:T: Top-level and required (checked out only when this is the Toplevel module).
  - T:F: Top-level and optional (checked out with --optional flag if this is the Toplevel module).
  - I:T: Internal and required (always checked out).
  - I:F: Internal and optional (checked out with --optional flag).
fxsparse: Enable sparse checkout for a submodule, pointing to a file containing sparse checkout paths.

Sparse Checkouts

To enable sparse checkout for a submodule, set the fxsparse variable
in the .gitmodules file to the path of a file containing the desired
sparse checkout paths. Git-fleximod will automatically configure
sparse checkout based on this file when applicable commands are run.
See [git-sparse-checkout](https://git-scm.com/docs/git-sparse-checkout#_internalsfull_pattern_set) for details on the format of this file.

Examples

Here are some common usage examples:

Installing submodules, including optional ones:

  git fleximod install --optional

Updating a specific submodule to the fxtag indicated in .gitmodules:

    git fleximod update submodule-name

Example .gitmodules entry:

    [submodule "cosp2"]
        path = src/physics/cosp2/src
        url = https://github.com/CFMIP/COSPv2.0
        fxsparse = ../.cosp_sparse_checkout
        fxtag = v2.1.4cesm

Explanation:

This entry indicates that the submodule named cosp2 at tag v2.1.4cesm should be checked out into the directory src/physics/cosp2/src relative to the .gitmodules directory. It should be checked out from the URL https://github.com/CFMIP/COSPv2.0 and use sparse checkout as described in the file ../.cosp_sparse_checkout relative to the path directory.

Additional example:

    [submodule "cime"]
        path = cime
        url = https://github.com/jedwards4b/cime
        fxrequired = T:T
        fxtag = cime6.0.198_rme01

Explanation:

This entry indicates that the submodule cime should be checked out into a directory named cime at tag cime6.0.198_rme01 from the URL https://github.com/jedwards4b/cime. This should only be done if the .gitmodules file is at the top level of the repository clone.

Contributing

We welcome contributions! Please see the CONTRIBUTING.md file for guidelines.

License

Git-fleximod is released under the MIT License.

Metadata

Release files for fleximod 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fleximod 0.1.8
File Size Uploaded Provenance Actions
fleximod-0.1.8.tar.gz 12.8 kB Without provenance Details for fleximod-0.1.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fleximod 0.1.8
File Interpreter ABI Platform Actions
fleximod-0.1.8-py3-none-any.whl Python 3 none any Details for fleximod-0.1.8-py3-none-any.whl

Total release size: 26.9 kB

Release files / fleximod-0.1.8.tar.gz

Download URL fleximod-0.1.8.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1ccf695f2270325274ccc9a2912f1e995647ab348fbe72ced0e8f2ed73cd481d
BLAKE2b-256 checksum
How to use checksums
829de2ee70a03be7ec75f956b100479e0d697b160809edc0cb405f1d71c59b1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / fleximod-0.1.8-py3-none-any.whl

Download URL fleximod-0.1.8-py3-none-any.whl
Size 14.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
319a469d0c906f6926819a4bb6cb7d685220d91babb81a067480d4911857e14c
BLAKE2b-256 checksum
How to use checksums
e271b75feb0c7a4673da22fb1f58054956eff022775bfa08460dbe526bb5f6f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Security for fleximod 0.1.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page