cosmotech-babylon 5.5.3__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 (182) hide show
  1. cosmotech_babylon-5.5.3/.coveragerc +9 -0
  2. cosmotech_babylon-5.5.3/.github/dependabot.yml +15 -0
  3. cosmotech_babylon-5.5.3/.github/workflows/ci.yml +83 -0
  4. cosmotech_babylon-5.5.3/.github/workflows/generate_gh_page.yml +35 -0
  5. cosmotech_babylon-5.5.3/.github/workflows/publish-to-pypi.yml +81 -0
  6. cosmotech_babylon-5.5.3/.github/workflows/sonarqube.yml +25 -0
  7. cosmotech_babylon-5.5.3/.github/workflows/tag_latest_release_gh_page.yml +32 -0
  8. cosmotech_babylon-5.5.3/.github/workflows/track_dependencies.yml +30 -0
  9. cosmotech_babylon-5.5.3/.gitignore +19 -0
  10. cosmotech_babylon-5.5.3/Babylon/__init__.py +1 -0
  11. cosmotech_babylon-5.5.3/Babylon/commands/__init__.py +8 -0
  12. cosmotech_babylon-5.5.3/Babylon/commands/api/__init__.py +19 -0
  13. cosmotech_babylon-5.5.3/Babylon/commands/api/dataset.py +465 -0
  14. cosmotech_babylon-5.5.3/Babylon/commands/api/meta.py +35 -0
  15. cosmotech_babylon-5.5.3/Babylon/commands/api/organization.py +142 -0
  16. cosmotech_babylon-5.5.3/Babylon/commands/api/run.py +156 -0
  17. cosmotech_babylon-5.5.3/Babylon/commands/api/runner.py +203 -0
  18. cosmotech_babylon-5.5.3/Babylon/commands/api/solution.py +140 -0
  19. cosmotech_babylon-5.5.3/Babylon/commands/api/workspace.py +144 -0
  20. cosmotech_babylon-5.5.3/Babylon/commands/macro/__init__.py +0 -0
  21. cosmotech_babylon-5.5.3/Babylon/commands/macro/apply.py +114 -0
  22. cosmotech_babylon-5.5.3/Babylon/commands/macro/build.py +170 -0
  23. cosmotech_babylon-5.5.3/Babylon/commands/macro/deploy_organization.py +80 -0
  24. cosmotech_babylon-5.5.3/Babylon/commands/macro/deploy_solution.py +86 -0
  25. cosmotech_babylon-5.5.3/Babylon/commands/macro/deploy_webapp.py +68 -0
  26. cosmotech_babylon-5.5.3/Babylon/commands/macro/deploy_workspace.py +80 -0
  27. cosmotech_babylon-5.5.3/Babylon/commands/macro/destroy.py +257 -0
  28. cosmotech_babylon-5.5.3/Babylon/commands/macro/helpers/__init__.py +0 -0
  29. cosmotech_babylon-5.5.3/Babylon/commands/macro/helpers/common.py +144 -0
  30. cosmotech_babylon-5.5.3/Babylon/commands/macro/helpers/webapp.py +168 -0
  31. cosmotech_babylon-5.5.3/Babylon/commands/macro/helpers/workspace/__init__.py +65 -0
  32. cosmotech_babylon-5.5.3/Babylon/commands/macro/helpers/workspace/api_cosmotech_helper.py +112 -0
  33. cosmotech_babylon-5.5.3/Babylon/commands/macro/helpers/workspace/kubernetes_helper.py +710 -0
  34. cosmotech_babylon-5.5.3/Babylon/commands/macro/helpers/workspace/powerbi_helper.py +776 -0
  35. cosmotech_babylon-5.5.3/Babylon/commands/macro/helpers/workspace/superset_helper.py +1330 -0
  36. cosmotech_babylon-5.5.3/Babylon/commands/macro/init.py +246 -0
  37. cosmotech_babylon-5.5.3/Babylon/commands/namespace/__init__.py +21 -0
  38. cosmotech_babylon-5.5.3/Babylon/commands/namespace/get_all_states.py +47 -0
  39. cosmotech_babylon-5.5.3/Babylon/commands/namespace/get_contexts.py +23 -0
  40. cosmotech_babylon-5.5.3/Babylon/commands/namespace/show_state.py +61 -0
  41. cosmotech_babylon-5.5.3/Babylon/commands/namespace/use.py +21 -0
  42. cosmotech_babylon-5.5.3/Babylon/commands/plugin/__init__.py +25 -0
  43. cosmotech_babylon-5.5.3/Babylon/commands/plugin/activate.py +24 -0
  44. cosmotech_babylon-5.5.3/Babylon/commands/plugin/add.py +27 -0
  45. cosmotech_babylon-5.5.3/Babylon/commands/plugin/deactivate.py +24 -0
  46. cosmotech_babylon-5.5.3/Babylon/commands/plugin/remove.py +24 -0
  47. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/__init__.py +37 -0
  48. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/dataset/__init__.py +33 -0
  49. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/dataset/delete.py +38 -0
  50. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/dataset/get.py +33 -0
  51. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/dataset/get_all.py +25 -0
  52. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/dataset/parameters/__init__.py +19 -0
  53. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/dataset/parameters/get.py +34 -0
  54. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/dataset/parameters/update.py +41 -0
  55. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/dataset/services/__init__.py +0 -0
  56. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/dataset/services/powerbi_api_svc.py +114 -0
  57. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/dataset/services/powerbi_params_svc.py +32 -0
  58. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/dataset/services/powerbi_users_svc.py +25 -0
  59. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/dataset/take_over.py +32 -0
  60. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/dataset/update_credentials.py +52 -0
  61. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/dataset/users/__init__.py +15 -0
  62. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/dataset/users/add.py +36 -0
  63. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/report/__init__.py +21 -0
  64. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/report/delete.py +38 -0
  65. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/report/download.py +42 -0
  66. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/report/download_all.py +37 -0
  67. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/report/get.py +39 -0
  68. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/report/get_all.py +27 -0
  69. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/report/pages.py +45 -0
  70. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/report/service/__init__.py +0 -0
  71. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/report/service/powerbi_report_api_svc.py +154 -0
  72. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/report/upload.py +67 -0
  73. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/resume.py +33 -0
  74. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/suspend.py +33 -0
  75. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/workspace/__init__.py +33 -0
  76. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/workspace/create.py +26 -0
  77. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/workspace/delete.py +32 -0
  78. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/workspace/get.py +37 -0
  79. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/workspace/get_all.py +23 -0
  80. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/workspace/get_current.py +31 -0
  81. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/workspace/services/__init__.py +0 -0
  82. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/workspace/services/powerb__worskapce_users_svc.py +67 -0
  83. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/workspace/services/powerbi_workspace_api_svc.py +85 -0
  84. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/workspace/user/__init__.py +23 -0
  85. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/workspace/user/add.py +44 -0
  86. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/workspace/user/delete.py +36 -0
  87. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/workspace/user/get_all.py +29 -0
  88. cosmotech_babylon-5.5.3/Babylon/commands/powerbi/workspace/user/update.py +45 -0
  89. cosmotech_babylon-5.5.3/Babylon/commands/superset/__init__.py +12 -0
  90. cosmotech_babylon-5.5.3/Babylon/commands/superset/delete_assets.py +56 -0
  91. cosmotech_babylon-5.5.3/Babylon/main.py +145 -0
  92. cosmotech_babylon-5.5.3/Babylon/templates/config/api.yaml +12 -0
  93. cosmotech_babylon-5.5.3/Babylon/templates/config/babylon.yaml +2 -0
  94. cosmotech_babylon-5.5.3/Babylon/templates/config/github.yaml +5 -0
  95. cosmotech_babylon-5.5.3/Babylon/templates/config/platform.yaml +3 -0
  96. cosmotech_babylon-5.5.3/Babylon/templates/config/powerbi.yaml +6 -0
  97. cosmotech_babylon-5.5.3/Babylon/templates/plugin/__init__.py +17 -0
  98. cosmotech_babylon-5.5.3/Babylon/templates/plugin/plugin_config.yaml +1 -0
  99. cosmotech_babylon-5.5.3/Babylon/templates/plugin/requirements.txt +1 -0
  100. cosmotech_babylon-5.5.3/Babylon/templates/plugin_template/plugin_config.yaml +1 -0
  101. cosmotech_babylon-5.5.3/Babylon/templates/plugin_template/requirements.txt +1 -0
  102. cosmotech_babylon-5.5.3/Babylon/templates/working_dir/.templates/api/dataset.storage.yaml +14 -0
  103. cosmotech_babylon-5.5.3/Babylon/templates/working_dir/.templates/api/organization.yaml +6 -0
  104. cosmotech_babylon-5.5.3/Babylon/templates/working_dir/.templates/api/solution.yaml +11 -0
  105. cosmotech_babylon-5.5.3/Babylon/templates/working_dir/.templates/api/workspace.yaml +38 -0
  106. cosmotech_babylon-5.5.3/Babylon/templates/working_dir/.templates/arm/azf_deploy.json +231 -0
  107. cosmotech_babylon-5.5.3/Babylon/templates/working_dir/.templates/arm/eventhub_deploy.json +180 -0
  108. cosmotech_babylon-5.5.3/Babylon/templates/working_dir/.templates/postgres/scripts/01_create_test_table.sql +8 -0
  109. cosmotech_babylon-5.5.3/Babylon/templates/working_dir/.templates/postgres/scripts/02_seed_test_data.sql +9 -0
  110. cosmotech_babylon-5.5.3/Babylon/templates/working_dir/.templates/tfc/workspace_create.json +16 -0
  111. cosmotech_babylon-5.5.3/Babylon/templates/working_dir/.templates/tfc/workspace_run.json +17 -0
  112. cosmotech_babylon-5.5.3/Babylon/templates/working_dir/.templates/yaml/Build.yaml +13 -0
  113. cosmotech_babylon-5.5.3/Babylon/templates/working_dir/.templates/yaml/Organization.yaml +8 -0
  114. cosmotech_babylon-5.5.3/Babylon/templates/working_dir/.templates/yaml/Solution.yaml +664 -0
  115. cosmotech_babylon-5.5.3/Babylon/templates/working_dir/.templates/yaml/Workspace_powerbi.yaml +296 -0
  116. cosmotech_babylon-5.5.3/Babylon/templates/working_dir/.templates/yaml/Workspace_superset.yaml +269 -0
  117. cosmotech_babylon-5.5.3/Babylon/templates/working_dir/.templates/yaml/azure/Webapp.yaml +15 -0
  118. cosmotech_babylon-5.5.3/Babylon/templates/working_dir/.templates/yaml/azure/variables.yaml +73 -0
  119. cosmotech_babylon-5.5.3/Babylon/templates/working_dir/.templates/yaml/k8s_job.yaml +49 -0
  120. cosmotech_babylon-5.5.3/Babylon/templates/working_dir/.templates/yaml/k8s_job_destroy.yaml +39 -0
  121. cosmotech_babylon-5.5.3/Babylon/templates/working_dir/.templates/yaml/k8s_job_scripts.yaml +46 -0
  122. cosmotech_babylon-5.5.3/Babylon/templates/working_dir/.templates/yaml/kob/Webapp.yaml +15 -0
  123. cosmotech_babylon-5.5.3/Babylon/templates/working_dir/.templates/yaml/kob/variables.yaml +72 -0
  124. cosmotech_babylon-5.5.3/Babylon/utils/__init__.py +6 -0
  125. cosmotech_babylon-5.5.3/Babylon/utils/checkers.py +65 -0
  126. cosmotech_babylon-5.5.3/Babylon/utils/command_helper.py +25 -0
  127. cosmotech_babylon-5.5.3/Babylon/utils/credentials.py +209 -0
  128. cosmotech_babylon-5.5.3/Babylon/utils/decorators.py +255 -0
  129. cosmotech_babylon-5.5.3/Babylon/utils/dry_run.py +43 -0
  130. cosmotech_babylon-5.5.3/Babylon/utils/environment.py +397 -0
  131. cosmotech_babylon-5.5.3/Babylon/utils/interactive.py +117 -0
  132. cosmotech_babylon-5.5.3/Babylon/utils/kubernetes_state.py +152 -0
  133. cosmotech_babylon-5.5.3/Babylon/utils/messages.py +22 -0
  134. cosmotech_babylon-5.5.3/Babylon/utils/request.py +59 -0
  135. cosmotech_babylon-5.5.3/Babylon/utils/response.py +138 -0
  136. cosmotech_babylon-5.5.3/Babylon/utils/string.py +43 -0
  137. cosmotech_babylon-5.5.3/Babylon/utils/typing.py +33 -0
  138. cosmotech_babylon-5.5.3/Babylon/utils/working_dir.py +55 -0
  139. cosmotech_babylon-5.5.3/Babylon/utils/yaml_utils.py +11 -0
  140. cosmotech_babylon-5.5.3/Babylon/version.py +5 -0
  141. cosmotech_babylon-5.5.3/LICENCE.md +9 -0
  142. cosmotech_babylon-5.5.3/MANIFEST.in +1 -0
  143. cosmotech_babylon-5.5.3/PKG-INFO +261 -0
  144. cosmotech_babylon-5.5.3/README.md +232 -0
  145. cosmotech_babylon-5.5.3/docs/assets/img/Babylon-logo.png +0 -0
  146. cosmotech_babylon-5.5.3/docs/assets/img/babylon-demo.gif +0 -0
  147. cosmotech_babylon-5.5.3/docs/assets/img/logo.png +0 -0
  148. cosmotech_babylon-5.5.3/docs/concepts/contribute.md +119 -0
  149. cosmotech_babylon-5.5.3/docs/concepts/environment.md +8 -0
  150. cosmotech_babylon-5.5.3/docs/getting_started/installation.md +19 -0
  151. cosmotech_babylon-5.5.3/docs/index.md +7 -0
  152. cosmotech_babylon-5.5.3/docs/references/cli.md +8 -0
  153. cosmotech_babylon-5.5.3/docs/references/decorators.md +9 -0
  154. cosmotech_babylon-5.5.3/mkdocs.yml +77 -0
  155. cosmotech_babylon-5.5.3/overrides/partials/copyright.html +11 -0
  156. cosmotech_babylon-5.5.3/plugins/dev_tools/__init__.py +47 -0
  157. cosmotech_babylon-5.5.3/plugins/dev_tools/initialize_plugin.py +61 -0
  158. cosmotech_babylon-5.5.3/plugins/dev_tools/plugin_config.yaml +1 -0
  159. cosmotech_babylon-5.5.3/plugins/dev_tools/requirements.txt +2 -0
  160. cosmotech_babylon-5.5.3/plugins/dev_tools/tests/__init__.py +15 -0
  161. cosmotech_babylon-5.5.3/plugins/dev_tools/tests/how_to.py +24 -0
  162. cosmotech_babylon-5.5.3/pyproject.toml +79 -0
  163. cosmotech_babylon-5.5.3/scripts/generate_index.py +11 -0
  164. cosmotech_babylon-5.5.3/scripts/index.template.md +23 -0
  165. cosmotech_babylon-5.5.3/sonar-project.properties +9 -0
  166. cosmotech_babylon-5.5.3/tests/e2e/test_e2e.sh +24 -0
  167. cosmotech_babylon-5.5.3/tests/integration/data/dataset.yaml +20 -0
  168. cosmotech_babylon-5.5.3/tests/integration/data/dataset_part.yaml +2 -0
  169. cosmotech_babylon-5.5.3/tests/integration/data/dataset_part_db.yaml +3 -0
  170. cosmotech_babylon-5.5.3/tests/integration/data/organization.yaml +11 -0
  171. cosmotech_babylon-5.5.3/tests/integration/data/runner.yaml +15 -0
  172. cosmotech_babylon-5.5.3/tests/integration/data/solution.yaml +19 -0
  173. cosmotech_babylon-5.5.3/tests/integration/data/update_workspace.yaml +2 -0
  174. cosmotech_babylon-5.5.3/tests/integration/data/workspace.yaml +13 -0
  175. cosmotech_babylon-5.5.3/tests/integration/datasetfile.csv +0 -0
  176. cosmotech_babylon-5.5.3/tests/integration/datasetfile2.csv +0 -0
  177. cosmotech_babylon-5.5.3/tests/integration/example.csv +5 -0
  178. cosmotech_babylon-5.5.3/tests/integration/test_api_endpoints.sh +119 -0
  179. cosmotech_babylon-5.5.3/tests/unit/test_destroy_powerbi.py +152 -0
  180. cosmotech_babylon-5.5.3/tests/unit/test_macro.py +115 -0
  181. cosmotech_babylon-5.5.3/tests/unit/test_powerbi_reports.py +229 -0
  182. cosmotech_babylon-5.5.3/uv.lock +1991 -0
