arkitekt-next 0.8.32__tar.gz → 0.8.34__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 arkitekt-next might be problematic. Click here for more details.

Files changed (140) hide show
  1. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/PKG-INFO +10 -10
  2. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/builders.py +1 -0
  3. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/gen/compile.py +8 -0
  4. arkitekt_next-0.8.34/arkitekt_next/cli/commands/gen/init.py +117 -0
  5. arkitekt_next-0.8.34/arkitekt_next/service_registry.py +192 -0
  6. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/pyproject.toml +10 -10
  7. arkitekt_next-0.8.32/arkitekt_next/cli/commands/gen/init.py +0 -122
  8. arkitekt_next-0.8.32/arkitekt_next/service_registry.py +0 -113
  9. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/LICENSE +0 -0
  10. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/README.md +0 -0
  11. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/__blok__.py +0 -0
  12. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/__init__.py +0 -0
  13. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/apps/__init__.py +0 -0
  14. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/apps/service/__init__.py +0 -0
  15. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/apps/service/fakts_next.py +0 -0
  16. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/apps/service/fakts_qt.py +0 -0
  17. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/apps/service/grant_registry.py +0 -0
  18. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/apps/service/herre.py +0 -0
  19. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/apps/service/herre_qt.py +0 -0
  20. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/apps/types.py +0 -0
  21. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/base_models.py +0 -0
  22. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/__init__.py +0 -0
  23. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/admin.py +0 -0
  24. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/arkitekt.py +0 -0
  25. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/base.py +0 -0
  26. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/config.py +0 -0
  27. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/fluss.py +0 -0
  28. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/gateway.py +0 -0
  29. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/internal_docker.py +0 -0
  30. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/kabinet.py +0 -0
  31. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/livekit.py +0 -0
  32. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/lok.py +0 -0
  33. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/mikro.py +0 -0
  34. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/minio.py +0 -0
  35. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/mount.py +0 -0
  36. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/namegen.py +0 -0
  37. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/orkestrator.py +0 -0
  38. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/postgres.py +0 -0
  39. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/redis.py +0 -0
  40. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/rekuest.py +0 -0
  41. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/secret.py +0 -0
  42. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/services/__init__.py +0 -0
  43. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/services/admin.py +0 -0
  44. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/services/config.py +0 -0
  45. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/services/db.py +0 -0
  46. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/services/gateway.py +0 -0
  47. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/services/livekit.py +0 -0
  48. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/services/lok.py +0 -0
  49. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/services/mount.py +0 -0
  50. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/services/name.py +0 -0
  51. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/services/redis.py +0 -0
  52. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/services/s3.py +0 -0
  53. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/services/secret.py +0 -0
  54. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/services/socket.py +0 -0
  55. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/socket.py +0 -0
  56. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/bloks/tailscale.py +0 -0
  57. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/__init__.py +0 -0
  58. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/call/__init__.py +0 -0
  59. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/call/local.py +0 -0
  60. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/call/main.py +0 -0
  61. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/call/remote.py +0 -0
  62. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/gen/__init__.py +0 -0
  63. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/gen/main.py +0 -0
  64. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/gen/watch.py +0 -0
  65. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/init/__init__.py +0 -0
  66. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/init/main.py +0 -0
  67. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/inspect/__init__.py +0 -0
  68. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/inspect/main.py +0 -0
  69. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/inspect/requirements.py +0 -0
  70. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/inspect/templates.py +0 -0
  71. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/inspect/variables.py +0 -0
  72. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/kabinet/__init__.py +0 -0
  73. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/kabinet/build.py +0 -0
  74. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/kabinet/init.py +0 -0
  75. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/kabinet/main.py +0 -0
  76. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/kabinet/publish.py +0 -0
  77. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/kabinet/stage.py +0 -0
  78. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/kabinet/utils.py +0 -0
  79. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/kabinet/validate.py +0 -0
  80. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/kabinet/wizard.py +0 -0
  81. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/manifest/__init__.py +0 -0
  82. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/manifest/inspect.py +0 -0
  83. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/manifest/main.py +0 -0
  84. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/manifest/scopes.py +0 -0
  85. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/manifest/version.py +0 -0
  86. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/manifest/wizard.py +0 -0
  87. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/run/__init__.py +0 -0
  88. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/run/dev.py +0 -0
  89. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/run/main.py +0 -0
  90. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/run/prod.py +0 -0
  91. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/commands/run/utils.py +0 -0
  92. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/configs/base.yaml +0 -0
  93. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/constants.py +0 -0
  94. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/dockerfiles/vanilla.dockerfile +0 -0
  95. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/errors.py +0 -0
  96. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/inspect.py +0 -0
  97. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/io.py +0 -0
  98. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/main.py +0 -0
  99. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/options.py +0 -0
  100. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/schemas/fluss.schema.graphql +0 -0
  101. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/schemas/gucker.schema.graphql +0 -0
  102. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/schemas/kabinet.schema.graphql +0 -0
  103. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/schemas/kluster.schema.graphql +0 -0
  104. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/schemas/konviktion.schema.graphql +0 -0
  105. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/schemas/kuay.schema.graphql +0 -0
  106. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/schemas/mikro.schema.graphql +0 -0
  107. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/schemas/mikro_next.schema.graphql +0 -0
  108. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/schemas/napari.schema.graphql +0 -0
  109. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/schemas/omero_ark.schema.graphql +0 -0
  110. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/schemas/port.schema.graphql +0 -0
  111. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/schemas/rekuest.schema.graphql +0 -0
  112. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/schemas/rekuest_next.schema.graphql +0 -0
  113. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/schemas/unlok.schema.graphql +0 -0
  114. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/templates/filter.py +0 -0
  115. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/templates/simple.py +0 -0
  116. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/texts.py +0 -0
  117. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/types.py +0 -0
  118. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/ui.py +0 -0
  119. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/utils.py +0 -0
  120. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/validators.py +0 -0
  121. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/vars.py +0 -0
  122. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/cli/versions/v1.yaml +0 -0
  123. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/constants.py +0 -0
  124. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/qt/__init__.py +0 -0
  125. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/qt/assets/dark/gear.png +0 -0
  126. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/qt/assets/dark/green pulse.gif +0 -0
  127. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/qt/assets/dark/orange pulse.gif +0 -0
  128. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/qt/assets/dark/pink pulse.gif +0 -0
  129. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/qt/assets/dark/red pulse.gif +0 -0
  130. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/qt/assets/light/gear.png +0 -0
  131. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/qt/assets/light/green pulse.gif +0 -0
  132. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/qt/assets/light/orange pulse.gif +0 -0
  133. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/qt/assets/light/pink pulse.gif +0 -0
  134. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/qt/assets/light/red pulse.gif +0 -0
  135. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/qt/builders.py +0 -0
  136. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/qt/magic_bar.py +0 -0
  137. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/qt/types.py +0 -0
  138. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/qt/utils.py +0 -0
  139. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/tqdm.py +0 -0
  140. {arkitekt_next-0.8.32 → arkitekt_next-0.8.34}/arkitekt_next/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: arkitekt-next
