datajunction 0.0.209__tar.gz → 0.0.211__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.
- {datajunction-0.0.209 → datajunction-0.0.211}/.pre-commit-config.yaml +12 -22
- {datajunction-0.0.209 → datajunction-0.0.211}/PKG-INFO +3 -3
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/__about__.py +1 -1
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/_base.py +34 -17
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/_internal.py +30 -30
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/admin.py +2 -3
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/builder.py +45 -46
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/cli.py +25 -25
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/client.py +65 -64
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/deployment.py +3 -3
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/exceptions.py +1 -3
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/mcp/config.py +1 -2
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/models.py +65 -63
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/nodes.py +42 -42
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/tags.py +3 -4
- {datajunction-0.0.209 → datajunction-0.0.211}/pyproject.toml +2 -2
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/conftest.py +15 -12
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples.py +1 -3
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/test_base.py +8 -9
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/test_builder.py +9 -10
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/test_cli.py +7 -5
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/test_client.py +91 -95
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/test_integration.py +5 -7
- {datajunction-0.0.209 → datajunction-0.0.211}/.coveragerc +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/.gitignore +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/LICENSE.txt +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/Makefile +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/README.md +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/claude_desktop_config.example.json +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/__init__.py +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/compile.py +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/mcp/__init__.py +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/mcp/cli.py +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/rendering.py +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/init_system_nodes.py +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/date.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/deployment.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/dimension_link.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/distinct_node_authors.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/distinct_node_editors.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/dj.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/is_active.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/materialization.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/median_deployment_duration_seconds.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/median_dim_links_per_node.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/median_dimension_indegree.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/median_downstream_count.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/median_revisions_per_node.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/median_upstream_count.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/namespace.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/node_revision.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/node_type.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/nodes.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/number_of_branches.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/number_of_deployments.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/number_of_materializations.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/number_of_namespaces.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/number_of_nodes.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/number_of_orphan_nodes.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/number_of_unused_dimensions.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/repo.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/seed/nodes/user.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/skills/datajunction/SKILL.md +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/skills/datajunction-api/SKILL.md +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/skills/datajunction-query/SKILL.md +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/skills/datajunction-repo/SKILL.md +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/datajunction/skills/datajunction-semantic-model/SKILL.md +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/setup.cfg +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/__init__.py +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/deploy0/dj.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/deploy0/roads/companies.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/deploy0/roads/companies_dim.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/deploy0/roads/contractor.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/deploy0/roads/contractors.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/deploy0/roads/us_state.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/deploy0/roads/us_states.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/dj.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/avg_length_of_employment.metric.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/avg_repair_price.metric.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/avg_time_to_dispatch.metric.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/contractor.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/contractors.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/date.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/date_dim.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/dispatcher.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/dispatchers.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/hard_hat.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/hard_hat_state.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/hard_hats.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/local_hard_hats.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/municipality.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/municipality_dim.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/municipality_municipality_type.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/municipality_type.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/national_level_agg.transform.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/num_repair_orders.metric.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/regional_level_agg.transform.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/regional_repair_efficiency.metric.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/repair_order.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/repair_order_details.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/repair_order_transform.transform.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/repair_orders.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/repair_orders_cube.cube.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/repair_type.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/total_repair_cost.metric.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/total_repair_order_discounts.metric.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/us_region.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/us_state.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project1/roads/us_states.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project10/dj.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/avg_length_of_employment.metric.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/avg_repair_price.metric.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/avg_time_to_dispatch.metric.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/contractor.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/contractors.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/date.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/date_dim.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/dispatcher.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/dispatchers.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/dj.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/hard_hat.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/hard_hat_state.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/hard_hats.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/local_hard_hats.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/municipality.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/municipality_dim.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/municipality_municipality_type.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/municipality_type.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/national_level_agg.transform.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/num_repair_orders.metric.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/regional_level_agg.transform.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/regional_repair_efficiency.metric.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/repair_order.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/repair_order_details.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/repair_order_transform.transform.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/repair_orders.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/repair_orders_cube.cube.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/repair_type.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/total_repair_cost.metric.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/total_repair_order_discounts.metric.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/us_region.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/us_state.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project11/us_states.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project12/dj.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project12/roads/companies.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project12/roads/companies_dim.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project12/roads/contractor.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project12/roads/contractors.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project12/roads/us_state.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project12/roads/us_states.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project2/dj.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project2/some_node.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project3/dj.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project3/some_node.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project4/dj.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project4/very/very/deeply/nested/namespace/some_node.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project5/dj.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project5/some_node.a.b.c.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project6/dj.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project6/roads/contractor.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project6/roads/contractors.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project7/dj.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project7/roads/contractor.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project7/roads/contractors.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project8/dj.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project9/dj.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project9/roads/companies.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project9/roads/companies_dim.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project9/roads/contractor.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project9/roads/contractors.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project9/roads/us_state.dimension.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/examples/project9/roads/us_states.source.yaml +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/mcp/README.md +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/mcp/__init__.py +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/mcp/test_cli.py +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/test__internal.py +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/test_admin.py +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/test_compile.py +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/test_deploy.py +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/test_generated_client.py +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/test_models.py +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/test_plugin_mirror.py +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tests/test_skills.py +0 -0
- {datajunction-0.0.209 → datajunction-0.0.211}/tox.ini +0 -0
|
@@ -3,29 +3,27 @@ exclude: ^datajunction-clients/python/dj.project.schema.json
|
|
|
3
3
|
|
|
4
4
|
repos:
|
|
5
5
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
6
|
-
rev:
|
|
6
|
+
rev: v6.0.0
|
|
7
7
|
hooks:
|
|
8
8
|
- id: trailing-whitespace
|
|
9
9
|
- id: check-ast
|
|
10
|
-
exclude:
|
|
10
|
+
exclude: templates/
|
|
11
11
|
- id: check-merge-conflict
|
|
12
12
|
- id: debug-statements
|
|
13
|
-
exclude:
|
|
14
|
-
- id: requirements-txt-fixer
|
|
15
|
-
exclude: ^templates/
|
|
13
|
+
exclude: templates/
|
|
16
14
|
|
|
17
15
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
18
|
-
rev: v0.
|
|
16
|
+
rev: v0.15.22
|
|
19
17
|
hooks:
|
|
20
|
-
- id: ruff
|
|
18
|
+
- id: ruff-check
|
|
21
19
|
args: [ --fix ]
|
|
22
20
|
- id: ruff-format
|
|
23
21
|
|
|
24
22
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
25
|
-
rev: '
|
|
23
|
+
rev: 'v2.3.0' # Use the sha / tag you want to point at
|
|
26
24
|
hooks:
|
|
27
25
|
- id: mypy
|
|
28
|
-
exclude:
|
|
26
|
+
exclude: templates/
|
|
29
27
|
additional_dependencies:
|
|
30
28
|
- types-requests
|
|
31
29
|
- types-freezegun
|
|
@@ -35,20 +33,12 @@ repos:
|
|
|
35
33
|
- types-tabulate
|
|
36
34
|
|
|
37
35
|
- repo: https://github.com/asottile/add-trailing-comma
|
|
38
|
-
rev:
|
|
36
|
+
rev: v4.0.0
|
|
39
37
|
hooks:
|
|
40
38
|
- id: add-trailing-comma
|
|
41
39
|
|
|
42
|
-
- repo: https://github.com/
|
|
43
|
-
rev:
|
|
40
|
+
- repo: https://github.com/asottile/pyupgrade
|
|
41
|
+
rev: v3.21.2
|
|
44
42
|
hooks:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
rev: "0.7"
|
|
48
|
-
hooks:
|
|
49
|
-
- id: black-nb
|
|
50
|
-
files: '\.ipynb$'
|
|
51
|
-
- repo: https://github.com/pdm-project/pdm
|
|
52
|
-
rev: 2.6.1
|
|
53
|
-
hooks:
|
|
54
|
-
- id: pdm-lock-check
|
|
43
|
+
- id: pyupgrade
|
|
44
|
+
args: [--py311-plus]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: datajunction
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.211
|
|
4
4
|
Summary: DataJunction client library for connecting to a DataJunction server
|
|
5
5
|
Project-URL: repository, https://github.com/DataJunction/dj
|
|
6
6
|
Author-email: DataJunction Authors <yian.shang@gmail.com>
|
|
@@ -8,10 +8,10 @@ License: MIT
|
|
|
8
8
|
License-File: LICENSE.txt
|
|
9
9
|
Classifier: License :: OSI Approved :: MIT License
|
|
10
10
|
Classifier: Operating System :: OS Independent
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
12
11
|
Classifier: Programming Language :: Python :: 3.11
|
|
13
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
-
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Requires-Python: <4.0,>=3.11
|
|
15
15
|
Requires-Dist: alive-progress>=3.1.2
|
|
16
16
|
Requires-Dist: httpx>=0.27.0
|
|
17
17
|
Requires-Dist: pandas>=2.0.2
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
"""Base client dataclasses."""
|
|
2
2
|
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import sys
|
|
3
6
|
from dataclasses import MISSING, fields, is_dataclass
|
|
4
7
|
from types import UnionType
|
|
5
8
|
from typing import (
|
|
6
9
|
TYPE_CHECKING,
|
|
7
10
|
Any,
|
|
8
|
-
|
|
9
|
-
Optional,
|
|
10
|
-
Type,
|
|
11
|
+
Self,
|
|
11
12
|
TypeVar,
|
|
12
13
|
Union,
|
|
14
|
+
cast,
|
|
13
15
|
get_args,
|
|
14
16
|
get_origin,
|
|
15
17
|
)
|
|
@@ -28,22 +30,25 @@ class SerializableMixin: # pylint: disable=too-few-public-methods
|
|
|
28
30
|
|
|
29
31
|
@staticmethod
|
|
30
32
|
def _serialize_nested(
|
|
31
|
-
field_type:
|
|
33
|
+
field_type: type,
|
|
32
34
|
field_value: Any,
|
|
33
|
-
dj_client:
|
|
35
|
+
dj_client: DJClient | None,
|
|
34
36
|
):
|
|
35
37
|
"""
|
|
36
38
|
Handle nested field serialization
|
|
37
39
|
"""
|
|
38
40
|
if is_dataclass(field_type) and isinstance(field_value, dict):
|
|
39
|
-
return field_type.from_dict(
|
|
41
|
+
return cast(type[SerializableMixin], field_type).from_dict(
|
|
42
|
+
dj_client,
|
|
43
|
+
field_value,
|
|
44
|
+
)
|
|
40
45
|
return field_value
|
|
41
46
|
|
|
42
47
|
@staticmethod
|
|
43
48
|
def _serialize_list(
|
|
44
|
-
field_type:
|
|
49
|
+
field_type: type,
|
|
45
50
|
field_value: Any,
|
|
46
|
-
dj_client:
|
|
51
|
+
dj_client: DJClient | None,
|
|
47
52
|
):
|
|
48
53
|
"""
|
|
49
54
|
Handle serialization of lists of both primitive and dataclass object types
|
|
@@ -74,10 +79,10 @@ class SerializableMixin: # pylint: disable=too-few-public-methods
|
|
|
74
79
|
|
|
75
80
|
@classmethod
|
|
76
81
|
def from_dict(
|
|
77
|
-
cls
|
|
78
|
-
dj_client:
|
|
79
|
-
data:
|
|
80
|
-
) ->
|
|
82
|
+
cls,
|
|
83
|
+
dj_client: DJClient | None,
|
|
84
|
+
data: dict[str, Any],
|
|
85
|
+
) -> Self:
|
|
81
86
|
"""
|
|
82
87
|
Create an instance of the given dataclass `cls` from a dictionary `data`.
|
|
83
88
|
This will handle nested dataclasses and optional types.
|
|
@@ -90,14 +95,26 @@ class SerializableMixin: # pylint: disable=too-few-public-methods
|
|
|
90
95
|
if field.name == "dj_client":
|
|
91
96
|
continue
|
|
92
97
|
|
|
93
|
-
#
|
|
98
|
+
# `from __future__ import annotations` makes `field.type` a string;
|
|
99
|
+
# evaluate it in the defining module's namespace to get the real
|
|
100
|
+
# type. Forward refs only importable under TYPE_CHECKING (e.g. a
|
|
101
|
+
# "DJBuilder" used solely for static typing) can't be resolved
|
|
102
|
+
# here, so fall back to the raw string and skip nested conversion.
|
|
94
103
|
field_type = field.type
|
|
104
|
+
if isinstance(field_type, str):
|
|
105
|
+
try:
|
|
106
|
+
field_type = eval( # pylint: disable=eval-used
|
|
107
|
+
field_type,
|
|
108
|
+
vars(sys.modules[cls.__module__]),
|
|
109
|
+
None,
|
|
110
|
+
)
|
|
111
|
+
except NameError: # pragma: no cover
|
|
112
|
+
pass
|
|
113
|
+
|
|
95
114
|
origin = get_origin(field_type)
|
|
96
115
|
if origin in (Union, UnionType):
|
|
97
116
|
field_type = next( # pragma: no cover
|
|
98
|
-
typ
|
|
99
|
-
for typ in get_args(field_type)
|
|
100
|
-
if typ is not type(None) # noqa
|
|
117
|
+
typ for typ in get_args(field_type) if typ is not type(None)
|
|
101
118
|
)
|
|
102
119
|
|
|
103
120
|
# Serialize field value
|
|
@@ -118,6 +135,6 @@ class SerializableMixin: # pylint: disable=too-few-public-methods
|
|
|
118
135
|
field.name not in field_values or field_values[field.name] is None
|
|
119
136
|
) and field.default is not MISSING:
|
|
120
137
|
field_values[field.name] = field.default
|
|
121
|
-
if is_dataclass(cls) and "dj_client" in cls.__dataclass_fields__
|
|
138
|
+
if is_dataclass(cls) and "dj_client" in cls.__dataclass_fields__: # type: ignore
|
|
122
139
|
return cls(dj_client=dj_client, **field_values) # type: ignore
|
|
123
140
|
return cls(**field_values)
|
|
@@ -5,7 +5,7 @@ import logging
|
|
|
5
5
|
import os
|
|
6
6
|
import platform
|
|
7
7
|
from dataclasses import asdict, dataclass
|
|
8
|
-
from typing import TYPE_CHECKING, Any,
|
|
8
|
+
from typing import TYPE_CHECKING, Any, TypedDict, Union
|
|
9
9
|
from urllib.parse import urljoin
|
|
10
10
|
|
|
11
11
|
import pandas as pd
|
|
@@ -49,8 +49,8 @@ class Results(TypedDict):
|
|
|
49
49
|
Results in a completed DJ Query
|
|
50
50
|
"""
|
|
51
51
|
|
|
52
|
-
columns:
|
|
53
|
-
data:
|
|
52
|
+
columns: tuple[str]
|
|
53
|
+
data: tuple[tuple]
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
class RequestsSessionWithEndpoint(requests.Session): # pragma: no cover
|
|
@@ -59,7 +59,7 @@ class RequestsSessionWithEndpoint(requests.Session): # pragma: no cover
|
|
|
59
59
|
subsequent requests will use as a prefix.
|
|
60
60
|
"""
|
|
61
61
|
|
|
62
|
-
def __init__(self, endpoint: str = None, show_traceback: bool = False):
|
|
62
|
+
def __init__(self, endpoint: str | None = None, show_traceback: bool = False):
|
|
63
63
|
super().__init__()
|
|
64
64
|
self.endpoint = endpoint
|
|
65
65
|
self.mount("http://", HTTPAdapter())
|
|
@@ -137,9 +137,9 @@ class DJClient:
|
|
|
137
137
|
def __init__( # pylint: disable=too-many-arguments
|
|
138
138
|
self,
|
|
139
139
|
uri: str = "http://localhost:8000",
|
|
140
|
-
engine_name: str = None,
|
|
141
|
-
engine_version: str = None,
|
|
142
|
-
requests_session: RequestsSessionWithEndpoint = None,
|
|
140
|
+
engine_name: str | None = None,
|
|
141
|
+
engine_version: str | None = None,
|
|
142
|
+
requests_session: RequestsSessionWithEndpoint | None = None,
|
|
143
143
|
target_namespace: str = DEFAULT_NAMESPACE,
|
|
144
144
|
timeout: int = 2 * 60,
|
|
145
145
|
debug: bool = False,
|
|
@@ -174,8 +174,8 @@ class DJClient:
|
|
|
174
174
|
|
|
175
175
|
def basic_login(
|
|
176
176
|
self,
|
|
177
|
-
username:
|
|
178
|
-
password:
|
|
177
|
+
username: str | None = None,
|
|
178
|
+
password: str | None = None,
|
|
179
179
|
):
|
|
180
180
|
"""
|
|
181
181
|
Login with basic authentication.
|
|
@@ -189,7 +189,7 @@ class DJClient:
|
|
|
189
189
|
)
|
|
190
190
|
return response
|
|
191
191
|
|
|
192
|
-
def deploy(self, deployment_spec:
|
|
192
|
+
def deploy(self, deployment_spec: dict[str, Any]):
|
|
193
193
|
"""
|
|
194
194
|
Deploy a deployment spec to the target namespace.
|
|
195
195
|
"""
|
|
@@ -215,7 +215,7 @@ class DJClient:
|
|
|
215
215
|
namespace: str,
|
|
216
216
|
git_branch: str | None = None,
|
|
217
217
|
parent_namespace: str | None = None,
|
|
218
|
-
) ->
|
|
218
|
+
) -> dict[str, Any]:
|
|
219
219
|
"""
|
|
220
220
|
Set git metadata (branch, parent namespace) on a namespace.
|
|
221
221
|
Creates the namespace if it does not exist yet.
|
|
@@ -232,7 +232,7 @@ class DJClient:
|
|
|
232
232
|
)
|
|
233
233
|
return response.json()
|
|
234
234
|
|
|
235
|
-
def get_deployment_impact(self, deployment_spec:
|
|
235
|
+
def get_deployment_impact(self, deployment_spec: dict[str, Any]):
|
|
236
236
|
"""
|
|
237
237
|
Get impact analysis for a deployment spec without deploying.
|
|
238
238
|
"""
|
|
@@ -244,7 +244,7 @@ class DJClient:
|
|
|
244
244
|
return response.json()
|
|
245
245
|
|
|
246
246
|
@staticmethod
|
|
247
|
-
def _primary_key_from_columns(columns) ->
|
|
247
|
+
def _primary_key_from_columns(columns) -> list[str]:
|
|
248
248
|
"""
|
|
249
249
|
Extracts the primary key from the columns
|
|
250
250
|
"""
|
|
@@ -292,7 +292,7 @@ class DJClient:
|
|
|
292
292
|
def _get_nodes_in_namespace(
|
|
293
293
|
self,
|
|
294
294
|
namespace: str,
|
|
295
|
-
type_:
|
|
295
|
+
type_: models.NodeType | None = None,
|
|
296
296
|
):
|
|
297
297
|
"""
|
|
298
298
|
Retrieves all nodes in given namespace.
|
|
@@ -308,7 +308,7 @@ class DJClient:
|
|
|
308
308
|
|
|
309
309
|
def _get_all_nodes(
|
|
310
310
|
self,
|
|
311
|
-
type_:
|
|
311
|
+
type_: models.NodeType | None = None,
|
|
312
312
|
):
|
|
313
313
|
"""
|
|
314
314
|
Retrieve all nodes of a given type.
|
|
@@ -321,8 +321,8 @@ class DJClient:
|
|
|
321
321
|
def _verify_node_exists(
|
|
322
322
|
self,
|
|
323
323
|
node_name: str,
|
|
324
|
-
type_:
|
|
325
|
-
) ->
|
|
324
|
+
type_: str | None = None,
|
|
325
|
+
) -> dict[str, Any]:
|
|
326
326
|
"""
|
|
327
327
|
Retrieves a node and verifies that it exists and has the expected node type.
|
|
328
328
|
"""
|
|
@@ -351,7 +351,7 @@ class DJClient:
|
|
|
351
351
|
def _create_node(
|
|
352
352
|
self,
|
|
353
353
|
node: "Node",
|
|
354
|
-
mode:
|
|
354
|
+
mode: models.NodeMode | None = models.NodeMode.PUBLISHED,
|
|
355
355
|
):
|
|
356
356
|
"""
|
|
357
357
|
Helper function to create a node.
|
|
@@ -439,7 +439,7 @@ class DJClient:
|
|
|
439
439
|
node_name: str,
|
|
440
440
|
column_name: str,
|
|
441
441
|
dimension_name: str,
|
|
442
|
-
dimension_column:
|
|
442
|
+
dimension_column: str | None,
|
|
443
443
|
):
|
|
444
444
|
"""
|
|
445
445
|
Helper function to link a dimension to the node.
|
|
@@ -460,7 +460,7 @@ class DJClient:
|
|
|
460
460
|
node_column: str,
|
|
461
461
|
dimension_node: str,
|
|
462
462
|
dimension_column: str,
|
|
463
|
-
role:
|
|
463
|
+
role: str | None = None,
|
|
464
464
|
):
|
|
465
465
|
"""
|
|
466
466
|
Helper function to link a dimension to the node.
|
|
@@ -481,12 +481,12 @@ class DJClient:
|
|
|
481
481
|
self,
|
|
482
482
|
node_name: str,
|
|
483
483
|
dimension_node: str,
|
|
484
|
-
join_type:
|
|
484
|
+
join_type: str | None = None,
|
|
485
485
|
*,
|
|
486
486
|
join_on: str,
|
|
487
|
-
join_cardinality:
|
|
488
|
-
role:
|
|
489
|
-
spark_hints:
|
|
487
|
+
join_cardinality: str | None = None,
|
|
488
|
+
role: str | None = None,
|
|
489
|
+
spark_hints: str | None = None,
|
|
490
490
|
):
|
|
491
491
|
"""
|
|
492
492
|
Helper function to link a complex dimension to the node.
|
|
@@ -511,7 +511,7 @@ class DJClient:
|
|
|
511
511
|
node_name: str,
|
|
512
512
|
column_name: str,
|
|
513
513
|
dimension_name: str,
|
|
514
|
-
dimension_column:
|
|
514
|
+
dimension_column: str | None = None,
|
|
515
515
|
):
|
|
516
516
|
"""
|
|
517
517
|
Helper function to un-link a dimension to the node.
|
|
@@ -527,7 +527,7 @@ class DJClient:
|
|
|
527
527
|
self,
|
|
528
528
|
node_name: str,
|
|
529
529
|
dimension_node: str,
|
|
530
|
-
role:
|
|
530
|
+
role: str | None = None,
|
|
531
531
|
):
|
|
532
532
|
"""
|
|
533
533
|
Helper function to remove a complex dimension link.
|
|
@@ -605,7 +605,7 @@ class DJClient:
|
|
|
605
605
|
self,
|
|
606
606
|
node_name,
|
|
607
607
|
column_name,
|
|
608
|
-
attributes:
|
|
608
|
+
attributes: list[models.ColumnAttribute],
|
|
609
609
|
):
|
|
610
610
|
"""
|
|
611
611
|
Sets attributes for columns on the node
|
|
@@ -669,7 +669,7 @@ class DJClient:
|
|
|
669
669
|
def _export_namespace_yaml_zip(
|
|
670
670
|
self,
|
|
671
671
|
namespace: str,
|
|
672
|
-
existing_zip_bytes:
|
|
672
|
+
existing_zip_bytes: bytes | None = None,
|
|
673
673
|
) -> bytes:
|
|
674
674
|
"""
|
|
675
675
|
Export a namespace as a ZIP of YAML files.
|
|
@@ -698,7 +698,7 @@ class DJClient:
|
|
|
698
698
|
"""
|
|
699
699
|
return self._session.patch(f"/tags/{tag_name}/", json=asdict(update_input))
|
|
700
700
|
|
|
701
|
-
def _update_node_tags(self, node_name: str, tags:
|
|
701
|
+
def _update_node_tags(self, node_name: str, tags: list[str] | None):
|
|
702
702
|
"""
|
|
703
703
|
Update tags on a node
|
|
704
704
|
"""
|
|
@@ -738,7 +738,7 @@ class DJClient:
|
|
|
738
738
|
def _list_nodes_with_tag(
|
|
739
739
|
self,
|
|
740
740
|
tag_name: str,
|
|
741
|
-
node_type:
|
|
741
|
+
node_type: models.NodeType | None = None,
|
|
742
742
|
):
|
|
743
743
|
"""
|
|
744
744
|
Retrieves all nodes with a given tag.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"""DataJunction admin client module."""
|
|
2
2
|
|
|
3
3
|
import logging
|
|
4
|
-
from typing import Optional
|
|
5
4
|
|
|
6
5
|
from datajunction.builder import DJBuilder
|
|
7
6
|
from datajunction.exceptions import DJClientException
|
|
@@ -66,8 +65,8 @@ class DJAdmin(DJBuilder): # pylint: disable=too-many-public-methods
|
|
|
66
65
|
self,
|
|
67
66
|
name: str,
|
|
68
67
|
version: str,
|
|
69
|
-
uri:
|
|
70
|
-
dialect:
|
|
68
|
+
uri: str | None = None,
|
|
69
|
+
dialect: str | None = None,
|
|
71
70
|
skip_if_exists: bool = False,
|
|
72
71
|
) -> None:
|
|
73
72
|
"""
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
import re
|
|
5
5
|
from dataclasses import fields
|
|
6
6
|
from http import HTTPStatus
|
|
7
|
-
from typing import Dict, List, Optional
|
|
8
7
|
|
|
9
8
|
from datajunction import models
|
|
10
9
|
from datajunction.client import DJClient
|
|
@@ -142,7 +141,7 @@ class DJBuilder(DJClient): # pylint: disable=too-many-public-methods
|
|
|
142
141
|
branch_info = data["branch"]
|
|
143
142
|
return Namespace(namespace=branch_info["namespace"], dj_client=self)
|
|
144
143
|
|
|
145
|
-
def list_branches(self, namespace: str) ->
|
|
144
|
+
def list_branches(self, namespace: str) -> list[BranchInfo]:
|
|
146
145
|
"""List all branch namespaces under a git root namespace."""
|
|
147
146
|
response = self._session.get(
|
|
148
147
|
f"/namespaces/{namespace}/branches",
|
|
@@ -198,8 +197,8 @@ class DJBuilder(DJClient): # pylint: disable=too-many-public-methods
|
|
|
198
197
|
namespace: str,
|
|
199
198
|
github_repo_path: str,
|
|
200
199
|
default_branch: str,
|
|
201
|
-
git_path:
|
|
202
|
-
git_only:
|
|
200
|
+
git_path: str | None = None,
|
|
201
|
+
git_only: bool | None = None,
|
|
203
202
|
) -> GitConfig:
|
|
204
203
|
"""Initialize git configuration on a root namespace.
|
|
205
204
|
|
|
@@ -268,7 +267,7 @@ class DJBuilder(DJClient): # pylint: disable=too-many-public-methods
|
|
|
268
267
|
def make_node_of_type(
|
|
269
268
|
self,
|
|
270
269
|
type_: models.NodeType,
|
|
271
|
-
data:
|
|
270
|
+
data: dict,
|
|
272
271
|
):
|
|
273
272
|
"""
|
|
274
273
|
Make a new node of the given type.
|
|
@@ -305,7 +304,7 @@ class DJBuilder(DJClient): # pylint: disable=too-many-public-methods
|
|
|
305
304
|
self,
|
|
306
305
|
type_: models.NodeType,
|
|
307
306
|
name: str,
|
|
308
|
-
data:
|
|
307
|
+
data: dict,
|
|
309
308
|
update_if_exists: bool = False,
|
|
310
309
|
):
|
|
311
310
|
"""
|
|
@@ -401,15 +400,15 @@ class DJBuilder(DJClient): # pylint: disable=too-many-public-methods
|
|
|
401
400
|
def create_source( # pylint: disable=too-many-arguments
|
|
402
401
|
self,
|
|
403
402
|
name: str,
|
|
404
|
-
catalog:
|
|
405
|
-
schema:
|
|
406
|
-
table:
|
|
407
|
-
display_name:
|
|
408
|
-
description:
|
|
409
|
-
columns:
|
|
410
|
-
primary_key:
|
|
411
|
-
tags:
|
|
412
|
-
mode:
|
|
403
|
+
catalog: str | None = None,
|
|
404
|
+
schema: str | None = None,
|
|
405
|
+
table: str | None = None,
|
|
406
|
+
display_name: str | None = None,
|
|
407
|
+
description: str | None = None,
|
|
408
|
+
columns: list["models.ColumnYAML"] | None = None,
|
|
409
|
+
primary_key: list[str] | None = None,
|
|
410
|
+
tags: list[str] | None = None,
|
|
411
|
+
mode: models.NodeMode | None = models.NodeMode.PUBLISHED,
|
|
413
412
|
update_if_exists: bool = False,
|
|
414
413
|
) -> "Source":
|
|
415
414
|
"""
|
|
@@ -522,13 +521,13 @@ class DJBuilder(DJClient): # pylint: disable=too-many-public-methods
|
|
|
522
521
|
def create_transform( # pylint: disable=too-many-arguments
|
|
523
522
|
self,
|
|
524
523
|
name: str,
|
|
525
|
-
query:
|
|
526
|
-
description:
|
|
527
|
-
display_name:
|
|
528
|
-
primary_key:
|
|
529
|
-
tags:
|
|
530
|
-
mode:
|
|
531
|
-
custom_metadata:
|
|
524
|
+
query: str | None = None,
|
|
525
|
+
description: str | None = None,
|
|
526
|
+
display_name: str | None = None,
|
|
527
|
+
primary_key: list[str] | None = None,
|
|
528
|
+
tags: list[str] | None = None,
|
|
529
|
+
mode: models.NodeMode | None = models.NodeMode.PUBLISHED,
|
|
530
|
+
custom_metadata: dict | None = None,
|
|
532
531
|
update_if_exists: bool = False,
|
|
533
532
|
) -> "Transform":
|
|
534
533
|
"""
|
|
@@ -556,12 +555,12 @@ class DJBuilder(DJClient): # pylint: disable=too-many-public-methods
|
|
|
556
555
|
def create_dimension( # pylint: disable=too-many-arguments
|
|
557
556
|
self,
|
|
558
557
|
name: str,
|
|
559
|
-
query:
|
|
560
|
-
primary_key:
|
|
561
|
-
description:
|
|
562
|
-
display_name:
|
|
563
|
-
tags:
|
|
564
|
-
mode:
|
|
558
|
+
query: str | None = None,
|
|
559
|
+
primary_key: list[str] | None = None,
|
|
560
|
+
description: str | None = None,
|
|
561
|
+
display_name: str | None = None,
|
|
562
|
+
tags: list[str] | None = None,
|
|
563
|
+
mode: models.NodeMode | None = models.NodeMode.PUBLISHED,
|
|
565
564
|
update_if_exists: bool = False,
|
|
566
565
|
) -> "Dimension":
|
|
567
566
|
"""
|
|
@@ -588,17 +587,17 @@ class DJBuilder(DJClient): # pylint: disable=too-many-public-methods
|
|
|
588
587
|
def create_metric( # pylint: disable=too-many-arguments
|
|
589
588
|
self,
|
|
590
589
|
name: str,
|
|
591
|
-
query:
|
|
592
|
-
description:
|
|
593
|
-
display_name:
|
|
594
|
-
required_dimensions:
|
|
595
|
-
direction:
|
|
596
|
-
unit:
|
|
590
|
+
query: str | None = None,
|
|
591
|
+
description: str | None = None,
|
|
592
|
+
display_name: str | None = None,
|
|
593
|
+
required_dimensions: list[str] | None = None,
|
|
594
|
+
direction: models.MetricDirection | None = None,
|
|
595
|
+
unit: models.MetricUnit | None = None,
|
|
597
596
|
significant_digits: int | None = None,
|
|
598
597
|
min_decimal_exponent: int | None = None,
|
|
599
598
|
max_decimal_exponent: int | None = None,
|
|
600
|
-
tags:
|
|
601
|
-
mode:
|
|
599
|
+
tags: list[str] | None = None,
|
|
600
|
+
mode: models.NodeMode | None = models.NodeMode.PUBLISHED,
|
|
602
601
|
update_if_exists: bool = False,
|
|
603
602
|
) -> "Metric":
|
|
604
603
|
"""
|
|
@@ -638,14 +637,14 @@ class DJBuilder(DJClient): # pylint: disable=too-many-public-methods
|
|
|
638
637
|
def create_cube( # pylint: disable=too-many-arguments
|
|
639
638
|
self,
|
|
640
639
|
name: str,
|
|
641
|
-
metrics:
|
|
642
|
-
dimensions:
|
|
643
|
-
filters:
|
|
644
|
-
description:
|
|
645
|
-
display_name:
|
|
646
|
-
mode:
|
|
647
|
-
tags:
|
|
648
|
-
custom_metadata:
|
|
640
|
+
metrics: list[str] | None = None,
|
|
641
|
+
dimensions: list[str] | None = None,
|
|
642
|
+
filters: list[str] | None = None,
|
|
643
|
+
description: str | None = None,
|
|
644
|
+
display_name: str | None = None,
|
|
645
|
+
mode: models.NodeMode | None = models.NodeMode.PUBLISHED,
|
|
646
|
+
tags: list[str] | None = None,
|
|
647
|
+
custom_metadata: dict | None = None,
|
|
649
648
|
update_if_exists: bool = False,
|
|
650
649
|
) -> "Cube":
|
|
651
650
|
"""
|
|
@@ -674,8 +673,8 @@ class DJBuilder(DJClient): # pylint: disable=too-many-public-methods
|
|
|
674
673
|
def create_tag( # pylint: disable=too-many-arguments
|
|
675
674
|
self,
|
|
676
675
|
name: str,
|
|
677
|
-
description:
|
|
678
|
-
tag_metadata:
|
|
676
|
+
description: str | None,
|
|
677
|
+
tag_metadata: dict,
|
|
679
678
|
tag_type: str,
|
|
680
679
|
update_if_exists: bool = False,
|
|
681
680
|
) -> Tag:
|