@@ -0,0 +1,9 @@
1
+ [run]
2
+ omit =
3
+ Babylon/utils/command_helper.py
4
+ Babylon/utils/dry_run.py
5
+ Babylon/utils/help.py
6
+ Babylon/utils/logging.py
7
+ Babylon/utils/typing.py
8
+
9
+ source = Babylon/utils
@@ -0,0 +1,15 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "pip" # See documentation for possible values
9
+ directory: "/" # Location of package manifests
10
+ schedule:
11
+ interval: "daily"
12
+ - package-ecosystem: "github-actions"
13
+ directory: "/" # Location of GitHub Actions workflow files
14
+ schedule:
15
+ interval: "weekly"
@@ -0,0 +1,83 @@
1
+ name: Continuous Integration
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches:
7
+ - "main"
8
+ pull_request:
9
+ branches:
10
+ - "main"
11
+
12
+ permissions:
13
+ id-token: write
14
+ contents: read
15
+ jobs:
16
+ code-quality:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+
20
+ - uses: actions/checkout@v7
21
+ - uses: astral-sh/ruff-action@v4.1.0
22
+ - run: ruff check --output-format=github
23
+ - run: ruff format --check
24
+ unit-tests:
25
+ needs: code-quality
26
+ runs-on: ubuntu-latest
27
+ steps:
28
+ - uses: actions/checkout@v7
29
+ - uses: astral-sh/setup-uv@v7
30
+ with:
31
+ enable-cache: true
32
+ - name: Run unit tests
33
+ run: |
34
+ uv run --group dev pytest
35
+ integration-and-end2end-tests:
36
+ strategy:
37
+ matrix:
38
+ os: [ubuntu-latest, windows-latest]
39
+ defaults:
40
+ run:
41
+ shell: bash
42
+
43
+ needs: unit-tests
44
+ runs-on: ${{ matrix.os }}
45
+ env:
46
+ PYTHONUTF8: 1
47
+ PYTHONIOENCODING: utf-8
48
+ steps:
49
+ - uses: actions/checkout@v7
50
+ - uses: astral-sh/setup-uv@v7
51
+ with:
52
+ enable-cache: true
53
+
54
+ - name: Azure login
55
+ uses: azure/login@v3
56
+ with:
57
+ client-id: ${{ secrets.AZURE_CLIENT_ID }}
58
+ tenant-id: ${{ secrets.AZURE_TENANT_ID }}
59
+ subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
60
+
61
+ - name: Azure AKS set context
62
+ uses: azure/aks-set-context@v4
63
+ with:
64
+ cluster-name: "${{ vars.CLUSTER_NAME }}"
65
+ resource-group: "${{ vars.CLUSTER_RESOURCE_GROUP }}"
66
+
67
+ - name: Install
68
+ run: |
69
+ uv venv
70
+ uv pip install .
71
+ shell: bash
72
+
73
+ - name: Run integration tests
74
+ working-directory: tests/integration/
75
+ run: ./test_api_endpoints.sh
76
+ shell: bash
77
+
78
+ - name: End-to-end tests
79
+ working-directory: tests/e2e/
80
+ env:
81
+ CONTEXT: ${{ matrix.os }}
82
+ run: ./test_e2e.sh
83
+ shell: bash
@@ -0,0 +1,35 @@
1
+ name: generate_github_page
2
+ on:
3
+ push:
4
+ branches:
5
+ - "main"
6
+ jobs:
7
+ deploy:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: actions/checkout@v7
11
+ with:
12
+ fetch-depth: 0
13
+ - uses: actions/setup-python@v7
14
+ - name: Install uv
15
+ uses: astral-sh/setup-uv@v7
16
+ with:
17
+ enable-cache: true
18
+ - run: |
19
+ uv venv
20
+ . .venv/bin/activate
21
+ uv pip install . --group doc
22
+
23
+ - name: Extract version
24
+ id: version
25
+ run: |
26
+ . .venv/bin/activate
27
+ echo "version=$(babylon --version)" >> $GITHUB_OUTPUT
28
+
29
+ - name: Configure Git user
30
+ run: |
31
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
32
+ git config --local user.name "github-actions[bot]"
33
+ - run: |
34
+ . .venv/bin/activate
35
+ mike deploy --push ${{ steps.version.outputs.version }}
@@ -0,0 +1,81 @@
1
+ name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ build:
9
+ name: Build distribution 📦
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: read
13
+
14
+ steps:
15
+ - uses: actions/checkout@v6
16
+ with:
17
+ persist-credentials: false
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v6
20
+ with:
21
+ python-version: "3.12"
22
+ - name: Install pypa/build
23
+ run: >-
24
+ python3 -m
25
+ pip install
26
+ build
27
+ --user
28
+ - name: Build a binary wheel and a source tarball
29
+ run: python3 -m build
30
+ - name: Store the distribution packages
31
+ uses: actions/upload-artifact@v5
32
+ with:
33
+ name: python-package-distributions
34
+ path: dist/
35
+
36
+ publish-to-pypi:
37
+ if: ${{ !github.event.release.prerelease }}
38
+ name: >-
39
+ Publish Python 🐍 distribution 📦 to PyPI
40
+ needs:
41
+ - build
42
+ runs-on: ubuntu-latest
43
+ environment:
44
+ name: pypi
45
+ url: https://pypi.org/p/cosmotech-babylon
46
+ permissions:
47
+ id-token: write # IMPORTANT: mandatory for trusted publishing
48
+
49
+ steps:
50
+ - name: Download all the dists
51
+ uses: actions/download-artifact@v6
52
+ with:
53
+ name: python-package-distributions
54
+ path: dist/
55
+ - name: Publish distribution 📦 to PyPI
56
+ uses: pypa/gh-action-pypi-publish@release/v1
57
+
58
+ publish-to-testpypi:
59
+ if: ${{ github.event.release.prerelease }}
60
+ name: Publish Python 🐍 distribution 📦 to TestPyPI
61
+ needs:
62
+ - build
63
+ runs-on: ubuntu-latest
64
+
65
+ environment:
66
+ name: testpypi
67
+ url: https://test.pypi.org/p/cosmotech-babylon
68
+
69
+ permissions:
70
+ id-token: write # IMPORTANT: mandatory for trusted publishing
71
+
72
+ steps:
73
+ - name: Download all the dists
74
+ uses: actions/download-artifact@v6
75
+ with:
76
+ name: python-package-distributions
77
+ path: dist/
78
+ - name: Publish distribution 📦 to TestPyPI
79
+ uses: pypa/gh-action-pypi-publish@release/v1
80
+ with:
81
+ repository-url: https://test.pypi.org/legacy/
@@ -0,0 +1,25 @@
1
+ name: SonarQube analysis
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ push:
7
+ branches:
8
+ - main
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ jobs:
14
+ sonarqube:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@v7
18
+ with:
19
+ fetch-depth: 0 # Disable shallow clone to improve the analysis results
20
+
21
+ - name: SonarQube Scan
22
+ uses: SonarSource/sonarqube-scan-action@v8
23
+ env:
24
+ SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
25
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
@@ -0,0 +1,32 @@
1
+ name: tag_latest_release_gh_page
2
+ on:
3
+ release:
4
+ types: [ released ]
5
+ jobs:
6
+ deploy_tag:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v7
10
+ with:
11
+ fetch-depth: 0
12
+ - uses: actions/setup-python@v7
13
+ - name: Install uv
14
+ uses: astral-sh/setup-uv@v7
15
+ with:
16
+ enable-cache: true
17
+ - run: |
18
+ uv venv
19
+ . .venv/bin/activate
20
+ uv pip install . --group doc
21
+ - name: Extract version
22
+ id: version
23
+ run: |
24
+ . .venv/bin/activate
25
+ echo "version=$(babylon --version)" >> $GITHUB_OUTPUT
26
+ - name: Configure Git user
27
+ run: |
28
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
29
+ git config --local user.name "github-actions[bot]"
30
+ - run: |
31
+ . .venv/bin/activate
32
+ mike deploy --push --update-aliases ${{ steps.version.outputs.version }} latest
@@ -0,0 +1,30 @@
1
+ name: Track Dependencies
2
+ permissions:
3
+ contents: read
4
+
5
+ on:
6
+ push:
7
+ branches:
8
+ - main
9
+
10
+ jobs:
11
+ generate-sbom:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v7
15
+ - uses: actions/setup-python@v7
16
+
17
+ - name: Install uv
18
+ uses: astral-sh/setup-uv@v7
19
+ with:
20
+ enable-cache: true
21
+
22
+ - run: uv export --format=cyclonedx1.5 --output-file=sbom.json -q
23
+ - name: Upload cyclonedx bom to dependency
24
+ uses: DependencyTrack/gh-upload-sbom@v4
25
+ with:
26
+ serverhostname: ${{ secrets.DEPENDENCY_TRACK_SERVER_HOSTNAME }}
27
+ apikey: ${{ secrets.DEPENDENCY_TRACK_API_KEY }}
28
+ project: 'b79e84bb-f445-4b32-a56c-5c82c0064aff'
29
+ bomfilename: 'sbom.json'
30
+
@@ -0,0 +1,19 @@
1
+ .env
2
+ .idea/
3
+ tmp/
4
+ **/__pycache__/
5
+ **.egg-info/
6
+ **venv**/
7
+ **vscode**/
8
+ site/
9
+ build/
10
+ Test**/
11
+ .pytest_*/
12
+ .envrc
13
+ .coverage
14
+ poetry.lock
15
+ typings/
16
+ .config/
17
+ babylon.log
18
+ babylon.error
19
+ ***/__pycache__/
@@ -0,0 +1 @@
1
+ #!/usr/bin/env python3
@@ -0,0 +1,8 @@
1
+ from .api import api
2
+ from .macro.apply import apply
3
+ from .macro.destroy import destroy
4
+ from .macro.init import init
5
+ from .namespace import namespace
6
+ from .superset import superset
7
+
8
+ list_groups = [api, namespace, apply, destroy, init, superset]
@@ -0,0 +1,19 @@
1
+ from click import group
2
+
3
+ from .dataset import datasets
4
+ from .meta import about
5
+ from .organization import organizations
6
+ from .run import runs
7
+ from .runner import runners
8
+ from .solution import solutions
9
+ from .workspace import workspaces
10
+
11
+
12
+ @group()
13
+ def api():
14
+ """Cosmotech API"""
15
+ pass
16
+
17
+
18
+ for _command in [organizations, solutions, workspaces, datasets, runners, runs, about]:
19
+ api.add_command(_command)