pycarta 0.3.12__tar.gz → 1.0.0.dev8__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.
Files changed (287) hide show
  1. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/AUTHORS.rst +1 -0
  2. pycarta-1.0.0.dev8/CHANGELOG.rst +544 -0
  3. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/CONTRIBUTING.rst +9 -4
  4. pycarta-1.0.0.dev8/MANIFEST.in +33 -0
  5. {pycarta-0.3.12/src/pycarta.egg-info → pycarta-1.0.0.dev8}/PKG-INFO +109 -94
  6. pycarta-1.0.0.dev8/README.md +269 -0
  7. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/README.rst +56 -29
  8. pycarta-1.0.0.dev8/docs/architecture/admin.rst +180 -0
  9. pycarta-1.0.0.dev8/docs/architecture/auth.rst +80 -0
  10. pycarta-1.0.0.dev8/docs/architecture/cli.rst +85 -0
  11. pycarta-1.0.0.dev8/docs/architecture/formsdb.rst +118 -0
  12. pycarta-1.0.0.dev8/docs/architecture/fs.rst +106 -0
  13. pycarta-1.0.0.dev8/docs/architecture/graph.rst +66 -0
  14. pycarta-1.0.0.dev8/docs/architecture/mqtt.rst +80 -0
  15. pycarta-1.0.0.dev8/docs/architecture/servicemanager.rst +93 -0
  16. pycarta-1.0.0.dev8/docs/architecture/services.rst +92 -0
  17. pycarta-1.0.0.dev8/docs/architecture/tablify.rst +55 -0
  18. pycarta-1.0.0.dev8/docs/architecture.rst +93 -0
  19. pycarta-1.0.0.dev8/docs/cli.rst +167 -0
  20. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/docs/conf.py +5 -0
  21. pycarta-1.0.0.dev8/docs/data-management.rst +685 -0
  22. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/docs/examples/README.md +15 -11
  23. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/docs/index.rst +6 -3
  24. pycarta-1.0.0.dev8/docs/installation.rst +72 -0
  25. pycarta-1.0.0.dev8/docs/migration.rst +313 -0
  26. pycarta-1.0.0.dev8/docs/mqtt.rst +606 -0
  27. pycarta-1.0.0.dev8/docs/quickstart.rst +800 -0
  28. pycarta-1.0.0.dev8/docs/requirements.txt +6 -0
  29. pycarta-1.0.0.dev8/docs/servicemanager.rst +229 -0
  30. pycarta-1.0.0.dev8/docs/services.rst +320 -0
  31. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/pyproject.toml +8 -3
  32. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/setup.cfg +10 -28
  33. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/setup.py +1 -1
  34. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta/__init__.py +252 -165
  35. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta/__init__.pyi +11 -29
  36. pycarta-1.0.0.dev8/src/pycarta/__main__.py +6 -0
  37. pycarta-1.0.0.dev8/src/pycarta/_agent.py +45 -0
  38. pycarta-1.0.0.dev8/src/pycarta/_async.py +49 -0
  39. pycarta-1.0.0.dev8/src/pycarta/_compat.py +62 -0
  40. pycarta-1.0.0.dev8/src/pycarta/_tenanted.py +66 -0
  41. pycarta-1.0.0.dev8/src/pycarta/admin/__init__.py +134 -0
  42. pycarta-1.0.0.dev8/src/pycarta/admin/compat.py +286 -0
  43. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/__init__.py +173 -0
  44. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/_error_markers.py +108 -0
  45. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/file.py +341 -0
  46. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/group.py +232 -0
  47. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/permission.py +207 -0
  48. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/project.py +154 -0
  49. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/secret.py +110 -0
  50. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/service.py +460 -0
  51. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/types/__init__.py +61 -0
  52. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/types/connection.py +54 -0
  53. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/types/document_history.py +46 -0
  54. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/types/file.py +205 -0
  55. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/types/group.py +75 -0
  56. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/types/item.py +27 -0
  57. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/types/namespace.py +8 -0
  58. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/types/permission_entity.py +31 -0
  59. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/types/permissions.py +139 -0
  60. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/types/project.py +19 -0
  61. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/types/resource_type.py +82 -0
  62. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/types/service.py +17 -0
  63. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/types/user.py +206 -0
  64. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/types/util.py +23 -0
  65. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/types/workspace.py +20 -0
  66. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/user.py +449 -0
  67. pycarta-1.0.0.dev8/src/pycarta/admin/legacy/workspace.py +392 -0
  68. pycarta-1.0.0.dev8/src/pycarta/admin/v2/__init__.py +131 -0
  69. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta/admin/v2/advanced.py +169 -25
  70. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta/admin/v2/apitoken.py +79 -37
  71. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta/admin/v2/auth.py +11 -5
  72. pycarta-1.0.0.dev8/src/pycarta/admin/v2/exceptions.py +26 -0
  73. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta/admin/v2/permission.py +74 -51
  74. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta/admin/v2/resource.py +38 -23
  75. pycarta-1.0.0.dev8/src/pycarta/admin/v2/types.py +455 -0
  76. pycarta-1.0.0.dev8/src/pycarta/auth/__init__.py +217 -0
  77. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta/auth/_http_compat.py +145 -47
  78. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta/auth/agent.py +535 -99
  79. pycarta-1.0.0.dev8/src/pycarta/auth/config.py +324 -0
  80. pycarta-1.0.0.dev8/src/pycarta/auth/dialogs/carta_login.py +75 -0
  81. pycarta-1.0.0.dev8/src/pycarta/auth/exceptions.py +42 -0
  82. pycarta-1.0.0.dev8/src/pycarta/auth/profile.py +89 -0
  83. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta/auth/ui.py +156 -169
  84. pycarta-1.0.0.dev8/src/pycarta/auth/weblogin.py +469 -0
  85. pycarta-1.0.0.dev8/src/pycarta/cli/__init__.py +76 -0
  86. pycarta-1.0.0.dev8/src/pycarta/cli/commands/__init__.py +23 -0
  87. pycarta-1.0.0.dev8/src/pycarta/cli/commands/auth.py +178 -0
  88. pycarta-1.0.0.dev8/src/pycarta/cli/commands/services.py +117 -0
  89. pycarta-1.0.0.dev8/src/pycarta/cli/shared/__init__.py +49 -0
  90. pycarta-1.0.0.dev8/src/pycarta/cli/shared/command.py +105 -0
  91. pycarta-1.0.0.dev8/src/pycarta/cli/shared/errors.py +48 -0
  92. pycarta-1.0.0.dev8/src/pycarta/cli/shared/options.py +141 -0
  93. pycarta-1.0.0.dev8/src/pycarta/cli/shared/output.py +70 -0
  94. pycarta-1.0.0.dev8/src/pycarta/exceptions.py +310 -0
  95. pycarta-1.0.0.dev8/src/pycarta/formsdb/__init__.py +92 -0
  96. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta/formsdb/_helpers.py +3 -9
  97. pycarta-1.0.0.dev8/src/pycarta/formsdb/admin.py +72 -0
  98. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta/formsdb/concurrent.py +52 -70
  99. pycarta-1.0.0.dev8/src/pycarta/formsdb/data.py +430 -0
  100. pycarta-1.0.0.dev8/src/pycarta/formsdb/folders.py +183 -0
  101. pycarta-1.0.0.dev8/src/pycarta/formsdb/query.py +450 -0
  102. pycarta-1.0.0.dev8/src/pycarta/formsdb/schema.py +402 -0
  103. pycarta-1.0.0.dev8/src/pycarta/formsdb/types.py +553 -0
  104. pycarta-1.0.0.dev8/src/pycarta/fs/__init__.py +262 -0
  105. pycarta-1.0.0.dev8/src/pycarta/fs/configuration.py +286 -0
  106. pycarta-1.0.0.dev8/src/pycarta/fs/consts.py +3 -0
  107. pycarta-1.0.0.dev8/src/pycarta/fs/file.py +714 -0
  108. pycarta-1.0.0.dev8/src/pycarta/fs/multipart_upload.py +68 -0
  109. pycarta-1.0.0.dev8/src/pycarta/fs/reference.py +67 -0
  110. pycarta-1.0.0.dev8/src/pycarta/fs/types/__init__.py +10 -0
  111. pycarta-1.0.0.dev8/src/pycarta/fs/types/configuration.py +83 -0
  112. pycarta-1.0.0.dev8/src/pycarta/fs/types/exception.py +29 -0
  113. pycarta-1.0.0.dev8/src/pycarta/fs/types/file.py +251 -0
  114. pycarta-1.0.0.dev8/src/pycarta/graph/__init__.py +30 -0
  115. pycarta-1.0.0.dev8/src/pycarta/graph/algorithms.py +147 -0
  116. pycarta-1.0.0.dev8/src/pycarta/graph/graph.py +44 -0
  117. pycarta-1.0.0.dev8/src/pycarta/graph/iterator.py +245 -0
  118. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta/graph/util.py +206 -60
  119. pycarta-1.0.0.dev8/src/pycarta/graph/vertex/__init__.py +23 -0
  120. pycarta-1.0.0.dev8/src/pycarta/graph/vertex/types.py +294 -0
  121. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta/graph/vertex/util.py +45 -16
  122. pycarta-1.0.0.dev8/src/pycarta/graph/visitor/__init__.py +14 -0
  123. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta/graph/visitor/base.py +92 -23
  124. pycarta-1.0.0.dev8/src/pycarta/mqtt/__init__.py +83 -0
  125. pycarta-1.0.0.dev8/src/pycarta/mqtt/client.py +19 -0
  126. pycarta-1.0.0.dev8/src/pycarta/mqtt/connection.py +447 -0
  127. pycarta-1.0.0.dev8/src/pycarta/mqtt/credentials.py +908 -0
  128. pycarta-1.0.0.dev8/src/pycarta/mqtt/exceptions.py +443 -0
  129. pycarta-1.0.0.dev8/src/pycarta/mqtt/formatter.py +107 -0
  130. pycarta-1.0.0.dev8/src/pycarta/mqtt/publisher.py +349 -0
  131. pycarta-1.0.0.dev8/src/pycarta/mqtt/subscriber.py +538 -0
  132. pycarta-1.0.0.dev8/src/pycarta/servicemanager/__init__.py +85 -0
  133. pycarta-1.0.0.dev8/src/pycarta/servicemanager/_helpers.py +5 -0
  134. pycarta-1.0.0.dev8/src/pycarta/servicemanager/exceptions.py +106 -0
  135. pycarta-1.0.0.dev8/src/pycarta/servicemanager/execution.py +386 -0
  136. pycarta-1.0.0.dev8/src/pycarta/servicemanager/pagination.py +171 -0
  137. pycarta-1.0.0.dev8/src/pycarta/servicemanager/runner.py +479 -0
  138. pycarta-1.0.0.dev8/src/pycarta/servicemanager/types.py +168 -0
  139. pycarta-1.0.0.dev8/src/pycarta/services/__init__.py +9 -0
  140. pycarta-1.0.0.dev8/src/pycarta/services/_errors.py +15 -0
  141. pycarta-1.0.0.dev8/src/pycarta/services/_handlers.py +225 -0
  142. pycarta-1.0.0.dev8/src/pycarta/services/_registrar.py +119 -0
  143. pycarta-1.0.0.dev8/src/pycarta/services/_run.py +163 -0
  144. pycarta-1.0.0.dev8/src/pycarta/services/cmd/__init__.py +4 -0
  145. pycarta-1.0.0.dev8/src/pycarta/services/cmd/_enroll.py +71 -0
  146. pycarta-1.0.0.dev8/src/pycarta/services/cmd/_env.py +84 -0
  147. pycarta-1.0.0.dev8/src/pycarta/services/cmd/_init.py +167 -0
  148. pycarta-1.0.0.dev8/src/pycarta/services/event/__init__.py +3 -0
  149. pycarta-1.0.0.dev8/src/pycarta/services/event/_event.py +54 -0
  150. pycarta-1.0.0.dev8/src/pycarta/services/routes/__init__.py +4 -0
  151. pycarta-1.0.0.dev8/src/pycarta/services/routes/_openapi.py +193 -0
  152. pycarta-1.0.0.dev8/src/pycarta/services/routes/_routes.py +234 -0
  153. pycarta-1.0.0.dev8/src/pycarta/tablify/__init__.py +27 -0
  154. pycarta-1.0.0.dev8/src/pycarta/tablify/__main__.py +8 -0
  155. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta/tablify/core.py +61 -27
  156. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta/tablify/io.py +31 -14
  157. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta/tablify/melt.py +67 -35
  158. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta/tablify/tablify.py +56 -19
  159. pycarta-1.0.0.dev8/src/pycarta/tablify/types.py +58 -0
  160. pycarta-1.0.0.dev8/src/pycarta/tablify/utils.py +637 -0
  161. {pycarta-0.3.12 → pycarta-1.0.0.dev8/src/pycarta.egg-info}/PKG-INFO +109 -94
  162. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta.egg-info/SOURCES.txt +76 -52
  163. pycarta-1.0.0.dev8/src/pycarta.egg-info/entry_points.txt +2 -0
  164. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta.egg-info/requires.txt +7 -9
  165. pycarta-1.0.0.dev8/src/pycarta.egg-info/scm_file_list.json +1274 -0
  166. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/tox.ini +0 -14
  167. pycarta-0.3.12/.gitignore +0 -62
  168. pycarta-0.3.12/.gitlab-ci.yml +0 -50
  169. pycarta-0.3.12/.readthedocs.yml +0 -27
  170. pycarta-0.3.12/CHANGELOG.rst +0 -160
  171. pycarta-0.3.12/MANIFEST.in +0 -10
  172. pycarta-0.3.12/README.md +0 -252
  173. pycarta-0.3.12/docs/data-management.rst +0 -797
  174. pycarta-0.3.12/docs/examples/00_index.ipynb +0 -380
  175. pycarta-0.3.12/docs/examples/01_authentication.ipynb +0 -496
  176. pycarta-0.3.12/docs/examples/02_admin.ipynb +0 -652
  177. pycarta-0.3.12/docs/examples/03_services.ipynb +0 -1359
  178. pycarta-0.3.12/docs/examples/04_mqtt.ipynb +0 -724
  179. pycarta-0.3.12/docs/examples/05_data_management.ipynb +0 -1108
  180. pycarta-0.3.12/docs/examples/06_seven_bridges.ipynb +0 -1230
  181. pycarta-0.3.12/docs/installation.rst +0 -11
  182. pycarta-0.3.12/docs/mqtt.rst +0 -822
  183. pycarta-0.3.12/docs/quickstart.rst +0 -790
  184. pycarta-0.3.12/docs/requirements.txt +0 -5
  185. pycarta-0.3.12/docs/services.rst +0 -565
  186. pycarta-0.3.12/src/pycarta/_compat.py +0 -30
  187. pycarta-0.3.12/src/pycarta/admin/__init__.py +0 -9
  188. pycarta-0.3.12/src/pycarta/admin/_error_markers.py +0 -40
  189. pycarta-0.3.12/src/pycarta/admin/file.py +0 -192
  190. pycarta-0.3.12/src/pycarta/admin/group.py +0 -95
  191. pycarta-0.3.12/src/pycarta/admin/permission.py +0 -178
  192. pycarta-0.3.12/src/pycarta/admin/project.py +0 -55
  193. pycarta-0.3.12/src/pycarta/admin/secret.py +0 -39
  194. pycarta-0.3.12/src/pycarta/admin/service.py +0 -150
  195. pycarta-0.3.12/src/pycarta/admin/types/__init__.py +0 -15
  196. pycarta-0.3.12/src/pycarta/admin/types/connection.py +0 -20
  197. pycarta-0.3.12/src/pycarta/admin/types/document_history.py +0 -18
  198. pycarta-0.3.12/src/pycarta/admin/types/file.py +0 -77
  199. pycarta-0.3.12/src/pycarta/admin/types/group.py +0 -26
  200. pycarta-0.3.12/src/pycarta/admin/types/item.py +0 -14
  201. pycarta-0.3.12/src/pycarta/admin/types/namespace.py +0 -6
  202. pycarta-0.3.12/src/pycarta/admin/types/permission_entity.py +0 -12
  203. pycarta-0.3.12/src/pycarta/admin/types/permissions.py +0 -35
  204. pycarta-0.3.12/src/pycarta/admin/types/project.py +0 -8
  205. pycarta-0.3.12/src/pycarta/admin/types/resource_type.py +0 -33
  206. pycarta-0.3.12/src/pycarta/admin/types/service.py +0 -8
  207. pycarta-0.3.12/src/pycarta/admin/types/user.py +0 -60
  208. pycarta-0.3.12/src/pycarta/admin/types/util.py +0 -5
  209. pycarta-0.3.12/src/pycarta/admin/types/workspace.py +0 -6
  210. pycarta-0.3.12/src/pycarta/admin/user.py +0 -235
  211. pycarta-0.3.12/src/pycarta/admin/v2/__init__.py +0 -122
  212. pycarta-0.3.12/src/pycarta/admin/v2/_helpers.py +0 -28
  213. pycarta-0.3.12/src/pycarta/admin/v2/aio/__init__.py +0 -68
  214. pycarta-0.3.12/src/pycarta/admin/v2/aio/apitoken.py +0 -64
  215. pycarta-0.3.12/src/pycarta/admin/v2/aio/auth.py +0 -23
  216. pycarta-0.3.12/src/pycarta/admin/v2/aio/permission.py +0 -103
  217. pycarta-0.3.12/src/pycarta/admin/v2/aio/resource.py +0 -63
  218. pycarta-0.3.12/src/pycarta/admin/v2/compat.py +0 -164
  219. pycarta-0.3.12/src/pycarta/admin/v2/exceptions.py +0 -13
  220. pycarta-0.3.12/src/pycarta/admin/v2/types.py +0 -173
  221. pycarta-0.3.12/src/pycarta/admin/workspace.py +0 -150
  222. pycarta-0.3.12/src/pycarta/auth/__init__.py +0 -148
  223. pycarta-0.3.12/src/pycarta/auth/config.py +0 -63
  224. pycarta-0.3.12/src/pycarta/auth/dialogs/carta_login.py +0 -36
  225. pycarta-0.3.12/src/pycarta/auth/profile.py +0 -42
  226. pycarta-0.3.12/src/pycarta/auth/weblogin.py +0 -136
  227. pycarta-0.3.12/src/pycarta/exceptions.py +0 -79
  228. pycarta-0.3.12/src/pycarta/formsdb/__init__.py +0 -303
  229. pycarta-0.3.12/src/pycarta/formsdb/admin.py +0 -28
  230. pycarta-0.3.12/src/pycarta/formsdb/aio/__init__.py +0 -40
  231. pycarta-0.3.12/src/pycarta/formsdb/aio/admin.py +0 -16
  232. pycarta-0.3.12/src/pycarta/formsdb/aio/data.py +0 -71
  233. pycarta-0.3.12/src/pycarta/formsdb/aio/folders.py +0 -36
  234. pycarta-0.3.12/src/pycarta/formsdb/aio/schema.py +0 -76
  235. pycarta-0.3.12/src/pycarta/formsdb/data.py +0 -148
  236. pycarta-0.3.12/src/pycarta/formsdb/folders.py +0 -63
  237. pycarta-0.3.12/src/pycarta/formsdb/query.py +0 -211
  238. pycarta-0.3.12/src/pycarta/formsdb/schema.py +0 -121
  239. pycarta-0.3.12/src/pycarta/formsdb/types.py +0 -187
  240. pycarta-0.3.12/src/pycarta/fs/__init__.py +0 -4
  241. pycarta-0.3.12/src/pycarta/fs/configuration.py +0 -98
  242. pycarta-0.3.12/src/pycarta/fs/consts.py +0 -2
  243. pycarta-0.3.12/src/pycarta/fs/file.py +0 -462
  244. pycarta-0.3.12/src/pycarta/fs/multipart_upload.py +0 -23
  245. pycarta-0.3.12/src/pycarta/fs/reference.py +0 -45
  246. pycarta-0.3.12/src/pycarta/fs/types/__init__.py +0 -0
  247. pycarta-0.3.12/src/pycarta/fs/types/configuration.py +0 -29
  248. pycarta-0.3.12/src/pycarta/fs/types/exception.py +0 -9
  249. pycarta-0.3.12/src/pycarta/fs/types/file.py +0 -80
  250. pycarta-0.3.12/src/pycarta/graph/__init__.py +0 -27
  251. pycarta-0.3.12/src/pycarta/graph/algorithms.py +0 -67
  252. pycarta-0.3.12/src/pycarta/graph/graph.py +0 -7
  253. pycarta-0.3.12/src/pycarta/graph/iterator.py +0 -76
  254. pycarta-0.3.12/src/pycarta/graph/vertex/__init__.py +0 -2
  255. pycarta-0.3.12/src/pycarta/graph/vertex/types.py +0 -154
  256. pycarta-0.3.12/src/pycarta/graph/visitor/__init__.py +0 -1
  257. pycarta-0.3.12/src/pycarta/mqtt/__init__.py +0 -21
  258. pycarta-0.3.12/src/pycarta/mqtt/client.py +0 -3
  259. pycarta-0.3.12/src/pycarta/mqtt/connection.py +0 -230
  260. pycarta-0.3.12/src/pycarta/mqtt/credentials.py +0 -513
  261. pycarta-0.3.12/src/pycarta/mqtt/exceptions.py +0 -215
  262. pycarta-0.3.12/src/pycarta/mqtt/formatter.py +0 -57
  263. pycarta-0.3.12/src/pycarta/mqtt/publisher.py +0 -138
  264. pycarta-0.3.12/src/pycarta/mqtt/subscriber.py +0 -252
  265. pycarta-0.3.12/src/pycarta/sbg/__init__.py +0 -11
  266. pycarta-0.3.12/src/pycarta/sbg/base.py +0 -1023
  267. pycarta-0.3.12/src/pycarta/sbg/login.py +0 -186
  268. pycarta-0.3.12/src/pycarta/sbg/project.py +0 -527
  269. pycarta-0.3.12/src/pycarta/services/__init__.py +0 -17
  270. pycarta-0.3.12/src/pycarta/services/proxy.py +0 -239
  271. pycarta-0.3.12/src/pycarta/services/server.py +0 -890
  272. pycarta-0.3.12/src/pycarta/tablify/__init__.py +0 -12
  273. pycarta-0.3.12/src/pycarta/tablify/__main__.py +0 -6
  274. pycarta-0.3.12/src/pycarta/tablify/types.py +0 -43
  275. pycarta-0.3.12/src/pycarta/tablify/utils.py +0 -501
  276. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/LICENSE.txt +0 -0
  277. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/docs/Makefile +0 -0
  278. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/docs/_static/.gitignore +0 -0
  279. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/docs/authors.rst +0 -0
  280. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/docs/changelog.rst +0 -0
  281. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/docs/contributing.rst +0 -0
  282. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/docs/license.rst +0 -0
  283. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta/py.typed +0 -0
  284. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta.egg-info/dependency_links.txt +0 -0
  285. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta.egg-info/not-zip-safe +0 -0
  286. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/src/pycarta.egg-info/top_level.txt +0 -0
  287. {pycarta-0.3.12 → pycarta-1.0.0.dev8}/static/brand.png +0 -0
