-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from QGreenland-Net/submit-command-trey
Submit command
- Loading branch information
Showing
18 changed files
with
400 additions
and
73 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
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
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 __future__ import annotations | ||
|
||
from jinja2 import Environment, PackageLoader, StrictUndefined | ||
|
||
j2_environment = Environment( | ||
loader=PackageLoader("ogdc_runner"), undefined=StrictUndefined | ||
) |
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,21 @@ | ||
# classmap = { | ||
# ("ConfigMap", "BatchV1"): configmap_api_instance, | ||
# | ||
# | ||
# } | ||
# | ||
# | ||
# def k8s_apply( | ||
# *, | ||
# yaml_file: Path, | ||
# ): | ||
# yml = safe_load(yaml_file) | ||
# kind = yml.kind | ||
# api = yml.api | ||
# | ||
# api = classmap[(kind, api)] | ||
# | ||
# api.apply(yml) | ||
# | ||
# | ||
# k8s_apply("/path/to/my_yaml.yml") |
Empty file.
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,24 @@ | ||
from __future__ import annotations | ||
|
||
from pydantic import AnyUrl, BaseModel, Field | ||
|
||
|
||
# Create a model for the recipe input | ||
class RecipeInput(BaseModel): | ||
url: AnyUrl | ||
|
||
|
||
class RecipeOutput(BaseModel): | ||
dataone_id: str | ||
|
||
|
||
# Create a model for the recipe configuration | ||
class RecipeConfig(BaseModel): | ||
name: str | ||
|
||
# Allow lower-case alphanumeric characters, `.`, and `,`. These are the only | ||
# allowable characters in k8s object names. `id` to construct such names. | ||
id: str = Field(..., pattern=r"^[a-z0-9.-]+$") | ||
|
||
input: RecipeInput | ||
output: RecipeOutput |
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.