daktari 0.0.223__tar.gz → 0.0.225__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of daktari might be problematic. Click here for more details.
- {daktari-0.0.223/daktari.egg-info → daktari-0.0.225}/PKG-INFO +2 -2
- {daktari-0.0.223 → daktari-0.0.225}/README.md +1 -1
- daktari-0.0.225/daktari/__init__.py +1 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/files.py +22 -1
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/intellij_idea.py +28 -1
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/test_intellij_idea.py +26 -1
- {daktari-0.0.223 → daktari-0.0.225}/daktari/file_utils.py +6 -0
- {daktari-0.0.223 → daktari-0.0.225/daktari.egg-info}/PKG-INFO +2 -2
- {daktari-0.0.223 → daktari-0.0.225}/setup.py +1 -1
- daktari-0.0.223/daktari/__init__.py +0 -1
- {daktari-0.0.223 → daktari-0.0.225}/LICENSE.txt +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/MANIFEST.in +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/__main__.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/asdf.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/check.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/check_runner.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/check_sorter.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/check_utils.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/__init__.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/android.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/aws.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/certs.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/conan.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/direnv.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/docker.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/flutter.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/git.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/google.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/java.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/kubernetes.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/misc.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/nodejs.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/onepassword.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/python.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/ssh.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/terraform.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/test_certs.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/test_java.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/test_misc.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/test_onepassword.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/test_ssh.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/test_yarn.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/xml.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/checks/yarn.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/collection_utils.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/command_utils.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/config.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/options.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/os.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/resource_utils.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/resources/__init__.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/resources/daktari-local-template.yaml +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/resources/mock_cert.pem +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/result_printer.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/test_asdf.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/test_check.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/test_check_factory.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/test_check_runner.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/test_check_sorter.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/test_check_utils.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/test_collection_utils.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/test_config.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/test_result_printer.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/test_version_utils.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari/version_utils.py +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari.egg-info/SOURCES.txt +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari.egg-info/dependency_links.txt +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari.egg-info/entry_points.txt +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari.egg-info/requires.txt +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/daktari.egg-info/top_level.txt +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/pyproject.toml +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/requirements.txt +0 -0
- {daktari-0.0.223 → daktari-0.0.225}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: daktari
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.225
|
|
4
4
|
Summary: Assist in setting up and maintaining developer environments
|
|
5
5
|
Home-page: https://github.com/sonocent/daktari
|
|
6
6
|
Author: Matt Russell
|
|
@@ -22,7 +22,7 @@ In the root of the project repository, create a `.daktari.py` configuration file
|
|
|
22
22
|
```python
|
|
23
23
|
from daktari.checks.git import *
|
|
24
24
|
|
|
25
|
-
version = "0.0.
|
|
25
|
+
version = "0.0.225"
|
|
26
26
|
title = "My Project"
|
|
27
27
|
|
|
28
28
|
checks = [
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.225"
|
|
@@ -2,7 +2,7 @@ from os.path import expanduser
|
|
|
2
2
|
from typing import List
|
|
3
3
|
|
|
4
4
|
from daktari.check import Check, CheckResult
|
|
5
|
-
from daktari.file_utils import dir_exists, file_exists
|
|
5
|
+
from daktari.file_utils import dir_exists, file_exists, get_file_owner
|
|
6
6
|
from daktari.os import OS
|
|
7
7
|
|
|
8
8
|
|
|
@@ -42,3 +42,24 @@ class DirExists(DirsExist):
|
|
|
42
42
|
self.dir_paths = [dir_path]
|
|
43
43
|
self.pass_fail_message = f"{dir_path} is <not/> present"
|
|
44
44
|
self.suggestions = {OS.GENERIC: suggestion}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class FilesOwnedByUser(Check):
|
|
48
|
+
name = "files.ownedByUser"
|
|
49
|
+
|
|
50
|
+
def __init__(self, file_paths: List[str], expected_owner: str = "root", pass_fail_message: str = ""):
|
|
51
|
+
self.file_paths = file_paths
|
|
52
|
+
self.expected_owner = expected_owner
|
|
53
|
+
file_paths_str = ", ".join(file_paths)
|
|
54
|
+
self.pass_fail_message = pass_fail_message or f"{file_paths_str} are <not/> owned by {expected_owner}"
|
|
55
|
+
|
|
56
|
+
def check(self) -> CheckResult:
|
|
57
|
+
for file_path in self.file_paths:
|
|
58
|
+
expanded_file_path = expanduser(file_path)
|
|
59
|
+
if file_exists(expanded_file_path):
|
|
60
|
+
if get_file_owner(expanded_file_path) != self.expected_owner:
|
|
61
|
+
return self.verify(False, self.pass_fail_message)
|
|
62
|
+
else:
|
|
63
|
+
return self.failed(f"{expanded_file_path} is not present")
|
|
64
|
+
|
|
65
|
+
return self.verify(True, self.pass_fail_message)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import json
|
|
2
2
|
import logging
|
|
3
|
-
import os
|
|
3
|
+
import os
|
|
4
4
|
from json.decoder import JSONDecodeError
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
from typing import Optional
|
|
@@ -186,6 +186,33 @@ class IntelliJNodePackageManagerConfigured(XmlFileXPathCheck):
|
|
|
186
186
|
return current_package_manager.__contains__(self.package_manager_path)
|
|
187
187
|
|
|
188
188
|
|
|
189
|
+
class IntelliJTypescriptCompilerPathConfigured(XmlFileXPathCheck):
|
|
190
|
+
name = "intellij.typescriptCompilerPathConfigured"
|
|
191
|
+
file_path = ".idea/compiler.xml"
|
|
192
|
+
xpath_query = "./component[@name='TypeScriptCompiler']/option[@name='typeScriptServiceDirectory']"
|
|
193
|
+
depends_on = [IntelliJProjectImported]
|
|
194
|
+
|
|
195
|
+
def __init__(self, typescript_compiler_path: str):
|
|
196
|
+
self.typescript_compiler_path = typescript_compiler_path
|
|
197
|
+
resolved_path = typescript_compiler_path.replace("$PROJECT_DIR$", os.getcwd())
|
|
198
|
+
self.pass_fail_message = f"IntelliJ typescript compiler path has <not/> been set to {resolved_path}"
|
|
199
|
+
|
|
200
|
+
self.suggestions = {
|
|
201
|
+
OS.GENERIC: f"""
|
|
202
|
+
Follow the steps to set {resolved_path} as your typescript compiler path:
|
|
203
|
+
https://www.jetbrains.com/help/idea/typescript-support.html#ws_ts_use_ts_service_checkbox
|
|
204
|
+
"""
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
def validate_query_result(self, result):
|
|
208
|
+
if result is None:
|
|
209
|
+
self.pass_fail_message = "IntelliJ typescript compiler path is <not/> set"
|
|
210
|
+
return False
|
|
211
|
+
current_typescript_compiler_path = result.get("value")
|
|
212
|
+
logging.debug(f"IntelliJ typescript compiler set to: {current_typescript_compiler_path}")
|
|
213
|
+
return current_typescript_compiler_path == self.typescript_compiler_path
|
|
214
|
+
|
|
215
|
+
|
|
189
216
|
class IntelliJProjectSdkJavaVersion(XmlFileXPathCheck):
|
|
190
217
|
name = "intellij.jdkVersionConfigured"
|
|
191
218
|
file_path = ".idea/misc.xml"
|
|
@@ -3,7 +3,11 @@ import unittest
|
|
|
3
3
|
from semver import VersionInfo
|
|
4
4
|
|
|
5
5
|
from daktari.check import CheckStatus
|
|
6
|
-
from daktari.checks.intellij_idea import
|
|
6
|
+
from daktari.checks.intellij_idea import (
|
|
7
|
+
IntelliJProjectSdkJavaVersion,
|
|
8
|
+
get_intellij_version_from_product_info,
|
|
9
|
+
IntelliJTypescriptCompilerPathConfigured,
|
|
10
|
+
)
|
|
7
11
|
|
|
8
12
|
|
|
9
13
|
class TestIntellijIdea(unittest.TestCase):
|
|
@@ -39,3 +43,24 @@ class TestIntellijIdea(unittest.TestCase):
|
|
|
39
43
|
result = check.check()
|
|
40
44
|
self.assertEqual(result.status, CheckStatus.PASS)
|
|
41
45
|
self.assertEqual(result.summary, "IntelliJ Project SDK is set to Java 17: JDK_17")
|
|
46
|
+
|
|
47
|
+
def test_project_typescript_path_unset(self):
|
|
48
|
+
check = IntelliJTypescriptCompilerPathConfigured("$PROJECT_DIR$/node_modules/typescript")
|
|
49
|
+
check.file_path = "checks/test_resources/intellij_misc_no_ts_path.xml"
|
|
50
|
+
result = check.check()
|
|
51
|
+
self.assertEqual(result.status, CheckStatus.FAIL)
|
|
52
|
+
self.assertIn("IntelliJ typescript compiler path is not set", result.summary)
|
|
53
|
+
|
|
54
|
+
def test_project_typescript_path_set_wrong(self):
|
|
55
|
+
check = IntelliJTypescriptCompilerPathConfigured("/some/project/node_modules/typescript")
|
|
56
|
+
check.file_path = "checks/test_resources/intellij_misc_custom_ts_path.xml"
|
|
57
|
+
result = check.check()
|
|
58
|
+
self.assertEqual(result.status, CheckStatus.FAIL)
|
|
59
|
+
self.assertIn("IntelliJ typescript compiler path has not been set to", result.summary)
|
|
60
|
+
|
|
61
|
+
def test_project_typescript_path_set_correctly(self):
|
|
62
|
+
check = IntelliJTypescriptCompilerPathConfigured("$PROJECT_DIR$/node_modules/typescript")
|
|
63
|
+
check.file_path = "checks/test_resources/intellij_misc_custom_ts_path.xml"
|
|
64
|
+
result = check.check()
|
|
65
|
+
self.assertEqual(result.status, CheckStatus.PASS)
|
|
66
|
+
self.assertIn("IntelliJ typescript compiler path has been set to", result.summary)
|
|
@@ -4,6 +4,7 @@ from daktari.command_utils import get_stdout
|
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
6
|
import re
|
|
7
|
+
from pwd import getpwuid
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
def get_absolute_path(path: str) -> str:
|
|
@@ -44,3 +45,8 @@ def file_contains_text_regex(path: str, regex: str) -> bool:
|
|
|
44
45
|
def dir_exists(path: str) -> bool:
|
|
45
46
|
testing_dir = Path(path)
|
|
46
47
|
return testing_dir.is_dir()
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def get_file_owner(file_path: str) -> str:
|
|
51
|
+
file_stat = os.stat(file_path)
|
|
52
|
+
return getpwuid(file_stat.st_uid).pw_name
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: daktari
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.225
|
|
4
4
|
Summary: Assist in setting up and maintaining developer environments
|
|
5
5
|
Home-page: https://github.com/sonocent/daktari
|
|
6
6
|
Author: Matt Russell
|
|
@@ -22,7 +22,7 @@ In the root of the project repository, create a `.daktari.py` configuration file
|
|
|
22
22
|
```python
|
|
23
23
|
from daktari.checks.git import *
|
|
24
24
|
|
|
25
|
-
version = "0.0.
|
|
25
|
+
version = "0.0.225"
|
|
26
26
|
title = "My Project"
|
|
27
27
|
|
|
28
28
|
checks = [
|
|
@@ -10,7 +10,7 @@ README = (HERE / "README.md").read_text()
|
|
|
10
10
|
|
|
11
11
|
setuptools.setup(
|
|
12
12
|
name="daktari",
|
|
13
|
-
version="0.0.
|
|
13
|
+
version="0.0.225",
|
|
14
14
|
description="Assist in setting up and maintaining developer environments",
|
|
15
15
|
long_description=README,
|
|
16
16
|
long_description_content_type="text/markdown",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.0.223"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|