crossplane-function-pythonic 0.0.7__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 (195) hide show
  1. crossplane_function_pythonic-0.0.7/.coveragerc +2 -0
  2. crossplane_function_pythonic-0.0.7/.devcontainer/devcontainer.json +17 -0
  3. crossplane_function_pythonic-0.0.7/.github/workflows/ci.yaml +265 -0
  4. crossplane_function_pythonic-0.0.7/.gitignore +215 -0
  5. crossplane_function_pythonic-0.0.7/.venv-default/.gitignore +2 -0
  6. crossplane_function_pythonic-0.0.7/.venv-default/CACHEDIR.TAG +4 -0
  7. crossplane_function_pythonic-0.0.7/.venv-default/bin/activate +87 -0
  8. crossplane_function_pythonic-0.0.7/.venv-default/bin/activate.csh +55 -0
  9. crossplane_function_pythonic-0.0.7/.venv-default/bin/activate.fish +103 -0
  10. crossplane_function_pythonic-0.0.7/.venv-default/bin/activate.nu +96 -0
  11. crossplane_function_pythonic-0.0.7/.venv-default/bin/activate.ps1 +61 -0
  12. crossplane_function_pythonic-0.0.7/.venv-default/bin/activate_this.py +38 -0
  13. crossplane_function_pythonic-0.0.7/.venv-default/bin/ipython +8 -0
  14. crossplane_function_pythonic-0.0.7/.venv-default/bin/ipython3 +8 -0
  15. crossplane_function_pythonic-0.0.7/.venv-default/bin/kopf +8 -0
  16. crossplane_function_pythonic-0.0.7/.venv-default/bin/pip +8 -0
  17. crossplane_function_pythonic-0.0.7/.venv-default/bin/pip-3.13 +8 -0
  18. crossplane_function_pythonic-0.0.7/.venv-default/bin/pip3 +8 -0
  19. crossplane_function_pythonic-0.0.7/.venv-default/bin/pip3.13 +8 -0
  20. crossplane_function_pythonic-0.0.7/.venv-default/bin/pygmentize +8 -0
  21. crossplane_function_pythonic-0.0.7/.venv-default/bin/python +1 -0
  22. crossplane_function_pythonic-0.0.7/.venv-default/bin/python3 +1 -0
  23. crossplane_function_pythonic-0.0.7/.venv-default/bin/python3.13 +1 -0
  24. crossplane_function_pythonic-0.0.7/.venv-default/pyvenv.cfg +8 -0
  25. crossplane_function_pythonic-0.0.7/.venv-default/share/man/man1/ipython.1 +60 -0
  26. crossplane_function_pythonic-0.0.7/.venv-test/.gitignore +2 -0
  27. crossplane_function_pythonic-0.0.7/.venv-test/CACHEDIR.TAG +4 -0
  28. crossplane_function_pythonic-0.0.7/.venv-test/bin/activate +87 -0
  29. crossplane_function_pythonic-0.0.7/.venv-test/bin/activate.csh +55 -0
  30. crossplane_function_pythonic-0.0.7/.venv-test/bin/activate.fish +103 -0
  31. crossplane_function_pythonic-0.0.7/.venv-test/bin/activate.nu +96 -0
  32. crossplane_function_pythonic-0.0.7/.venv-test/bin/activate.ps1 +61 -0
  33. crossplane_function_pythonic-0.0.7/.venv-test/bin/activate_this.py +38 -0
  34. crossplane_function_pythonic-0.0.7/.venv-test/bin/coverage +8 -0
  35. crossplane_function_pythonic-0.0.7/.venv-test/bin/coverage-3.13 +8 -0
  36. crossplane_function_pythonic-0.0.7/.venv-test/bin/coverage3 +8 -0
  37. crossplane_function_pythonic-0.0.7/.venv-test/bin/kopf +8 -0
  38. crossplane_function_pythonic-0.0.7/.venv-test/bin/pip +8 -0
  39. crossplane_function_pythonic-0.0.7/.venv-test/bin/pip-3.13 +8 -0
  40. crossplane_function_pythonic-0.0.7/.venv-test/bin/pip3 +8 -0
  41. crossplane_function_pythonic-0.0.7/.venv-test/bin/pip3.13 +8 -0
  42. crossplane_function_pythonic-0.0.7/.venv-test/bin/py.test +8 -0
  43. crossplane_function_pythonic-0.0.7/.venv-test/bin/pygmentize +8 -0
  44. crossplane_function_pythonic-0.0.7/.venv-test/bin/pytest +8 -0
  45. crossplane_function_pythonic-0.0.7/.venv-test/bin/python +1 -0
  46. crossplane_function_pythonic-0.0.7/.venv-test/bin/python3 +1 -0
  47. crossplane_function_pythonic-0.0.7/.venv-test/bin/python3.13 +1 -0
  48. crossplane_function_pythonic-0.0.7/.venv-test/pyvenv.cfg +8 -0
  49. crossplane_function_pythonic-0.0.7/Dockerfile +15 -0
  50. crossplane_function_pythonic-0.0.7/LICENSE +201 -0
  51. crossplane_function_pythonic-0.0.7/PKG-INFO +540 -0
  52. crossplane_function_pythonic-0.0.7/README.md +519 -0
  53. crossplane_function_pythonic-0.0.7/crossplane/pythonic/__init__.py +19 -0
  54. crossplane_function_pythonic-0.0.7/crossplane/pythonic/composite.py +670 -0
  55. crossplane_function_pythonic-0.0.7/crossplane/pythonic/function.py +260 -0
  56. crossplane_function_pythonic-0.0.7/crossplane/pythonic/main.py +187 -0
  57. crossplane_function_pythonic-0.0.7/crossplane/pythonic/packages.py +158 -0
  58. crossplane_function_pythonic-0.0.7/crossplane/pythonic/protobuf.py +941 -0
  59. crossplane_function_pythonic-0.0.7/examples/.dev/functions.yaml +13 -0
  60. crossplane_function_pythonic-0.0.7/examples/alert.tgz +0 -0
  61. crossplane_function_pythonic-0.0.7/examples/argo.tgz +0 -0
  62. crossplane_function_pythonic-0.0.7/examples/argocd-application/composition.yaml +87 -0
  63. crossplane_function_pythonic-0.0.7/examples/argocd-application/extra.yaml +53 -0
  64. crossplane_function_pythonic-0.0.7/examples/argocd-application/functions.yaml +13 -0
  65. crossplane_function_pythonic-0.0.7/examples/argocd-application/render.sh +3 -0
  66. crossplane_function_pythonic-0.0.7/examples/argocd-application/xr.yaml +6 -0
  67. crossplane_function_pythonic-0.0.7/examples/argocd-application/xrd.yaml +34 -0
  68. crossplane_function_pythonic-0.0.7/examples/argocd.tgz +0 -0
  69. crossplane_function_pythonic-0.0.7/examples/ds-mod/composition.yaml +36 -0
  70. crossplane_function_pythonic-0.0.7/examples/ds-mod/daemonset.yaml +35 -0
  71. crossplane_function_pythonic-0.0.7/examples/ds-mod/functions.yaml +9 -0
  72. crossplane_function_pythonic-0.0.7/examples/ds-mod/render.sh +3 -0
  73. crossplane_function_pythonic-0.0.7/examples/ds-mod/xr.yaml +8 -0
  74. crossplane_function_pythonic-0.0.7/examples/ds-mod/xrd.yaml +25 -0
  75. crossplane_function_pythonic-0.0.7/examples/eks-cluster/composition-v2.yaml +138 -0
  76. crossplane_function_pythonic-0.0.7/examples/eks-cluster/composition.yaml +124 -0
  77. crossplane_function_pythonic-0.0.7/examples/eks-cluster/definition.yaml +47 -0
  78. crossplane_function_pythonic-0.0.7/examples/eks-cluster/functions.yaml +8 -0
  79. crossplane_function_pythonic-0.0.7/examples/eks-cluster/render-v2.sh +3 -0
  80. crossplane_function_pythonic-0.0.7/examples/eks-cluster/render.sh +3 -0
  81. crossplane_function_pythonic-0.0.7/examples/eks-cluster/xr.yaml +12 -0
  82. crossplane_function_pythonic-0.0.7/examples/filing-system/README.md +13 -0
  83. crossplane_function_pythonic-0.0.7/examples/filing-system/composition.yaml +17 -0
  84. crossplane_function_pythonic-0.0.7/examples/filing-system/definition.yaml +21 -0
  85. crossplane_function_pythonic-0.0.7/examples/filing-system/function.yaml +10 -0
  86. crossplane_function_pythonic-0.0.7/examples/filing-system/kustomization.yaml +18 -0
  87. crossplane_function_pythonic-0.0.7/examples/filing-system/runtime.yaml +23 -0
  88. crossplane_function_pythonic-0.0.7/examples/filing-system/vcluster.py +38 -0
  89. crossplane_function_pythonic-0.0.7/examples/filing-system/vcluster.yaml +5 -0
  90. crossplane_function_pythonic-0.0.7/examples/function-go-templating/conditions/composition.yaml +35 -0
  91. crossplane_function_pythonic-0.0.7/examples/function-go-templating/conditions/functions.yaml +25 -0
  92. crossplane_function_pythonic-0.0.7/examples/function-go-templating/conditions/render.sh +3 -0
  93. crossplane_function_pythonic-0.0.7/examples/function-go-templating/conditions/xr.yaml +5 -0
  94. crossplane_function_pythonic-0.0.7/examples/function-go-templating/conditions/xrd.yaml +25 -0
  95. crossplane_function_pythonic-0.0.7/examples/function-go-templating/context/composition.yaml +42 -0
  96. crossplane_function_pythonic-0.0.7/examples/function-go-templating/context/environmentConfigs.yaml +10 -0
  97. crossplane_function_pythonic-0.0.7/examples/function-go-templating/context/functions.yaml +25 -0
  98. crossplane_function_pythonic-0.0.7/examples/function-go-templating/context/render.sh +3 -0
  99. crossplane_function_pythonic-0.0.7/examples/function-go-templating/context/xr.yaml +5 -0
  100. crossplane_function_pythonic-0.0.7/examples/function-go-templating/context/xrd.yaml +25 -0
  101. crossplane_function_pythonic-0.0.7/examples/function-go-templating/extra-resources/composition.yaml +29 -0
  102. crossplane_function_pythonic-0.0.7/examples/function-go-templating/extra-resources/extraResources.yaml +14 -0
  103. crossplane_function_pythonic-0.0.7/examples/function-go-templating/extra-resources/functions.yaml +9 -0
  104. crossplane_function_pythonic-0.0.7/examples/function-go-templating/extra-resources/render.sh +3 -0
  105. crossplane_function_pythonic-0.0.7/examples/function-go-templating/extra-resources/xr.yaml +6 -0
  106. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/fromYaml/composition.yaml +21 -0
  107. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/fromYaml/functions.yaml +9 -0
  108. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/fromYaml/render.sh +3 -0
  109. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/fromYaml/xr.yaml +9 -0
  110. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/getComposedResource/composition.yaml +28 -0
  111. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/getComposedResource/functions.yaml +9 -0
  112. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/getComposedResource/observed.yaml +20 -0
  113. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/getComposedResource/render.sh +3 -0
  114. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/getComposedResource/xr.yaml +6 -0
  115. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/getCompositeResource/composition.yaml +23 -0
  116. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/getCompositeResource/functions.yaml +9 -0
  117. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/getCompositeResource/render.sh +3 -0
  118. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/getCompositeResource/xr.yaml +7 -0
  119. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/getResourceCondition/composition.yaml +27 -0
  120. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/getResourceCondition/functions.yaml +9 -0
  121. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/getResourceCondition/observed.yaml +21 -0
  122. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/getResourceCondition/render.sh +3 -0
  123. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/getResourceCondition/xr.yaml +12 -0
  124. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/include/composition.yaml +41 -0
  125. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/include/functions.yaml +9 -0
  126. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/include/render.sh +3 -0
  127. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/include/xr.yaml +7 -0
  128. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/toYaml/composition.yaml +21 -0
  129. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/toYaml/functions.yaml +9 -0
  130. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/toYaml/render.sh +3 -0
  131. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions/toYaml/xr.yaml +12 -0
  132. crossplane_function_pythonic-0.0.7/examples/function-go-templating/functions.yaml +15 -0
  133. crossplane_function_pythonic-0.0.7/examples/function-go-templating/inline/composition.yaml +36 -0
  134. crossplane_function_pythonic-0.0.7/examples/function-go-templating/inline/functions.yaml +9 -0
  135. crossplane_function_pythonic-0.0.7/examples/function-go-templating/inline/render.sh +3 -0
  136. crossplane_function_pythonic-0.0.7/examples/function-go-templating/inline/xr.yaml +6 -0
  137. crossplane_function_pythonic-0.0.7/examples/function-go-templating/recursive/composition-real.yaml +21 -0
  138. crossplane_function_pythonic-0.0.7/examples/function-go-templating/recursive/composition-wrapper.yaml +23 -0
  139. crossplane_function_pythonic-0.0.7/examples/function-go-templating/recursive/functions.yaml +9 -0
  140. crossplane_function_pythonic-0.0.7/examples/function-go-templating/recursive/render.sh +4 -0
  141. crossplane_function_pythonic-0.0.7/examples/function-go-templating/recursive/xr.yaml +8 -0
  142. crossplane_function_pythonic-0.0.7/examples/get-started-app/composition.yaml +41 -0
  143. crossplane_function_pythonic-0.0.7/examples/get-started-app/definition.yaml +35 -0
  144. crossplane_function_pythonic-0.0.7/examples/get-started-app/functions.yaml +8 -0
  145. crossplane_function_pythonic-0.0.7/examples/get-started-app/render.sh +3 -0
  146. crossplane_function_pythonic-0.0.7/examples/get-started-app/xr.yaml +7 -0
  147. crossplane_function_pythonic-0.0.7/examples/grafana/EFCObservability.yaml +1033 -0
  148. crossplane_function_pythonic-0.0.7/examples/grafana/README.md +6 -0
  149. crossplane_function_pythonic-0.0.7/examples/grafana/alert.py +104 -0
  150. crossplane_function_pythonic-0.0.7/examples/grafana/composition.yaml +30 -0
  151. crossplane_function_pythonic-0.0.7/examples/grafana/configmap.yaml +750 -0
  152. crossplane_function_pythonic-0.0.7/examples/grafana/dashboard.json +637 -0
  153. crossplane_function_pythonic-0.0.7/examples/grafana/extra.yaml +89 -0
  154. crossplane_function_pythonic-0.0.7/examples/grafana/functions.yaml +15 -0
  155. crossplane_function_pythonic-0.0.7/examples/grafana/observed.yaml +15 -0
  156. crossplane_function_pythonic-0.0.7/examples/grafana/render.sh +3 -0
  157. crossplane_function_pythonic-0.0.7/examples/grafana/run-pythonic.sh +3 -0
  158. crossplane_function_pythonic-0.0.7/examples/grafana/secret.yaml +9 -0
  159. crossplane_function_pythonic-0.0.7/examples/grafana/xr.yaml +26 -0
  160. crossplane_function_pythonic-0.0.7/examples/helm-copy-secret/composition.yaml +17 -0
  161. crossplane_function_pythonic-0.0.7/examples/helm-copy-secret/functions.yaml +8 -0
  162. crossplane_function_pythonic-0.0.7/examples/helm-copy-secret/kustomization.yaml +16 -0
  163. crossplane_function_pythonic-0.0.7/examples/helm-copy-secret/render.sh +3 -0
  164. crossplane_function_pythonic-0.0.7/examples/helm-copy-secret/run-function.sh +3 -0
  165. crossplane_function_pythonic-0.0.7/examples/helm-copy-secret/vcluster.py +63 -0
  166. crossplane_function_pythonic-0.0.7/examples/helm-copy-secret/xr.yaml +5 -0
  167. crossplane_function_pythonic-0.0.7/examples/helm-copy-secret/xrd.yaml +21 -0
  168. crossplane_function_pythonic-0.0.7/examples/single-purpose/functions.yaml +8 -0
  169. crossplane_function_pythonic-0.0.7/examples/single-purpose/render.sh +3 -0
  170. crossplane_function_pythonic-0.0.7/examples/single-purpose/xr.yaml +9 -0
  171. crossplane_function_pythonic-0.0.7/package/composite-composition.yaml +18 -0
  172. crossplane_function_pythonic-0.0.7/package/composite-definition.yaml +32 -0
  173. crossplane_function_pythonic-0.0.7/package/crossplane.yaml +5 -0
  174. crossplane_function_pythonic-0.0.7/package/input-definition.yaml +38 -0
  175. crossplane_function_pythonic-0.0.7/pyproject.toml +122 -0
  176. crossplane_function_pythonic-0.0.7/renovate.json +6 -0
  177. crossplane_function_pythonic-0.0.7/scripts/run_function.proto +370 -0
  178. crossplane_function_pythonic-0.0.7/scripts/setup-local.sh +205 -0
  179. crossplane_function_pythonic-0.0.7/tests/fn_cases/buckets.yaml +37 -0
  180. crossplane_function_pythonic-0.0.7/tests/fn_cases/clazz.py +5 -0
  181. crossplane_function_pythonic-0.0.7/tests/fn_cases/clazz.yaml +14 -0
  182. crossplane_function_pythonic-0.0.7/tests/fn_cases/composed.yaml +57 -0
  183. crossplane_function_pythonic-0.0.7/tests/fn_cases/conditions.yaml +85 -0
  184. crossplane_function_pythonic-0.0.7/tests/fn_cases/context.yaml +46 -0
  185. crossplane_function_pythonic-0.0.7/tests/fn_cases/do-nothing.yaml +6 -0
  186. crossplane_function_pythonic-0.0.7/tests/fn_cases/extra-resources.yaml +74 -0
  187. crossplane_function_pythonic-0.0.7/tests/fn_cases/get-started-app.yaml +98 -0
  188. crossplane_function_pythonic-0.0.7/tests/fn_cases/inline.yaml +82 -0
  189. crossplane_function_pythonic-0.0.7/tests/fn_cases/unknowns-fatal.yaml +72 -0
  190. crossplane_function_pythonic-0.0.7/tests/fn_cases/unknowns-info.yaml +55 -0
  191. crossplane_function_pythonic-0.0.7/tests/fn_cases/unknowns-warning.yaml +73 -0
  192. crossplane_function_pythonic-0.0.7/tests/fn_cases/yaml.yaml +36 -0
  193. crossplane_function_pythonic-0.0.7/tests/test_fn.py +75 -0
  194. crossplane_function_pythonic-0.0.7/tests/test_protobuf_values.py +210 -0
  195. crossplane_function_pythonic-0.0.7/tests/utils.py +253 -0
