Skip to content

Commit 40e5b47

Browse files
authored
feat: add poetry setup dev (#8)
1 parent 3a2185f commit 40e5b47

21 files changed

+244
-10
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Shared Scripts Development Rules
2+
3+
## Code Quality
4+
5+
- Run `make lint` at the end of any code changes to ensure code quality
6+
7+
## Discussion Mode
8+
9+
- **Discussion Mode**: Prefix prompt with "D:" to enter read-only discussion mode
10+
- In discussion mode: NO code updates, only read files and provide analysis/suggestions
11+
- Always start responses with "[Discussion Mode]" header when in discussion mode
12+
- Never exit discussion mode automatically - only when user uses "XD:" prefix
13+
- If user seems to want code changes, remind them to use "XD:" to exit discussion mode
14+
- **Exit Discussion**: Use "XD:" prefix to exit discussion mode and resume normal operations
15+
16+
## Project Structure
17+
18+
- Follow the existing module organization by language/tool (`node/`, `rust/`, `python/`, `common/`, `shell/`)
19+
- Place setup scripts as `setup_dev.sh` and validation scripts as `assert_setup_dev.sh`
20+
- Maintain separation between different tool ecosystems

common/update_brew.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
set -e
3+
set -ex
44

55
brew update
66
brew upgrade

node/assert_tools.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
set -e
3+
set -ex
44

55
echo "Node: $(which node)"
66
echo "NPM: $(which npm)"

node/load_nvm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
set -e
3+
set -ex
44

55
export NVM_DIR="$HOME/.nvm"
66
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

node/setup_dev.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
set -e
3+
set -ex
44

55
chmod +x "$(dirname "$0")/setup_zshrc_nvm.sh"
66
"$(dirname "$0")/setup_zshrc_nvm.sh"

node/setup_zshrc_nvm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
set -e
3+
set -ex
44

55
if ! grep -q "# >>> nvm initialize >>>" ~/.zshrc; then
66
if [ -s ~/.zshrc ] && [ "$(tail -c 1 ~/.zshrc | wc -l)" -eq 0 ]; then

node/update_node.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22

3-
set -e
3+
set -ex
44

55
chmod +x "$(dirname "$0")/load_nvm.sh"
66
source "$(dirname "$0")/load_nvm.sh"

python/clean.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex
4+
5+
rm -rf .mypy_cache/
6+
rm -rf .ruff_cache/
7+
rm -rf .coverage
8+
rm -rf coverage.xml
9+
rm -rf __pycache__/
10+
rm -rf .pytest_cache
11+
rm -rf dist
12+
find . -type d -name "__pycache__" -exec rm -rf {} +
13+
find . -type f -name "*.pyc" -delete

python/clean_all.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex
4+
5+
chmod +x "$(dirname "$0")/clean.sh"
6+
"$(dirname "$0")/clean.sh"
7+
8+
chmod +x "$(dirname "$0")/clean_venv.sh"
9+
"$(dirname "$0")/clean_venv.sh"
10+
11+
chmod +x "$(dirname "$0")/../common/clean_cache_env.sh"
12+
"$(dirname "$0")/../common/clean_cache_env.sh"

python/clean_venv.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex
4+
5+
rm -rf .venv/

0 commit comments

Comments
 (0)