Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts: refactor and review #12

Open
noahehall opened this issue Dec 24, 2022 · 0 comments
Open

scripts: refactor and review #12

noahehall opened this issue Dec 24, 2022 · 0 comments

Comments

@noahehall
Copy link
Contributor

noahehall commented Dec 24, 2022

moving pretty fast and not following best practices

  • ensure atleast set -eu at top
  • no hardcoded values, vars et at top
  • no logic embedded in case structs; call functions at top
  • no multi level if statements: use case structs
  • no hella long if else if, else if, else ifs, use case statements
  • ensure help is provided if invalid input received
  • add DEBUG=${NIRV_SCRIPT_DEBUG:-''} to all scripts to enable debugging via 1 env var (see script.vault.sh)
  • update nirvai/docs/scripts readme.md
    • ensure interfaces are clearly stated
    • ensure all copypasta works
    • ensure basic workflow provided
  • no bash, keep it posix compliant (there might be a ticket for this already)
  • decompose into multiple files, e.g. they should all share the same base interface
@noahehall noahehall changed the title tidy up scripts: keep it DRY son scripts: refactor and review Dec 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: FAST lane
Development

No branches or pull requests

1 participant