@@ -5,4 +5,5 @@ Contributors
5
5
  * Branden Kappes <branden.kappes@contextualize.us.com>
6
6
  * Chen Chen <chen.chen@contextualize.us.com>
7
7
  * Lindsey Kuettner <lindsey.kuettner@contextualize.us.com>
8
+ * Stephen Domingo <stephen.domingo@contextualize.us.com>
8
9
  * William Silloway <william.silloway@contextualize.us.com>
@@ -0,0 +1,544 @@
1
+ =========
2
+ Changelog
3
+ =========
4
+
5
+ v1.0
6
+ ====
7
+
8
+ Migration (0.3 -> 1.0)
9
+ ----------------------
10
+
11
+ This table maps every exception name and structural change made across Phases
12
+ 56–58 from its 0.3.x form to its v1.0 form. It exists for a 0.3.x caller
13
+ migrating ``except`` clauses: every removal listed here is outright, with no
14
+ deprecation alias, so the old name raises ``AttributeError`` on access rather
15
+ than resolving to a stale class.
16
+
17
+ .. list-table::
18
+ :header-rows: 1
19
+ :widths: 24 24 12 40
20
+
21
+ * - Old
22
+ - New
23
+ - Change
24
+ - Notes
25
+ * - ``CartaException``
26
+ - ``CartaError``
27
+ - removed
28
+ - use ``CartaError`` instead; there is no alias — accessing
29
+ ``CartaException`` now raises ``AttributeError``.
30
+ * - ``BadCredentialsException``
31
+ - ``BadCredentialsError``
32
+ - removed
33
+ - use ``BadCredentialsError`` instead; there is no alias — accessing
34
+ ``BadCredentialsException`` now raises ``AttributeError``.
35
+ * - ``PermissionDeniedException``
36
+ - ``PermissionDeniedError``
37
+ - removed
38
+ - use ``PermissionDeniedError`` instead; there is no alias — accessing
39
+ ``PermissionDeniedException`` now raises ``AttributeError``.
40
+ * - ``InvalidParameterException``
41
+ - ``InvalidParameterError``
42
+ - removed
43
+ - use ``InvalidParameterError`` instead; there is no alias — accessing
44
+ ``InvalidParameterException`` now raises ``AttributeError``.
45
+ * - ``UserCreationFailedException``
46
+ - ``UserCreationFailedError``
47
+ - removed
48
+ - use ``UserCreationFailedError`` instead; there is no alias — accessing
49
+ ``UserCreationFailedException`` now raises ``AttributeError``.
50
+ * - ``CartaServerException``
51
+ - ``CartaServerError``
52
+ - removed
53
+ - use ``CartaServerError`` instead; there is no alias — accessing
54
+ ``CartaServerException`` now raises ``AttributeError``.
55
+ * - ``ProfileNotFoundException``
56
+ - ``ProfileNotFoundError``
57
+ - removed
58
+ - use ``ProfileNotFoundError`` instead; there is no alias — accessing
59
+ ``ProfileNotFoundException`` now raises ``AttributeError``.
60
+ * - ``FileUnavailableException``
61
+ - ``FileUnavailableError``
62
+ - removed
63
+ - use ``FileUnavailableError`` instead; there is no alias — accessing
64
+ ``FileUnavailableException`` now raises ``AttributeError``; base changed
65
+ from ``Exception`` to ``CartaError`` (HIER-01, Phase 57).
66
+ * - ``PyCartaMQTTError``
67
+ - ``CartaMQTTError``
68
+ - renamed
69
+ - ``pycarta.mqtt.exceptions``; no alias for the old name (raises
70
+ ``AttributeError``); base changed from ``Exception`` to ``CartaError``
71
+ (HIER-01, Phase 57).
72
+ * - ``pycarta.auth._http_compat.HTTPStatusError``
73
+ - ``CartaHTTPStatusError``
74
+ - renamed
75
+ - still deprecated, retires in **v3.0**; the httpx/requests dual-MRO
76
+ contract is preserved, with ``CartaError`` added as the last base.
77
+ * - ``pycarta.auth._http_compat.TimeoutError``
78
+ - ``CartaTimeoutError``
79
+ - renamed
80
+ - still deprecated, retires in **v3.0**; the httpx/requests dual-MRO
81
+ contract is preserved, with ``CartaError`` added as the last base.
82
+ * - ``pycarta.auth._http_compat.ConnectionError``
83
+ - ``CartaConnectionError``
84
+ - renamed
85
+ - still deprecated, retires in **v3.0**; the httpx/requests dual-MRO
86
+ contract is preserved, with ``CartaError`` added as the last base.
87
+ * - ``pycarta.auth.HeadlessEnvironmentError``
88
+ - ``pycarta.auth.exceptions.HeadlessEnvironmentError``
89
+ - relocated
90
+ - now defined exactly once (was defined inline twice in
91
+ ``pycarta.auth.__init__``); ``pycarta.auth.HeadlessEnvironmentError``
92
+ still resolves through the lazy ``__getattr__``; bases are
93
+ ``ImportError``, ``RuntimeError``, ``CartaError``.
94
+ * - ``ValueError``
95
+ - ``CartaValueError``
96
+ - new mirror
97
+ - ``except ValueError`` still matches because the mirror dual-inherits the
98
+ builtin, with ``CartaError`` as the last base.
99
+ * - ``TypeError``
100
+ - ``CartaTypeError``
101
+ - new mirror
102
+ - ``except TypeError`` still matches because the mirror dual-inherits the
103
+ builtin, with ``CartaError`` as the last base.
104
+ * - ``RuntimeError``
105
+ - ``CartaRuntimeError``
106
+ - new mirror
107
+ - ``except RuntimeError`` still matches because the mirror dual-inherits
108
+ the builtin, with ``CartaError`` as the last base.
109
+ * - ``KeyError``
110
+ - ``CartaKeyError``
111
+ - new mirror
112
+ - ``except KeyError`` still matches because the mirror dual-inherits the
113
+ builtin, with ``CartaError`` as the last base.
114
+ * - ``IndexError``
115
+ - ``CartaIndexError``
116
+ - new mirror
117
+ - ``except IndexError`` still matches because the mirror dual-inherits the
118
+ builtin, with ``CartaError`` as the last base.
119
+ * - ``FileNotFoundError``
120
+ - ``CartaFileNotFoundError``
121
+ - new mirror
122
+ - ``except FileNotFoundError`` still matches because the mirror dual-
123
+ inherits the builtin, with ``CartaError`` as the last base.
124
+ * - ``NotImplementedError``
125
+ - ``CartaNotImplementedError``
126
+ - new mirror
127
+ - ``except NotImplementedError`` still matches because the mirror dual-
128
+ inherits the builtin, with ``CartaError`` as the last base.
129
+ * - ``IOError`` / ``OSError``
130
+ - ``CartaOSError``
131
+ - new mirror
132
+ - ``except IOError`` and ``except OSError`` still match because the
133
+ mirror dual-inherits the builtin, with ``CartaError`` as the last
134
+ base.
135
+ * - ``TimeoutError`` (``pycarta.mqtt.timeout()``)
136
+ - ``MqttTimeoutError``
137
+ - new mirror
138
+ - ``except TimeoutError`` still matches;
139
+ ``pycarta.mqtt.exceptions.MqttTimeoutError`` is a ``TimeoutError`` +
140
+ ``CartaMQTTError`` subclass; deliberately NOT the deprecated
141
+ ``_http_compat`` ``CartaTimeoutError`` shim.
142
+ * - ``InvalidParameterError`` (base ``CartaError``)
143
+ - ``InvalidParameterError`` (base ``CartaValueError``)
144
+ - re-parented
145
+ - ``except ValueError`` now also catches it; ``UserCreationFailedError``
146
+ inherits the change; ``str(exc)`` / ``.args`` / ``.message`` are
147
+ unchanged.
148
+
149
+ **RAISE-01 conversion policy:** no ``raise`` statement in ``src/pycarta``
150
+ constructs a bare Python builtin exception; every converted site now raises a
151
+ ``CartaError`` subtype. The **RAISE-02** allow-list exempts a fixed set of
152
+ genuine Python-protocol raises: ``StopIteration`` / ``StopAsyncIteration`` in
153
+ iterator-protocol methods, ``SystemExit`` in ``__main__``, ``AttributeError``
154
+ raised from a PEP 562 module ``__getattr__``, ``ImportError`` from extras
155
+ gating and lazy-import guards, and ``NotImplementedError`` on genuine
156
+ abstract-method stubs.
157
+ ``tests/test_raise_hardening_structure.py`` is the exact-count ratchet that
158
+ enforces this allow-list; ``tests/test_surface_hardening_structure.py`` is the
159
+ NAME-01/HIER-01 ratchet.
160
+
161
+ Behavior changes
162
+ ----------------
163
+
164
+ - **TYPE-01 / D-01** — ``Profile`` (``pycarta.Profile``, ``pycarta.auth.Profile``)
165
+ has been converted from a pydantic ``BaseModel`` to a stdlib
166
+ ``@dataclass(slots=True)``. This change removes pydantic from the core auth
167
+ import path and introduces strict fail-fast behavior on unknown
168
+ ``profiles.ini`` keys.
169
+
170
+ **Fail-fast on unknown ini keys (D-01):** constructing ``Profile`` with a
171
+ keyword argument not in its declared field set — including keys inherited from
172
+ the ``[DEFAULT]`` section, which ``configparser`` propagates into every section
173
+ — now raises ``TypeError`` at the call site (``config.py``
174
+ ``get_profile`` → ``Profile(**section, profile_name=...)``). Previously,
175
+ pydantic silently dropped unknown fields. This surfaces config drift loudly
176
+ rather than producing a partially-populated ``Profile``.
177
+
178
+ **Public-surface narrowing (declared non-contractual):** ``Profile`` is
179
+ publicly exported from ``pycarta`` and ``pycarta.auth``. Dropping pydantic
180
+ ``BaseModel`` as the base class removes pydantic-provided surface that pycarta
181
+ itself never used:
182
+
183
+ - ``.model_dump()`` / ``.model_validate()`` — removed (pycarta never
184
+ serialized ``Profile``; consumers who used these methods must migrate to
185
+ direct attribute access or construct from a ``dict`` explicitly).
186
+ - Constructor type-coercion — removed (pydantic silently coerced non-string
187
+ values; the dataclass constructor now accepts values as-is, which matches
188
+ the ``configparser`` string-only source).
189
+ - Pydantic ``__eq__`` and ``__repr__`` — replaced by dataclass equivalents
190
+ (field-by-field equality and repr; functionally equivalent for typical
191
+ use).
192
+
193
+ **Preserved surface (no change):** attribute access on all six fields
194
+ (``username``, ``environment``, ``password``, ``token``, ``aws_profile``,
195
+ ``profile_name``), construction by keyword, and all three methods
196
+ (``is_production()``, ``invalidate_token()``, ``set_token(token)``).
197
+ Method return values and semantics are unchanged — ``is_production()``
198
+ still returns ``None`` (not ``False``) when ``environment`` is ``None``;
199
+ ``invalidate_token()`` still returns the result of
200
+ ``self.username and self.password`` (a ``str | None``, not a strict
201
+ ``bool``).
202
+
203
+ - **DEFER-03 / COMPAT-02** — ``CartaAgent`` boto3 ``Session`` construction and
204
+ AWS credential evaluation are now deferred to the first AWS/Cognito call
205
+ (previously occurred at ``CartaAgent(...)`` construction time). A missing
206
+ credentials file, invalid AWS profile, or boto3 import error now surfaces at
207
+ the first AWS-backed call (e.g. username/password authentication, or
208
+ ``reset_user_password``) rather than at agent construction.
209
+
210
+ *Token-only and header-auth callers are unaffected* — they never reach an
211
+ AWS path and will not see this change.
212
+
213
+ Callers who previously relied on a ``boto3`` / credential error being raised
214
+ at construction time must now handle it at the first AWS-backed call.
215
+ The exception types raised are unchanged; only the timing differs.
216
+
217
+ Affected attribute: ``CognitoAgent._aws_session`` (now a
218
+ ``functools.cached_property``).
219
+
220
+ - **HTTP-02 / COMPAT-03** — ``httpx`` is now the sole synchronous HTTP client
221
+ across ``CartaAgent``, ``fs/file.py``, ``services/proxy.py``, and
222
+ ``services/server.py``. The ``requests.Session``-based transport has been
223
+ replaced with a lazily-constructed ``httpx.Client``.
224
+
225
+ **Behavior parity (D-03):** The shared client is configured with
226
+ ``timeout=None`` and ``follow_redirects=True`` to exactly match the prior
227
+ ``requests.Session`` defaults. No silent behavior change is introduced by
228
+ the transport swap itself.
229
+
230
+ **Response surface (D-01 / D-06):** ``CartaAgent`` verb methods
231
+ (``get``, ``post``, ``put``, ``patch``, ``delete``, ``head``, ``request``)
232
+ now return a ``ResponseAdapter`` — a thin delegating wrapper that preserves
233
+ the ``requests.Response`` attribute surface (``.status_code``, ``.json()``,
234
+ ``.content``, ``.text``, ``.headers``, ``.ok``, ``.reason``,
235
+ ``.raise_for_status()``, ``.iter_content()``) for existing SDK consumers.
236
+ The underlying object is an ``httpx.Response``; the adapter is
237
+ **deprecated** and scheduled for retirement in **a future version**.
238
+
239
+ **Exception shim (D-02):** HTTP-status errors now raise an
240
+ ``HTTPStatusError`` shim that inherits from BOTH
241
+ ``httpx.HTTPStatusError`` (primary) AND ``requests.exceptions.HTTPError``
242
+ (secondary). This means:
243
+
244
+ - Existing ``except requests.exceptions.HTTPError`` catch-sites continue to
245
+ work unchanged and will additionally receive a ``DeprecationWarning`` on
246
+ each catch.
247
+ - New code should catch ``httpx.HTTPStatusError`` directly.
248
+ - The caught exception's ``.response`` attribute is a ``ResponseAdapter``,
249
+ so ``e.response.status_code`` and ``e.response.json()`` keep working at
250
+ all existing catch-sites.
251
+
252
+ **Transport shims:** ``requests.exceptions.Timeout`` and
253
+ ``requests.exceptions.ConnectionError`` catch-sites continue to work.
254
+ Network-level exceptions are mapped via dual-inheritance shims:
255
+ ``httpx.TimeoutException`` → ``TimeoutError`` (also a
256
+ ``requests.exceptions.Timeout``); ``httpx.RequestError`` →
257
+ ``ConnectionError`` (also a ``requests.exceptions.ConnectionError``).
258
+ Both shims emit a ``DeprecationWarning`` on construction and are slated for
259
+ removal in a future version.
260
+
261
+ **New public API:**
262
+
263
+ - ``CartaAgent.http_client`` — a ``@property`` that lazily constructs and
264
+ returns the shared ``httpx.Client``. Long-lived or high-frequency
265
+ consumers should call ``CartaAgent.close()`` when done to release the
266
+ shared connection pool.
267
+ - ``CartaAgent.close()`` — closes the shared ``httpx.Client`` and resets
268
+ its internal sentinel. No-op if the client has not yet been built. Call
269
+ this at the end of a session to avoid resource leaks when the agent is
270
+ held for a long lifetime.
271
+
272
+ **Presigned fs upload/download — BEHAVIOR CHANGE (raise_for_status):**
273
+ ``fs.file.upload()`` and ``fs.file.download()`` now call
274
+ ``raise_for_status()`` on the streamed presigned response. Previously,
275
+ non-2xx presigned responses were silently ignored. After this change, a
276
+ non-2xx response from the presigned endpoint (S3, Azure, etc.) raises the
277
+ dual-MRO ``HTTPStatusError`` shim, which can be caught by existing
278
+ ``except requests.exceptions.HTTPError`` sites.
279
+
280
+ *Migration:* callers that previously relied on a silent non-2xx presigned
281
+ response (e.g. a 403 from an expired presigned URL proceeding without
282
+ error) must now wrap the call in a try/except block or treat non-2xx as a
283
+ failure.
284
+
285
+ **Deferred hardening (future milestone):** A default request timeout and
286
+ restriction of cross-host redirect Authorization-header propagation are
287
+ intentionally deferred. The current ``timeout=None`` and
288
+ ``follow_redirects=True`` settings preserve the prior ``requests.Session``
289
+ behavior (D-03); a future pass may set a default timeout and/or restrict
290
+ redirect behavior.
291
+
292
+ **Retained dependency:** ``requests`` is retained in ``install_requires``
293
+ through the v1.0 deprecation window so the dual-inheritance shims always
294
+ have their secondary base classes available. Removal of ``requests``
295
+ (HTTP-03) is deferred to a future version.
296
+
297
+ - **NAME-01 / NAME-02 / NAME-03 / D-01** — ``pycarta``'s exception taxonomy
298
+ has been renamed to a single canonical ``*Error`` suffix rooted at
299
+ ``CartaError`` (was ``CartaException``).
300
+
301
+ **Removed outright, no deprecation aliases:** the eight legacy
302
+ ``*Exception`` names — ``CartaException``, ``BadCredentialsException``,
303
+ ``PermissionDeniedException``, ``InvalidParameterException``,
304
+ ``UserCreationFailedException``, ``CartaServerException``,
305
+ ``ProfileNotFoundException``, ``FileUnavailableException`` — no longer
306
+ exist. Accessing any of them raises ``AttributeError``.
307
+
308
+ **``PermissionDeniedError`` is now a real class**, not an alias of
309
+ ``PermissionDeniedException``.
310
+
311
+ **Subpackage base exceptions:** ``PyCartaMQTTError`` is renamed
312
+ ``CartaMQTTError``. The new ``servicemanager``, ``services`` and ``cli``
313
+ packages define ``CartaServiceManagerError``, ``CartaServiceError`` and
314
+ ``CartaCliError``. The CLI's authentication leaf is named ``CliAuthError`` so
315
+ it is not confused with ``pycarta.exceptions.AuthenticationError``.
316
+
317
+ **Preserved surface (no change):** ``str(exc)`` and ``exc.args`` are
318
+ unchanged for every renamed class, including no-argument construction of
319
+ ``CartaServerError()`` and ``UserCreationFailedError()``.
320
+
321
+ **Constructor normalisation (D-11):** ``CartaServerError`` and
322
+ ``UserCreationFailedError`` now accept an optional leading ``message``
323
+ argument (``CartaServerError(message=None)``,
324
+ ``UserCreationFailedError(message=<default text>)``), matching every
325
+ other core exception. No-argument construction is unchanged.
326
+
327
+ The class names used in the **D-04** compatibility entry above —
328
+ ``CartaException`` and ``ProfileNotFoundException`` — were subsequently
329
+ renamed by this entry to ``CartaError`` and ``ProfileNotFoundError``; that
330
+ earlier entry is left verbatim as the historical record of what it
331
+ described at the time.
332
+
333
+ *Migration:* see *Migration (0.3 -> 1.0)* above; this entry records the
334
+ behavior change only.
335
+
336
+ - **HIER-01 / HIER-02 / HIER-03** — every exception class defined anywhere
337
+ under ``pycarta`` (not just in ``pycarta.exceptions``) now has
338
+ ``pycarta.exceptions.CartaError`` in its MRO, so a single
339
+ ``except CartaError`` catches anything ``pycarta`` raises.
340
+
341
+ **Re-based trees:**
342
+
343
+ - ``CartaMQTTError`` (``pycarta.mqtt.exceptions``) and its descendants
344
+ - ``FileUnavailableError`` (``pycarta.fs.types.exception``)
345
+ - ``CartaCliError`` / ``CliAuthError`` / ``CartaCliUsageError``
346
+ (``pycarta.cli.shared.errors``, new in 1.0) — dual-inherit
347
+ ``click.ClickException`` (``click.UsageError`` for ``CartaCliUsageError``)
348
+ and ``CartaError``; click's exit-code dispatch is unchanged
349
+ - ``HeadlessEnvironmentError`` (``pycarta.auth.exceptions``, new module) —
350
+ now defined exactly once, dual-inheriting ``ImportError``,
351
+ ``RuntimeError``, and ``CartaError`` (previously defined twice inline
352
+ in ``pycarta.auth.__init__``)
353
+
354
+ **Ordering rule:** ``CartaError`` is always the LAST direct base of any
355
+ multi-base exception class defined under ``pycarta``. Any existing
356
+ ``except click.ClickException``, ``except requests...``, or
357
+ ``except ImportError`` clause still matches first, exactly as before —
358
+ this change is additive, not a reordering of existing catch behavior.
359
+
360
+ **``.message`` is now guaranteed** on every ``CartaError`` subclass,
361
+ including the non-cooperative-``__init__`` cases above, which set it
362
+ explicitly.
363
+
364
+ ``aiomqtt.MqttError`` and ``aiomqtt.MqttCodeError``, re-exported from
365
+ ``pycarta.mqtt.exceptions`` for caller convenience, are third-party
366
+ pass-throughs and are deliberately NOT ``CartaError`` subclasses.
367
+
368
+ **Preserved surface (HIER-03):** ``str(exc)`` and ``exc.args`` are
369
+ unchanged for every affected class.
370
+
371
+ **Known issue:** ``FileUnavailableError(message=None)`` still renders as
372
+ the string ``"None"``; normalizing this message shape is out of scope
373
+ here and tracked under CTXTZ-922.
374
+
375
+ - **HIER-01 / D-10** — the three ``pycarta.auth._http_compat`` transport
376
+ shims are renamed with no aliases: ``HTTPStatusError`` →
377
+ ``CartaHTTPStatusError``, ``TimeoutError`` → ``CartaTimeoutError``,
378
+ ``ConnectionError`` → ``CartaConnectionError``. Each also gains
379
+ ``CartaError`` as an additional (last) base, so ``except CartaError``
380
+ catches them too, alongside their existing httpx/requests dual-MRO catch
381
+ behavior. This also removes the shims' shadowing of the builtin
382
+ ``TimeoutError`` and ``ConnectionError`` names within
383
+ ``pycarta.auth._http_compat``. The classes those historical entries above
384
+ call ``HTTPStatusError``, ``TimeoutError``, and ``ConnectionError`` are
385
+ the ones renamed here; there are no old-name aliases.
386
+
387
+ - **RAISE-01 / RAISE-02 / RAISE-03** — every ``raise`` in ``src/pycarta``
388
+ that constructed a bare Python builtin now raises a ``CartaError``
389
+ subtype instead, except an exact-count allow-list of genuine
390
+ Python-protocol raises.
391
+
392
+ **Eight new mirror types**, added to ``pycarta.exceptions``, each
393
+ dual-inheriting the builtin FIRST and ``CartaError`` LAST — the same
394
+ ordering rule as the Phase 57 HIER-01 entry above:
395
+
396
+ - ``CartaValueError(ValueError, CartaError)``
397
+ - ``CartaTypeError(TypeError, CartaError)``
398
+ - ``CartaRuntimeError(RuntimeError, CartaError)``
399
+ - ``CartaKeyError(KeyError, CartaError)``
400
+ - ``CartaIndexError(IndexError, CartaError)``
401
+ - ``CartaFileNotFoundError(FileNotFoundError, CartaError)``
402
+ - ``CartaNotImplementedError(NotImplementedError, CartaError)``
403
+ - ``CartaOSError(OSError, CartaError)`` — ``IOError`` is an alias of
404
+ ``OSError``, so this mirror covers both.
405
+
406
+ Plus one new MQTT leaf: ``pycarta.mqtt.exceptions.MqttTimeoutError``
407
+ (``TimeoutError``, ``CartaMQTTError``), raised by ``pycarta.mqtt.timeout()``.
408
+ This is NOT the deprecated ``pycarta.auth._http_compat.CartaTimeoutError``
409
+ shim from the HIER-01 / D-10 entry above — the two are unrelated classes
410
+ in different subpackages.
411
+
412
+ **Re-parenting:** ``InvalidParameterError`` now subclasses
413
+ ``CartaValueError`` instead of ``CartaError`` directly, and
414
+ ``UserCreationFailedError`` inherits that change transitively. Its default
415
+ message is unchanged.
416
+
417
+ **Preserved surface / no migration required:** every ``except <builtin>``
418
+ clause in downstream code continues to match because each Carta type
419
+ subclasses the builtin it replaces; ``str(exc)``, ``exc.args``, and
420
+ zero-argument construction (``str(exc) == ""``) are byte-identical to the
421
+ builtin; no exception message text changed anywhere in this release. This
422
+ change is additive, not a reordering of existing catch behavior.
423
+
424
+ **RAISE-02 allow-list:** a fixed set of raises stay bare builtins because
425
+ they are genuine Python-protocol raises, not application errors: PEP 562
426
+ module ``__getattr__`` (``AttributeError``), extras-gating and
427
+ lazy-import guards (``ImportError``), abstract-method stubs
428
+ (``NotImplementedError``), iterator / async-iterator protocol
429
+ (``StopIteration`` / ``StopAsyncIteration``), and ``__main__.py`` process
430
+ exit (``SystemExit``). The allow-list is ratcheted by
431
+ ``tests/test_raise_hardening_structure.py`` at exactly 23 raises across
432
+ 18 (file, exception type) pairs — any new bare-builtin raise anywhere
433
+ else in ``src/pycarta`` now fails that test.
434
+
435
+ **Other raises converted to ``CartaError`` subclasses:**
436
+
437
+ - ``pycarta.tablify.load_json`` raises ``CartaValueError`` on unparseable
438
+ JSON. 0.3.x raised ``TypeError``.
439
+ - ``pycarta.admin.v2.create_token`` raises ``InvalidParameterError`` for a
440
+ ``name`` that does not match ``^[A-Za-z0-9\-._~]+$``.
441
+ - ``pycarta auth login --web`` raises ``CartaCliUsageError`` (a
442
+ ``click.UsageError``) when combined with ``--api-token``, ``--profile`` or
443
+ ``--username``.
444
+
445
+ *Migration:* see *Migration (0.3 -> 1.0)* above; this entry is its
446
+ raise-policy half.
447
+
448
+ Changed (compatibility)
449
+ -----------------------
450
+
451
+ - **D-04** — ``AuthenticationError`` and ``ProfileNotFoundException`` are now
452
+ subclasses of ``CartaException`` (previously direct subclasses of the
453
+ built-in ``Exception``).
454
+
455
+ ``except CartaException`` now also catches ``AuthenticationError`` and
456
+ ``ProfileNotFoundException`` (both were previously direct ``Exception``
457
+ subclasses).
458
+
459
+ This is an intentional, accepted compatibility change. Existing
460
+ ``except AuthenticationError`` and ``except ProfileNotFoundException``
461
+ catch-sites are unaffected — they still catch by the subclass name
462
+ directly and the caught set is unchanged. The ``str(exc)`` /
463
+ ``exc.args`` contract is preserved via the ``CartaException.__init__``
464
+ chain.
465
+
466
+ Bug fixes
467
+ ---------
468
+
469
+ - **D-A2 / R6** — ``AuthenticationAgent.is_authenticated()`` (concrete base
470
+ implementation) previously referenced ``self.agent.get(...)`` — an attribute
471
+ that does not exist on ``AuthenticationAgent`` or ``CognitoAgent``. This
472
+ caused an ``AttributeError`` on any ``CognitoAgent`` instance (or subclass
473
+ that does not override ``is_authenticated``) that reached
474
+ ``is_authenticated()`` — e.g. via ``CognitoAgent.reset_user_password()``.
475
+ The attribute access has been corrected to ``self.get("user/authenticated")``,
476
+ matching the ``CartaAgent`` override at line 760. ``CartaAgent`` instances
477
+ were unaffected (their own override was always correct).
478
+
479
+ Hardening
480
+ ---------
481
+
482
+ - **Phase 37-02 (Admin Core)** — Admin core layer hardened against the Phase 37
483
+ R1–R8 rubric (no observable API change):
484
+
485
+ - **D-AD1 / R8** — All 8 star imports in ``admin/__init__.py`` replaced with
486
+ explicit ``from .X import <names>``; each of the 8 core submodules and
487
+ ``_error_markers.py`` now declare their own ``__all__``; an aggregate
488
+ ``__all__`` is declared in ``admin/__init__.py``. The ``from . import v2
489
+ # noqa: F401`` line is preserved. Incidental leakage names (``asyncio``,
490
+ ``logging``, ``os``, ``warnings``, ``BinaryIO``, ``TypeAdapter``, ``logger``)
491
+ are intentionally excluded — they were undocumented internals, not API.
492
+ A new snapshot test (``tests/admin/test_admin_export_surface.py``) guards
493
+ the curated export set against accidental drift.
494
+
495
+ - **F-AD3 / R2** — ``get_user_resources()`` exception handler now chains the
496
+ original cause: ``raise ValueError(response.content) from e`` preserves the
497
+ root exception (e.g. pydantic ``ValidationError`` or ``TypeError``) via
498
+ ``__cause__``. The ``# pragma: no cover`` on the touched branch has been
499
+ removed and the path is covered by ``tests/admin/test_permission_coverage.py``.
500
+
501
+ - **F-AD4 / R8** — All remaining lint debt cleared on admin core in-scope
502
+ files: E252 (whitespace around annotated-param ``=``), E302 (two blank lines
503
+ before top-level defs), E501 (line-length), E128/E127 (continuation indent),
504
+ W293 (trailing whitespace on blank lines). No lazy/function-local heavy
505
+ imports were hoisted to module scope (D-AD3 guardrail).
506
+
507
+ - **R2** — ``AuthenticationAgent._profile_authentication()``: the bare
508
+ ``except:`` at line 153 has been narrowed to ``except AuthenticationError``.
509
+ Previously, any exception raised inside the ``try`` block — including
510
+ unexpected connection errors or HTTP errors raised by ``is_authenticated()``
511
+ — was silently swallowed and the authentication attempt routed to the
512
+ password-fallback path. After this change, only ``AuthenticationError``
513
+ triggers the password fallback; all other exceptions propagate (Fail Fast).
514
+
515
+ Deprecations
516
+ ------------
517
+
518
+ - ``ResponseAdapter`` (the ``requests.Response``-compatible wrapper returned
519
+ by ``CartaAgent`` verb methods) is deprecated as of v1.0. Callers should
520
+ transition to consuming ``httpx.Response`` directly. The adapter will be
521
+ removed in **a future version**.
522
+
523
+ - ``CartaHTTPStatusError``, ``CartaTimeoutError``, and ``CartaConnectionError``
524
+ shims in ``pycarta.auth._http_compat`` (renamed from ``HTTPStatusError``,
525
+ ``TimeoutError``, and ``ConnectionError`` respectively; see HIER-01 above)
526
+ are deprecated as of v1.0. Use ``httpx.HTTPStatusError``,
527
+ ``httpx.TimeoutException``, and ``httpx.RequestError`` directly. The
528
+ shims will be removed in **v3.0**.
529
+
530
+ Breaking changes
531
+ ----------------
532
+
533
+ - ``pycarta.sbg`` is removed with no replacement, along with the ``sbg``
534
+ extra. ``pycarta.login()`` no longer logs in to Seven Bridges and its
535
+ ``reauthenticate_sbg`` argument is gone.
536
+ - ``CARTA_USER`` and ``CARTA_PASS`` are no longer read. ``pycarta.login()``,
537
+ ``pycarta auth login`` and ``pycarta services`` read ``CARTA_USERNAME`` and
538
+ ``CARTA_PASSWORD`` only.
539
+ - ``get_user_permission``, ``set_user_permission`` and
540
+ ``remove_user_permission`` are removed from ``pycarta.admin.legacy``. The
541
+ v2 equivalents are ``get_permissions``, ``set_permissions`` and
542
+ ``delete_permissions``.
543
+ - ``AuthenticationAgent.url``, inherited by ``CartaAgent``, is removed.
544
+ ``host`` replaces it.
@@ -19,6 +19,11 @@ guidelines.
19
19
 
