Skip to content

Commit

Permalink
fix: Rename attribute shell to backend (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhijeetSaroha authored Sep 25, 2024
1 parent f422e30 commit 7d617ce
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 40 deletions.
28 changes: 14 additions & 14 deletions .makim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ groups:
tasks:
tmp:
help: Clean unnecessary temporary files
shell: bash
backend: bash
run: |
rm -fr build/
rm -fr dist/
Expand Down Expand Up @@ -104,7 +104,7 @@ groups:
action: store_true
env:
MAKIM_FILE: ./tests/smoke/.makim-simple.yaml
shell: bash
backend: bash
run: |
export VERBOSE_FLAG='${{ "--verbose" if args.verbose_mode else "" }}'
makim $VERBOSE_FLAG --file $MAKIM_FILE --help
Expand All @@ -121,7 +121,7 @@ groups:
help: Run the all the tests in verbose mode
type: bool
action: store_true
shell: bash
backend: bash
run: |
export VERBOSE_FLAG='${{ "--verbose" if args.verbose_mode else "" }}'
makim $VERBOSE_FLAG --file $MAKIM_FILE --help
Expand Down Expand Up @@ -166,7 +166,7 @@ groups:
help: Run the all the tests in verbose mode
type: bool
action: store_true
shell: bash
backend: bash
run: |
export VERBOSE_FLAG='${{ "--verbose" if args.verbose_mode else "" }}'
cd ./tests/smoke
Expand All @@ -183,7 +183,7 @@ groups:
action: store_true
env:
MAKIM_FILE: tests/smoke/.makim-interpreters.yaml
shell: bash
backend: bash
run: |
export VERBOSE_FLAG='${{ "--verbose" if args.verbose_mode else "" }}'
export MAKIM_FILE="$(pwd)/${MAKIM_FILE}"
Expand All @@ -198,7 +198,7 @@ groups:
action: store_true
env:
MAKIM_FILE: ./tests/smoke/.makim-unittest.yaml
shell: bash
backend: bash
run: |
export VERBOSE_FLAG='${{ "--verbose" if args.verbose_mode else "" }}'
makim $VERBOSE_FLAG --file $MAKIM_FILE --help
Expand All @@ -221,7 +221,7 @@ groups:
action: store_true
env:
MAKIM_FILE: ./tests/smoke/.makim-env.yaml
shell: bash
backend: bash
run: |
export VERBOSE_FLAG='${{ "--verbose" if args.verbose_mode else "" }}'
makim $VERBOSE_FLAG --file $MAKIM_FILE --help
Expand All @@ -245,14 +245,14 @@ groups:
action: store_true
env:
MAKIM_FILE: ./tests/smoke/.makim-vars.yaml
shell: bash
backend: bash
run: |
export VERBOSE_FLAG='${{ "--verbose" if args.verbose_mode else "" }}'
makim $VERBOSE_FLAG --file $MAKIM_FILE vars-group.vars-task
bash:
help: Test makim shell attribute with bash
shell: bash
backend: bash
args:
verbose-mode:
help: Run the all the tests in verbose mode
Expand All @@ -275,7 +275,7 @@ groups:
action: store_true
env:
MAKIM_FILE: tests/smoke/.makim-dir-absolute-path.yaml
shell: bash
backend: bash
run: |
export VERBOSE_FLAG='${{ "--verbose" if args.verbose_mode else "" }}'
makim $VERBOSE_FLAG --file $MAKIM_FILE --help
Expand All @@ -301,7 +301,7 @@ groups:
action: store_true
env:
MAKIM_FILE: tests/smoke/.makim-dir-no-path.yaml
shell: bash
backend: bash
run: |
export VERBOSE_FLAG='${{ "--verbose" if args.verbose_mode else "" }}'
export MAKIM_FILE="$(pwd)/${MAKIM_FILE}"
Expand Down Expand Up @@ -329,7 +329,7 @@ groups:
action: store_true
env:
MAKIM_FILE: tests/smoke/.makim-dir-relative-path.yaml
shell: bash
backend: bash
run: |
export VERBOSE_FLAG='${{ "--verbose" if args.verbose_mode else "" }}'
export MAKIM_FILE="$(pwd)/${MAKIM_FILE}"
Expand Down Expand Up @@ -377,9 +377,9 @@ groups:
tasks:
python-assert:
help: Raise an system error
shell: python
backend: python
run: assert False, "Failed"
code-3:
help: Raise an system error
shell: bash
backend: bash
run: exit 3
16 changes: 8 additions & 8 deletions docs/tutorials/introduction/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"metadata": {},
"source": [
"```bash\n",
"pip install -q \"makim==1.15.0\"\n",
"pip install -q \"makim==1.16.0\"\n",
"```"
]
},
Expand All @@ -52,7 +52,7 @@
"- For those who prefer `conda`, execute:\n",
"\n",
" ```bash\n",
" conda install \"makim==1.15.0\"\n",
" conda install \"makim==1.16.0\"\n",
" ```\n",
"\n",
"Given Makim's active development, pinning to a specific version is recommended to ensure consistency.\n",
Expand Down Expand Up @@ -364,26 +364,26 @@
" tasks:\n",
" node:\n",
" help: Test using nodejs\n",
" shell: node\n",
" backend: node\n",
" run: console.log(\"${{ env.MSG_PREFIX }} from NodeJS!\");\n",
" perl:\n",
" help: Test using perl\n",
" shell: perl\n",
" backend: perl\n",
" run: print \"${{ env.MSG_PREFIX }} from Perl!\\n\";\n",
"\n",
" python:\n",
" help: Test using php\n",
" shell: python\n",
" baackend: python\n",
" run: print(\"${{ env.MSG_PREFIX }} from Python!\")\n",
"\n",
" r:\n",
" help: Test using R\n",
" shell: Rscript\n",
" backend: Rscript\n",
" run: print(\"${{ env.MSG_PREFIX }} from R!\")\n",
"\n",
" sh:\n",
" help: Test using sh\n",
" shell: sh\n",
" backend: sh\n",
" run: echo \"${{ env.MSG_PREFIX }} from sh!\"\n",
"\n",
" run-all:\n",
Expand Down Expand Up @@ -983,7 +983,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.1"
"version": "3.12.5"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/makim-for-nox-users/.makim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ groups:
tasks:
tests:
help: Run nox tests
shell: nox
backend: nox
run: |
import nox
Expand All @@ -16,7 +16,7 @@ groups:
session.run("pytest", "--version")
lint:
help: Run nox tests
shell: nox
backend: nox
run: |
import nox
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/makim-for-nox-users/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@
" tasks:\n",
" tests:\n",
" help: Run nox tests\n",
" shell: nox\n",
" backend: nox\n",
" run: |\n",
" import nox\n",
"\n",
Expand All @@ -595,7 +595,7 @@
" session.run(\"pytest\", \"--version\")\n",
" lint:\n",
" help: Run nox tests\n",
" shell: nox\n",
" backend: nox\n",
" run: |\n",
" import nox\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion src/makim/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def _extract_shell_app_config(
self, scoped_config: dict[str, Any]
) -> AppConfigType:
"""Extract the shell app configuration from the scoped config data."""
shell_app_data: AppConfigType = scoped_config.get('shell', {})
shell_app_data: AppConfigType = scoped_config.get('backend', {})

