-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: release changes for version 0.4.9
- Loading branch information
Showing
10 changed files
with
111 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 17 additions & 7 deletions
24
galaxy/cli/cookiecutter/{{cookiecutter.integration_name}}/main.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,27 @@ | ||
from types import TracebackType | ||
from typing import Any | ||
|
||
from galaxy.core.galaxy import register, Integration | ||
from galaxy.core.models import Config | ||
from galaxy.integrations.{{cookiecutter.integration_name}}.client import {{cookiecutter.integration_name_pascalcase}}Client | ||
from galaxy.integrations.{{ cookiecutter.integration_name }}.client import {{ cookiecutter.integration_name_pascalcase }}Client | ||
|
||
|
||
class {{cookiecutter.integration_name_pascalcase}}(Integration): | ||
class {{ cookiecutter.integration_name_pascalcase }}(Integration): | ||
_methods = [] | ||
|
||
def __init__(self, config: Config): | ||
super().__init__(config) | ||
self.client = {{cookiecutter.integration_name_pascalcase}}Client(self.config, self.logger) | ||
self.client = {{ cookiecutter.integration_name_pascalcase }}Client(self.config, self.logger) | ||
|
||
async def __aenter__(self) -> "{{ cookiecutter.integration_name_pascalcase }}": | ||
await self.client.__aenter__() | ||
return self | ||
|
||
async def __aexit__(self, exc_type: type, exc: Exception, tb: TracebackType) -> None: | ||
await self.client.__aexit__(exc_type, exc, tb) | ||
|
||
@register(_methods, group=1) | ||
async def entities(self) -> list[dict]: | ||
self.entities = await self.client.api_request() | ||
entities = await self.mapper.process("entities", self.entities) | ||
return entities | ||
async def entities(self) -> tuple[Any]: | ||
entities = await self.client.api_request() | ||
mapped_entities = await self.mapper.process("entities", entities) | ||
return mapped_entities |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.