3
- Version: 0.8.32
3
+ Version: 0.8.34
4
4
  Summary: client for the arkitekt_next platform
5
5
  License: MIT
6
6
  Author: jhnnsrs
@@ -21,21 +21,21 @@ Requires-Dist: blok (>=0.0.19) ; (python_version >= "3.9" and python_version < "
21
21
  Requires-Dist: cryptography (>=40.0.8) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "blok")
22
22
  Requires-Dist: dokker (>=1.0.0)
23
23
  Requires-Dist: fakts-next (>=1.0.2)
24
- Requires-Dist: fluss-next (>=0.1.90) ; extra == "all"
24
+ Requires-Dist: fluss-next (>=0.1.91) ; extra == "all"
25
25
  Requires-Dist: herre-next (>=1.0.2)
26
- Requires-Dist: kabinet (>=0.1.38) ; (python_version >= "3.9" and python_version < "4.0") and (extra == "all")
26
+ Requires-Dist: kabinet (>=0.1.40) ; (python_version >= "3.9" and python_version < "4.0") and (extra == "all")
27
27
  Requires-Dist: koil (>=1.0.0)
28
- Requires-Dist: kraph (>=0.1.91) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "extended")
29
- Requires-Dist: lovekit (>=0.1.15) ; (python_version >= "3.10" and python_version < "4.0") and (extra == "all")
30
- Requires-Dist: mikro-next (>=0.1.47) ; (python_version >= "3.10" and python_version < "4.0") and (extra == "all")
28
+ Requires-Dist: kraph (>=0.1.92) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "extended")
29
+ Requires-Dist: lovekit (>=0.1.16) ; (python_version >= "3.10" and python_version < "4.0") and (extra == "all")
30
+ Requires-Dist: mikro-next (>=0.1.48) ; (python_version >= "3.10" and python_version < "4.0") and (extra == "all")
31
31
  Requires-Dist: namegenerator (>=1.0.6) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "blok")
