Skip to main content

An extension for TRAC D.A.P. that loads models from Git repositories

Project description

Git Extension for the TRAC Model Runtime

This extension allows TRAC to load models dynamically from Git repositories.

  • Includes a pure-Python implementation using the excellent dulwich library
  • Includes a native Git implementation that wraps a Git binaries on the host system
  • Support for private repositories using tokens
  • Handles corporate firewalls, proxies and SSL

This extension is a pre-release and will be finalized inTRAC 0.10.

Installing

The HTTP extension can be installed with pip:

$ pip install tracdap-ext-git

The package has the following dependencies:

  • tracdap-runtime (version 0.10.0-beta2 or later)
  • dulwich (0.24.x series)
  • urllib3 (version 2.2 or later)

Using the Git model repository

With the Git extension installed, you can add a Git model repository as a resource in sys_config.yaml like this:

resources:

  my_repository:
    resourceType: MODEL_REPOSITORY
    protocol: git
    properties:
      repoUrl: https://github.com/a-user/my-repository

By default the extension will use the pure-python implementation of Git, to use native Git binaries set nativeGit: true as a property on the repository. To supply credentials, use either the username and password properties, or the token property. In production deployments these properties should be supplied using the TRAC secrets mechanism.

Using the pure-Python implementation, all of TRAC's network properties are respected. In particular, to supply an enterprise root trust certificate you can set network.ssl.caCertificates to the path of a certificate in PEM format. Setting network.ssl.publicCertificates: true will include the global, public CAs in addition to the enterprise root.

All properties starting with the prefix git. are treated as Git configuration and written into the Git config file for the repository when it is checked out. For example, setting git.http.sslCAInfo will set the sslCAInfo property in the http section of the Git configuration. This is an alternate way of specifying SSL details that works with the native Git implementation, but can also be used to set arbitrary Git configuration values with either implementation. Some Git config values may not be respected by Dulwich, so it is recommended to use the TRAC config settings with the pure-Python implementation and native Git config settings with the native Git implementation.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tracdap_ext_git-0.10.0b3-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file tracdap_ext_git-0.10.0b3-py3-none-any.whl.

File metadata

File hashes

Hashes for tracdap_ext_git-0.10.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 b945fe647ac6787a00c4d4a2097ae732f47d7ed8ebc8f7f133d886cbf4cf3caa
MD5 5b9426dfa666404bafca14646b9606a8
BLAKE2b-256 bd801f5fba07fab977f26fd5b4d4db83e6c9858f375fb94fe78009a8903b5454

See more details on using hashes here.

Provenance

The following attestation bundles were made for tracdap_ext_git-0.10.0b3-py3-none-any.whl:

Publisher: packaging.yaml on finos/tracdap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page