Sources¶
Base source¶
base ¶
BaseSource ¶
Bases: ABC
Base class for data sources.
get_path abstractmethod ¶
get_path() -> Path | None
Returns the path to the directory to be analyzed.
Source code in docstr_health/sources/base.py
8 9 10 11 12 13 | |
get_scan_paths ¶
get_scan_paths() -> list[Path] | None
Return specific paths to scan, or None to scan the whole source path.
Source code in docstr_health/sources/base.py
15 16 17 | |
cleanup abstractmethod ¶
cleanup() -> None
Cleans up temporary files (if any).
Source code in docstr_health/sources/base.py
19 20 21 22 | |
Local source¶
local ¶
LocalSource ¶
LocalSource(path: Path)
Bases: BaseSource
Local directory.
Source code in docstr_health/sources/local.py
10 11 | |
get_path ¶
get_path() -> Path
Source code in docstr_health/sources/local.py
13 14 15 16 17 18 | |
cleanup ¶
cleanup() -> None
Source code in docstr_health/sources/local.py
20 21 | |
Git repository source¶
git_repo ¶
GitRepositorySource ¶
GitRepositorySource(repo_url: str)
Bases: BaseSource
Remote git repository.
Source code in docstr_health/sources/git_repo.py
14 15 16 | |
check_git_installed staticmethod ¶
check_git_installed()
Source code in docstr_health/sources/git_repo.py
18 19 20 21 | |
get_from_cache ¶
get_from_cache() -> Path | None
Source code in docstr_health/sources/git_repo.py
28 29 30 31 | |
get_from_repo ¶
get_from_repo()
Source code in docstr_health/sources/git_repo.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |
get_path ¶
get_path() -> Path | None
Source code in docstr_health/sources/git_repo.py
49 50 51 52 53 | |
cleanup ¶
cleanup() -> None
Source code in docstr_health/sources/git_repo.py
55 56 57 58 59 60 61 62 63 64 | |
PyPI package source¶
pypi_package ¶
PyPiPackageSource ¶
PyPiPackageSource(package_url: str)
Bases: BaseSource
Remote PyPi package.
Source code in docstr_health/sources/pypi_package.py
14 15 | |
get_download_method ¶
get_download_method() -> list[str]
Source code in docstr_health/sources/pypi_package.py
21 22 23 24 25 26 27 28 | |
get_from_cache ¶
get_from_cache() -> Path | None
Source code in docstr_health/sources/pypi_package.py
34 35 36 37 | |
get_from_package ¶
get_from_package()
Source code in docstr_health/sources/pypi_package.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
get_path ¶
get_path() -> Path | None
Source code in docstr_health/sources/pypi_package.py
55 56 57 58 59 | |
get_scan_paths ¶
get_scan_paths() -> list[Path] | None
Source code in docstr_health/sources/pypi_package.py
61 62 63 64 65 66 67 68 69 | |
cleanup ¶
cleanup() -> None
Source code in docstr_health/sources/pypi_package.py
98 99 100 101 102 103 104 105 106 107 108 109 | |
Factory¶
sources ¶
get_repository_source ¶
get_repository_source(settings, args) -> BaseSource
Source code in docstr_health/sources/__init__.py
7 8 9 10 11 12 | |