-
-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
95 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from typing import Iterator, Optional | ||
|
||
from .base import Client as _BaseClient | ||
from .build import build as base_build | ||
|
||
class _Client(_BaseClient): | ||
build = base_build | ||
|
||
Client = _Client() |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from typing import Iterator, Optional | ||
|
||
from .base import Client | ||
|
||
def build( | ||
self: Client, | ||
recipe: Optional[str] = ..., | ||
image: Optional[str] = ..., | ||
isolated: Optional[bool] = ..., | ||
sandbox: Optional[bool] = ..., | ||
writable: Optional[bool] = ..., | ||
build_folder: Optional[str] = ..., | ||
robot_name: Optional[bool] = ..., | ||
ext: Optional[str] = ..., | ||
sudo: Optional[bool] = ..., | ||
stream: Optional[bool] = ..., | ||
force: Optional[bool] = ..., | ||
options: Optional[list[str]] | None = ..., | ||
quiet: Optional[bool] = ..., | ||
return_result: Optional[bool] = ..., | ||
sudo_options: Optional[str | list[str]] = ..., | ||
singularity_options: Optional[list[str]] = ..., | ||
) -> tuple[str, Iterator[str]]: ... |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import abc | ||
|
||
from ..recipe import Recipe | ||
|
||
class ParserBase(metaclass=abc.ABCMeta): | ||
filename: str | ||
lines: list[str] | ||
args: dict[str, str] | ||
active_layer: str | ||
active_layer_num: int | ||
recipe: dict[str, Recipe] | ||
def __init__(self, filename: str, load: bool = ...) -> None: ... | ||
@abc.abstractmethod | ||
def parse(self) -> dict[str, Recipe]: ... |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from ..recipe import Recipe | ||
from .base import ParserBase as ParserBase | ||
|
||
class DockerParser(ParserBase): | ||
name: str | ||
def __init__(self, filename: str = ..., load: bool = ...) -> None: ... | ||
def parse(self) -> dict[str, Recipe]: ... |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from typing import Optional | ||
|
||
class Recipe: | ||
cmd: Optional[str] | ||
comments: list[str] | ||
entrypoint: Optional[str] | ||
environ: list[str] | ||
files: list[str] | ||
layer_files: dict[str, str] | ||
install: list[str] | ||
labels: list[str] | ||
ports: list[str] | ||
test: Optional[str] | ||
volumes: list[str] | ||
workdir: Optional[str] | ||
layer: int | ||
fromHeader: Optional[str] | ||
source: Optional[Recipe] | ||
def __init__(self, recipe: Optional[Recipe] = ..., layer: int = ...) -> None: ... |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from ..recipe import Recipe | ||
|
||
class WriterBase: | ||
recipe: dict[str, Recipe] | ||
def __init__(self, recipe: dict[str, Recipe] | None = ...) -> None: ... | ||
def write(self, output_file: str | None = ..., force: bool = ...) -> None: ... |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from typing import Optional | ||
|
||
from ..recipe import Recipe | ||
from .base import WriterBase as WriterBase | ||
|
||
class SingularityWriter(WriterBase): | ||
name: str | ||
def __init__(self, recipe: Optional[dict[str, Recipe]] = ...) -> None: ... | ||
def validate(self) -> None: ... | ||
def convert(self, runscript: str = ..., force: bool = ...) -> str: ... |
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