Skip to content

Commit bff563d

Browse files
authored
Removed html from public API (#133)
1 parent b4ed1bf commit bff563d

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

dvclive/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,13 @@ def init(
1212
resume: bool = False,
1313
step: int = 0,
1414
summary: bool = True,
15-
html: bool = True,
1615
) -> MetricLogger:
1716
global _metric_logger # pylint: disable=global-statement
1817
_metric_logger = MetricLogger(
1918
path=path or MetricLogger.DEFAULT_DIR,
2019
resume=resume,
2120
step=step,
2221
summary=summary,
23-
html=html,
2422
)
2523
return _metric_logger
2624

tests/test_main.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,13 @@ def test_nested_logging(tmp_dir):
106106
(False, False, False),
107107
],
108108
)
109-
def test_html(tmp_dir, dvc_repo, html, signal_exists):
109+
def test_html(tmp_dir, dvc_repo, html, signal_exists, monkeypatch):
110110
if dvc_repo:
111111
from dvc.repo import Repo
112112

113113
Repo.init(no_scm=True)
114-
115-
dvclive.init("logs", html=html)
114+
monkeypatch.setenv(env.DVCLIVE_PATH, "logs")
115+
monkeypatch.setenv(env.DVCLIVE_HTML, str(int(html)))
116116

117117
dvclive.log("m1", 1)
118118
dvclive.next_step()
@@ -125,7 +125,7 @@ def test_html(tmp_dir, dvc_repo, html, signal_exists):
125125
[(True, True), (True, False), (False, True), (False, False)],
126126
)
127127
def test_cleanup(tmp_dir, summary, html):
128-
dvclive.init("logs", summary=summary, html=html)
128+
dvclive.init("logs", summary=summary)
129129
dvclive.log("m1", 1)
130130
dvclive.next_step()
131131
if html:
@@ -218,18 +218,15 @@ def test_init_from_env(tmp_dir, summary, html, monkeypatch):
218218
assert dvclive._metric_logger._html == html
219219

220220

221-
@pytest.mark.parametrize("html", [True, False])
222221
@pytest.mark.parametrize("summary", [True, False])
223-
def test_init_overrides_env(tmp_dir, html, summary, monkeypatch):
224-
monkeypatch.setenv(env.DVCLIVE_PATH, "logs")
222+
def test_init_overrides_env(tmp_dir, summary, monkeypatch):
223+
monkeypatch.setenv(env.DVCLIVE_PATH, "FOO")
225224
monkeypatch.setenv(env.DVCLIVE_SUMMARY, str(int(not summary)))
226-
monkeypatch.setenv(env.DVCLIVE_HTML, str(int(not html)))
227225

228-
dvclive.init("logs", summary=summary, html=html)
226+
dvclive.init("logs", summary=summary)
229227

230228
assert dvclive._metric_logger._path == "logs"
231229
assert dvclive._metric_logger._summary == summary
232-
assert dvclive._metric_logger._html == html
233230

234231

235232
def test_no_init(tmp_dir):

0 commit comments

Comments
 (0)