32
32
  Requires-Dist: netifaces (>=0.11.0) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "blok")
33
- Requires-Dist: reaktion-next (>=0.1.80) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "all")
34
- Requires-Dist: rekuest-next (>=0.2.43) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "cli" or extra == "all")
33
+ Requires-Dist: reaktion-next (>=0.1.81) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "all")
34
+ Requires-Dist: rekuest-next (>=0.2.44) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "cli" or extra == "all")
35
35
  Requires-Dist: rich-click (>=1.6.1) ; extra == "cli" or extra == "all"
36
36
  Requires-Dist: semver (>=3.0.1) ; extra == "cli" or extra == "all"
37
- Requires-Dist: turms (>=0.6.0) ; (python_version >= "3.9" and python_version < "4.0") and (extra == "cli" or extra == "all")
38
- Requires-Dist: unlok-next (>=0.1.83) ; python_version >= "3.8" and python_version < "4.0"
37
+ Requires-Dist: turms (>=0.7.0) ; (python_version >= "3.9" and python_version < "4.0") and (extra == "cli" or extra == "all")
38
+ Requires-Dist: unlok-next (>=0.1.84) ; python_version >= "3.8" and python_version < "4.0"
39
39
  Requires-Dist: watchfiles (>=0.18.1) ; extra == "cli" or extra == "all"
40
40
  Description-Content-Type: text/markdown
41
41
 
