dal.classes.common package
Submodules
dal.classes.common.gitlink module
Copyright (C) Mov.ai - All Rights Reserved Unauthorized copying of this file, via any medium is strictly prohibited Proprietary and confidential
Developers: - Moawiya Mograbi (moawiya@mov.ai) - 2022
- class dal.classes.common.gitlink.GitLink(link: str)
Bases:
objecta class to represent a remote git link whether it was ssh link or https. Git links Parser.
- example of git links:
- GitLab:
git@gitlab.com:szabiprog/cashflow.git https://gitlab.com/szabiprog/cashflow.git https://gitlab.com/szabiprog/cashflow
- GitHub:
https://github.com/MOV-AI/data-access-layer.git git@github.com:MOV-AI/data-access-layer.git https://github.com/MOV-AI/data-access-layer
- Bitbucket:
git@bitbucket.org:robosavvy/movai-cli.git https://Moawiyam@bitbucket.org/robosavvy/movai-cli.git
- HTTPS_REGEX = 'https://([^/]+)/([^/]+)/([^/]*)(/(.*))?'
- SSH_REGEX = 'git@([^:]+):([^/]+)/([^/]*)(/(.*))?'
- property domain: str
return the domain of the given link
- Returns:
domain name
- Return type:
str
- property owner: str
the owner of the repository given by link
- Returns:
owner name
- Return type:
str
- property path: str
the path inside the repo given by the link
- Returns:
the path inside the repository.
- Return type:
str
- property remote: str
- the remote link
composed of: domain/owner/repository/path
- Returns:
the remote link
- Return type:
str
- property repo: str
return the repository name
- Returns:
repository name
- Return type:
str
- property repo_https_link: str
- return https link representing the remote link
useful in case git link received.
- Returns:
https link
- Return type:
str
- property repo_ssh_link: str
dal.classes.common.singleton module
Copyright (C) Mov.ai - All Rights Reserved Unauthorized copying of this file, via any medium is strictly prohibited Proprietary and confidential
Developers: - Moawiya Mograbi (moawiya@mov.ai) - 2021
Module that implements a Singleton Base class.
- class dal.classes.common.singleton.Singleton
Bases:
typeA Singleton metaclass, every class that is intended to be a Singleton have to inherit this class as metaclass, for example:
- class Logger(metaclass=Singleton):
pass