daktari 0.0.224__py3-none-any.whl → 0.0.226__py3-none-any.whl

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/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.0.224"
1
+ __version__ = "0.0.226"
@@ -1,6 +1,6 @@
1
1
  import json
2
2
  import logging
3
- import os.path
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 IntelliJProjectSdkJavaVersion, get_intellij_version_from_product_info
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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: daktari
3
- Version: 0.0.224
3
+ Version: 0.0.226
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
@@ -18,7 +18,7 @@ Requires-Dist: distro (==1.9.0)
18
18
  Requires-Dist: dpath (==2.2.0)
19
19
  Requires-Dist: importlib-resources (==6.4.5)
20
20
  Requires-Dist: packaging (==20.9)
21
- Requires-Dist: pyOpenSSL (==24.2.1)
21
+ Requires-Dist: pyOpenSSL (==24.3.0)
22
22
  Requires-Dist: pyclip (==0.7.0)
23
23
  Requires-Dist: pyfiglet (==0.8.post1)
24
24
  Requires-Dist: python-hosts (==1.0.7)
@@ -34,7 +34,7 @@ Requires-Dist: types-tabulate (==0.9.0.20240106)
34
34
  Requires-Dist: urllib3 (<1.27)
35
35
  Requires-Dist: dataclasses (==0.8) ; python_version < "3.7"
36
36
  Requires-Dist: types-dataclasses (==0.1.5) ; python_version < "3.7"
37
- Requires-Dist: pyobjc-core (==10.3.1) ; sys_platform == "darwin"
37
+ Requires-Dist: pyobjc-core (==10.3.2) ; sys_platform == "darwin"
38
38
  Requires-Dist: pyobjc-framework-Cocoa (==10.3.1) ; sys_platform == "darwin"
39
39
 
40
40
  **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.
