recce-nightly 1.16.0.20250813__py3-none-any.whl → 1.16.0.20250817__py3-none-any.whl
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.
Potentially problematic release.
This version of recce-nightly might be problematic. Click here for more details.
- recce/VERSION +1 -1
- recce/cli.py +13 -4
- recce/data/404.html +1 -1
- recce/data/_next/static/{RX_nnCGyE7ZOeoTStwYCZ → -zBI1h60_HeMe-9ZrCw7s}/_buildManifest.js +1 -1
- recce/data/_next/static/chunks/068b80ea-7fab85837b21fed5.js +1 -0
- recce/data/_next/static/chunks/{0ddaf06c-c7961285f66460f6.js → 0ddaf06c-05b8d2a8a3e5c6f3.js} +1 -1
- recce/data/_next/static/chunks/{12f8fac4-16838e42d28d45c3.js → 12f8fac4-170216f89d5576c6.js} +1 -1
- recce/data/_next/static/chunks/{235b8375-8c84c51d7bd4f6aa.js → 235b8375-c2d62e0b44e3ae74.js} +1 -1
- recce/data/_next/static/chunks/{2541941f-2cd3a7c2d629bd33.js → 2541941f-d65696bd5d37dfa2.js} +1 -1
- recce/data/_next/static/chunks/25c097a4-51d7c9060de49a6c.js +1 -0
- recce/data/_next/static/chunks/27e92eb0-4d8ec3c6cdf0d5f1.js +1 -0
- recce/data/_next/static/chunks/{2fc37c1e-910deebeb3d77c90.js → 2fc37c1e-fd3c94ef85344810.js} +1 -1
- recce/data/_next/static/chunks/370-bd3e0bf7237858bc.js +1 -0
- recce/data/_next/static/chunks/{3a92ee20-0400ffe460c7c803.js → 3a92ee20-a33bb5964d0b2f37.js} +1 -1
- recce/data/_next/static/chunks/490-ce854af0bc670d3e.js +1 -0
- recce/data/_next/static/chunks/575-2443813ff441d02c.js +1 -0
- recce/data/_next/static/chunks/{62446465-423c03bb8c1f59b6.js → 62446465-5277e7ad93431c07.js} +1 -1
- recce/data/_next/static/chunks/{6af7f9e9-60aa8706f49dae45.js → 6af7f9e9-1b5f068628caacd4.js} +1 -1
- recce/data/_next/static/chunks/{6cf54382-49d52ae6e564e2ac.js → 6cf54382-9bc9b4c7b7e4b8d8.js} +1 -1
- recce/data/_next/static/chunks/6dc81886-2b329a8d619994c9.js +1 -0
- recce/data/_next/static/chunks/{715e4acc-9e2e6df4eb3809d1.js → 715e4acc-be8c974e746c0e77.js} +1 -1
- recce/data/_next/static/chunks/76-54eeed3fa75d6146.js +10 -0
- recce/data/_next/static/chunks/{8d700b6a.7fe2c8c3f4e333a6.js → 8d700b6a.6c883c62894c0d11.js} +1 -1
- recce/data/_next/static/chunks/975-341ea105d3d5e6ca.js +30 -0
- recce/data/_next/static/chunks/{ae307f12-01100009689ace61.js → ae307f12-0f5382a8bd52593f.js} +1 -1
- recce/data/_next/static/chunks/app/_not-found/page-f6afb3793e4b6ce1.js +1 -0
- recce/data/_next/static/chunks/app/layout-6b127f6a9d30f81d.js +1 -0
- recce/data/_next/static/chunks/app/page-6e7f45c0d0eb69b3.js +1 -0
- recce/data/_next/static/chunks/c0015c5c-6adfd10682179dba.js +1 -0
- recce/data/_next/static/chunks/{1268aea1-6dc1251c01bd724b.js → c41d1589-27a36c0adae3f11b.js} +4 -4
- recce/data/_next/static/chunks/{d90cfbaa-e7d779b3912afeec.js → d90cfbaa-10a3b2cefa2eb9ba.js} +1 -1
- recce/data/_next/static/chunks/{e07c302e-cd170429646873e1.js → e07c302e-21163cafc81583fb.js} +1 -1
- recce/data/_next/static/chunks/{fa5fb511-15fb438349ad5b97.js → fa5fb511-722a622636dc535b.js} +1 -1
- recce/data/_next/static/chunks/{framework-7950757d31580329.js → framework-d3cdc9ad10f589c3.js} +1 -1
- recce/data/_next/static/chunks/main-0aa311ca5eab4c3d.js +1 -0
- recce/data/_next/static/chunks/main-app-a6bd599e25466331.js +1 -0
- recce/data/_next/static/chunks/pages/_app-f73a7d040f1ea45c.js +1 -0
- recce/data/_next/static/chunks/pages/_error-c550ce619d2ef6f8.js +1 -0
- recce/data/_next/static/chunks/{webpack-84df6dd5ae3cf908.js → webpack-e707d93a7b1691e8.js} +1 -1
- recce/data/_next/static/css/9ba7df14573e8fe7.css +1 -0
- recce/data/index.html +1 -1
- recce/data/index.txt +14 -14
- recce/state/__init__.py +31 -0
- recce/state/cloud.py +384 -0
- recce/state/const.py +26 -0
- recce/state/local.py +56 -0
- recce/state/state.py +118 -0
- recce/state/state_loader.py +179 -0
- {recce_nightly-1.16.0.20250813.dist-info → recce_nightly-1.16.0.20250817.dist-info}/METADATA +1 -1
- {recce_nightly-1.16.0.20250813.dist-info → recce_nightly-1.16.0.20250817.dist-info}/RECORD +58 -54
- tests/test_cli.py +3 -3
- tests/test_core.py +147 -0
- tests/test_server.py +6 -6
- recce/data/_next/static/chunks/0376eeba-3db2196398d62270.js +0 -1
- recce/data/_next/static/chunks/068b80ea-833a129468ee1622.js +0 -1
- recce/data/_next/static/chunks/273-f3fa401bd2b6fc91.js +0 -10
- recce/data/_next/static/chunks/338-2e7eed5135c64550.js +0 -30
- recce/data/_next/static/chunks/367-ae35f5a152ee1ce5.js +0 -1
- recce/data/_next/static/chunks/6dc81886-78e2efe4538794ae.js +0 -1
- recce/data/_next/static/chunks/72-181b430654230f0e.js +0 -1
- recce/data/_next/static/chunks/786-774e3e3ed70a41b3.js +0 -1
- recce/data/_next/static/chunks/a69d64b4-d6890125a87b0aba.js +0 -1
- recce/data/_next/static/chunks/app/_not-found/page-c7ef8ed6dc07aaeb.js +0 -1
- recce/data/_next/static/chunks/app/layout-744f0a78e9e50e60.js +0 -1
- recce/data/_next/static/chunks/app/page-e8f798c2ae3f59c2.js +0 -1
- recce/data/_next/static/chunks/c0015c5c-82c219792582c104.js +0 -1
- recce/data/_next/static/chunks/main-app-4df79eb11c34d43c.js +0 -1
- recce/data/_next/static/chunks/main-cd6c104af638214a.js +0 -1
- recce/data/_next/static/chunks/pages/_app-73008661edbd5e05.js +0 -1
- recce/data/_next/static/chunks/pages/_error-cf8bbdc3cf76c83f.js +0 -1
- recce/data/_next/static/css/188a3a1687e2a064.css +0 -1
- recce/state.py +0 -865
- tests/test_state.py +0 -134
- /recce/data/_next/static/{RX_nnCGyE7ZOeoTStwYCZ → -zBI1h60_HeMe-9ZrCw7s}/_ssgManifest.js +0 -0
- {recce_nightly-1.16.0.20250813.dist-info → recce_nightly-1.16.0.20250817.dist-info}/WHEEL +0 -0
- {recce_nightly-1.16.0.20250813.dist-info → recce_nightly-1.16.0.20250817.dist-info}/entry_points.txt +0 -0
- {recce_nightly-1.16.0.20250813.dist-info → recce_nightly-1.16.0.20250817.dist-info}/licenses/LICENSE +0 -0
- {recce_nightly-1.16.0.20250813.dist-info → recce_nightly-1.16.0.20250817.dist-info}/top_level.txt +0 -0
tests/test_state.py
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
# add the RecceState test case
|
|
2
|
-
import os
|
|
3
|
-
import unittest
|
|
4
|
-
from datetime import datetime
|
|
5
|
-
|
|
6
|
-
from recce.core import RecceContext
|
|
7
|
-
from recce.models import Check, Run
|
|
8
|
-
from recce.state import ArtifactsRoot, RecceState, RecceStateLoader
|
|
9
|
-
|
|
10
|
-
current_dir = os.path.dirname(os.path.abspath(__file__))
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class TestRecceState(unittest.TestCase):
|
|
14
|
-
def test_merge_checks(self):
|
|
15
|
-
check1 = Check(name="test1", description="", type="query")
|
|
16
|
-
check2 = Check(name="test2", description="", type="query", updated_at=datetime(2000, 1, 1))
|
|
17
|
-
check2_2 = Check(
|
|
18
|
-
name="test2_2", description="", type="query", updated_at=datetime(2020, 1, 1), check_id=check2.check_id
|
|
19
|
-
)
|
|
20
|
-
check3 = Check(name="test3", description="", type="query")
|
|
21
|
-
|
|
22
|
-
context = RecceContext()
|
|
23
|
-
state = RecceState(checks=[check1], runs=[])
|
|
24
|
-
context.import_state(state)
|
|
25
|
-
self.assertEqual(1, len(context.checks))
|
|
26
|
-
self.assertEqual(check1.name, context.checks[0].name)
|
|
27
|
-
|
|
28
|
-
context = RecceContext(checks=[check1, check2])
|
|
29
|
-
state = RecceState(checks=[check1, check2_2, check3], runs=[])
|
|
30
|
-
context.import_state(state)
|
|
31
|
-
self.assertEqual(3, len(context.checks))
|
|
32
|
-
self.assertEqual(check2_2.name, context.checks[1].name)
|
|
33
|
-
|
|
34
|
-
def test_merge_preset_checks(self):
|
|
35
|
-
check1 = Check(
|
|
36
|
-
name="test1",
|
|
37
|
-
description="test1",
|
|
38
|
-
type="query",
|
|
39
|
-
params=dict(foo="bar"),
|
|
40
|
-
updated_at=datetime(2000, 1, 1),
|
|
41
|
-
is_preset=True,
|
|
42
|
-
)
|
|
43
|
-
check2 = Check(
|
|
44
|
-
name="test2",
|
|
45
|
-
description="test2",
|
|
46
|
-
type="query",
|
|
47
|
-
params=dict(foo="bar"),
|
|
48
|
-
updated_at=datetime(2001, 1, 1),
|
|
49
|
-
is_preset=True,
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
context = RecceContext(checks=[check1])
|
|
53
|
-
state = RecceState(checks=[check2], runs=[])
|
|
54
|
-
context.import_state(state)
|
|
55
|
-
self.assertEqual(1, len(context.checks))
|
|
56
|
-
self.assertEqual(check2.name, context.checks[0].name)
|
|
57
|
-
|
|
58
|
-
context = RecceContext(checks=[check2])
|
|
59
|
-
state = RecceState(checks=[check1], runs=[])
|
|
60
|
-
context.import_state(state)
|
|
61
|
-
self.assertEqual(1, len(context.checks))
|
|
62
|
-
self.assertEqual(check2.name, context.checks[0].name)
|
|
63
|
-
|
|
64
|
-
def test_revert_checks(self):
|
|
65
|
-
check1 = Check(name="test1", description="", type="query")
|
|
66
|
-
check2 = Check(name="test2", description="", type="query")
|
|
67
|
-
check2_2 = Check(name="test2_2", description="", type="query", check_id=check2.check_id)
|
|
68
|
-
check3 = Check(name="test3", description="", type="query")
|
|
69
|
-
|
|
70
|
-
context = RecceContext(checks=[check1, check2])
|
|
71
|
-
state = RecceState(checks=[check2_2, check3], runs=[])
|
|
72
|
-
context.import_state(state, merge=False)
|
|
73
|
-
self.assertEqual(2, len(context.checks))
|
|
74
|
-
self.assertEqual(check2_2.name, context.checks[0].name)
|
|
75
|
-
|
|
76
|
-
def test_merge_runs(self):
|
|
77
|
-
run1 = Run(type="query")
|
|
78
|
-
run2 = Run(type="query")
|
|
79
|
-
run3 = Run(type="query")
|
|
80
|
-
|
|
81
|
-
context = RecceContext(runs=[])
|
|
82
|
-
state = RecceState(runs=[run1])
|
|
83
|
-
context.import_state(state)
|
|
84
|
-
self.assertEqual(1, len(context.runs))
|
|
85
|
-
|
|
86
|
-
context = RecceContext(runs=[run1, run2])
|
|
87
|
-
state = RecceState(runs=[run2, run3])
|
|
88
|
-
context.import_state(state)
|
|
89
|
-
self.assertEqual(3, len(context.runs))
|
|
90
|
-
|
|
91
|
-
def test_merge_dbt_artifacts(self):
|
|
92
|
-
import json
|
|
93
|
-
import os
|
|
94
|
-
|
|
95
|
-
with open(os.path.join(current_dir, "manifest.json"), "r") as f:
|
|
96
|
-
manifest = json.load(f)
|
|
97
|
-
manifest["metadata"]["generated_at"] = "2000-01-01T00:00:00Z"
|
|
98
|
-
artifacts = ArtifactsRoot(
|
|
99
|
-
base=dict(
|
|
100
|
-
manifest=manifest,
|
|
101
|
-
),
|
|
102
|
-
current=dict(
|
|
103
|
-
manifest=manifest,
|
|
104
|
-
),
|
|
105
|
-
)
|
|
106
|
-
|
|
107
|
-
from tests.adapter.dbt_adapter.dbt_test_helper import DbtTestHelper
|
|
108
|
-
|
|
109
|
-
adapter = DbtTestHelper().adapter
|
|
110
|
-
adapter.import_artifacts(artifacts)
|
|
111
|
-
self.assertNotEqual(adapter.base_manifest.metadata.invocation_id, manifest.get("metadata").get("invocation_id"))
|
|
112
|
-
|
|
113
|
-
manifest["metadata"]["generated_at"] = "2099-01-01T00:00:00Z"
|
|
114
|
-
adapter.import_artifacts(artifacts)
|
|
115
|
-
self.assertEqual(adapter.base_manifest.metadata.invocation_id, manifest.get("metadata").get("invocation_id"))
|
|
116
|
-
|
|
117
|
-
def test_state_loader(self):
|
|
118
|
-
# copy ./recce_state.json to temp and open
|
|
119
|
-
|
|
120
|
-
# use library to create a temp file in the context
|
|
121
|
-
import os
|
|
122
|
-
import shutil
|
|
123
|
-
import tempfile
|
|
124
|
-
|
|
125
|
-
with tempfile.NamedTemporaryFile() as f:
|
|
126
|
-
# copy ./recce_state.json to temp file
|
|
127
|
-
current_dir = os.path.dirname(os.path.abspath(__file__))
|
|
128
|
-
state_file = os.path.join(current_dir, "recce_state.json")
|
|
129
|
-
shutil.copy(state_file, f.name)
|
|
130
|
-
|
|
131
|
-
# load the state file
|
|
132
|
-
state_loader = RecceStateLoader(state_file=f.name)
|
|
133
|
-
state = state_loader.load()
|
|
134
|
-
assert len(state.runs) == 17
|
|
File without changes
|
|
File without changes
|
{recce_nightly-1.16.0.20250813.dist-info → recce_nightly-1.16.0.20250817.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{recce_nightly-1.16.0.20250813.dist-info → recce_nightly-1.16.0.20250817.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{recce_nightly-1.16.0.20250813.dist-info → recce_nightly-1.16.0.20250817.dist-info}/top_level.txt
RENAMED
|
File without changes
|