Skip to content

Commit

Permalink
rename resource class
Browse files Browse the repository at this point in the history
  • Loading branch information
benpankow committed Aug 7, 2024
1 parent 8a7c788 commit 431815d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from dagster._core.libraries import DagsterLibraryRegistry

from .resource import PowerBIResource as PowerBIResource
from .resource import PowerBiWorkspace as PowerBiWorkspace
from .translator import DagsterPowerBITranslator as DagsterPowerBITranslator

# Move back to version.py and edit setup.py once we are ready to publish.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
BASE_API_URL = "https://api.powerbi.com/v1.0/myorg/"


class PowerBIResource(ConfigurableResource):
"""A resource used to interact with the PowerBI API."""
class PowerBiWorkspace(ConfigurableResource):
"""Represents a workspace in PowerBI and provides utilities
to interact with the PowerBI API.
"""

api_token: str = Field(..., description="An API token used to connect to PowerBI.")
workspace_id: str = Field(..., description="The ID of the PowerBI group to use.")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import uuid

import responses
from dagster_powerbi import PowerBIResource
from dagster_powerbi import PowerBiWorkspace
from dagster_powerbi.resource import BASE_API_URL


@responses.activate
def test_basic_resource_request() -> None:
fake_token = uuid.uuid4().hex
fake_workspace_id = uuid.uuid4().hex
resource = PowerBIResource(
resource = PowerBiWorkspace(
api_token=fake_token,
workspace_id=fake_workspace_id,
)
Expand Down

0 comments on commit 431815d

Please sign in to comment.