Skip to content

Commit

Permalink
chore(studio): Update Studio URL to new domain (#172)
Browse files Browse the repository at this point in the history
Co-authored-by: Marcin Jasion <[email protected]>
  • Loading branch information
mjasion and mjasion authored Jun 27, 2024
1 parent 5c95dca commit e664101
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/dvc_studio_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
getenv(DVC_STUDIO_CLIENT_LOGLEVEL, getenv(DVCLIVE_LOGLEVEL, "WARNING")).upper(),
)

DEFAULT_STUDIO_URL = "https://studio.iterative.ai"
DEFAULT_STUDIO_URL = "https://studio.dvc.ai"
4 changes: 2 additions & 2 deletions src/dvc_studio_client/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def start_device_login(
Optional Parameters:
- base_url: The base URL of the Studio API.
If not provided, the default value is "https://studio.iterative.ai".
If not provided, the default value is "https://studio.dvc.ai".
- token_name: The name of the token. If not provided, it defaults to None.
- scopes: A list of scopes to request. If not provided, it defaults to None.
Expand Down Expand Up @@ -156,7 +156,7 @@ def start_device_login(
logger.debug(f"JSON body `{body=}`")

response = requests.post(
url=urljoin(base_url or "https://studio.iterative.ai", "api/device-login"),
url=urljoin(base_url or "https://studio.dvc.ai", "api/device-login"),
json=body,
headers={
"Content-type": "application/json",
Expand Down
2 changes: 1 addition & 1 deletion src/dvc_studio_client/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def get_studio_config(
{
"token": "mytoken",
"repo_url": "[email protected]:iterative/dvc-studio-client.git",
"url": "https://studio.iterative.ai",
"url": "https://studio.dvc.ai",
}
"""
config = {}
Expand Down
18 changes: 9 additions & 9 deletions tests/test_post_live_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def test_post_live_metrics_data(mocker, monkeypatch):

assert post_live_metrics("data", "f" * 40, "fooname", "fooclient", step=0)
mocked_post.assert_called_with(
"https://studio.iterative.ai/api/live",
"https://studio.dvc.ai/api/live",
json={
"type": "data",
"repo_url": "FOO_REPO_URL",
Expand All @@ -214,7 +214,7 @@ def test_post_live_metrics_data(mocker, monkeypatch):
params={"dvclive/params.yaml": {"foo": "bar"}},
)
mocked_post.assert_called_with(
"https://studio.iterative.ai/api/live",
"https://studio.dvc.ai/api/live",
json={
"type": "data",
"repo_url": "FOO_REPO_URL",
Expand Down Expand Up @@ -247,7 +247,7 @@ def test_post_live_metrics_data(mocker, monkeypatch):
mocked_post.assert_has_calls(
[
mocker.call(
"https://studio.iterative.ai/api/live",
"https://studio.dvc.ai/api/live",
json={
"type": "data",
"repo_url": "FOO_REPO_URL",
Expand All @@ -266,7 +266,7 @@ def test_post_live_metrics_data(mocker, monkeypatch):
timeout=(30, 5),
),
mocker.call(
"https://studio.iterative.ai/api/live",
"https://studio.dvc.ai/api/live",
json={
"type": "data",
"repo_url": "FOO_REPO_URL",
Expand Down Expand Up @@ -305,7 +305,7 @@ def test_post_live_metrics_done(mocker, monkeypatch):
"fooclient",
)
mocked_post.assert_called_with(
"https://studio.iterative.ai/api/live",
"https://studio.dvc.ai/api/live",
json={
"type": "done",
"repo_url": "FOO_REPO_URL",
Expand All @@ -328,7 +328,7 @@ def test_post_live_metrics_done(mocker, monkeypatch):
experiment_rev="h" * 40,
)
mocked_post.assert_called_with(
"https://studio.iterative.ai/api/live",
"https://studio.dvc.ai/api/live",
json={
"type": "done",
"repo_url": "FOO_REPO_URL",
Expand All @@ -352,7 +352,7 @@ def test_post_live_metrics_done(mocker, monkeypatch):
metrics={"dvclive/metris.json": {"data": {"foo": 1}}},
)
mocked_post.assert_called_with(
"https://studio.iterative.ai/api/live",
"https://studio.dvc.ai/api/live",
json={
"type": "done",
"repo_url": "FOO_REPO_URL",
Expand Down Expand Up @@ -550,7 +550,7 @@ def test_post_in_chunks(mocker, monkeypatch):
mocked_post.assert_has_calls(
[
mocker.call(
"https://studio.iterative.ai/api/live",
"https://studio.dvc.ai/api/live",
json={
"type": "data",
"repo_url": "FOO_REPO_URL",
Expand All @@ -569,7 +569,7 @@ def test_post_in_chunks(mocker, monkeypatch):
timeout=(30, 5),
),
mocker.call(
"https://studio.iterative.ai/api/live",
"https://studio.dvc.ai/api/live",
json={
"type": "data",
"repo_url": "FOO_REPO_URL",
Expand Down

0 comments on commit e664101

Please sign in to comment.