20
20
  .. contents::
21
21
 
22
+ .. important::
23
+
24
+ **Internal use only.** Contributing to ``pycarta`` is currently limited to
25
+ Contextualize personnel.
26
+
22
27
 
23
28
  Issue Reports
24
29
  =============
@@ -89,7 +94,7 @@ This can easily be done via either |virtualenv|_::
89
94
 
90
95
  or Miniconda_::
91
96
 
92
- conda create -n pycarta python=3 six virtualenv pytest pytest-cov
97
+ conda create -n pycarta python=3.12 six virtualenv pytest pytest-cov
93
98
  conda activate pycarta
94
99
 
95
100
  Clone the repository
@@ -105,7 +110,7 @@ Clone the repository
105
110
 
106
111
  #. You should run::
107
112
 
108
- pip install -U pip setuptools -e .
113
+ pip install -U pip setuptools -e ".[dev]"
109
114
 
110
115
  to be able to import the package under development in the Python REPL.
111
116
 
@@ -247,7 +252,7 @@ package:
247
252
  tox -r -e docs
248
253
 
249
254
  #. Make sure to have a reliable |tox|_ installation that uses the correct
250
- Python version (e.g., 3.7+). When in doubt you can run::
255
+ Python version (3.12+). When in doubt you can run::
251
256
 
