%global _empty_manifest_terminate_build 0 Name: python-daktari Version: 0.0.103 Release: 1 Summary: Assist in setting up and maintaining developer environments License: MIT URL: https://github.com/sonocent/daktari Source0: https://mirrors.nju.edu.cn/pypi/web/packages/66/e1/44b3a26d1fea4dbb376a21d74cbbd9cdd445a0203804e53f306124a52ccb/daktari-0.0.103.tar.gz BuildArch: noarch Requires: python3-PyYAML Requires: python3-ansicolors Requires: python3-distro Requires: python3-dpath Requires: python3-importlib-resources Requires: python3-packaging Requires: python3-pyOpenSSL Requires: python3-pyfiglet Requires: python3-hosts Requires: python3-requests-unixsocket Requires: python3-requests Requires: python3-semver Requires: python3-setuptools Requires: python3-tabulate Requires: python3-types-PyYAML Requires: python3-types-pyOpenSSL Requires: python3-types-tabulate Requires: python3-dataclasses Requires: python3-types-dataclasses Requires: python3-pyobjc-core Requires: python3-pyobjc-framework-Cocoa %description **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.103" 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: "brew install git-crypt", OS.UBUNTU: "sudo apt install git-crypt", 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 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 setup.py sdist bdist_wheel twine check dist/* twine upload dist/* ``` %package -n python3-daktari Summary: Assist in setting up and maintaining developer environments Provides: python-daktari BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-daktari **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.103" 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: "brew install git-crypt", OS.UBUNTU: "sudo apt install git-crypt", 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 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 setup.py sdist bdist_wheel twine check dist/* twine upload dist/* ``` %package help Summary: Development documents and examples for daktari Provides: python3-daktari-doc %description help **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.103" 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: "brew install git-crypt", OS.UBUNTU: "sudo apt install git-crypt", 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 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 setup.py sdist bdist_wheel twine check dist/* twine upload dist/* ``` %prep %autosetup -n daktari-0.0.103 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-daktari -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue May 30 2023 Python_Bot - 0.0.103-1 - Package Spec generated