Skip to content

Commit ce235a4

Browse files
authored
Merge branch 'main' into skip_context-check-for-our-tests
2 parents dd9374c + ddb7f27 commit ce235a4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+4183
-1497
lines changed

.github/workflows/end-to-end-test-benchmark-bubblesort.yaml renamed to .github/workflows/e2e-bubblesort-benchmark.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: end-to-end-test
1+
name: E2E - Bubble Sort Benchmark
22

33
on:
44
pull_request:

.github/workflows/end-to-end-test-bubblesort-pytest-no-git.yaml renamed to .github/workflows/e2e-bubblesort-pytest-nogit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: end-to-end-test
1+
name: E2E - Bubble Sort Pytest (No Git)
22

33
on:
44
pull_request:

.github/workflows/end-to-end-test-bubblesort-unittest.yaml renamed to .github/workflows/e2e-bubblesort-unittest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: end-to-end-test
1+
name: E2E - Bubble Sort Unittest
22

33
on:
44
pull_request:

.github/workflows/end-to-end-test-futurehouse.yaml renamed to .github/workflows/e2e-futurehouse-structure.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: end-to-end-test
1+
name: E2E - Futurehouse Structure
22

33
on:
44
pull_request:

.github/workflows/end-to-end-test-init-optim.yaml renamed to .github/workflows/e2e-init-optimization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: end-to-end-test
1+
name: E2E - Init Optimization
22

33
on:
44
pull_request:

.github/workflows/end-to-end-topological-sort-test.yaml renamed to .github/workflows/e2e-topological-sort.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: end-to-end-test
1+
name: E2E - Topological Sort
22

33
on:
44
pull_request:

.github/workflows/end-to-end-test-tracer-replay.yaml renamed to .github/workflows/e2e-tracer-replay.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: end-to-end-test
1+
name: E2E - Tracer Replay
22

33
on:
44
pull_request:
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
from os import getenv
2+
3+
from attrs import define, evolve
4+
5+
from constants import DEFAULT_API_URL, DEFAULT_APP_URL
6+
7+
8+
@define
9+
class ApiClient():
10+
api_key_header_name: str = "API-Key"
11+
client_type_header_name: str = "client-type"
12+
client_type_header_value: str = "sdk-python"
13+
14+
@staticmethod
15+
def get_console_url() -> str:
16+
console_url = getenv("CONSOLE_URL", DEFAULT_API_URL)
17+
if DEFAULT_API_URL == console_url:
18+
return DEFAULT_APP_URL
19+
20+
return console_url
21+
22+
def with_api_key(self, api_key: str) -> "ApiClient": # ---> here is the problem with circular dependency, this makes libcst thinks that ApiClient needs an import despite it's already in the same file.
23+
"""Get a new client matching this one with a new API key"""
24+
return evolve(self, api_key=api_key)
25+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
DEFAULT_API_URL = "https://api.galileo.ai/"
2+
DEFAULT_APP_URL = "https://app.galileo.ai/"
3+
4+
5+
# function_names: GalileoApiClient.get_console_url
6+
# module_abs_path : /home/mohammed/Work/galileo-python/src/galileo/api_client.py
7+
# preexisting_objects: {('GalileoApiClient', ()), ('_set_destination', ()), ('get_console_url', (FunctionParent(name='GalileoApiClient', type='ClassDef'),))}
8+
# project_root_path: /home/mohammed/Work/galileo-python/src

0 commit comments

Comments
 (0)