@@ -96,6 +96,7 @@ def easy(
96
96
  NextApp
97
97
  A built app, that can be used to interact with the ArkitektNext server
98
98
  """
99
+ print("CAAAAAAAAAAAAAAAAAAAAAAAAAAAALLLED")
99
100
  registry = registry or check_and_import_services()
100
101
 
101
102
 
@@ -20,6 +20,14 @@ def compile(projects, config):
20
20
  """
21
21
  app_directory = os.getcwd()
22
22
 
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
23
31
  from turms.run import scan_folder_for_single_config, load_projects_from_configpath
24
32
  from turms.cli.main import generate_projects
25
33
 
@@ -0,0 +1,117 @@
1
+ import os
2
+ import shutil
3
+ from click import ClickException
4
+ import rich_click as click
5
+ from arkitekt_next.cli.options import (
6
+ with_documents,
7
+ with_graphql_config,
8
+ with_api_path,
9
+ with_boring,
10
+ with_choose_services,
11
+ with_schemas,
12
+ with_seperate_document_dirs,
13
+ )
14
+ import yaml
15
+ from arkitekt_next.cli.utils import build_relative_dir
16
+ from arkitekt_next.cli.vars import get_console, get_manifest
17
+ from arkitekt_next.service_registry import check_and_import_services
18
+
19
+
20
+ @click.command()
21
+ @with_seperate_document_dirs
22
+ @with_boring
23
+ @with_choose_services
24
+ @with_graphql_config
25
+ @with_api_path
26
+ @with_schemas
27
+ @with_graphql_config
28
+ @with_documents
29
+ @click.pass_context
30
+ def init(ctx, boring, services, config, documents, schemas, path, seperate_doc_dirs):
31
+ """Initialize code generation for the arkitekt_next app
32
+
33
+ Code generation for API's is done with the help of GraphQL Code Generation
34
+ that is powered by turms. This command initializes the code generation for
35
+ the app. It creates the necessary folders and files for the code generation
36
+ to work. It also creates a graphql config file that is used by turms to
37
+ generate the code.
38
+
39
+ """
40
+ app_directory = os.getcwd()
41
+
42
+ app_api_path = os.path.join(app_directory, path)
43
+ app_documents = os.path.join(app_directory, "documents")
44
+
45
+ app_schemas = os.path.join(app_directory, "schemas")
46
+
47
+ os.makedirs(app_documents, exist_ok=True)
48
+ os.makedirs(app_schemas, exist_ok=True)
49
+ os.makedirs(app_api_path, exist_ok=True)
50
+
51
+ # Initializing the config
52
+ projects = {}
53
+
54
+
55
+ registry = check_and_import_services()
56
+
57
+ base_config = yaml.load(
58
+ open(build_relative_dir("configs", "base.yaml"), "r"), Loader=yaml.FullLoader
59
+ )
60
+
61
+ for key, service in registry.service_builders.items():
62
+ try:
63
+
64
+ schema, project = service.get_graphql_schema(), service.get_turms_project()
65
+
66
+ if not schema or not project:
67
+ get_console(ctx).print(f"[red]No schema or project found for {key} [/]")
68
+ continue
69
+
70
+ if documents:
71
+ os.makedirs(os.path.join(app_documents, key), exist_ok=True)
72
+ if seperate_doc_dirs:
73
+ os.makedirs(
74
+ os.path.join(app_documents, key, "queries"), exist_ok=True
75
+ )
76
+ os.makedirs(
77
+ os.path.join(app_documents, key, "mutations"), exist_ok=True
78
+ )
79
+ os.makedirs(
80
+ os.path.join(app_documents, key, "subscriptions"), exist_ok=True
81
+ )
82
+
83
+ if schemas:
84
+ out_path = os.path.join(app_schemas, key + ".schema.graphql")
85
+ with open(out_path, "w") as f:
86
+ f.write(schema)
87
+
88
+
89
+
90
+ if schemas:
91
+ project["schema"] = os.path.join(app_schemas, key + ".schema.graphql")
92
+ if documents:
93
+ project["documents"] = (
94
+ os.path.join(app_documents, key) + "/**/*.graphql"
95
+ )
96
+
97
+ project["extensions"]["turms"]["out_dir"] = path
98
+ project["extensions"]["turms"]["generated_name"] = f"{key}.py"
99
+ del project["extensions"]["turms"]["documents"]
100
+
101
+ projects[key] = project
102
+
103
+ except Exception as e:
104
+ raise ClickException(f"Failed to initialize project for {key}. Error: {e}") from e
105
+
106
+ if os.path.exists(config):
107
+ if not click.confirm(
108
+ f"GraphQL Config file already exists. Do you want to overwrite?"
109
+ ):
110
+ click.echo("Aborting...")
111
+ ctx.abort()
112
+
113
+ graph_config_path = os.path.join(app_directory, config)
114
+ yaml.safe_dump(
115
+ {"projects": projects}, open(graph_config_path, "w"), sort_keys=False
116
+ )
117
+ get_console(ctx).print(f"Config file written to {graph_config_path}")
@@ -0,0 +1,192 @@
1
+ from pydantic import BaseModel, Field
2
+ from herre_next import Herre
3
+ from fakts_next import Fakts
4
+ from .base_models import Manifest, Requirement
5
+ from typing import Callable, Dict, Protocol
6
+ import importlib
7
+ import sys
8
+ import os
9
+ import traceback
10
+ import logging
11
+ import pkgutil
12
+ from typing import runtime_checkable
13
+
14
+ Params = Dict[str, str]
15
+
16
+
17
+
18
+
19
+
20
+
21
+ class Registration(BaseModel):
22
+ name: str
23
+ requirement: Requirement
24
+ builder: Callable[[Herre, Fakts, Params], object]
25
+ schema_loader: Callable[[str], object]
26
+
27
+
28
+ @runtime_checkable
29
+ class ArkitektService(Protocol):
30
+
31
+
32
+ def get_service_name(self):
33
+ pass
34
+
35
+
36
+ def build_service(self, fakts: Fakts, herre: Herre, params: Params, manifest: Manifest):
37
+ pass
38
+
39
+
40
+ def get_requirements(self):
41
+ pass
42
+
43
+
44
+ def get_graphql_schema(self):
45
+ pass
46
+
47
+ def get_turms_project(self):
48
+ pass
49
+
50
+
51
+
52
+ class BaseArkitektService:
53
+
54
+
55
+ def get_service_name(self):
56
+ raise NotImplementedError("get_service_name not implemented")
57
+
58
+ def build_service(self, fakts: Fakts, herre: Herre, params: Params, manifest: Manifest):
59
+ raise NotImplementedError("build_service not implemented")
60
+
61
+ def get_requirements(self):
62
+ raise NotImplementedError("get_requirements not implemented")
63
+
64
+ def get_graphql_schema(self):
65
+ return None
66
+
67
+ def get_turms_project(self):
68
+ return None
69
+
70
+
71
+
72
+ basic_requirements = [Requirement(
73
+ key="lok",
74
+ service="live.arkitekt.lok",
75
+ description="An instance of ArkitektNext Lok to authenticate the user",
76
+ )]
77
+
78
+
79
+ class ServiceBuilderRegistry:
80
+ def __init__(self):
81
+ self.service_builders: Dict[str, ArkitektService] = {}
82
+
83
+ def register(
84
+ self,
85
+ service: ArkitektService,
86
+ ):
87
+
88
+ name = service.get_service_name()
89
+
90
+ if name not in self.service_builders:
91
+ self.service_builders[name] = service
92
+ else:
93
+ raise ValueError(f"Service {name} already registered")
94
+
95
+
96
+ def get(self, name):
97
+ return self.services.get(name)
98
+
99
+ def build_service_map(
100
+ self, fakts: Fakts, herre: Herre, params: Params, manifest: Manifest
101
+ ):
102
+ potentially_needed_services = {
103
+ name: service.build_service(fakts, herre, params, manifest)
104
+ for name, service in self.service_builders.items()
105
+ }
106
+
107
+ print(potentially_needed_services.keys())
108
+
109
+
110
+ return {key: value for key, value in potentially_needed_services.items() if value is not None}
111
+
112
+
113
+
114
+ def get_requirements(self):
115
+
116
+ requirements = basic_requirements
117
+
118
+ for service in self.service_builders.values():
119
+ for requirement in service.get_requirements():
120
+ requirements.append(requirement)
121
+
122
+
123
+
124
+ return requirements
125
+
126
+
127
+ class SetupInfo:
128
+ services: Dict[str, object]
129
+
130
+
131
+ import os
132
+ import importlib.util
133
+ import pkgutil
134
+ import traceback
135
+ import logging
136
+
137
+ def check_and_import_services() -> ServiceBuilderRegistry:
138
+ service_builder_registry = ServiceBuilderRegistry()
139
+ processed_modules = set() # Track modules that have already been processed
140
+
141
+ # Function to load and call init_extensions from __rekuest__.py
142
+ def load_and_call_init_extensions(module_name, rekuest_path):
143
+ if module_name in processed_modules:
144
+ return # Skip if module has already been processed
145
+ try:
146
+ spec = importlib.util.spec_from_file_location(
147
+ f"{module_name}.__arkitekt__", rekuest_path
148
+ )
149
+ rekuest_module = importlib.util.module_from_spec(spec)
150
+ spec.loader.exec_module(rekuest_module)
151
+ if hasattr(rekuest_module, "build_services"):
152
+ for service in rekuest_module.build_services():
153
+ try:
154
+ service_builder_registry.register(service)
155
+ except ValueError as e:
156
+ print(f"Failed to register service {service}: Another service with the same name is already registered {service_builder_registry.service_builders}")
157
+ logging.info(f"Called build_services function from {module_name}")
158
+ else:
159
+ print(f"Discovered Arkitekt-like module (containing __arkitekt__) that doesn't conform with the __arkitekt__ spec. No build_services function in {module_name}.__arkitekt__")
160
+ processed_modules.add(module_name) # Mark this module as processed
161
+ except Exception as e:
162
+ print(f"Failed to call init_services for {module_name}: {e}")
163
+ traceback.print_exc()
164
+
165
+ # Check local modules in the current working directory
166
+ current_directory = os.getcwd()
167
+ for item in os.listdir(current_directory):
168
+ item_path = os.path.join(current_directory, item)
169
+ if os.path.isdir(item_path) and os.path.isfile(
170
+ os.path.join(item_path, "__init__.py")
171
+ ):
172
+ rekuest_path = os.path.join(item_path, "__arkitekt__.py")
173
+ if os.path.isfile(rekuest_path):
174
+ load_and_call_init_extensions(item, rekuest_path)
175
+
176
+ # Check installed packages
177
+ for _, module_name, _ in pkgutil.iter_modules():
178
+ try:
179
+ module_spec = importlib.util.find_spec(module_name)
180
+ if module_spec and module_spec.origin:
181
+ rekuest_path = os.path.join(
182
+ os.path.dirname(module_spec.origin), "__arkitekt__.py"
183
+ )
184
+ if os.path.isfile(rekuest_path):
185
+ load_and_call_init_extensions(module_name, rekuest_path)
186
+ except Exception as e:
187
+ print(
188
+ f"Failed to call init_extensions for installed package {module_name}: {e}"
189
+ )
190
+ traceback.print_exc()
191
+
192
+ return service_builder_registry
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "arkitekt-next"
3
- version = "0.8.32"
3
+ version = "0.8.34"
4
4
  description = "client for the arkitekt_next platform"
5
5
  authors = ["jhnnsrs <jhnnsrs@gmail.com>"]
6
6
  license = "MIT"
@@ -11,17 +11,17 @@ readme = "README.md"
11
11
  python = "^3.8"
12
12
  herre-next = ">=1.0.2"
13
13
  fakts-next = ">=1.0.2"
14
- kraph = { version = ">=0.1.91", python = "^3.8", optional = true }
15
- mikro-next = { version = ">=0.1.47", python = "^3.10", optional = true }
16
- kabinet = { version = ">=0.1.38", optional = true, python = "^3.9" }
17
- fluss-next = { version = ">=0.1.90", optional = true }
18
- reaktion-next= { version = ">=0.1.80", python = "^3.8", optional = true }
19
- rekuest-next= { version = ">=0.2.43", python = "^3.8", optional = true }
20
- unlok-next= { version = ">=0.1.83", python = "^3.8", optional = true }
21
- lovekit = { version = ">=0.1.15", python = "^3.10", optional = true }
14
+ kraph = { version = ">=0.1.92", python = "^3.8", optional = true }
15
+ mikro-next = { version = ">=0.1.48", python = "^3.10", optional = true }
16
+ kabinet = { version = ">=0.1.40", optional = true, python = "^3.9" }
17
+ fluss-next = { version = ">=0.1.91", optional = true }
18
+ reaktion-next= { version = ">=0.1.81", python = "^3.8", optional = true }
19
+ rekuest-next= { version = ">=0.2.44", python = "^3.8", optional = true }
20
+ unlok-next= { version = ">=0.1.84", python = "^3.8", optional = true }
21
+ lovekit = { version = ">=0.1.16", python = "^3.10", optional = true }
22
22
  rich-click = { version = ">=1.6.1", optional = true }
23
23
  watchfiles = { version = ">=0.18.1", optional = true }
24
- turms = { version = ">=0.6.0", python = "^3.9", optional = true }
24
+ turms = { version = ">=0.7.0", python = "^3.9", optional = true }
25
25
  semver = { version = ">=3.0.1", optional = true }
26
26
  dokker = ">=1.0.0"
27
27
  koil = ">=1.0.0"
@@ -1,122 +0,0 @@
1
- import os
2
- import shutil
3
- import rich_click as click
4
- from arkitekt_next.cli.options import (
5
- with_documents,
6
- with_graphql_config,
7
- with_api_path,
8
- with_boring,
9
- with_choose_services,
10
- with_schemas,
11
- with_seperate_document_dirs,
12
- )
13
- import yaml
14
- from arkitekt_next.cli.utils import build_relative_dir
15
- from arkitekt_next.cli.vars import get_console, get_manifest
16
-
17
-
18
- @click.command()
19
- @with_seperate_document_dirs
20
- @with_boring
21
- @with_choose_services
22
- @with_graphql_config
23
- @with_api_path
24
- @with_schemas
25
- @with_graphql_config
26
- @with_documents
27
- @click.pass_context
28
- def init(ctx, boring, services, config, documents, schemas, path, seperate_doc_dirs):
29
- """Initialize code generation for the arkitekt_next app
30
-
31
- Code generation for API's is done with the help of GraphQL Code Generation
32
- that is powered by turms. This command initializes the code generation for
33
- the app. It creates the necessary folders and files for the code generation
34
- to work. It also creates a graphql config file that is used by turms to
35
- generate the code.
36
-
37
- """
38
- app_directory = os.getcwd()
39
-
40
- app_api_path = os.path.join(app_directory, path)
41
- app_documents = os.path.join(app_directory, "graphql", "documents")
42
-
43
- app_schemas = os.path.join(app_directory, "graphql", "schemas")
44
-
45
- if documents:
46
- os.makedirs(app_documents, exist_ok=True)
47
- if schemas:
48
- os.makedirs(app_schemas, exist_ok=True)
49
- if path:
50
- os.makedirs(app_api_path, exist_ok=True)
51
-
52
- # Initializing the config
53
- projects = {}
54
-
55
- base_config = yaml.load(
56
- open(build_relative_dir("configs", "base.yaml"), "r"), Loader=yaml.FullLoader
57
- )
58
-
59
- for service in services:
60
- schema_path = build_relative_dir("schemas", f"{service}.schema.graphql")
61
-
62
- if documents:
63
- os.makedirs(os.path.join(app_documents, service), exist_ok=True)
64
- if seperate_doc_dirs:
65
- os.makedirs(
66
- os.path.join(app_documents, service, "queries"), exist_ok=True
67
- )
68
- os.makedirs(
69
- os.path.join(app_documents, service, "mutations"), exist_ok=True
70
- )
71
- os.makedirs(
72
- os.path.join(app_documents, service, "subscriptions"), exist_ok=True
73
- )
74
-
75
- if schemas:
76
- if os.path.exists(schema_path):
77
- try:
78
- shutil.copyfile(
79
- schema_path,
80
- os.path.join(app_schemas, service + ".graphql"),
81
- )
82
- except FileExistsError:
83
- if click.confirm(
84
- f"Schema for {service} already exist. Do you want to overwrite them?"
85
- ):
86
- shutil.copyfile(
87
- schema_path,
88
- os.path.join(app_schemas, service + ".graphql"),
89
- )
90
- else:
91
- get_console(ctx).print(f"[red]No schema found for {service} [/]")
92
-
93
- try:
94
- project = base_config["projects"][service]
95
- except KeyError:
96
- get_console(ctx).print(f"[red]No config found for {service} [/]")
97
- continue
98
-
99
- if schemas:
100
- project["schema"] = os.path.join(app_schemas, service + ".graphql")
101
- if documents:
102
- project["documents"] = (
103
- os.path.join(app_documents, service) + "/**/*.graphql"
104
- )
105
-
106
- project["extensions"]["turms"]["out_dir"] = path
107
- project["extensions"]["turms"]["generated_name"] = f"{service}.py"
108
-
109
- projects[service] = project
110
-
111
- if os.path.exists(config):
112
- if not click.confirm(
113
- f"GraphQL Config file already exists. Do you want to overwrite?"
114
- ):
115
- click.echo("Aborting...")
116
- ctx.abort()
117
-
118
- graph_config_path = os.path.join(app_directory, config)
119
- yaml.safe_dump(
120
- {"projects": projects}, open(graph_config_path, "w"), sort_keys=False
121
- )
122
- get_console(ctx).print(f"Config file written to {graph_config_path}")
@@ -1,113 +0,0 @@
1
- from pydantic import BaseModel, Field
2
- from herre_next import Herre
3
- from fakts_next import Fakts
4
- from .base_models import Manifest, Requirement
5
- from typing import Callable, Dict
6
- import importlib
7
- import sys
8
- import os
9
- import traceback
10
- import logging
11
- import pkgutil
12
-
13
- Params = Dict[str, str]
14
-
15
-
16
- class Registration(BaseModel):
17
- name: str
18
- requirement: Requirement
19
- builder: Callable[[Herre, Fakts, Params], object]
20
-
21
-
22
- basic_requirements = {"lok": Requirement(
23
- key="lok",
24
- service="live.arkitekt.lok",
25
- description="An instance of ArkitektNext Lok to authenticate the user",
26
- )}
27
-
28
-
29
- class ServiceBuilderRegistry:
30
- def __init__(self):
31
- self.service_builders = {}
32
- self.requirements_map = basic_requirements
33
-
34
- def register(
35
- self,
36
- name: str,
37
- service_builder: Callable[[Herre, Fakts], object],
38
- requirement: Requirement,
39
- ):
40
- if name not in self.service_builders:
41
- self.service_builders[name] = service_builder
42
-
43
- if name not in self.requirements_map:
44
- self.requirements_map[name] = requirement
45
-
46
- def get(self, name):
47
- return self.services.get(name)
48
-
49
- def build_service_map(
50
- self, fakts: Fakts, herre: Herre, params: Params, manifest: Manifest
51
- ):
52
- return {
53
- name: builder(fakts, herre, params, manifest)
54
- for name, builder in self.service_builders.items()
55
- }
56
-
57
- def get_requirements(self):
58
- return self.requirements_map.values()
59
-
60
-
61
- class SetupInfo:
62
- services: Dict[str, object]
63
-
64
-
65
- def check_and_import_services() -> ServiceBuilderRegistry:
66
-
67
- service_builder_registry = ServiceBuilderRegistry()
68
-
69
- # Function to load and call init_extensions from __rekuest__.py
70
- def load_and_call_init_extensions(module_name, rekuest_path):
71
- try:
72
- spec = importlib.util.spec_from_file_location(
73
- f"{module_name}.__arkitekt__", rekuest_path
74
- )
75
- rekuest_module = importlib.util.module_from_spec(spec)
76
- spec.loader.exec_module(rekuest_module)
77
- if hasattr(rekuest_module, "init_services"):
78
- rekuest_module.init_services(service_builder_registry)
79
- logging.info(f"Called init_service function from {module_name}")
80
- else:
81
- print(f"No init_services function in {module_name}.__arkitekt__")
82
- except Exception as e:
83
- print(f"Failed to call init_services for {module_name}: {e}")
84
- traceback.print_exc()
85
-
86
- # Check local modules in the current working directory
87
- current_directory = os.getcwd()
88
- for item in os.listdir(current_directory):
89
- item_path = os.path.join(current_directory, item)
90
- if os.path.isdir(item_path) and os.path.isfile(
91
- os.path.join(item_path, "__init__.py")
92
- ):
93
- rekuest_path = os.path.join(item_path, "__arkitekt__.py")
94
- if os.path.isfile(rekuest_path):
95
- load_and_call_init_extensions(item, rekuest_path)
96
-
97
- # Check installed packages
98
- for _, module_name, _ in pkgutil.iter_modules():
99
- try:
100
- module_spec = importlib.util.find_spec(module_name)
101
- if module_spec and module_spec.origin:
102
- rekuest_path = os.path.join(
103
- os.path.dirname(module_spec.origin), "__arkitekt__.py"
104
- )
105
- if os.path.isfile(rekuest_path):
106
- load_and_call_init_extensions(module_name, rekuest_path)
107
- except Exception as e:
108
- print(
109
- f"Failed to call init_extensions for installed package {module_name}: {e}"
110
- )
111
- traceback.print_exc()
112
-
113
- return service_builder_registry
File without changes
File without changes