Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 35 additions & 2 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,41 @@
# Documentation:
# https://direnv.net/man/direnv-stdlib.1.html

# Step 1: Define variables and functions.
VENV_DIR=".venv"

# Color codes
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
RED='\033[0;31m'
BLUE='\033[0;34m'
NC='\033[0m' # No color

# Step 2: Load system dependencies (python, uv) from Nix.
strict_env
layout node
dotenv_if_exists

use nix

# Step 3: Create the virtual environment using uv if it doesn't exist.
# This replaces the creation part of `layout python`.
if [ ! -d "$VENV_DIR" ]; then
printf "direnv: ${YELLOW}Creating virtual environment in '$VENV_DIR' with uv.${NC}\n"
uv venv --python 3.13 "$VENV_DIR"
fi

# Step 4: Manually "activate" the environment in a direnv-friendly way.
# This replaces the activation part of `layout python`.
export VIRTUAL_ENV="$PWD/$VENV_DIR"
path_add PATH "$VIRTUAL_ENV/bin"

# Step 5: Add your project's code to the PYTHONPATH.
# 'path_add' safely creates the variable or prepends to it.
path_add PYTHONPATH python

# Step 6: Install dependencies with `uv pip`.
# 'watch_file' tells direnv to re-run this block if requirements.txt changes.
watch_file requirements.txt
if [ -f "requirements.txt" ]; then
printf "direnv: ${YELLOW}Syncing dependencies with uv.${NC}\n"
uv pip install -r requirements.txt
fi
Binary file removed .github/media/banner-dark.jpg
Binary file not shown.
Binary file added .github/media/banner-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed .github/media/banner-light.jpg
Binary file not shown.
Binary file added .github/media/banner-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .github/media/logo-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .github/media/logo-dual.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified .github/media/logo-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions .github/scripts/discord-notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export async function notifyDiscord(webhookUrl, releaseInfo) {
const { packageName, version, changelog, repositoryUrl } = releaseInfo

const embed = {
title: `🚀 Brainyflow ${packageName} v${version} Released!`,
title: `🚀 Caskada ${packageName} v${version} Released!`,
description: changelog.substring(0, 2000), // Discord embed description limit
color: packageName.toLowerCase() === 'typescript' ? 0x3178c6 : 0x3776ab, // TS blue or Python blue
fields: [
Expand All @@ -23,7 +23,7 @@ export async function notifyDiscord(webhookUrl, releaseInfo) {
},
],
footer: {
text: 'BrainyFlow Release Bot',
text: 'Caskada Release Bot',
},
timestamp: new Date().toISOString(),
}
Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/generate-changeset-comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export function generateChangesetComment(context, packageType) {
const directory = packageName
const isTypescript = packageName === 'typescript'
const icon = isTypescript
? '<img src="https://github.com/zvictor/brainyflow/raw/main/.github/media/typescript.svg" width="28" height="28" alt="Typescript Logo" />'
: '<img src="https://github.com/zvictor/brainyflow/raw/main/.github/media/python.svg" width="28" height="28" alt="Python Logo" />'
? '<img src="https://github.com/skadaai/caskada/raw/main/.github/media/typescript.svg" width="28" height="28" alt="Typescript Logo" />'
: '<img src="https://github.com/skadaai/caskada/raw/main/.github/media/python.svg" width="28" height="28" alt="Python Logo" />'

const changesetUrl = `${context.payload.pull_request.head.repo.html_url}/new/${
context.payload.pull_request.head.ref
Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/generate-examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import fs from 'fs/promises'
import path from 'path'

const REPOSITORY = 'https://github.com/zvictor/brainyflow'
const REPOSITORY = 'https://github.com/skadaai/caskada'
const COOKBOOK_DIR = 'cookbook'
const OUTPUT_DIR = 'docs/cookbook' // Directory where generated files will be saved
const PYTHON_EXAMPLES_FILE = path.join(OUTPUT_DIR, 'python.md')
Expand Down Expand Up @@ -166,7 +166,7 @@ function generateMarkdown(pageTitle, projects) {
markdown += `</details>\n\n`
})

markdown += `![](https://raw.githubusercontent.com/zvictor/brainyflow/master/.github/media/divider.png)\n`
markdown += `![](https://raw.githubusercontent.com/skadaai/caskada/master/.github/media/divider.png)\n`
markdown += `# The Complexity Points System\n`
markdown += `All listed projects had their calculation automatically calculated.\nClick \`Details\` below for more information in the points system.\n`
markdown += `<details>\n<summary><strong>Details</strong></summary>\n\n`
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
fi
echo "Current version from setup.py: $CURRENT_VERSION"

pnpm pkg set name=brainyflow
pnpm pkg set name=caskada
pnpm pkg set version=$CURRENT_VERSION # Use extracted version

echo "Running changeset version..."
Expand Down Expand Up @@ -139,16 +139,16 @@ jobs:
tag_name: python-v${{ steps.version.outputs.new_version }}
release_name: Python Package v${{ steps.version.outputs.new_version }}
body: |
## BrainyFlow Python Package v${{ steps.version.outputs.new_version }}
## Caskada Python Package v${{ steps.version.outputs.new_version }}

${{ steps.changelog_text.outputs.changelog }}

### Installation

pip install brainyflow==${{ steps.version.outputs.new_version }}
pip install caskada==${{ steps.version.outputs.new_version }}

### PyPI Package
🐍 [View on PyPI](https://pypi.org/project/brainyflow/${{ steps.version.outputs.new_version }}/)
🐍 [View on PyPI](https://pypi.org/project/caskada/${{ steps.version.outputs.new_version }}/)
draft: false
prerelease: false

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/typescript-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,18 @@ jobs:
tag_name: typescript-v${{ steps.version.outputs.new_version }}
release_name: TypeScript Package v${{ steps.version.outputs.new_version }}
body: |
## BrainyFlow TypeScript Package v${{ steps.version.outputs.new_version }}
## Caskada TypeScript Package v${{ steps.version.outputs.new_version }}

${{ steps.changelog_text.outputs.changelog }}

### Installation

npm install brainyflow@${{ steps.version.outputs.new_version }}
pnpm add brainyflow@${{ steps.version.outputs.new_version }}
yarn add brainyflow@${{ steps.version.outputs.new_version }}
npm install caskada@${{ steps.version.outputs.new_version }}
pnpm add caskada@${{ steps.version.outputs.new_version }}
yarn add caskada@${{ steps.version.outputs.new_version }}

### NPM Package
📦 [View on NPM](https://www.npmjs.com/package/brainyflow/v/${{ steps.version.outputs.new_version }})
📦 [View on NPM](https://www.npmjs.com/package/caskada/v/${{ steps.version.outputs.new_version }})
draft: false
prerelease: false

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:

- name: Generate docs/index.md from README.md
run: |
printf -- "---\ntitle: 'BrainyFlow'\nmachine-display: false\n---\n" > docs/index.md
printf -- "---\ntitle: 'Caskada'\nmachine-display: false\n---\n" > docs/index.md
perl -0777 -pe 's/<!-- gitbook-ignore-start -->.*?<!-- gitbook-ignore-end -->//gs' README.md \
| perl -pe 's{(https://brainy\.gitbook\.io/flow/[^)\s]+)}{$1.md}g' \
| sed 's|https://brainy.gitbook.io/flow|.|g' \
| perl -pe 's{(https://skadaai\.gitbook\.io/caskada/[^)\s]+)}{$1.md}g' \
| sed 's|https://skadaai.gitbook.io/caskada|.|g' \
| sed 's/alt\s*=\s*"[^"]*"//g; s/alt\s*=\s*'\''[^'\'']*'\''//g' \
>> docs/index.md

Expand Down
Loading
Loading