@@ -46,7 +46,7 @@ In the root of the project repository, create a `.daktari.py` configuration file
46
46
  ```python
47
47
  from daktari.checks.git import *
48
48
 
49
- version = "0.0.224"
49
+ version = "0.0.226"
50
50
  title = "My Project"
51
51
 
52
52
  checks = [
@@ -1,4 +1,4 @@
1
- daktari/__init__.py,sha256=bYFROgesnN_7BNf1oGOGGm3r05dR7GI232cLTf1snL4,24
1
+ daktari/__init__.py,sha256=wdj_3fI5i5P-XMAm5HmCg8ZAFH7Fwi5tUBD5sVjJI1w,24
2
2
  daktari/__main__.py,sha256=iYwgtZZE2HD9Eh9Io6OliGQwCNZJSde_66jI6kF8xJU,1463
3
3
  daktari/asdf.py,sha256=fALVL6UTz1AYxuabw9MZeAES7J_CvImutUDD1Y2yWwM,509
4
4
  daktari/check.py,sha256=WzIiCrrdH7gCbElNwYbYkjhpmaOs_nUWfvkTBkfZlgs,4133
@@ -35,7 +35,7 @@ daktari/checks/files.py,sha256=E9REDXly96K6e4rVXIDbpNiXlgYiQmiS3CdlloxlqNo,2239
35
35
  daktari/checks/flutter.py,sha256=1TI19pIiLVrAuJvoPMXzgX1yOVq6Q5K0TwHNSAUdR_g,1536
36
36
  daktari/checks/git.py,sha256=yII22HkvhjGM4bpr3wiLvPxi1pSBPiQcxdTyjqPXji4,6508
37
37
  daktari/checks/google.py,sha256=pVbMVWe_mcZ5v-Y6COMwjpMIRopSqzVvgwAQVA4x_Tc,4643
38
- daktari/checks/intellij_idea.py,sha256=QZr5w-E-dBOevGsYVPfMEsOpLc5Kw2KPP8SYKFRGNnw,8461
38
+ daktari/checks/intellij_idea.py,sha256=_8A3t5jIAzqyjkIAFjAFwKwYb4WdbPk4Ex02R6d7cFE,9792
39
39
  daktari/checks/java.py,sha256=vS4gfuLwLxuTLizvybRx2yYXnNLMTsSfmoYHp91rono,3542
40
40
  daktari/checks/kubernetes.py,sha256=BJjxAZzZ3y3t7oHBruUy8OxP41JaX0cxlLvTnFz-F8s,5886
41
41
  daktari/checks/misc.py,sha256=8-xvFvMCoZTaZIVCw5QWKtFT-wSkUSUXGBak02IB6yY,10489
@@ -45,7 +45,7 @@ daktari/checks/python.py,sha256=v6xuRwtFCjzTYMN3qRLu76Xm7Bn8NO7wVpI3d8dOBSc,658
45
45
  daktari/checks/ssh.py,sha256=NqFhO03u523yQaffCeemcRtnYowx6LDuufayzF1t5eQ,1285
46
46
  daktari/checks/terraform.py,sha256=fvA7VRRJftkISqcnEjbc9dUovfXEe0eXrQl2MvsnfSM,2476
47
47
  daktari/checks/test_certs.py,sha256=LmwjzNBEJauGSFYYLGevJ5H3FRkaO0piezUm3P-hrbM,1693
48
- daktari/checks/test_intellij_idea.py,sha256=SGohgXApjm1DzMC-r43FHJX04oimrIhijRmMjyinA_o,1905
48
+ daktari/checks/test_intellij_idea.py,sha256=dJ7Nu0eVyv1cpo8h5wUJ6w1rmsbGg3yxslaQKHT3So4,3207
49
49
  daktari/checks/test_java.py,sha256=f-JFGI-J-pBD1WgY8a88BO7XeJhvD87QSZK0kDnflls,3613
50
50
  daktari/checks/test_misc.py,sha256=tTvaPaZORjNf1dV8wPUKXDI3-JksyfdOsnZXFs7SLLE,587
51
51
  daktari/checks/test_onepassword.py,sha256=HLeNjkZd85ty1U4Ut3OSjWVa5msC1Fp1OF0IIWD69u4,1115
@@ -56,9 +56,9 @@ daktari/checks/yarn.py,sha256=T8b_oOoZ4l96delmPgPfgtaTkiUS129hoWlGIBcU7Io,5534
56
56
  daktari/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
57
57
  daktari/resources/daktari-local-template.yaml,sha256=ik7KzMcG1r90nxDOk7t5G7P-BSxQIl2PocGUVe14c44,503
58
58
  daktari/resources/mock_cert.pem,sha256=AIc9dZOVIuxm7KFLunP5WSA1-LDWLOwpfu48B9xQ_Wg,82
59
- daktari-0.0.224.dist-info/LICENSE.txt,sha256=sMo18UdnQ7rY1SYg9gmop08ubzEQOGO1URYXu1Hxdx0,1051
60
- daktari-0.0.224.dist-info/METADATA,sha256=9TtOJLDZumDhylW7s3B9BNCeEdkrLY5n1d-H2W0pZrg,3844
61
- daktari-0.0.224.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
62
- daktari-0.0.224.dist-info/entry_points.txt,sha256=Sqwxp-qsyRnWwGVHkd3hoeG7aPffCIRB4pouCD9BbYU,51
63
- daktari-0.0.224.dist-info/top_level.txt,sha256=LW6kawKAAyxUbGqpAbdedKRUyVy2DBzEZOalp0qDdF8,8
64
- daktari-0.0.224.dist-info/RECORD,,
59
+ daktari-0.0.226.dist-info/LICENSE.txt,sha256=sMo18UdnQ7rY1SYg9gmop08ubzEQOGO1URYXu1Hxdx0,1051
60
+ daktari-0.0.226.dist-info/METADATA,sha256=xvwit65xA1H9mAKC6Wr1gGTAtDMI-juvA2IbcBHHMYI,3844
61
+ daktari-0.0.226.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
62
+ daktari-0.0.226.dist-info/entry_points.txt,sha256=Sqwxp-qsyRnWwGVHkd3hoeG7aPffCIRB4pouCD9BbYU,51
63
+ daktari-0.0.226.dist-info/top_level.txt,sha256=LW6kawKAAyxUbGqpAbdedKRUyVy2DBzEZOalp0qDdF8,8
64
+ daktari-0.0.226.dist-info/RECORD,,