Skip to content

Commit 2daf840

Browse files
Merge pull request #17 from recursivezero/develop
update the UI
2 parents 35777b4 + 08c5e46 commit 2daf840

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+4885
-4044
lines changed

.env.local

Lines changed: 0 additions & 9 deletions
This file was deleted.

.env.sample

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
MODE=local
2+
MONGO_URI=mongodb://<username>:<password>@127.0.0.1:27017/?authSource=admin&retryWrites=true&w=majority
3+
DOMAIN=https://localhost:8001
4+
PORT=8001
5+
API_VERSION=""
6+
APP_NAMe="LOCAL"

.githooks/post-checkout

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
#!/bin/bash
2-
set -e
3-
4-
# DRY RUN GUARD
5-
if [ "$DRY_RUN" = "1" ]; then
6-
echo "[DRY RUN] Hook executed: $(basename "$0")"
7-
exit 0
8-
fi
9-
10-
git diff --name-only HEAD@{1} HEAD | grep -q "poetry.lock" || exit 0
11-
12-
echo "[post-checkout] regenerating requirements.txt"
13-
14-
poetry export -f requirements.txt -o requirements.txt --without-hashes
1+
#!/bin/bash
2+
set -e
3+
4+
# DRY RUN GUARD
5+
if [ "$DRY_RUN" = "1" ]; then
6+
echo "[DRY RUN] Hook executed: $(basename "$0")"
7+
exit 0
8+
fi
9+
10+
git diff --name-only HEAD@{1} HEAD | grep -q "poetry.lock" || exit 0
11+
12+
echo "[post-checkout] regenerating requirements.txt"
13+
14+
poetry export -f requirements.txt -o requirements.txt --without-hashes

.githooks/post-merge

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#!/bin/bash
2-
set -e
3-
4-
# DRY RUN GUARD
5-
if [ "$DRY_RUN" = "1" ]; then
6-
echo "[DRY RUN] Hook executed: $(basename "$0")"
7-
exit 0
8-
fi
9-
10-
git diff --name-only HEAD@{1} HEAD | grep -q "poetry.lock" || exit 0
11-
echo "[post-merge] regenerating requirements.txt"
12-
poetry export -f requirements.txt -o requirements.txt --without-hashes
1+
#!/bin/bash
2+
set -e
3+
4+
# DRY RUN GUARD
5+
if [ "$DRY_RUN" = "1" ]; then
6+
echo "[DRY RUN] Hook executed: $(basename "$0")"
7+
exit 0
8+
fi
9+
10+
git diff --name-only HEAD@{1} HEAD | grep -q "poetry.lock" || exit 0
11+
echo "[post-merge] regenerating requirements.txt"
12+
poetry export -f requirements.txt -o requirements.txt --without-hashes

