Metadata-Version: 2.4
Name: daktari
Version: 0.0.281
Summary: Assist in setting up and maintaining developer environments
Author-email: Matt Russell <matthew.russell@sonocent.com>
License: Copyright 2021 Sonocent Ltd
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project-URL: Homepage, https://github.com/sonocent/daktari
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: ansicolors==1.1.8
Requires-Dist: distro==1.9.0
Requires-Dist: pyfiglet==1.0.3
Requires-Dist: importlib_resources==6.5.2
Requires-Dist: packaging==25.0
Requires-Dist: setuptools==80.9.0
Requires-Dist: requests==2.32.4
Requires-Dist: responses==0.25.7
Requires-Dist: semver==3.0.4
Requires-Dist: python-hosts==1.1.2
Requires-Dist: PyYAML==6.0.2
Requires-Dist: types-PyYAML==6.0.12.20250516
Requires-Dist: pyobjc-core==11.1; sys_platform == "darwin"
Requires-Dist: pyobjc-framework-Cocoa==11.1; sys_platform == "darwin"
Requires-Dist: requests-unixsocket==0.4.1
Requires-Dist: dpath==2.2.0
Requires-Dist: pyOpenSSL==25.1.0
Requires-Dist: types-pyOpenSSL==24.1.0.20240722
Requires-Dist: pyclip==0.7.0
Requires-Dist: urllib3==2.5.0
Dynamic: license-file

**Daktari** is a tool to help the initial setup and ongoing maintenance of developer environments. It runs a series of checks (for example, that required software is installed) and provides suggestions on how to fix the issue if the check fails.

## Configuration

In the root of the project repository, create a `.daktari.py` configuration file listing the checks you want run. For example,

```python
from daktari.checks.git import *

version = "0.0.281"
title = "My Project"

checks = [
    GitInstalled(),
    GitLfsInstalled(),
    GitLfsSetUpForUser(),
    GitLfsFilesDownloaded(),
    GitCryptInstalled(),
]
```

Then run `daktari` to diagnose your environment:

```
$ daktari
✅ [git.installed] Git is installed
✅ [git.lfs.installed] Git LFS is installed
✅ [git.lfs.setUpForUser] Git LFS is set up for the current user
✅ [git.lfs.filesDownloaded] Git LFS files have been downloaded
❌ [git.crypt.installed] git-crypt is not installed
┌─💡 Suggestion ─────────┐
│ brew install git-crypt │
└────────────────────────┘
```

## Custom Check

You can write a custom check as a Python class within `.daktari.py`, and include it in your list of checks. Example of a check implementation:

```python
class GitCryptInstalled(Check):
    name = "git.crypt.installed"
    depends_on = [GitInstalled]

    suggestions = {
        OS.OS_X: "<cmd>brew install git-crypt</cmd>",
        OS.UBUNTU: "<cmd>sudo apt install git-crypt</cmd>",
        OS.GENERIC: "Install git-crypt (https://www.agwa.name/projects/git-crypt/)",
    }

    def check(self):
        return self.verify(can_run_command("git crypt version"), "git-crypt is <not/> installed")
```

## Testing Daktari changes locally

Having cloned the repo into `~/daktari`, you can make use of PYTHONPATH to run daktari using your local changes.

To do this, navigate into a directory that has a `.daktari.py` (e.g. another repository intending to use your change) and run:

```bash
PYTHONPATH=~/daktari python3 -m daktari --debug
```

## Release instructions

Daktari is continuously deployed via a github action - see [release.yaml](.github/workflows/release.yaml). 
In case of a need to manually release, the steps are:

```
bumpversion --verbose patch
python -m build
twine check dist/*
twine upload dist/*
```
