phystool.physgit
Module Contents
Classes
Functions
Initialize the local git repository and link it to its remote. |
Data
API
- phystool.physgit.logger
“getLogger(…)”
- exception phystool.physgit.PhysGitError(msg: str)
Bases:
Exception
- class phystool.physgit.GitFile(status: Status, path: pathlib.Path)
Bases:
abc.ABC- SUFFIXES: tuple[str, str]
None
- SEARCH_DIR: pathlib.Path
None
- classmethod is_tracked(path: pathlib.Path)
- abstract add(path: pathlib.Path) None
- message() str
- get_files() list[str]
- get_diff() str
- display_diff() None
- class phystool.physgit.GitPDBFile(status: Status, path: pathlib.Path)
Bases:
phystool.physgit.GitFile- SUFFIXES
(“.tex”, “.json”)
- SEARCH_DIR
None
- add(path: pathlib.Path) None
- class phystool.physgit.GitTexFile(status: Status, path: pathlib.Path)
Bases:
phystool.physgit.GitFile- SUFFIXES
(“.sty”, “.cls”)
- SEARCH_DIR
None
- add(path: pathlib.Path) None
- class phystool.physgit.PhysGit
Initialization
Helper class to manage PDBFile stored in config.DB_DIR. If the directory is not a valid git repository it raises InvalidGitRepositoryError.
To have a nicer git diff experience, this helper class uses bat and delta (named git-delta in debian package manager).
- interactive_staging() None
- stage(uuid: str) None
- commit(for_terminal: bool) str
- get_diff(uuid: str) str
- get_remote_url() str
- phystool.physgit.run_git_in_terminal()
- phystool.physgit.setup_git_repository(remote_url: str) None
Initialize the local git repository and link it to its remote.
- Remote_url:
url of an empty remote repository