Skip to content

Commit

Permalink
docs: Update contributing guidelines
Browse files Browse the repository at this point in the history
Also add a script to run all the examples.
  • Loading branch information
jmgate committed Jul 10, 2024
1 parent 43462de commit 2598c88
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 7 deletions.
11 changes: 4 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ The checks we perform are the following:
* Ensure files don't contain merge conflict strings.
* Ensure files end with a single blank line.
* Ensure we only use Unix line endings.
* Ensure test files are correctly named.
* Trim trailing whitespace.
* Ensure we use [type-hinting][typing].
* Check for common mistakes in [reStructuredText][rest] in our documentation.
Expand Down Expand Up @@ -133,8 +132,6 @@ search for and install them. These are the ones we recommend:
* **Conventional Commits:** Adhere to the [Conventional Commits][conventional]
specification for commit messages.
* **Coverage Gutters:** Display test coverage in the editor.
* **GitLab Workflow:** Integrate GitLab issues, merge requests, and pipelines
into VS Code.
* **GitLens — Git supercharged:** Integrate some of the powerful features of
[GitKraken][kraken] into VS Code.
* **IntelliCode:** AI-assisted development features.
Expand Down Expand Up @@ -472,10 +469,10 @@ Feel free to commit and push small chunks early and often and then use `git
rebase -i` to reorganize your commits before sharing.
> **Note:** If you rebase a branch that's already been pushed to a remote,
> you'll wind up changing the history, which will require a force push with
> `git push origin +<branch-name>`. That is permissible (even encouraged), but
> if you've had one or more reviewers or collaborators working with you on the
> branch, *get their buy-in first* before doing a force push.
> you'll wind up changing the history, which will require a force push. That
> is permissible (even encouraged), but if you've had one or more reviewers or
> collaborators working with you on the branch, *get their buy-in first* before
> doing a force push.
### When Work is Complete
Expand Down
33 changes: 33 additions & 0 deletions example/run-all.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash
quote_arg() {
if [[ "$1" =~ ( ) ]]; then
echo -n "'$1' "
else
echo -n "$1 "
fi
}

run_script() {
echo
echo -n "~~~~~ Running "
for arg in "$@"; do
quote_arg "${arg}"
done
echo " ~~~~~"
echo
python3 "$@"
echo
}

ORIG_DIR=$(pwd)
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
cd "${SCRIPT_DIR}" || exit 1
python3 -m pip uninstall -y shell-logger
cd ..
python3 -m pip install .
cd "${SCRIPT_DIR}" || exit 1
run_script hello_world_html.py
run_script hello_world_html_and_console.py
run_script hello_world_html_with_stats.py
run_script build_flex.py
cd "${ORIG_DIR}" || exit 1

0 comments on commit 2598c88

Please sign in to comment.