-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* split schema from main plugin script * initial rename script * rename directories first * correct entrypoint in Dockerfile * add input check to rename script * fix for github workflow * rename configs to inputs
- Loading branch information
1 parent
9b35e85
commit 635417b
Showing
10 changed files
with
83 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import typing | ||
from dataclasses import dataclass | ||
from arcaflow_plugin_sdk import validation | ||
|
||
|
||
@dataclass | ||
class InputParams: | ||
""" | ||
This is the data structure for the input parameters of the step defined | ||
below. | ||
""" | ||
|
||
name: typing.Annotated[str, validation.min(1)] | ||
|
||
|
||
@dataclass | ||
class SuccessOutput: | ||
""" | ||
This is the output data structure for the success case. | ||
""" | ||
|
||
message: str | ||
|
||
|
||
@dataclass | ||
class ErrorOutput: | ||
""" | ||
This is the output data structure in the error case. | ||
""" | ||
|
||
error: 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
File renamed without changes.
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,31 @@ | ||
#!/bin/bash | ||
|
||
die () { | ||
echo >&2 "$@" | ||
exit 1 | ||
} | ||
|
||
[ "$#" -eq 1 ] || die "1 argument required, $# provided" | ||
echo $1 | grep -E -q '^.*-.*' && die "Please use underscores (_) instead of hyphens (-)" | ||
|
||
for file in $(find . -type d -name '*template_python*'); do | ||
git mv "$file" "${file/template_python/$1}" | ||
done | ||
|
||
for file in $(find . -type f -name '*template_python*'); do | ||
git mv "$file" "${file/template_python/$1}" | ||
done | ||
|
||
for name in template_python Template; do | ||
for file in $(grep -rl $name * .github); do | ||
sed -i "s/$name/$1/g" $file | ||
done | ||
done | ||
|
||
hyphenated_name=$(echo $1 | sed s/_/-/g) | ||
|
||
for file in $(grep -rl template-python *); do | ||
sed -i "s/template-python/$hyphenated_name/g" $file | ||
done | ||
|
||
echo "Template renaming complete. Please remove this file and commit your changes." |
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