datajunction 0.0.217__tar.gz → 0.0.219__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.217 → datajunction-0.0.219}/PKG-INFO +1 -1
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/__about__.py +1 -1
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/deployment.py +15 -1
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/test_deploy.py +88 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/.coveragerc +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/.gitignore +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/.pre-commit-config.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/LICENSE.txt +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/Makefile +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/README.md +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/claude_desktop_config.example.json +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/__init__.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/_base.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/_internal.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/admin.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/builder.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/cli.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/client.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/compile.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/exceptions.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/mcp/__init__.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/mcp/cli.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/mcp/config.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/models.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/nodes.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/rendering.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/init_system_nodes.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/date.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/deployment.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/dimension_link.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/distinct_node_authors.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/distinct_node_editors.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/dj.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/is_active.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/materialization.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/median_deployment_duration_seconds.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/median_dim_links_per_node.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/median_dimension_indegree.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/median_downstream_count.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/median_revisions_per_node.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/median_upstream_count.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/namespace.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/node_revision.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/node_type.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/nodes.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/number_of_branches.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/number_of_deployments.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/number_of_materializations.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/number_of_namespaces.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/number_of_nodes.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/number_of_orphan_nodes.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/number_of_unused_dimensions.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/repo.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/user.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/skills/datajunction/SKILL.md +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/skills/datajunction-api/SKILL.md +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/skills/datajunction-query/SKILL.md +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/skills/datajunction-repo/SKILL.md +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/skills/datajunction-semantic-model/SKILL.md +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/datajunction/tags.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/pyproject.toml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/setup.cfg +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/__init__.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/conftest.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/deploy0/dj.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/deploy0/roads/companies.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/deploy0/roads/companies_dim.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/deploy0/roads/contractor.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/deploy0/roads/contractors.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/deploy0/roads/us_state.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/deploy0/roads/us_states.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/dj.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/avg_length_of_employment.metric.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/avg_repair_price.metric.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/avg_time_to_dispatch.metric.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/contractor.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/contractors.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/date.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/date_dim.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/dispatcher.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/dispatchers.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/hard_hat.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/hard_hat_state.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/hard_hats.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/local_hard_hats.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/municipality.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/municipality_dim.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/municipality_municipality_type.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/municipality_type.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/national_level_agg.transform.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/num_repair_orders.metric.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/regional_level_agg.transform.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/regional_repair_efficiency.metric.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/repair_order.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/repair_order_details.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/repair_order_transform.transform.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/repair_orders.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/repair_orders_cube.cube.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/repair_type.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/total_repair_cost.metric.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/total_repair_order_discounts.metric.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/us_region.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/us_state.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/us_states.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project10/dj.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/avg_length_of_employment.metric.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/avg_repair_price.metric.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/avg_time_to_dispatch.metric.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/contractor.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/contractors.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/date.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/date_dim.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/dispatcher.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/dispatchers.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/dj.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/hard_hat.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/hard_hat_state.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/hard_hats.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/local_hard_hats.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/municipality.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/municipality_dim.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/municipality_municipality_type.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/municipality_type.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/national_level_agg.transform.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/num_repair_orders.metric.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/regional_level_agg.transform.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/regional_repair_efficiency.metric.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/repair_order.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/repair_order_details.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/repair_order_transform.transform.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/repair_orders.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/repair_orders_cube.cube.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/repair_type.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/total_repair_cost.metric.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/total_repair_order_discounts.metric.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/us_region.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/us_state.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/us_states.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project12/dj.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project12/roads/companies.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project12/roads/companies_dim.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project12/roads/contractor.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project12/roads/contractors.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project12/roads/us_state.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project12/roads/us_states.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project2/dj.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project2/some_node.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project3/dj.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project3/some_node.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project4/dj.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project4/very/very/deeply/nested/namespace/some_node.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project5/dj.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project5/some_node.a.b.c.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project6/dj.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project6/roads/contractor.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project6/roads/contractors.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project7/dj.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project7/roads/contractor.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project7/roads/contractors.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project8/dj.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project9/dj.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project9/roads/companies.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project9/roads/companies_dim.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project9/roads/contractor.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project9/roads/contractors.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project9/roads/us_state.dimension.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project9/roads/us_states.source.yaml +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/examples.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/mcp/README.md +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/mcp/__init__.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/mcp/test_cli.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/test__internal.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/test_admin.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/test_base.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/test_builder.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/test_cli.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/test_client.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/test_compile.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/test_generated_client.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/test_integration.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/test_models.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/test_plugin_mirror.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tests/test_skills.py +0 -0
- {datajunction-0.0.217 → datajunction-0.0.219}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: datajunction
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.219
|
|
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>
|
|
@@ -5,6 +5,7 @@ import socket
|
|
|
5
5
|
import subprocess
|
|
6
6
|
import urllib.parse
|
|
7
7
|
import urllib.request
|
|
8
|
+
from datetime import date
|
|
8
9
|
from enum import Enum
|
|
9
10
|
from pathlib import Path
|
|
10
11
|
import time
|
|
@@ -27,6 +28,19 @@ from datajunction.rendering import print_deployment_header, print_results
|
|
|
27
28
|
# Canonical definitions live in datajunction_server/models/deployment.py.
|
|
28
29
|
|
|
29
30
|
|
|
31
|
+
def _stringify_dates(value: Any) -> Any:
|
|
32
|
+
"""
|
|
33
|
+
Replace dates and datetimes with ISO 8601 strings, recursively.
|
|
34
|
+
"""
|
|
35
|
+
if isinstance(value, date): # datetime subclasses date
|
|
36
|
+
return value.isoformat()
|
|
37
|
+
if isinstance(value, dict):
|
|
38
|
+
return {key: _stringify_dates(item) for key, item in value.items()}
|
|
39
|
+
if isinstance(value, list):
|
|
40
|
+
return [_stringify_dates(item) for item in value]
|
|
41
|
+
return value
|
|
42
|
+
|
|
43
|
+
|
|
30
44
|
class DeploymentStatus(str, Enum):
|
|
31
45
|
"""Overall deployment status. Mirrors server DeploymentStatus."""
|
|
32
46
|
|
|
@@ -290,7 +304,7 @@ class DeploymentService:
|
|
|
290
304
|
@staticmethod
|
|
291
305
|
def read_yaml_file(path: str | Path) -> dict[str, Any]:
|
|
292
306
|
with open(path) as f:
|
|
293
|
-
return yaml.safe_load(f)
|
|
307
|
+
return _stringify_dates(yaml.safe_load(f))
|
|
294
308
|
|
|
295
309
|
@staticmethod
|
|
296
310
|
def _resolve_email_to_github_username(
|
|
@@ -1682,3 +1682,91 @@ def test_collect_nodes_skips_vendored_dirs_and_list_yamls(tmp_path):
|
|
|
1682
1682
|
|
|
1683
1683
|
node_names = [n.get("name") for n in spec["nodes"]]
|
|
1684
1684
|
assert node_names == ["foo.bar"] # only the legitimate node survived
|
|
1685
|
+
|
|
1686
|
+
|
|
1687
|
+
def test_read_yaml_file_top_level_date(tmp_path):
|
|
1688
|
+
"""An unquoted top-level date becomes an ISO string."""
|
|
1689
|
+
path = tmp_path / "node.yaml"
|
|
1690
|
+
path.write_text("name: ns.thing\nvalid_from: 2026-08-17\n")
|
|
1691
|
+
|
|
1692
|
+
assert DeploymentService.read_yaml_file(path) == {
|
|
1693
|
+
"name": "ns.thing",
|
|
1694
|
+
"valid_from": "2026-08-17",
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
|
|
1698
|
+
def test_read_yaml_file_nested_date(tmp_path):
|
|
1699
|
+
"""A date nested in a dict becomes an ISO string."""
|
|
1700
|
+
path = tmp_path / "cube.yaml"
|
|
1701
|
+
path.write_text(
|
|
1702
|
+
"name: ns.cube\n"
|
|
1703
|
+
"materialization:\n"
|
|
1704
|
+
" strategy: incremental_time\n"
|
|
1705
|
+
" coverage:\n"
|
|
1706
|
+
" from: 2026-08-17\n",
|
|
1707
|
+
)
|
|
1708
|
+
|
|
1709
|
+
assert DeploymentService.read_yaml_file(path) == {
|
|
1710
|
+
"name": "ns.cube",
|
|
1711
|
+
"materialization": {
|
|
1712
|
+
"strategy": "incremental_time",
|
|
1713
|
+
"coverage": {"from": "2026-08-17"},
|
|
1714
|
+
},
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
|
|
1718
|
+
def test_read_yaml_file_date_in_list(tmp_path):
|
|
1719
|
+
"""Dates inside lists become ISO strings."""
|
|
1720
|
+
path = tmp_path / "node.yaml"
|
|
1721
|
+
path.write_text(
|
|
1722
|
+
"name: ns.thing\nbackfills:\n - 2026-08-17\n - start: 2026-01-01\n",
|
|
1723
|
+
)
|
|
1724
|
+
|
|
1725
|
+
assert DeploymentService.read_yaml_file(path) == {
|
|
1726
|
+
"name": "ns.thing",
|
|
1727
|
+
"backfills": ["2026-08-17", {"start": "2026-01-01"}],
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
|
|
1731
|
+
def test_read_yaml_file_datetime_keeps_time(tmp_path):
|
|
1732
|
+
"""A datetime keeps its time, not just the date."""
|
|
1733
|
+
path = tmp_path / "node.yaml"
|
|
1734
|
+
path.write_text("name: ns.thing\nstarted_at: 2026-08-17 09:30:15\n")
|
|
1735
|
+
|
|
1736
|
+
assert DeploymentService.read_yaml_file(path) == {
|
|
1737
|
+
"name": "ns.thing",
|
|
1738
|
+
"started_at": "2026-08-17T09:30:15",
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
|
|
1742
|
+
def test_read_yaml_file_quoted_date_unchanged(tmp_path):
|
|
1743
|
+
"""A quoted date passes through unchanged."""
|
|
1744
|
+
path = tmp_path / "node.yaml"
|
|
1745
|
+
path.write_text('name: ns.thing\nvalid_from: "2026-08-17"\n')
|
|
1746
|
+
|
|
1747
|
+
assert DeploymentService.read_yaml_file(path) == {
|
|
1748
|
+
"name": "ns.thing",
|
|
1749
|
+
"valid_from": "2026-08-17",
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1752
|
+
|
|
1753
|
+
def test_read_yaml_file_without_dates(tmp_path):
|
|
1754
|
+
"""A file with no dates comes back unchanged."""
|
|
1755
|
+
path = tmp_path / "node.yaml"
|
|
1756
|
+
path.write_text(
|
|
1757
|
+
"name: ns.thing\n"
|
|
1758
|
+
"query: SELECT 1\n"
|
|
1759
|
+
"columns:\n"
|
|
1760
|
+
" - name: one\n"
|
|
1761
|
+
" type: int\n"
|
|
1762
|
+
"enabled: true\n"
|
|
1763
|
+
"count: 3\n",
|
|
1764
|
+
)
|
|
1765
|
+
|
|
1766
|
+
assert DeploymentService.read_yaml_file(path) == {
|
|
1767
|
+
"name": "ns.thing",
|
|
1768
|
+
"query": "SELECT 1",
|
|
1769
|
+
"columns": [{"name": "one", "type": "int"}],
|
|
1770
|
+
"enabled": True,
|
|
1771
|
+
"count": 3,
|
|
1772
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/distinct_node_authors.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/distinct_node_editors.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/median_dim_links_per_node.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/median_dimension_indegree.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/median_downstream_count.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/median_revisions_per_node.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/median_upstream_count.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/number_of_branches.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/number_of_deployments.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/number_of_namespaces.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/datajunction/seed/nodes/number_of_orphan_nodes.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/datajunction/skills/datajunction-query/SKILL.md
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/datajunction/skills/datajunction-repo/SKILL.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/deploy0/roads/companies_dim.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/contractors.source.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/date.source.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/date_dim.dimension.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/dispatchers.source.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/hard_hat.dimension.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/hard_hats.source.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/municipality.source.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/repair_type.source.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/us_region.source.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/us_state.dimension.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project1/roads/us_states.source.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/avg_repair_price.metric.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/contractor.dimension.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/contractors.source.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/date_dim.dimension.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/dispatcher.dimension.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/dispatchers.source.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/hard_hat.dimension.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/hard_hat_state.source.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/hard_hats.source.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/municipality.source.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/municipality_type.source.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/num_repair_orders.metric.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/repair_order.dimension.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/repair_orders.source.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/repair_orders_cube.cube.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/repair_type.source.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/total_repair_cost.metric.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/us_region.source.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/us_state.dimension.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project11/us_states.source.yaml
RENAMED
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project12/roads/companies.source.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project12/roads/contractors.source.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project12/roads/us_state.dimension.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project12/roads/us_states.source.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project5/some_node.a.b.c.source.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project6/roads/contractors.source.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project7/roads/contractors.source.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project9/roads/companies.source.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project9/roads/contractors.source.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project9/roads/us_state.dimension.yaml
RENAMED
|
File without changes
|
{datajunction-0.0.217 → datajunction-0.0.219}/tests/examples/project9/roads/us_states.source.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|