-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: rename to beeai-framework, switch to monorepo
Signed-off-by: Tomas Dvorak <[email protected]>
- Loading branch information
Showing
369 changed files
with
1,228 additions
and
760 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
HOOK_NAME=$(basename "$0") | ||
STAGED_FILES=$(git diff --staged --name-only) | ||
if [ -z "$STAGED_FILES" ] && [ "$HOOK_NAME" = "pre-commit" ]; then | ||
echo "Error: Stash is empty. Aborting." | ||
exit 1 | ||
fi | ||
|
||
COMMIT_MSG_FILE="$1" | ||
HOOK_ARGS=${COMMIT_MSG_FILE:-$STAGED_FILES} | ||
|
||
TS_DIR="typescript" | ||
HAS_TS_FILES=$(echo "$STAGED_FILES" | grep -q "^$TS_DIR/" && echo 1 || echo 0) | ||
|
||
PY_DIR="python" | ||
HAS_PY_FILES=$(echo "$STAGED_FILES" | grep -q "^$PY_DIR/" && echo 1 || echo 0) | ||
|
||
if [ "$HAS_TS_FILES" -eq 1 ] && [ "$HAS_PY_FILES" -eq 1 ]; then | ||
echo "Error: Cannot commit changes in both $TS_DIR and $PY_DIR at the same time." | ||
exit 1 | ||
fi | ||
|
||
# Run hooks based on staged files | ||
if [ "$HAS_TS_FILES" -eq 1 ] && grep -q "\"git:$HOOK_NAME\"" "$TS_DIR/package.json"; then | ||
echo "Running $HOOK_NAME hook in $TS_DIR..." | ||
(cd "$TS_DIR" && npm run "git:$HOOK_NAME" "$HOOK_ARGS") || exit $? | ||
fi | ||
|
||
if [ "$HAS_PY_FILES" -eq 1 ]; then | ||
echo "Running Python $HOOK_NAME hook..." | ||
(cd "$PY_DIR" && poetry run poe git --hook "$HOOK_NAME" "$HOOK_ARGS") || exit $? | ||
fi | ||
|
||
# General commit style check | ||
if [ "$HAS_TS_FILES" -eq 0 ] && [ "$HAS_PY_FILES" -eq 0 ]; then | ||
if [ "$HOOK_NAME" = "commit-msg" ] ; then | ||
COMMIT_MSG=$(cat "$COMMIT_MSG_FILE") | ||
CONVENTIONAL_COMMIT_REGEX="^(chore|ci|docs|revert)(\(\w+\))?!?: .+" | ||
|
||
if ! echo "$COMMIT_MSG" | grep -qE "$CONVENTIONAL_COMMIT_REGEX"; then | ||
echo "Error: The provided commit message does not adhere to conventional commit style!" | ||
echo "Validation Regex: $CONVENTIONAL_COMMIT_REGEX" | ||
echo "Your commit message: $COMMIT_MSG" | ||
exit 1 | ||
fi | ||
fi | ||
fi |
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,18 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
GIT_ROOT_DIR=`git rev-parse --show-toplevel` | ||
SCRIPT_DIR=`(cd "$(dirname "$0")" && pwd)` | ||
|
||
WRAPPER_SCRIPT="${SCRIPT_DIR}/hook.sh" | ||
chmod +x "$WRAPPER_SCRIPT" | ||
|
||
HOOK_NAMES="pre-commit commit-msg pre-push post-merge pre-rebase post-checkout post-commit post-rewrite" | ||
for HOOK in $HOOK_NAMES; do | ||
TARGET="$GIT_ROOT_DIR/.git/hooks/$HOOK" | ||
cp -f "$WRAPPER_SCRIPT" "$TARGET" | ||
chmod u+x "$TARGET" | ||
done | ||
|
||
echo "All Git hooks are now set up!" |
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,37 @@ | ||
name: Build documentation | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Copy root | ||
run: cp *.md docs/ | ||
|
||
- name: Copy TypeScript Documentation | ||
run: cp -r ./typescript/docs docs/typescript | ||
|
||
- name: Upload Documentation Artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ./docs | ||
|
||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pages: write | ||
id-token: write | ||
|
||
steps: | ||
- name: Deploy to GitHub Pages | ||
uses: actions/deploy-pages@v4 |
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 |
---|---|---|
|
@@ -134,3 +134,7 @@ dist | |
/experiments | ||
.npmrc | ||
.DS_Store | ||
|
||
/docs/typescript | ||
/docs/python | ||
/docs/README.md |
This file was deleted.
Oops, something went wrong.
This file was deleted.
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,12 @@ | ||
cff-version: 1.2.0 | ||
title: Bee Agent Framework | ||
title: BeeAI Framework | ||
message: >- | ||
If you use this software, please cite it using the | ||
metadata from this file. | ||
type: software | ||
authors: | ||
- name: IBM Research | ||
repository-code: "https://github.com/i-am-bee/bee-agent-framework" | ||
repository-code: "https://github.com/i-am-bee/beeai-framework" | ||
url: "https://github.com/i-am-bee" | ||
license: Apache-2.0 | ||
date-released: "2024-08-23" |
Oops, something went wrong.