lighthouse-cli 0.41.3__tar.gz → 0.42.1__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.
- {lighthouse_cli-0.41.3/lighthouse_cli.egg-info → lighthouse_cli-0.42.1}/PKG-INFO +1 -1
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/__init__.py +1 -1
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1/lighthouse_cli.egg-info}/PKG-INFO +1 -1
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/pyproject.toml +1 -1
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/tests/test_installers.py +69 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/LICENSE +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/NOTICE +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/README.md +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/__main__.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/commands/__init__.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/commands/agents.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/commands/approvals.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/commands/builds.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/commands/collectors.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/commands/connect.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/commands/connections.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/commands/datasets.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/commands/evals.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/commands/kb.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/commands/language.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/commands/limits.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/commands/login.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/commands/models.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/commands/offline.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/commands/runs.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/commands/spend.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/commands/stack.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/commands/terms.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/commands/verify.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/commands/whoami.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/config.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/credentials.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/device.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/exits.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/flags.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/http.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/i18n.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/locales/ar.json +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/locales/de.json +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/locales/en-US.json +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/locales/en.json +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/locales/es.json +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/locales/fr.json +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/locales/ga.json +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/locales/it.json +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/locales/ja.json +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/locales/nl.json +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/locales/pt.json +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/locales/zh-Hans.json +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/locales/zh-Hant.json +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/main.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/out.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/py.typed +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse/sealing.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse_cli.egg-info/SOURCES.txt +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse_cli.egg-info/dependency_links.txt +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse_cli.egg-info/entry_points.txt +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse_cli.egg-info/requires.txt +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse_cli.egg-info/top_level.txt +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/setup.cfg +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/tests/test_approvals.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/tests/test_ci_credential.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/tests/test_collectors.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/tests/test_commands.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/tests/test_connect_erp_hr.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/tests/test_connect_finav.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/tests/test_connect_library.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/tests/test_datasets.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/tests/test_dev_surface.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/tests/test_fixtures.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/tests/test_golden.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/tests/test_i18n.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/tests/test_offline.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/tests/test_plumbing.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/tests/test_sealing.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/tests/test_sealing_hybrid.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/tests/test_stack.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/tests/test_verify.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/tests/test_verify_hybrid.py +0 -0
- {lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/tests/test_version.py +0 -0
|
@@ -18,7 +18,7 @@ build-backend = "setuptools.build_meta"
|
|
|
18
18
|
|
|
19
19
|
[project]
|
|
20
20
|
name = "lighthouse-cli"
|
|
21
|
-
version = "0.
|
|
21
|
+
version = "0.42.1"
|
|
22
22
|
description = "The LightHouse command line: sign in, connect your estate, deploy agents, watch runs"
|
|
23
23
|
requires-python = ">=3.11"
|
|
24
24
|
license = "Apache-2.0"
|
|
@@ -71,6 +71,7 @@ def test_the_command_line(tmp_path, capsys, monkeypatch):
|
|
|
71
71
|
report = tmp_path / "r.json"
|
|
72
72
|
report.write_text(json.dumps(REPORT))
|
|
73
73
|
monkeypatch.setattr(formula, "fetch_json", pypi())
|
|
74
|
+
monkeypatch.setattr(formula, "resolves", lambda url: True)
|
|
74
75
|
assert formula.main(["--version", "0.10.0", "--report", str(report)]) == 0
|
|
75
76
|
assert "resource \"httpx\"" in capsys.readouterr().out
|
|
76
77
|
assert formula.main(["--version", "bad", "--report", str(report)]) == 1
|
|
@@ -92,6 +93,74 @@ def test_the_tap_rename_record_maps_the_old_formula_to_the_new(tmp_path, monkeyp
|
|
|
92
93
|
report = tmp_path / "r.json"
|
|
93
94
|
report.write_text(json.dumps(REPORT))
|
|
94
95
|
monkeypatch.setattr(formula, "fetch_json", pypi())
|
|
96
|
+
monkeypatch.setattr(formula, "resolves", lambda url: True)
|
|
95
97
|
target = tmp_path / "formula_renames.json"
|
|
96
98
|
assert formula.main(["--version", "0.10.0", "--report", str(report), "--renames-out", str(target)]) == 0
|
|
97
99
|
assert json.loads(target.read_text()) == {"lighthouse": "lighthouse-ai"}
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
# -- the release has to be on PyPI before the formula is written (#291) -------
|
|
103
|
+
|
|
104
|
+
def test_the_formula_is_refused_when_its_source_url_does_not_resolve():
|
|
105
|
+
with pytest.raises(formula.FormulaError, match="does not resolve"):
|
|
106
|
+
formula.render("0.10.0", REPORT, pypi(), head=lambda url: False)
|
|
107
|
+
seen: list[str] = []
|
|
108
|
+
formula.render("0.10.0", REPORT, pypi(), head=lambda url: seen.append(url) or True)
|
|
109
|
+
assert seen[0] == "https://files.pythonhosted.org/lighthouse-cli-0.10.0.tar.gz"
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def test_waiting_for_the_release_polls_until_the_source_distribution_resolves():
|
|
113
|
+
calls = {"get": 0, "head": 0}
|
|
114
|
+
slept: list[float] = []
|
|
115
|
+
|
|
116
|
+
def get(url: str) -> Any:
|
|
117
|
+
calls["get"] += 1
|
|
118
|
+
if calls["get"] == 1: # PyPI does not know the version yet
|
|
119
|
+
raise OSError("404")
|
|
120
|
+
if calls["get"] == 2: # the wheel is up, the sdist is not
|
|
121
|
+
return {"urls": [{"packagetype": "bdist_wheel", "url": "w", "digests": {"sha256": "0"}}]}
|
|
122
|
+
return pypi()(url)
|
|
123
|
+
|
|
124
|
+
def head(url: str) -> bool:
|
|
125
|
+
calls["head"] += 1
|
|
126
|
+
return calls["head"] > 1 # the file host lags the JSON API once
|
|
127
|
+
|
|
128
|
+
url = formula.wait_for_release("0.10.0", get, head, tries=5, delay=7, sleep=slept.append)
|
|
129
|
+
assert url == "https://files.pythonhosted.org/lighthouse-cli-0.10.0.tar.gz"
|
|
130
|
+
assert slept == [7, 7, 7] and calls == {"get": 4, "head": 2}
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
def test_waiting_for_the_release_gives_up_after_its_tries():
|
|
134
|
+
slept: list[float] = []
|
|
135
|
+
with pytest.raises(formula.FormulaError, match="not on PyPI"):
|
|
136
|
+
formula.wait_for_release("0.10.0", pypi(), lambda url: False, tries=3, delay=1,
|
|
137
|
+
sleep=slept.append)
|
|
138
|
+
assert slept == [1, 1]
|
|
139
|
+
with pytest.raises(formula.FormulaError):
|
|
140
|
+
formula.wait_for_release("v0.10.0", pypi(), lambda url: True, tries=1, delay=0)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def test_the_command_line_waits_for_the_release(capsys, monkeypatch):
|
|
144
|
+
monkeypatch.setattr(formula, "fetch_json", pypi())
|
|
145
|
+
monkeypatch.setattr(formula, "resolves", lambda url: True)
|
|
146
|
+
monkeypatch.setattr(formula.time, "sleep", lambda s: None)
|
|
147
|
+
assert formula.main(["--version", "0.10.0", "--wait-for-release"]) == 0
|
|
148
|
+
assert "lighthouse-cli-0.10.0.tar.gz" in capsys.readouterr().out
|
|
149
|
+
monkeypatch.setattr(formula, "resolves", lambda url: False)
|
|
150
|
+
assert formula.main(["--version", "0.10.0", "--wait-for-release", "--tries", "2", "--delay", "0"]) == 1
|
|
151
|
+
with pytest.raises(SystemExit):
|
|
152
|
+
formula.main(["--version", "0.10.0"]) # writing a formula needs the report
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
def test_only_pythonhosted_files_are_checked():
|
|
156
|
+
with pytest.raises(formula.FormulaError):
|
|
157
|
+
formula.resolves("https://example.com/lighthouse_cli-0.10.0.tar.gz")
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
def test_the_tap_job_runs_after_pypi_and_waits_for_the_release():
|
|
161
|
+
ci = (Path(__file__).resolve().parents[2] / ".gitlab" / "ci" / "release-packages.yml").read_text()
|
|
162
|
+
job = ci.split("\nhomebrew-tap:\n", 1)[1]
|
|
163
|
+
assert "needs:" in job.split("script:", 1)[0] and "cli-pypi" in job.split("script:", 1)[0]
|
|
164
|
+
script = job.split("script:", 1)[1]
|
|
165
|
+
wait = script.index("--wait-for-release")
|
|
166
|
+
assert wait < script.index("pip install") < script.index("> lighthouse-ai.rb")
|
|
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
|
|
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
|
{lighthouse_cli-0.41.3 → lighthouse_cli-0.42.1}/lighthouse_cli.egg-info/dependency_links.txt
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|