Skip to content

Commit

Permalink
chore(studio): Update Studio URL to new domain (#181)
Browse files Browse the repository at this point in the history
The https://studio.dvc.ai is deprecated, and we switched to the new domain https://studio.datachain.ai.

The domain change is backwards compatible. The **older versions** of the `dvc` will still work. 🎉

Co-authored-by: Marcin Jasion <[email protected]>
  • Loading branch information
mjasion and mjasion authored Dec 31, 2024
1 parent c184355 commit a1a7806
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.dvc.ai"
DEFAULT_STUDIO_URL = "https://studio.datachain.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.dvc.ai".
If not provided, the default value is "https://studio.datachain.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.dvc.ai", "api/device-login"),
url=urljoin(base_url or "https://studio.datachain.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.dvc.ai",
"url": "https://studio.datachain.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 @@ -190,7 +190,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.dvc.ai/api/live",
"https://studio.datachain.ai/api/live",
json={
"type": "data",
"repo_url": "FOO_REPO_URL",
Expand All @@ -215,7 +215,7 @@ def test_post_live_metrics_data(mocker, monkeypatch):
params={"dvclive/params.yaml": {"foo": "bar"}},
)
mocked_post.assert_called_with(
"https://studio.dvc.ai/api/live",
"https://studio.datachain.ai/api/live",
json={
"type": "data",
"repo_url": "FOO_REPO_URL",
Expand Down Expand Up @@ -248,7 +248,7 @@ def test_post_live_metrics_data(mocker, monkeypatch):
mocked_post.assert_has_calls(
[
mocker.call(
"https://studio.dvc.ai/api/live",
"https://studio.datachain.ai/api/live",
json={
"type": "data",
"repo_url": "FOO_REPO_URL",
Expand All @@ -267,7 +267,7 @@ def test_post_live_metrics_data(mocker, monkeypatch):
timeout=(30, 5),
),
mocker.call(
"https://studio.dvc.ai/api/live",
"https://studio.datachain.ai/api/live",
json={
"type": "data",
"repo_url": "FOO_REPO_URL",
Expand Down Expand Up @@ -306,7 +306,7 @@ def test_post_live_metrics_done(mocker, monkeypatch):
"fooclient",
)
mocked_post.assert_called_with(
"https://studio.dvc.ai/api/live",
"https://studio.datachain.ai/api/live",
json={
"type": "done",
"repo_url": "FOO_REPO_URL",
Expand All @@ -329,7 +329,7 @@ def test_post_live_metrics_done(mocker, monkeypatch):
experiment_rev="h" * 40,
)
mocked_post.assert_called_with(
"https://studio.dvc.ai/api/live",
"https://studio.datachain.ai/api/live",
json={
"type": "done",
"repo_url": "FOO_REPO_URL",
Expand All @@ -353,7 +353,7 @@ def test_post_live_metrics_done(mocker, monkeypatch):
metrics={"dvclive/metris.json": {"data": {"foo": 1}}},
)
mocked_post.assert_called_with(
"https://studio.dvc.ai/api/live",
"https://studio.datachain.ai/api/live",
json={
"type": "done",
"repo_url": "FOO_REPO_URL",
Expand Down Expand Up @@ -551,7 +551,7 @@ def test_post_in_chunks(mocker, monkeypatch):
mocked_post.assert_has_calls(
[
mocker.call(
"https://studio.dvc.ai/api/live",
"https://studio.datachain.ai/api/live",
json={
"type": "data",
"repo_url": "FOO_REPO_URL",
Expand All @@ -570,7 +570,7 @@ def test_post_in_chunks(mocker, monkeypatch):
timeout=(30, 5),
),
mocker.call(
"https://studio.dvc.ai/api/live",
"https://studio.datachain.ai/api/live",
json={
"type": "data",
"repo_url": "FOO_REPO_URL",
Expand Down

0 comments on commit a1a7806

Please sign in to comment.