config
repo_root(path=Path('.'))
Find the root of the current repository.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
Path
|
A path in the repository. |
Path('.')
|
Returns:
Type | Description |
---|---|
Optional[Path]
|
Optional[Path]: The root of the repo if it is a repo, None otherwise. |
Source code in mkreports/config.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
set_mkreports_dir(mkreports_dir=None, repo_root_dir=repo_root(Path(os.getcwd())), mkreports_root_dir=Path(os.environ.get('MKREPORTS_ROOT_DIR', Path(tempfile.gettempdir()) / 'mkreports')))
Function to derive the ckpt directory.
This is called once at initialization. The reason is that it could change if the working directory is changed and this would be undesirable behavior.
Source code in mkreports/config.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
|