if not shell_app_data:
return {}
Expand Down
2 changes: 1 addition & 1 deletion tests/smoke/.makim-bash-group-scope.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 1.0
env-file: .env
groups:
group-scope:
shell: bash
backend: bash
tasks:
test:
help: Test bash defined in the group scope
Expand Down
2 changes: 1 addition & 1 deletion tests/smoke/.makim-bash-main-scope.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 1.0
env-file: .env
shell: bash
backend: bash
groups:
main-scope:
tasks:
Expand Down
2 changes: 1 addition & 1 deletion tests/smoke/.makim-bash-task-scope.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ groups:
print(os.getcwd())
test:
shell: bash
backend: bash
help: Test bash defined in the task scope
dependencies:
- task: task-scope.dep
Expand Down
14 changes: 7 additions & 7 deletions tests/smoke/.makim-interpreters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ groups:
tasks:
node:
help: Test using nodejs
shell: node
backend: node
run: console.log("Hello, World!");

nox:
help: Test using nox
shell:
backend:
app: nox
args: ["--noxfile"]
suffix: .nox.py
Expand All @@ -24,27 +24,27 @@ groups:
perl:
help: Test using perl
shell: perl
backend: perl
run: print "Hello, World!\n";

php:
help: Test using php
shell: php
backend: php
run: print "Hello, World!\n";

python:
help: Test using php
shell: python
backend: python
run: print("Hello, World!")

r:
help: Test using R
shell: Rscript
backend: Rscript
run: print("Hello World!")

sh:
help: Test using sh
shell: sh
backend: sh
run: echo "Hello, World!"

all:
Expand Down
2 changes: 1 addition & 1 deletion tests/smoke/.makim-sugar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ groups:
help: test running a docker service using containers-sugar
dependencies:
- task: containers.setup
shell: bash
backend: bash
run: |
sugar exec --service service1 --options -T --cmd python -c "print(1)"
sugar stop --all
4 changes: 2 additions & 2 deletions tests/smoke/.makim-unittest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ groups:

test-8:
help: failure test in 1 line
shell: bash
backend: bash
run: "false"

test-9:
help: failure test in the first line of 2 lines
shell: bash
backend: bash
run: |
false
true

0 comments on commit 7d617ce

Please sign in to comment.