# {py:mod}`phystool.physgit` ```{py:module} phystool.physgit ``` ```{autodoc2-docstring} phystool.physgit :allowtitles: ``` ## Module Contents ### Classes ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`GitFile ` - * - {py:obj}`GitPDBFile ` - * - {py:obj}`GitTexFile ` - * - {py:obj}`GitExtraFile ` - * - {py:obj}`PhysGit ` - ```{autodoc2-docstring} phystool.physgit.PhysGit :summary: ``` ```` ### Functions ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`run_git_in_terminal ` - ```{autodoc2-docstring} phystool.physgit.run_git_in_terminal :summary: ``` * - {py:obj}`is_valid_git_remote ` - ```{autodoc2-docstring} phystool.physgit.is_valid_git_remote :summary: ``` * - {py:obj}`setup_git_repository ` - ```{autodoc2-docstring} phystool.physgit.setup_git_repository :summary: ``` * - {py:obj}`clone_git_repository ` - ```{autodoc2-docstring} phystool.physgit.clone_git_repository :summary: ``` ```` ### Data ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`logger ` - ```{autodoc2-docstring} phystool.physgit.logger :summary: ``` ```` ### API ````{py:data} logger :canonical: phystool.physgit.logger :value: > 'getLogger(...)' ```{autodoc2-docstring} phystool.physgit.logger ``` ```` ```{py:exception} PhysGitError() :canonical: phystool.physgit.PhysGitError Bases: {py:obj}`Exception` ``` ``````{py:class} GitFile(status: Status, path: pathlib.Path) :canonical: phystool.physgit.GitFile Bases: {py:obj}`abc.ABC` ````{py:attribute} SUFFIXES :canonical: phystool.physgit.GitFile.SUFFIXES :type: tuple[str, str] :value: > None ```{autodoc2-docstring} phystool.physgit.GitFile.SUFFIXES ``` ```` ````{py:attribute} IN_DIR :canonical: phystool.physgit.GitFile.IN_DIR :type: pathlib.Path :value: > None ```{autodoc2-docstring} phystool.physgit.GitFile.IN_DIR ``` ```` `````{py:class} Status() :canonical: phystool.physgit.GitFile.Status Bases: {py:obj}`enum.StrEnum` ````{py:attribute} MODIFIED :canonical: phystool.physgit.GitFile.Status.MODIFIED :value: > 'M' ```{autodoc2-docstring} phystool.physgit.GitFile.Status.MODIFIED ``` ```` ````{py:attribute} MODIFIED_SUBMODULE :canonical: phystool.physgit.GitFile.Status.MODIFIED_SUBMODULE :value: > 'm' ```{autodoc2-docstring} phystool.physgit.GitFile.Status.MODIFIED_SUBMODULE ``` ```` ````{py:attribute} ADDED :canonical: phystool.physgit.GitFile.Status.ADDED :value: > 'A' ```{autodoc2-docstring} phystool.physgit.GitFile.Status.ADDED ``` ```` ````{py:attribute} DELETED :canonical: phystool.physgit.GitFile.Status.DELETED :value: > 'D' ```{autodoc2-docstring} phystool.physgit.GitFile.Status.DELETED ``` ```` ````{py:attribute} RENAMED :canonical: phystool.physgit.GitFile.Status.RENAMED :value: > 'R' ```{autodoc2-docstring} phystool.physgit.GitFile.Status.RENAMED ``` ```` ````{py:attribute} COPIED :canonical: phystool.physgit.GitFile.Status.COPIED :value: > 'C' ```{autodoc2-docstring} phystool.physgit.GitFile.Status.COPIED ``` ```` ````{py:attribute} UNTRACKED :canonical: phystool.physgit.GitFile.Status.UNTRACKED :value: > '??' ```{autodoc2-docstring} phystool.physgit.GitFile.Status.UNTRACKED ``` ```` ````{py:attribute} IGNORED :canonical: phystool.physgit.GitFile.Status.IGNORED :value: > '!!' ```{autodoc2-docstring} phystool.physgit.GitFile.Status.IGNORED ``` ```` ````` ````{py:method} create(status: Status, path: pathlib.Path) -> phystool.physgit.GitFile :canonical: phystool.physgit.GitFile.create :classmethod: ```{autodoc2-docstring} phystool.physgit.GitFile.create ``` ```` ````{py:method} add(path: pathlib.Path) -> None :canonical: phystool.physgit.GitFile.add :abstractmethod: ```{autodoc2-docstring} phystool.physgit.GitFile.add ``` ```` ````{py:method} message() -> str :canonical: phystool.physgit.GitFile.message ```{autodoc2-docstring} phystool.physgit.GitFile.message ``` ```` ````{py:method} get_files() -> list[str] :canonical: phystool.physgit.GitFile.get_files ```{autodoc2-docstring} phystool.physgit.GitFile.get_files ``` ```` ````{py:method} get_diff() -> str :canonical: phystool.physgit.GitFile.get_diff ```{autodoc2-docstring} phystool.physgit.GitFile.get_diff ``` ```` ````{py:method} display_diff() -> None :canonical: phystool.physgit.GitFile.display_diff ```{autodoc2-docstring} phystool.physgit.GitFile.display_diff ``` ```` `````` `````{py:class} GitPDBFile(status: Status, path: pathlib.Path) :canonical: phystool.physgit.GitPDBFile Bases: {py:obj}`phystool.physgit.GitFile` ````{py:attribute} SUFFIXES :canonical: phystool.physgit.GitPDBFile.SUFFIXES :value: > ('.tex', '.json') ```{autodoc2-docstring} phystool.physgit.GitPDBFile.SUFFIXES ``` ```` ````{py:method} add(path: pathlib.Path) -> None :canonical: phystool.physgit.GitPDBFile.add ```{autodoc2-docstring} phystool.physgit.GitPDBFile.add ``` ```` ````` `````{py:class} GitTexFile(status: Status, path: pathlib.Path) :canonical: phystool.physgit.GitTexFile Bases: {py:obj}`phystool.physgit.GitFile` ````{py:attribute} SUFFIXES :canonical: phystool.physgit.GitTexFile.SUFFIXES :value: > ('.sty', '.cls') ```{autodoc2-docstring} phystool.physgit.GitTexFile.SUFFIXES ``` ```` ````{py:method} add(path: pathlib.Path) -> None :canonical: phystool.physgit.GitTexFile.add ```{autodoc2-docstring} phystool.physgit.GitTexFile.add ``` ```` ````` `````{py:class} GitExtraFile(status: Status, path: pathlib.Path) :canonical: phystool.physgit.GitExtraFile Bases: {py:obj}`phystool.physgit.GitFile` ````{py:attribute} SUFFIXES :canonical: phystool.physgit.GitExtraFile.SUFFIXES :value: > ('.conf', '') ```{autodoc2-docstring} phystool.physgit.GitExtraFile.SUFFIXES ``` ```` ````{py:attribute} FILES :canonical: phystool.physgit.GitExtraFile.FILES :value: > ['0_physdb.conf', '.gitignore'] ```{autodoc2-docstring} phystool.physgit.GitExtraFile.FILES ``` ```` ````{py:method} add(path: pathlib.Path) -> None :canonical: phystool.physgit.GitExtraFile.add ```{autodoc2-docstring} phystool.physgit.GitExtraFile.add ``` ```` ````` `````{py:class} PhysGit() :canonical: phystool.physgit.PhysGit ```{autodoc2-docstring} phystool.physgit.PhysGit ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} phystool.physgit.PhysGit.__init__ ``` ````{py:method} interactive_staging() -> None :canonical: phystool.physgit.PhysGit.interactive_staging ```{autodoc2-docstring} phystool.physgit.PhysGit.interactive_staging ``` ```` ````{py:method} stage(git_pdb_file: phystool.physgit.GitFile) -> None :canonical: phystool.physgit.PhysGit.stage ```{autodoc2-docstring} phystool.physgit.PhysGit.stage ``` ```` ````{py:method} commit(for_terminal: bool) -> str :canonical: phystool.physgit.PhysGit.commit ```{autodoc2-docstring} phystool.physgit.PhysGit.commit ``` ```` ````{py:method} get_remote_url() -> str :canonical: phystool.physgit.PhysGit.get_remote_url ```{autodoc2-docstring} phystool.physgit.PhysGit.get_remote_url ``` ```` ````` ````{py:function} run_git_in_terminal() -> None :canonical: phystool.physgit.run_git_in_terminal ```{autodoc2-docstring} phystool.physgit.run_git_in_terminal ``` ```` ````{py:function} is_valid_git_remote(remote_url: str) -> bool :canonical: phystool.physgit.is_valid_git_remote ```{autodoc2-docstring} phystool.physgit.is_valid_git_remote ``` ```` ````{py:function} setup_git_repository(remote_url: str) -> None :canonical: phystool.physgit.setup_git_repository ```{autodoc2-docstring} phystool.physgit.setup_git_repository ``` ```` ````{py:function} clone_git_repository(remote_url: str, to_path: pathlib.Path) :canonical: phystool.physgit.clone_git_repository ```{autodoc2-docstring} phystool.physgit.clone_git_repository ``` ````