gitws.datamodel module
Central GitWS
Datamodel.
Group
: Dependency Group. A string (i.e. ‘test’).GroupFilter
: Group Filter Specification. A string (i.e. ‘+test@path’).GroupSelect
: Group Selection. A convertedGroupFilter
as needed byGitWS
.ManifestSpec
: Manifest specification for the current project.Manifest: Manifest as needed by
GitWS
derived fromManifestSpec
.ProjectSpec
: Dependency Specification inManifestSpec
.Project
: A Single Dependency as needed byGitWS
derived fromProjectSpec
.Remote
: Remote Alias inManifestSpec
.Defaults
: Default Values inManifestSpec
.AppConfigData
:GitWS
Configuration.
- class gitws.datamodel.AppConfigData(_case_sensitive: bool | None = None, _env_prefix: str | None = None, _env_file: DotenvType | None = PosixPath('.'), _env_file_encoding: str | None = None, _env_nested_delimiter: str | None = None, _secrets_dir: str | Path | None = None, *, manifest_path: Optional[str] = None, color_ui: Optional[bool] = None, group_filters: Optional[Tuple[str, ...]] = None, clone_cache: Optional[Path] = None, depth: Optional[int] = None, **values: Any)[source]
Bases:
BaseSettings
Configuration data of the application.
This class holds the concrete configuration values of the application. The following values are defined:
- clone_cache: Optional[Path]
Clone Cache.
Initial cloning all dependencies takes a while. This sums up if done often (i.e. in CI/CD). This local filesystem cache directory will be used, to re-use already cloned data.
This option can be overridden by specifying the
GIT_WS_CLONE_CACHE
environment variable.
- color_ui: Optional[bool]
Defines if outputs by the tool shall be colored.
If this is not defined, output will be colored by default.
This option can be overridden by specifying the
GIT_WS_COLOR_UI
environment variable.
- static defaults() Dict[str, Any] [source]
As all configuration options must be optional, this option provides the default values.
>>> for item in AppConfigData.defaults().items(): print(item) ('color_ui', True) ('manifest_path', 'git-ws.toml')
- depth: Optional[int]
Default Clone Depth.
New clones are created with the given depth. 0 deactivates shallow cloning.
- group_filters: Optional[Tuple[str, ...]]
The groups to operate on.
This is a filter for groups to operate on during workspace actions.
This option can be overridden by specifying the
GIT_WS_GROUP_FILTERS
environment variable.
- manifest_path: Optional[str]
The path of the manifest file within a repository.
If this is not defined, the default is
git-ws.toml
.This option can be overridden by specifying the
GIT_WS_MANIFEST_PATH
environment variable.
- model_config: ClassVar[SettingsConfigDict] = {'arbitrary_types_allowed': True, 'case_sensitive': False, 'env_file': None, 'env_file_encoding': None, 'env_nested_delimiter': None, 'env_prefix': '', 'extra': 'allow', 'protected_namespaces': ('model_', 'settings_'), 'secrets_dir': None, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'clone_cache': FieldInfo(annotation=Union[Path, NoneType], required=False, description='Local Cache for Git Clones.'), 'color_ui': FieldInfo(annotation=Union[bool, NoneType], required=False, description='If set to true, the output the tool generates will be colored.'), 'depth': FieldInfo(annotation=Union[int, NoneType], required=False, description='Default Clone Depth for New Clones'), 'group_filters': FieldInfo(annotation=Union[Tuple[Annotated[str, AfterValidator(func=<function _validate_group_filter>)], ...], NoneType], required=False, description='The groups to operate on.'), 'manifest_path': FieldInfo(annotation=Union[str, NoneType], required=False, description="The path (relative to the project's root folder) to the manifest file.")}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class gitws.datamodel.Defaults(*, remote: Optional[str] = None, revision: Optional[str] = None, groups: Optional[Tuple[str, ...]] = (), with_groups: Optional[Tuple[str, ...]] = (), submodules: bool = True)[source]
Bases:
BaseModel
Default Values.
These default values are used, if a
ProjectSpec
does not specify them.- Keyword Arguments:
remote – Remote Name.
revision – Revision. Tag or Branch. SHA does not make sense here.
groups – Dependency Groups.
with_groups – Group Selection for referred projects.
- groups: Optional[Tuple[str, ...]]
The
groups
attribute if not specified by the dependency.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'frozen': True, 'populate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'groups': FieldInfo(annotation=Union[Tuple[Annotated[str, AfterValidator(func=<function _validate_group>)], ...], NoneType], required=False, default=()), 'remote': FieldInfo(annotation=Union[str, NoneType], required=False), 'revision': FieldInfo(annotation=Union[str, NoneType], required=False), 'submodules': FieldInfo(annotation=bool, required=False, default=True), 'with_groups': FieldInfo(annotation=Union[Tuple[Annotated[str, AfterValidator(func=<function _validate_group>)], ...], NoneType], required=False, default=(), alias='with-groups', alias_priority=2)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- remote: Optional[str]
Remote name if not specified by the dependency. The remote must have been defined previously.
- revision: Optional[str]
The revision if not specified by the dependency. Tag or Branch. SHA does not make sense here.
- submodules: bool
Initialize and Update git submodules. True by default.
- with_groups: Optional[Tuple[str, ...]]
The
with_groups
attribute if not specified by the dependency.
- class gitws.datamodel.FileRef(*, src: str, dest: str)[source]
Bases:
BaseModel
File Reference Specification.
The main project and first level dependencies might specify symbolic-links or files-to-copy.
- Parameters:
src – Source - path relative to the project directory.
dest – Destination - relative path to the workspace directory.
- dest: str
Destination - relative path to the workspace directory.
- model_config: ClassVar[ConfigDict] = {'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'dest': FieldInfo(annotation=str, required=True), 'src': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- src: str
Source - path relative to the project directory.
- gitws.datamodel.Group
Dependency Group.
A group is a name consisting of lower- and uppercase letters, numbers and underscore. Dashes are allowed. Except the first sign.
Groups structure dependencies.
alias of typing.Annotated[str, AfterValidator(func=<function _validate_group>)]
- gitws.datamodel.GroupFilter
Group Filter.
A group filter is a group name prefixed by ‘+’ or ‘-’, to select or deselect the group. A group filter can have an optional path at the end.
Any
GroupFilter
is later-on converted to aGroupSelect
.alias of typing.Annotated[str, AfterValidator(func=<function _validate_group_filter>)]
- gitws.datamodel.GroupFilters
Groups Filter Specification from User.
Used by Config and Command Line Interface.
alias of
Tuple
[typing.Annotated[str, AfterValidator(func=<function _validate_group_filter>)], …]
- class gitws.datamodel.GroupSelect(*, group: Optional[str] = None, select: bool, path: Optional[str] = None)[source]
Bases:
BaseModel
Group Selection.
A group selection selects/deselects a specific group for a specific path.
- Keyword Arguments:
select – Select (True) or Deselect (False)
group – Group Name.
path – Path.
- static from_group(group: str) GroupSelect [source]
Create
GroupSelect
fromgroup
.>>> GroupSelect.from_group('test') GroupSelect(group='test', select=True)
- static from_group_filter(group_filter: str) GroupSelect [source]
Create Group Selection from
group_filter
.>>> GroupSelect.from_group_filter("+test") GroupSelect(group='test', select=True) >>> GroupSelect.from_group_filter("-test") GroupSelect(group='test', select=False) >>> GroupSelect.from_group_filter("-test@path") GroupSelect(group='test', select=False, path='path') >>> GroupSelect.from_group_filter("-@path") GroupSelect(select=False, path='path') >>> GroupSelect.from_group_filter("te-st") Traceback (most recent call last): ... ValueError: Invalid group selection 'te-st'
- group: Optional[str]
Group.
- model_config: ClassVar[ConfigDict] = {'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'group': FieldInfo(annotation=Union[Annotated[str, AfterValidator(func=<function _validate_group>)], NoneType], required=False), 'path': FieldInfo(annotation=Union[str, NoneType], required=False), 'select': FieldInfo(annotation=bool, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- path: Optional[str]
Path.
- select: bool
Selected (‘+’) or not (‘-‘).
- gitws.datamodel.GroupSelects
Group Selects.
alias of
Tuple
[GroupSelect
, …]
- class gitws.datamodel.MainFileRef(*, src: str, dest: str, groups: Tuple[str, ...] = ())[source]
Bases:
FileRef
Main Project File Reference.
- Parameters:
src – Source - path relative to the project directory.
dest – Destination - relative path to the workspace directory.
- Keyword Arguments:
groups – Groups
- groups: Tuple[str, ...]
groups
specification.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'dest': FieldInfo(annotation=str, required=True), 'groups': FieldInfo(annotation=Tuple[Annotated[str, AfterValidator(func=<function _validate_group>)], ...], required=False, default=()), 'src': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class gitws.datamodel.Manifest(*, group_filters: Tuple[str, ...] = (), linkfiles: Tuple[MainFileRef, ...] = (), copyfiles: Tuple[MainFileRef, ...] = (), dependencies: Tuple[Project, ...] = (), path: Optional[str] = None)[source]
Bases:
BaseModel
The Manifest.
A manifest describes the current project and its dependencies.
- Keyword Arguments:
group_filters – Group Filtering.
linkfiles – symbolic links to be created in the workspace
copyfiles – files to be created in the workspace
dependencies – Dependency Projects.
path – Filesystem Path. Relative to Workspace Root Directory.
The
ManifestSpec
represents the User Interface. The options which can be specified in the manifest file. The Manifest is the resolved version ofManifestSpec
with all calculated information needed byGitWS
to operate.Manifest.from_spec()
resolves aManifestSpec
into a Manifest.- copyfiles: Tuple[MainFileRef, ...]
Files To Be Created In The Workspace.
- static from_spec(spec: ManifestSpec, path: Optional[str] = None, refurl: Optional[str] = None, resolve_url: bool = False) Manifest [source]
Create Manifest from
ManifestSpec
.- Parameters:
spec – The source
ManifestSpec
.- Keyword Arguments:
path – File path of the
spec
.refurl – URL of the repository containing
spec
.resolve_url – Convert relative to absolute URLs. Requires
refurl
.
- Raises:
NoAbsUrlError – On
resolve_url=True
ifrefurl
isNone
and project uses a relative URL.
- group_filters: Tuple[str, ...]
Default Group Selection and Deselection.
- linkfiles: Tuple[MainFileRef, ...]
Symbolic Links To Be Created In The Workspace.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'frozen': True, 'populate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'copyfiles': FieldInfo(annotation=Tuple[gitws.datamodel.MainFileRef, ...], required=False, default=()), 'dependencies': FieldInfo(annotation=Tuple[gitws.datamodel.Project, ...], required=False, default=()), 'group_filters': FieldInfo(annotation=Tuple[Annotated[str, AfterValidator(func=<function _validate_group_filter>)], ...], required=False, default=(), alias='group-filters', alias_priority=2), 'linkfiles': FieldInfo(annotation=Tuple[gitws.datamodel.MainFileRef, ...], required=False, default=()), 'path': FieldInfo(annotation=Union[str, NoneType], required=False)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- path: Optional[str]
Path to the manifest file, relative to project path.
- class gitws.datamodel.ManifestSpec(*, version: str = '1.0', group_filters: Tuple[str, ...] = (), linkfiles: Tuple[MainFileRef, ...] = (), copyfiles: Tuple[MainFileRef, ...] = (), remotes: Tuple[Remote, ...] = (), defaults: Defaults = Defaults(), dependencies: Tuple[ProjectSpec, ...] = (), **extra_data: Any)[source]
Bases:
BaseModel
ManifestSpec.
A manifest describes the current project and its dependencies.
The
ManifestSpec
represents the User Interface. The options which can be specified in the manifest file. The Manifest is the resolved version ofManifestSpec
with all calculated information needed byGitWS
to operate.- Keyword Arguments:
version – Version String. Currently 1.0.
remotes – Remote Aliases.
group_filters – Group Filtering.
linkfiles – symbolic links to be created in the workspace
copyfiles – files to be created in the workspace
defaults – Default settings.
dependencies – Dependency Projects.
- copyfiles: Tuple[MainFileRef, ...]
Files To Be Created In The Workspace.
- dependencies: Tuple[ProjectSpec, ...]
Dependencies - Other Projects To Be Cloned In The Workspace.
- group_filters: Tuple[str, ...]
Default Group Selection and Deselection.
- linkfiles: Tuple[MainFileRef, ...]
Symbolic Links To Be Created In The Workspace.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'allow', 'frozen': True, 'populate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'copyfiles': FieldInfo(annotation=Tuple[gitws.datamodel.MainFileRef, ...], required=False, default=()), 'defaults': FieldInfo(annotation=Defaults, required=False, default=Defaults()), 'dependencies': FieldInfo(annotation=Tuple[gitws.datamodel.ProjectSpec, ...], required=False, default=()), 'group_filters': FieldInfo(annotation=Tuple[Annotated[str, AfterValidator(func=<function _validate_group_filter>)], ...], required=False, default=(), alias='group-filters', alias_priority=2), 'linkfiles': FieldInfo(annotation=Tuple[gitws.datamodel.MainFileRef, ...], required=False, default=()), 'remotes': FieldInfo(annotation=Tuple[gitws.datamodel.Remote, ...], required=False, default=()), 'version': FieldInfo(annotation=str, required=False, default='1.0')}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- version: str
Manifest Version Identifier.
Actual Version:
1.0
.
- class gitws.datamodel.Project(*, name: str, path: str, level: Optional[int] = None, url: Optional[str] = None, revision: Optional[str] = None, manifest_path: str = 'git-ws.toml', groups: Tuple[str, ...] = (), with_groups: Tuple[str, ...] = (), submodules: bool = True, linkfiles: Tuple[FileRef, ...] = (), copyfiles: Tuple[FileRef, ...] = (), recursive: bool = True, is_main: bool = False)[source]
Bases:
BaseModel
Project.
A project describes a dependency.
- Parameters:
name – Name.
path – Project Filesystem Path. Relative to Workspace Root Directory.
- Keyword Arguments:
level – Dependency Tree Level.
url – URL. Assembled from
remote
surl_base
,sub_url
and/orname
.revision – Revision to be checked out. Tag, branch or SHA.
manifest_path – Path to the manifest file. Relative to
path
of project.git-ws.toml
by default.groups – Dependency Groups.
with_groups – Group Selection for referred project.
submodules – initialize and update git submodules
linkfiles – symbolic links to be created in the workspace
copyfiles – files to be created in the workspace
recursive – integrate dependencies of this dependency
is_main – Project is Main Project.
The
ProjectSpec
represents the User Interface. The options which can be specified in the manifest file. TheProject
is the resolved version ofProjectSpec
with all calculated information needed byGitWS
to operate.Project.from_spec()
resolves aProjectSpec
into aProject
.ProjectSpec.from_project()
does the reverse.Note
Project.from_spec()
resolves some attributes irreversible. SoProject.from_spec(ProjectSpec.from_project())
will not return the original project.- static from_spec(manifest_spec: ManifestSpec, spec: ProjectSpec, level: int, refurl: Optional[str] = None, resolve_url: bool = False) Project [source]
Create
Project
frommanifest_spec
andspec
.- Parameters:
manifest_spec – Manifest Specification.
spec – Base project to be resolved.
level – Dependency tree level.
- Keyword Arguments:
refurl – Remote URL of the
manifest_spec
.resolve_url – Resolve URLs to absolute ones.
- Raises:
NoAbsUrlError – On
resolve_url=True
ifrefurl
isNone
and project uses a relative URL.
Project.from_spec()
resolves aProjectSpec
into aProject
.ProjectSpec.from_project()
does the reverse.
- groups: Tuple[str, ...]
Dependency Groups.
- property info
repr-like info string but more condensed.
>>> Project(name='name', path='name').info 'name' >>> Project(name='name', path='path').info "name (path='path')" >>> Project(name='name', path='name', revision='main').info "name (revision='main')" >>> Project(name='name', path='name', groups=('test', 'doc')).info "name (groups='test,doc')"
- is_main: bool
Project is the main project.
- level: Optional[int]
Dependency Tree Level.
- manifest_path: str
Path to the manifest file. Relative to
path
of project.git-ws.toml
by default.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'frozen': True, 'populate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'copyfiles': FieldInfo(annotation=Tuple[gitws.datamodel.FileRef, ...], required=False, default=()), 'groups': FieldInfo(annotation=Tuple[Annotated[str, AfterValidator(func=<function _validate_group>)], ...], required=False, default=()), 'is_main': FieldInfo(annotation=bool, required=False, default=False), 'level': FieldInfo(annotation=Union[int, NoneType], required=False), 'linkfiles': FieldInfo(annotation=Tuple[gitws.datamodel.FileRef, ...], required=False, default=()), 'manifest_path': FieldInfo(annotation=str, required=False, default='git-ws.toml'), 'name': FieldInfo(annotation=str, required=True, metadata=[AfterValidator(func=<function _validate_name>)]), 'path': FieldInfo(annotation=str, required=True, metadata=[AfterValidator(func=<function _validate_path>)]), 'recursive': FieldInfo(annotation=bool, required=False, default=True), 'revision': FieldInfo(annotation=Union[str, NoneType], required=False), 'submodules': FieldInfo(annotation=bool, required=False, default=True), 'url': FieldInfo(annotation=Union[str, NoneType], required=False), 'with_groups': FieldInfo(annotation=Tuple[Annotated[str, AfterValidator(func=<function _validate_group>)], ...], required=False, default=(), alias='with-groups', alias_priority=2)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- name: str
Dependency Name.
- path: str
Dependency Path.
name
will be used as default.
- recursive: bool
Integrate Dependencies of this dependency.
- revision: Optional[str]
Revision to be checked out. Tag, branch or SHA.
- submodules: bool
Initialize and Update git submodules.
- url: Optional[str]
URL. Assembled from
remote
surl_base
,sub_url
and/orname
.
- with_groups: Tuple[str, ...]
Group Selection for referred project.
- gitws.datamodel.ProjectPath
Project Path.
- class gitws.datamodel.ProjectSpec(*, name: str, remote: Optional[str] = None, sub_url: Optional[str] = None, url: Optional[str] = None, revision: Optional[str] = None, path: Optional[str] = None, manifest_path: Optional[str] = 'git-ws.toml', groups: Tuple[str, ...] = (), with_groups: Tuple[str, ...] = (), submodules: Optional[bool] = None, linkfiles: Tuple[FileRef, ...] = (), copyfiles: Tuple[FileRef, ...] = (), recursive: bool = True)[source]
Bases:
BaseModel
Project Dependency Specification.
A project specifies the reference to a repository.
- Parameters:
name – Name.
- Keyword Arguments:
remote – Remote Alias - Remote URL Helper
sub_url – URL relative to
Remote.url_base
.url – URL
revision – Revision
path – Project Filesystem Path. Relative to Workspace Root Directory.
manifest_path – Path to the manifest file. Relative to
path
of project.git-ws.toml
by default.groups – Dependency Groups.
with_groups – Group Selection for referred project.
submodules – initialize and update git submodules
linkfiles – symbolic links to be created in the workspace
copyfiles – files to be created in the workspace
recursive – integrate dependencies of this dependency
Some parameters are restricted:
remote
andurl
are mutually exclusive.url
andsub-url
are likewise mutually exclusivesub-url
requires aremote
.
The
ProjectSpec
represents the User Interface. The options which can be specified in the manifest file. TheProject
is the resolved version ofProjectSpec
with all calculated information needed byGitWS
to operate.- static from_project(project: Project) ProjectSpec [source]
Create
ProjectSpec
fromproject
.- Parameters:
project – The source
Project
.
Note
Project.from_spec()
resolves some attributes irreversible. SoProject.from_spec(ProjectSpec.from_project())
will not return the original project.
- groups: Tuple[str, ...]
Dependency Groups.
- manifest_path: Optional[str]
Path to the manifest file. Relative to
path
of project.git-ws.toml
by default.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'frozen': True, 'populate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'copyfiles': FieldInfo(annotation=Tuple[gitws.datamodel.FileRef, ...], required=False, default=()), 'groups': FieldInfo(annotation=Tuple[Annotated[str, AfterValidator(func=<function _validate_group>)], ...], required=False, default=()), 'linkfiles': FieldInfo(annotation=Tuple[gitws.datamodel.FileRef, ...], required=False, default=()), 'manifest_path': FieldInfo(annotation=Union[str, NoneType], required=False, default='git-ws.toml', alias='manifest-path', alias_priority=2), 'name': FieldInfo(annotation=str, required=True, metadata=[AfterValidator(func=<function _validate_name>)]), 'path': FieldInfo(annotation=Union[str, NoneType], required=False, metadata=[AfterValidator(func=<function _validate_path>)]), 'recursive': FieldInfo(annotation=bool, required=False, default=True), 'remote': FieldInfo(annotation=Union[str, NoneType], required=False), 'revision': FieldInfo(annotation=Union[str, NoneType], required=False), 'sub_url': FieldInfo(annotation=Union[str, NoneType], required=False, alias='sub-url', alias_priority=2), 'submodules': FieldInfo(annotation=Union[bool, NoneType], required=False), 'url': FieldInfo(annotation=Union[str, NoneType], required=False), 'with_groups': FieldInfo(annotation=Tuple[Annotated[str, AfterValidator(func=<function _validate_group>)], ...], required=False, default=(), alias='with-groups', alias_priority=2)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- name: str
Dependency Name.
- path: Optional[str]
Path within workspace.
name
will be used as default.
- recursive: bool
Integrate Dependencies of this dependency.
- remote: Optional[str]
Remote Alias Name. The
remote
must have been defined previously.
- revision: Optional[str]
Revision to be checked out.
- sub_url: Optional[str]
Relative URL to
remote
surl_base
OR the URL of the manifest file.
- submodules: Optional[bool]
Initialize and Update git submodules.
- url: Optional[str]
Absolute URL.
- with_groups: Tuple[str, ...]
Group Selection for referred project.
- class gitws.datamodel.Remote(*, name: str, url_base: str = None)[source]
Bases:
BaseModel
Remote Alias - Remote URL Helper.
- Parameters:
name – Remote Name
- Keyword Arguments:
url_base – Base URL. Optional.
- model_config: ClassVar[ConfigDict] = {'frozen': True, 'populate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'name': FieldInfo(annotation=str, required=True), 'url_base': FieldInfo(annotation=str, required=False, alias='url-base', alias_priority=2)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- name: str
The Name of the Remote. Must be unique within Manifest.
- url_base: str
URL to a directory of repositories.
- class gitws.datamodel.WorkspaceFileRef(*, type_: str, project_path: str, src: str, dest: str, hash_: Optional[int] = None)[source]
Bases:
BaseModel
Current File Reference with Workspace.
- Parameters:
Path. (project_path - Project) –
src – Source - path relative to the project directory.
dest – Destination - relative path to the workspace directory.
- Keyword Arguments:
hash – Source File Hash for Copied Files.
- dest: str
Destination - relative path to the workspace directory.
- hash_: Optional[int]
Hash - Source File Hash for Copied Files.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'frozen': True, 'populate_by_name': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'dest': FieldInfo(annotation=str, required=True), 'hash_': FieldInfo(annotation=Union[int, NoneType], required=False), 'project_path': FieldInfo(annotation=str, required=True), 'src': FieldInfo(annotation=str, required=True), 'type_': FieldInfo(annotation=str, required=True)}
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- project_path: str
Project Path.
- src: str
Source - path relative to project_path.
- type_: str
File Type.
- gitws.datamodel.group_selects_from_filters(group_filters: Tuple[str, ...]) Tuple[GroupSelect, ...] [source]
Create
GroupSelects
from GroupFilters.
- gitws.datamodel.group_selects_from_groups(groups: Tuple[str, ...]) Tuple[GroupSelect, ...] [source]
Create
GroupSelects
from GroupFilters.