.githooks/pre-commit

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
1-
#!/bin/bash
2-
3-
# ---- DRY RUN MODE ----
4-
if [ "$DRY_RUN" = "1" ]; then
5-
echo "[DRY RUN] Hook executed: $(basename "$0")"
6-
exit 0
7-
fi
8-
# ---------------------
9-
# Step 1: Validate branch naming convention
10-
BRANCH_NAME=$(git symbolic-ref --short HEAD)
11-
echo "Current branch: $BRANCH_NAME"
12-
13-
# Define the branches to exclude
14-
EXCLUDED_BRANCHES="develop main release"
15-
16-
# Check if the current branch is in the excluded list
17-
for EXCLUDED_BRANCH in $EXCLUDED_BRANCHES; do
18-
if [ "$BRANCH_NAME" = "$EXCLUDED_BRANCH" ]; then
19-
echo "Skipping pre-commit checks for branch: $BRANCH_NAME"
20-
exit 0
21-
fi
22-
done
23-
24-
# Pre-commit checks (e.g., linting, testing, etc.)
25-
echo "Running pre-commit checks for branch: $BRANCH_NAME"
26-
27-
echo "$BRANCH_NAME" | grep -Eq '^(feature|bugfix|hotfix)/[A-Za-z]+-[0-9]+'
28-
if [ $? -ne 0 ]; then
29-
echo "Error: Branch name '$BRANCH_NAME' is invalid."
30-
echo "Use a valid branch naming convention, e.g., feature/XYZ-123-description."
31-
exit 1
32-
fi
33-
34-
# Step 2: Run poetry linting tools
35-
echo "Running poetry linting tools..."
36-
if ! poetry run flake8 .; then
37-
echo "flake8 failed. Aborting commit."
38-
exit 1
39-
fi
40-
41-
if ! poetry run black .; then
42-
echo "black failed. Aborting commit."
43-
exit 1
44-
fi
45-
46-
#if ! poetry run mypy .; then
47-
# echo "mypy failed. Aborting commit."
48-
# exit 1
49-
#fi
50-
51-
echo "Pre-commit checks passed!"
52-
exit 0
1+
#!/bin/bash
2+
3+
# ---- DRY RUN MODE ----
4+
if [ "$DRY_RUN" = "1" ]; then
5+
echo "[DRY RUN] Hook executed: $(basename "$0")"
6+
exit 0
7+
fi
8+
# ---------------------
9+
# Step 1: Validate branch naming convention
10+
BRANCH_NAME=$(git symbolic-ref --short HEAD)
11+
echo "Current branch: $BRANCH_NAME"
12+
13+
# Define the branches to exclude
14+
EXCLUDED_BRANCHES="develop main release"
15+
16+
# Check if the current branch is in the excluded list
17+
for EXCLUDED_BRANCH in $EXCLUDED_BRANCHES; do
18+
if [ "$BRANCH_NAME" = "$EXCLUDED_BRANCH" ]; then
19+
echo "Skipping pre-commit checks for branch: $BRANCH_NAME"
20+
exit 0
21+
fi
22+
done
23+
24+
# Pre-commit checks (e.g., linting, testing, etc.)
25+
echo "Running pre-commit checks for branch: $BRANCH_NAME"
26+
27+
echo "$BRANCH_NAME" | grep -Eq '^(feature|bugfix|hotfix)/[A-Za-z]+-[0-9]+'
28+
if [ $? -ne 0 ]; then
29+
echo "Error: Branch name '$BRANCH_NAME' is invalid."
30+
echo "Use a valid branch naming convention, e.g., feature/XYZ-123-description."
31+
exit 1
32+
fi
33+
34+
# Step 2: Run poetry linting tools
35+
echo "Running poetry linting tools..."
36+
if ! poetry run flake8 .; then
37+
echo "flake8 failed. Aborting commit."
38+
exit 1
39+
fi
40+
41+
if ! poetry run black .; then
42+
echo "black failed. Aborting commit."
43+
exit 1
44+
fi
45+
46+
#if ! poetry run mypy .; then
47+
# echo "mypy failed. Aborting commit."
48+
# exit 1
49+
#fi
50+
51+
echo "Pre-commit checks passed!"
52+
exit 0

.githooks/prepare-commit-msg

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
#!/bin/bash
2-
3-
# This script prepends the branch name to the commit message
4-
# Skip certain branches (configurable)
5-
if [ -z "$BRANCHES_TO_SKIP" ]; then
6-
BRANCHES_TO_SKIP="master develop release"
7-
fi
8-
9-
BRANCH_NAME=$(git symbolic-ref --short HEAD)
10-
BRANCH_NAME="${BRANCH_NAME##*/}"
11-
12-
BRANCH_EXCLUDED=$(printf "%s\n" $BRANCHES_TO_SKIP | grep -c "^$BRANCH_NAME$")
13-
BRANCH_IN_COMMIT=$(grep -c "\[$BRANCH_NAME\]" "$1")
14-
15-
if [ -n "$BRANCH_NAME" ] && ! [ $BRANCH_EXCLUDED -eq 1 ] && ! [ $BRANCH_IN_COMMIT -ge 1 ]; then
16-
sed -i.bak -e "1s/^/[$BRANCH_NAME]: /" "$1"
17-
fi
1+
#!/bin/bash
2+
3+
# This script prepends the branch name to the commit message
4+
# Skip certain branches (configurable)
5+
if [ -z "$BRANCHES_TO_SKIP" ]; then
6+
BRANCHES_TO_SKIP="master develop release"
7+
fi
8+
9+
BRANCH_NAME=$(git symbolic-ref --short HEAD)
10+
BRANCH_NAME="${BRANCH_NAME##*/}"
11+
12+
BRANCH_EXCLUDED=$(printf "%s\n" $BRANCHES_TO_SKIP | grep -c "^$BRANCH_NAME$")
13+
BRANCH_IN_COMMIT=$(grep -c "\[$BRANCH_NAME\]" "$1")
14+
15+
if [ -n "$BRANCH_NAME" ] && ! [ $BRANCH_EXCLUDED -eq 1 ] && ! [ $BRANCH_IN_COMMIT -ge 1 ]; then
16+
sed -i.bak -e "1s/^/[$BRANCH_NAME]: /" "$1"
17+
fi

.github/CODEOWNERS

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
2-
* @recursivezero
3-
4-
# You can also use email addresses if you prefer
5-
6-
docs/* recursivelyzero@gmail.com
1+
2+
* @recursivezero
3+
4+
# You can also use email addresses if you prefer
5+
6+
docs/* recursivelyzero@gmail.com

0 commit comments

Comments
 (0)