252
257
  tox --version
253
258
  # OR
@@ -260,7 +265,7 @@ package:
260
265
  virtualenv .venv
261
266
  source .venv/bin/activate
262
267
  .venv/bin/pip install tox
263
- .venv/bin/tox -e all
268
+ .venv/bin/tox
264
269
 
265
270
  #. `Pytest can drop you`_ in an interactive session in the case an error occurs.
266
271
  In order to do that you need to pass a ``--pdb`` option (for example by
@@ -0,0 +1,33 @@
1
+ # setuptools_scm's file finder puts EVERY git-tracked file into the sdist, so
2
+ # this is a denylist and anything not named here is published to PyPI.
3
+
4
+ # Internal docs, planning material, and agent configuration
5
+ exclude CLAUDE.md
6
+ global-exclude CLAUDE.md
7
+ global-exclude *.claude.md
8
+ recursive-exclude .claude *
9
+ recursive-exclude .planning *
10
+ prune .internal
11
+
12
+ # Working directories
13
+ recursive-exclude build *
14
+ recursive-exclude dev *
15
+ recursive-exclude dist *
16
+ recursive-exclude tests *
17
+
18
+ # Service and tooling config
19
+ exclude .gitignore
20
+ exclude .gitlab-ci.yml
21
+ exclude .readthedocs.yml
22
+ exclude pytest.ini
23
+
24
+ # Secure credentials
25
+ global-exclude .env
26
+ global-exclude .env.*
27
+ global-exclude *.pem
28
+ global-exclude *.key
29
+ global-exclude *.p12
30
+ recursive-exclude docs/examples *.ipynb
31
+
32
+ include src/pycarta/py.typed
33
+ include src/pycarta/__init__.pyi