@@ -0,0 +1,2 @@
1
+ [run]
2
+ omit = tests/*
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "function-pythonic-devcontainer",
3
+ "image": "mcr.microsoft.com/devcontainers/python:3.12-bookworm",
4
+ "features": {
5
+ "ghcr.io/devcontainers-extra/features/hatch:2": {},
6
+ "ghcr.io/devcontainers/features/docker-in-docker:2": {
7
+ "version": "latest",
8
+ "enableNonRootDocker": "true",
9
+ "moby": "false"
10
+ },
11
+ "ghcr.io/joebowbeer/devcontainers-features/crossplane:1": {
12
+ "channel": "stable",
13
+ "version": "current"
14
+ }
15
+ },
16
+ "postCreateCommand": "hatch env create"
17
+ }
@@ -0,0 +1,265 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - release-*
8
+ pull_request: {}
9
+ workflow_dispatch:
10
+ inputs:
11
+ version:
12
+ description: Package version (e.g. v0.1.0)
13
+ required: false
14
+
15
+ env:
16
+ # Common versions
17
+ PYTHON_VERSION: '3.13.7' # TODO: Used?
18
+ HATCH_VERSION: '1.12.0'
19
+ DOCKER_BUILDX_VERSION: 'v0.26.1'
20
+
21
+ # These environment variables are important to the Crossplane CLI install.sh
22
+ # script. They determine what version it installs.
23
+ XP_CHANNEL: stable
24
+ XP_VERSION: current
25
+
26
+ # This CI job will automatically push new builds to xpkg.upbound.io if the
27
+ # XPKG_ACCESS_ID and XPKG_TOKEN secrets are set in the GitHub respository (or
28
+ # organization) settings. Create a token at https://accounts.upbound.io.
29
+ # XPKG_ACCESS_ID: ${{ secrets.XPKG_ACCESS_ID }}
30
+
31
+ # The package to push, without a version tag. The default matches GitHub. For
32
+ # example xpkg.upbound.io/crossplane/function-template-go.
33
+ # XPKG: xpkg.upbound.io/${{ github.repository}}
34
+ CROSSPLANE_REGORG: ghcr.io/${{ github.repository}}
35
+
36
+ # The PyPi project version to push. The default is v0.0.0+gitdate-gitsha.
37
+ PYPI_VERSION: ${{ inputs.version }}
38
+
39
+ # The package version to push. The default is 0.0.0-gitsha.
40
+ XPKG_VERSION: ${{ inputs.version }}
41
+
42
+ jobs:
43
+ # lint:
44
+ # runs-on: ubuntu-24.04
45
+ # steps:
46
+ # - name: Checkout
47
+ # uses: actions/checkout@v4
48
+
49
+ # - name: Setup Python
50
+ # uses: actions/setup-python@v5
51
+ # with:
52
+ # python-version: ${{ env.PYTHON_VERSION }}
53
+
54
+ # - name: Setup Hatch
55
+ # run: pipx install hatch==1.14.1
56
+
57
+ # - name: Lint
58
+ # run: hatch run lint:check
59
+
60
+ test:
61
+ runs-on: ubuntu-24.04
62
+ steps:
63
+ - name: Checkout
64
+ uses: actions/checkout@v4
65
+
66
+ - name: Setup Python
67
+ uses: actions/setup-python@v5
68
+ with:
69
+ python-version: ${{ env.PYTHON_VERSION }}
70
+
71
+ - name: Setup Hatch
72
+ run: pipx install hatch==1.14.1
73
+
74
+ - name: Run Unit Tests
75
+ run: hatch run test:ci
76
+
77
+ #- name: Pytest coverage comment
78
+ # uses: MishaKav/pytest-coverage-comment@v1.1.54
79
+ # with:
80
+ # badge-title: Coverage
81
+ # title: Coverage Report
82
+ # pytest-xml-coverage-path: reports/pytest-coverage.xml
83
+ # junitxml-title: Unit Tests
84
+ # junitxml-path: reports/pytest-junit.xml
85
+ #hide-badge: false
86
+ #hide-report: false
87
+ #create-new-comment: false
88
+ #hide-comment: false
89
+ #report-only-changed-files: false
90
+ #remove-link-from-badge: false
91
+ #unique-id-for-comment: python3.8
92
+
93
+ build-pypi:
94
+ runs-on: ubuntu-24.04
95
+ steps:
96
+ - name: Checkout
97
+ uses: actions/checkout@v4
98
+
99
+ - name: Setup Python
100
+ uses: actions/setup-python@v5
101
+ with:
102
+ python-version: ${{ env.PYTHON_VERSION }}
103
+
104
+ - name: Setup Hatch
105
+ run: pipx install hatch==${{ env.HATCH_VERSION }}
106
+
107
+ # If a version wasn't explicitly passed as a workflow_dispatch input we
108
+ # default to version v0.0.0+<git-commit-date>-<git-short-sha>, for example
109
+ # v0.0.0+20231101115142-1091066df799. This is a simple implementation of
110
+ # Go's pseudo-versions: https://go.dev/ref/mod#pseudo-versions.
111
+ - name: Set Default PyPI Project Version
112
+ if: env.PYPI_VERSION == ''
113
+ run: echo "PYPI_VERSION=v0.0.0+$(date -d@$(git show -s --format=%ct) +%Y%m%d%H%M%S)-$(git rev-parse --short=12 HEAD)" >> $GITHUB_ENV
114
+
115
+ - name: Set PyPI Project Version
116
+ run: hatch version ${{ env.PYPI_VERSION }}
117
+
118
+ - name: Build Sdist and Wheel
119
+ run: hatch build
120
+
121
+ - name: Upload Sdist and Wheel to GitHub
122
+ uses: actions/upload-artifact@v4
123
+ with:
124
+ name: dist
125
+ path: "dist/*"
126
+ if-no-files-found: error
127
+ retention-days: 1
128
+
129
+ # We want to build most packages for the amd64 and arm64 architectures. To
130
+ # speed this up we build single-platform packages in parallel. We then upload
131
+ # those packages to GitHub as a build artifact. The push job downloads those
132
+ # artifacts and pushes them as a single multi-platform package.
133
+ build-xpkg:
134
+ needs:
135
+ - build-pypi
136
+ runs-on: ubuntu-24.04
137
+ strategy:
138
+ fail-fast: true
139
+ matrix:
140
+ arch:
141
+ - amd64
142
+ - arm64
143
+ steps:
144
+ - name: Setup QEMU
145
+ uses: docker/setup-qemu-action@v3
146
+ with:
147
+ platforms: all
148
+
149
+ - name: Setup Docker Buildx
150
+ uses: docker/setup-buildx-action@v3
151
+ with:
152
+ version: ${{ env.DOCKER_BUILDX_VERSION }}
153
+ install: true
154
+
155
+ - name: Checkout
156
+ uses: actions/checkout@v4
157
+
158
+ - name: Download Wheel from GitHub
159
+ uses: actions/download-artifact@v5
160
+ with:
161
+ name: dist
162
+ pattern: '*.whl'
163
+ path: dist
164
+
165
+ # We ask Docker to use GitHub Action's native caching support to speed up
166
+ # the build, per https://docs.docker.com/build/cache/backends/gha/.
167
+ - name: Build Runtime
168
+ id: image
169
+ uses: docker/build-push-action@v6
170
+ with:
171
+ context: .
172
+ platforms: linux/${{ matrix.arch }}
173
+ cache-from: type=gha
174
+ cache-to: type=gha,mode=max
175
+ target: image
176
+ build-args:
177
+ PYTHON_VERSION=${{ env.PYTHON_VERSION }}
178
+ outputs: type=docker,dest=runtime-${{ matrix.arch }}.tar
179
+
180
+ - name: Setup the Crossplane CLI
181
+ run: "mkdir bin && cd bin && curl -sL https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh | sh"
182
+
183
+ - name: Build Package
184
+ run: bin/crossplane xpkg build --package-file=${{ matrix.arch }}.xpkg --package-root=package/ --embed-runtime-image-tarball=runtime-${{ matrix.arch }}.tar
185
+
186
+ - name: Upload Single-Platform Package
187
+ uses: actions/upload-artifact@v4
188
+ with:
189
+ name: package-${{ matrix.arch }}
190
+ path: "*.xpkg"
191
+ if-no-files-found: error
192
+ retention-days: 1
193
+
194
+ publish-pypi:
195
+ # Don't publish unless we were run with an explicit version.
196
+ if: ${{ inputs.version != '' }}
197
+ needs:
198
+ - build-pypi
199
+ runs-on: ubuntu-24.04
200
+ steps:
201
+ - name: Download Sdist and Wheel from GitHub
202
+ uses: actions/download-artifact@v5
203
+ with:
204
+ name: dist
205
+ path: dist
206
+
207
+ - name: Publish to PyPI
208
+ uses: pypa/gh-action-pypi-publish@v1.12.4
209
+ with:
210
+ password: ${{ secrets.PYPI_API_TOKEN }}
211
+
212
+ # This job downloads the single-platform packages built by the build job, and
213
+ # pushes them as a multi-platform package. We only push the package it the
214
+ # XPKG_ACCESS_ID and XPKG_TOKEN secrets were provided.
215
+ push-xpkg:
216
+ needs:
217
+ - build-xpkg
218
+ runs-on: ubuntu-24.04
219
+ permissions:
220
+ contents: read
221
+ packages: write
222
+ steps:
223
+ - name: Checkout
224
+ uses: actions/checkout@v4
225
+
226
+ - name: Download Single-Platform Packages
227
+ uses: actions/download-artifact@v4
228
+ with:
229
+ # See https://github.com/docker/build-push-action/blob/263435/README.md#summaries
230
+ pattern: "!*.dockerbuild"
231
+ path: .
232
+ merge-multiple: true
233
+
234
+ - name: Setup the Crossplane CLI
235
+ run: "mkdir bin && cd bin && curl -sL https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh | sh"
236
+
237
+ # If a version wasn't explicitly passed as a workflow_dispatch input we
238
+ # default to version v0.0.0-<git-commit-date>-<git-short-sha>, for example
239
+ # v0.0.0-20231101115142-1091066df799. This is a simple implementation of
240
+ # Go's pseudo-versions: https://go.dev/ref/mod#pseudo-versions.
241
+ - name: Set Default Multi-Platform Package Version
242
+ if: env.XPKG_VERSION == ''
243
+ run: echo "XPKG_VERSION=v0.0.0-$(date -d@$(git show -s --format=%ct) +%Y%m%d%H%M%S)-$(git rev-parse --short=12 HEAD)" >> $GITHUB_ENV
244
+
245
+ # - name: Login to Upbound
246
+ # uses: docker/login-action@v3
247
+ # if: env.XPKG_ACCESS_ID != ''
248
+ # with:
249
+ # registry: xpkg.upbound.io
250
+ # username: ${{ secrets.XPKG_ACCESS_ID }}
251
+ # password: ${{ secrets.XPKG_TOKEN }}
252
+
253
+ # - name: Push Multi-Platform Package to Upbound
254
+ # if: env.XPKG_ACCESS_ID != ''
255
+ # run: "bin/crossplane --verbose xpkg push --package-files $(echo *.xpkg|tr ' ' ,) ${{ env.XPKG }}:${{ env.XPKG_VERSION }}"
256
+
257
+ - name: Login to GHCR
258
+ uses: docker/login-action@v3
259
+ with:
260
+ registry: ghcr.io
261
+ username: ${{ github.repository_owner }}
262
+ password: ${{ secrets.GITHUB_TOKEN }}
263
+
264
+ - name: Push Multi-Platform Package to GHCR
265
+ run: "bin/crossplane --verbose xpkg push --package-files $(echo *.xpkg|tr ' ' ,) ${{ env.CROSSPLANE_REGORG }}:${{ env.XPKG_VERSION }}"
@@ -0,0 +1,215 @@
1
+ # Emacs
2
+ *~
3
+
4
+ # Byte-compiled / optimized / DLL files
5
+ __pycache__/
6
+ *.py[codz]
7
+ *$py.class
8
+
9
+ # C extensions
10
+ *.so
11
+
12
+ # Distribution / packaging
13
+ .Python
14
+ build/
15
+ develop-eggs/
16
+ dist/
17
+ downloads/
18
+ eggs/
19
+ .eggs/
20
+ lib/
21
+ lib64/
22
+ parts/
23
+ sdist/
24
+ var/
25
+ wheels/
26
+ share/python-wheels/
27
+ *.egg-info/
28
+ .installed.cfg
29
+ *.egg
30
+ MANIFEST
31
+
32
+ # PyInstaller
33
+ # Usually these files are written by a python script from a template
34
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
35
+ *.manifest
36
+ *.spec
37
+
38
+ # Installer logs
39
+ pip-log.txt
40
+ pip-delete-this-directory.txt
41
+
42
+ # Unit test / coverage reports
43
+ htmlcov/
44
+ .tox/
45
+ .nox/
46
+ .coverage
47
+ .coverage.*
48
+ .cache
49
+ nosetests.xml
50
+ coverage.xml
51
+ *.cover
52
+ *.py.cover
53
+ .hypothesis/
54
+ .pytest_cache/
55
+ cover/
56
+ reports/
57
+
58
+ # Translations
59
+ *.mo
60
+ *.pot
61
+
62
+ # Django stuff:
63
+ *.log
64
+ local_settings.py
65
+ db.sqlite3
66
+ db.sqlite3-journal
67
+
68
+ # Flask stuff:
69
+ instance/
70
+ .webassets-cache
71
+
72
+ # Scrapy stuff:
73
+ .scrapy
74
+
75
+ # Sphinx documentation
76
+ docs/_build/
77
+
78
+ # PyBuilder
79
+ .pybuilder/
80
+ target/
81
+
82
+ # Jupyter Notebook
83
+ .ipynb_checkpoints
84
+
85
+ # IPython
86
+ profile_default/
87
+ ipython_config.py
88
+
89
+ # pyenv
90
+ # For a library or package, you might want to ignore these files since the code is
91
+ # intended to run in multiple environments; otherwise, check them in:
92
+ # .python-version
93
+
94
+ # pipenv
95
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
96
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
97
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
98
+ # install all needed dependencies.
99
+ #Pipfile.lock
100
+
101
+ # UV
102
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
103
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
104
+ # commonly ignored for libraries.
105
+ #uv.lock
106
+
107
+ # poetry
108
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
109
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
110
+ # commonly ignored for libraries.
111
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
112
+ #poetry.lock
113
+ #poetry.toml
114
+
115
+ # pdm
116
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
117
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
118
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
119
+ #pdm.lock
120
+ #pdm.toml
121
+ .pdm-python
122
+ .pdm-build/
123
+
124
+ # pixi
125
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
126
+ #pixi.lock
127
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
128
+ # in the .venv directory. It is recommended not to include this directory in version control.
129
+ .pixi
130
+
131
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
132
+ __pypackages__/
133
+
134
+ # Celery stuff
135
+ celerybeat-schedule
136
+ celerybeat.pid
137
+
138
+ # SageMath parsed files
139
+ *.sage.py
140
+
141
+ # Environments
142
+ .env
143
+ .envrc
144
+ .venv
145
+ env/
146
+ venv/
147
+ ENV/
148
+ env.bak/
149
+ venv.bak/
150
+
151
+ # Spyder project settings
152
+ .spyderproject
153
+ .spyproject
154
+
155
+ # Rope project settings
156
+ .ropeproject
157
+
158
+ # mkdocs documentation
159
+ /site
160
+
161
+ # mypy
162
+ .mypy_cache/
163
+ .dmypy.json
164
+ dmypy.json
165
+
166
+ # Pyre type checker
167
+ .pyre/
168
+
169
+ # pytype static type analyzer
170
+ .pytype/
171
+
172
+ # Cython debug symbols
173
+ cython_debug/
174
+
175
+ # PyCharm
176
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
177
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
178
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
179
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
180
+ #.idea/
181
+
182
+ # Abstra
183
+ # Abstra is an AI-powered process automation framework.
184
+ # Ignore directories containing user credentials, local state, and settings.
185
+ # Learn more at https://abstra.io/docs
186
+ .abstra/
187
+
188
+ # Visual Studio Code
189
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
190
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
191
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
192
+ # you could uncomment the following to ignore the entire vscode folder
193
+ # .vscode/
194
+
195
+ # Ruff stuff:
196
+ .ruff_cache/
197
+
198
+ # PyPI configuration file
199
+ .pypirc
200
+
201
+ # Cursor
202
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
203
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
204
+ # refer to https://docs.cursor.com/context/ignore-files
205
+ .cursorignore
206
+ .cursorindexingignore
207
+
208
+ # Marimo
209
+ marimo/_static/
210
+ marimo/_lsp/
211
+ __marimo__/
212
+
213
+ # function-pythonic
214
+ pythonic-packages/
215
+ crossplane/pythonic/__version__.py
@@ -0,0 +1,2 @@
1
+ # created by virtualenv automatically
2
+ *
@@ -0,0 +1,4 @@
1
+ Signature: 8a477f597d28d172789f06886806bc55
2
+ # This file is a cache directory tag created by Python virtualenv.
3
+ # For information about cache directory tags, see:
4
+ # https://bford.info/cachedir/
@@ -0,0 +1,87 @@
1
+ # This file must be used with "source bin/activate" *from bash*
2
+ # you cannot run it directly
3
+
4
+
5
+ if [ "${BASH_SOURCE-}" = "$0" ]; then
6
+ echo "You must source this script: \$ source $0" >&2
7
+ exit 33
8
+ fi
9
+
10
+ deactivate () {
11
+ unset -f pydoc >/dev/null 2>&1 || true
12
+
13
+ # reset old environment variables
14
+ # ! [ -z ${VAR+_} ] returns true if VAR is declared at all
15
+ if ! [ -z "${_OLD_VIRTUAL_PATH:+_}" ] ; then
16
+ PATH="$_OLD_VIRTUAL_PATH"
17
+ export PATH
18
+ unset _OLD_VIRTUAL_PATH
19
+ fi
20
+ if ! [ -z "${_OLD_VIRTUAL_PYTHONHOME+_}" ] ; then
21
+ PYTHONHOME="$_OLD_VIRTUAL_PYTHONHOME"
22
+ export PYTHONHOME
23
+ unset _OLD_VIRTUAL_PYTHONHOME
24
+ fi
25
+
26
+ # The hash command must be called to get it to forget past
27
+ # commands. Without forgetting past commands the $PATH changes
28
+ # we made may not be respected
29
+ hash -r 2>/dev/null
30
+
31
+ if ! [ -z "${_OLD_VIRTUAL_PS1+_}" ] ; then
32
+ PS1="$_OLD_VIRTUAL_PS1"
33
+ export PS1
34
+ unset _OLD_VIRTUAL_PS1
35
+ fi
36
+
37
+ unset VIRTUAL_ENV
38
+ unset VIRTUAL_ENV_PROMPT
39
+ if [ ! "${1-}" = "nondestructive" ] ; then
40
+ # Self destruct!
41
+ unset -f deactivate
42
+ fi
43
+ }
44
+
45
+ # unset irrelevant variables
46
+ deactivate nondestructive
47
+
48
+ VIRTUAL_ENV=/Users/pmcnerthney/src/iciclespider/function-pythonic/.venv-default
49
+ if ([ "$OSTYPE" = "cygwin" ] || [ "$OSTYPE" = "msys" ]) && $(command -v cygpath &> /dev/null) ; then
50
+ VIRTUAL_ENV=$(cygpath -u "$VIRTUAL_ENV")
51
+ fi
52
+ export VIRTUAL_ENV
53
+
54
+ _OLD_VIRTUAL_PATH="$PATH"
55
+ PATH="$VIRTUAL_ENV/"bin":$PATH"
56
+ export PATH
57
+
58
+ if [ "x"'' != x ] ; then
59
+ VIRTUAL_ENV_PROMPT=''
60
+ else
61
+ VIRTUAL_ENV_PROMPT=$(basename "$VIRTUAL_ENV")
62
+ fi
63
+ export VIRTUAL_ENV_PROMPT
64
+
65
+ # unset PYTHONHOME if set
66
+ if ! [ -z "${PYTHONHOME+_}" ] ; then
67
+ _OLD_VIRTUAL_PYTHONHOME="$PYTHONHOME"
68
+ unset PYTHONHOME
69
+ fi
70
+
71
+ if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT-}" ] ; then
72
+ _OLD_VIRTUAL_PS1="${PS1-}"
73
+ PS1="(${VIRTUAL_ENV_PROMPT}) ${PS1-}"
74
+ export PS1
75
+ fi
76
+
77
+ # Make sure to unalias pydoc if it's already there
78
+ alias pydoc 2>/dev/null >/dev/null && unalias pydoc || true
79
+
80
+ pydoc () {
81
+ python -m pydoc "$@"
82
+ }
83
+
84
+ # The hash command must be called to get it to forget past
85
+ # commands. Without forgetting past commands the $PATH changes
86
+ # we made may not be respected
87
+ hash -r 2>/dev/null || true
@@ -0,0 +1,55 @@
1
+ # This file must be used with "source bin/activate.csh" *from csh*.
2
+ # You cannot run it directly.
3
+ # Created by Davide Di Blasi <davidedb@gmail.com>.
4
+
5
+ set newline='\
6
+ '
7
+
8
+ alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH:q" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT:q" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate && unalias pydoc'
9
+
10
+ # Unset irrelevant variables.
11
+ deactivate nondestructive
12
+
13
+ setenv VIRTUAL_ENV /Users/pmcnerthney/src/iciclespider/function-pythonic/.venv-default
14
+
15
+ set _OLD_VIRTUAL_PATH="$PATH:q"
16
+ setenv PATH "$VIRTUAL_ENV:q/"bin":$PATH:q"
17
+
18
+
19
+
20
+ if ('' != "") then
21
+ setenv VIRTUAL_ENV_PROMPT ''
22
+ else
23
+ setenv VIRTUAL_ENV_PROMPT "$VIRTUAL_ENV:t:q"
24
+ endif
25
+
26
+ if ( $?VIRTUAL_ENV_DISABLE_PROMPT ) then
27
+ if ( $VIRTUAL_ENV_DISABLE_PROMPT == "" ) then
28
+ set do_prompt = "1"
29
+ else
30
+ set do_prompt = "0"
31
+ endif
32
+ else
33
+ set do_prompt = "1"
34
+ endif
35
+
36
+ if ( $do_prompt == "1" ) then
37
+ # Could be in a non-interactive environment,
38
+ # in which case, $prompt is undefined and we wouldn't
39
+ # care about the prompt anyway.
40
+ if ( $?prompt ) then
41
+ set _OLD_VIRTUAL_PROMPT="$prompt:q"
42
+ if ( "$prompt:q" =~ *"$newline:q"* ) then
43
+ :
44
+ else
45
+ set prompt = '('"$VIRTUAL_ENV_PROMPT:q"') '"$prompt:q"
46
+ endif
47
+ endif
48
+ endif
49
+
50
+ unset env_name
51
+ unset do_prompt
52
+
53
+ alias pydoc python -m pydoc
54
+
55
+ rehash