-
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.
- Loading branch information
Showing
10 changed files
with
97 additions
and
881 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,25 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
rm -f */poetry.lock | ||
rm -rf /workspace/.pyenv_mirror/poetry/virtualenvs/* | ||
|
||
pushd uplib | ||
poetry config virtualenvs.create false | ||
poetry install -vvv | ||
popd | ||
|
||
pushd up_ansible | ||
poetry config virtualenvs.create false | ||
poetry install -vvv | ||
popd | ||
|
||
pushd up_splat | ||
poetry install | ||
popd | ||
|
||
pushd upcli | ||
poetry install | ||
popd | ||
|
||
echo "done installing all" |
Large diffs are not rendered by default.
Oops, something went wrong.
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,13 +1,12 @@ | ||
from uplib import hookimpl | ||
from uplib.match import match_prompt | ||
from uplib.containers import RunConfig | ||
import uplib as up | ||
|
||
def mk_run_config(prompt): | ||
result = RunConfig( | ||
result = up.RunConfig( | ||
image="cytopia/ansible:latest", | ||
command=prompt) | ||
return result | ||
|
||
@hookimpl | ||
|
||
@up.hookimpl | ||
def run_for_prompt(prompt): | ||
return match_prompt(mk_run_config, prompt, "ansible") | ||
return up.match_prompt(mk_run_config, prompt, "ansible") |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,15 +1,13 @@ | ||
from uplib import hookimpl | ||
from uplib.match import match_prompt | ||
from uplib.containers import RunConfig | ||
import uplib as up | ||
|
||
|
||
def mk_run_config(prompt): | ||
result = RunConfig( | ||
result = up.RunConfig( | ||
image="fedora", | ||
command=['echo', 'Thanks for trying UP: '] + prompt) | ||
return result | ||
|
||
@hookimpl | ||
@up.hookimpl | ||
def run_for_prompt(prompt): | ||
return match_prompt(mk_run_config, prompt, "splat") | ||
return up.match_prompt(mk_run_config, prompt, "splat") | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
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,12 +1,23 @@ | ||
import pluggy | ||
from typing import TypeAlias | ||
|
||
Context:TypeAlias = dict[str, str] | ||
Prompt:TypeAlias = list[str] | ||
|
||
Context: TypeAlias = dict[str, str] | ||
Prompt: TypeAlias = list[str] | ||
|
||
|
||
hookspec = pluggy.HookspecMarker("up") | ||
hookimpl = pluggy.HookimplMarker("up") | ||
pm = pluggy.PluginManager("up") | ||
|
||
from .match import does_match, match_prompt | ||
from .containers import RunConfig | ||
|
||
__all__ = [Context, | ||
Prompt, | ||
RunConfig, | ||
hookspec, | ||
hookimpl, | ||
pm, | ||
does_match, | ||
match_prompt] |
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